diff pkg/imports/wkb.go @ 4977:4bf6cde2d996

Generalize WFS point import job to be able to import other geometry types, too.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 03 Mar 2020 18:05:33 +0100
parents 046a07a33b19
children 799e8248de8d
line wrap: on
line diff
--- a/pkg/imports/wkb.go	Tue Mar 03 15:33:04 2020 +0100
+++ b/pkg/imports/wkb.go	Tue Mar 03 18:05:33 2020 +0100
@@ -30,6 +30,12 @@
 	polygonSlice [][][]float64
 )
 
+func newPointSlice(newProperties func() interface{}) func() (string, interface{}, interface{}) {
+	return func() (string, interface{}, interface{}) {
+		return "Point", new(pointSlice), newProperties()
+	}
+}
+
 func (ls lineSlice) asWKB() []byte {
 
 	size := 1 + 4 + 4 + len(ls)*(2*8)