Mercurial > gemma
changeset 1683:509e8728e846
Fixed pre-calculated size of 2D WKB line strings.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 27 Dec 2018 22:49:35 +0100 |
parents | 3c99d599503a |
children | b20b68adfe80 |
files | pkg/imports/wx.go pkg/models/cross.go |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pkg/imports/wx.go Thu Dec 27 22:23:32 2018 +0100 +++ b/pkg/imports/wx.go Thu Dec 27 22:49:35 2018 +0100 @@ -81,7 +81,7 @@ func (l line) asWKB() []byte { - size := 1 + 4 + 4 + len(l)*(1+4+2*8) + size := 1 + 4 + 4 + len(l)*(2*8) buf := bytes.NewBuffer(make([]byte, 0, size)) @@ -194,6 +194,8 @@ return nil } + feedback.Info("Using EPSG: %d", epsg) + for _, feature := range rfc.Features { if feature.Properties == nil || feature.Geometry.Coordinates == nil { missingProperties++
--- a/pkg/models/cross.go Thu Dec 27 22:23:32 2018 +0100 +++ b/pkg/models/cross.go Thu Dec 27 22:49:35 2018 +0100 @@ -155,7 +155,7 @@ func (lc GeoJSONLineCoordinates) AsWKB() []byte { - size := 1 + 4 + 4 + len(lc)*(1+4+2*8) + size := 1 + 4 + 4 + len(lc)*(2*8) buf := bytes.NewBuffer(make([]byte, 0, size))