Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapnik: add support for encoding in shape #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions builder/mapnik/serialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions mml/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type Shapefile struct {
Id string
Filename string
SRID string
Encoding string
}

type SQLite struct {
Expand Down
1 change: 1 addition & 0 deletions mml/mml.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down