comparison 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
comparison
equal deleted inserted replaced
4976:ff965141d085 4977:4bf6cde2d996
27 type ( 27 type (
28 pointSlice []float64 28 pointSlice []float64
29 lineSlice [][]float64 29 lineSlice [][]float64
30 polygonSlice [][][]float64 30 polygonSlice [][][]float64
31 ) 31 )
32
33 func newPointSlice(newProperties func() interface{}) func() (string, interface{}, interface{}) {
34 return func() (string, interface{}, interface{}) {
35 return "Point", new(pointSlice), newProperties()
36 }
37 }
32 38
33 func (ls lineSlice) asWKB() []byte { 39 func (ls lineSlice) asWKB() []byte {
34 40
35 size := 1 + 4 + 4 + len(ls)*(2*8) 41 size := 1 + 4 + 4 + len(ls)*(2*8)
36 42