From b5361ef1fdb53a8c7d2386a655af8c1cbe5bb50c Mon Sep 17 00:00:00 2001 From: Joakim Fors Date: Fri, 13 Dec 2019 15:43:08 +0100 Subject: [PATCH] mapnik: add support for encoding in shape --- builder/mapnik/serialize.go | 1 + mml/datasource.go | 1 + mml/mml.go | 1 + 3 files changed, 3 insertions(+) diff --git a/builder/mapnik/serialize.go b/builder/mapnik/serialize.go index 75e8f5e..1c3ed95 100644 --- a/builder/mapnik/serialize.go +++ b/builder/mapnik/serialize.go @@ -169,6 +169,7 @@ func (m *Map) newDatasource(ds mml.Datasource, rules []mss.Rule) []Parameter { params = []Parameter{ {Name: "file", Value: fname}, {Name: "type", Value: "shape"}, + {Name: "encoding", Value: ds.Encoding}, } case mml.SQLite: fname := m.locator.SQLite(ds.Filename) diff --git a/mml/datasource.go b/mml/datasource.go index 8ec0dd9..6cb07d7 100644 --- a/mml/datasource.go +++ b/mml/datasource.go @@ -17,6 +17,7 @@ type Shapefile struct { Id string Filename string SRID string + Encoding string } type SQLite struct { diff --git a/mml/mml.go b/mml/mml.go index 093774f..80ea395 100644 --- a/mml/mml.go +++ b/mml/mml.go @@ -106,6 +106,7 @@ func newDatasource(params map[string]interface{}) (Datasource, error) { return Shapefile{ Filename: d["file"], SRID: d["srid"], + Encoding: d["encoding"], }, nil } else if d["type"] == "sqlite" { return SQLite{