Skip to content

Commit

Permalink
fix layer schema
Browse files Browse the repository at this point in the history
  • Loading branch information
hisham waleed karam committed Oct 14, 2018
1 parent 6a6c95b commit 5d488c9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion layer.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,12 @@ func (layer *GdalLayer) GetGeomtryName() (geometryName string) {
func (layer *GdalLayer) GetLayerSchema() (fields []*LayerField) {
if layer.Layer != nil {
layerDef := layer.Layer.Definition()
geomName := layer.Layer.GeometryColumn()
if len(geomName) == 0 {
geomName = "geom"
}
geomField := LayerField{
Name: layer.Layer.GeometryColumn(),
Name: geomName,
Type: layer.GetGeomtryName(),
}
fields = append(fields, &geomField)
Expand Down

0 comments on commit 5d488c9

Please sign in to comment.