comparison pkg/octree/tin.go @ 1373:84e78d2e2d95

Backend: Centralized the definition of WGS84 constant in the models package.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 27 Nov 2018 13:02:28 +0100
parents d753ce6cf588
children de09bd3b5c05
comparison
equal deleted inserted replaced
1371:5b9b8eabcd01 1373:84e78d2e2d95
21 "errors" 21 "errors"
22 "fmt" 22 "fmt"
23 "io" 23 "io"
24 "log" 24 "log"
25 "math" 25 "math"
26
27 "gemma.intevation.de/gemma/pkg/models"
26 ) 28 )
27 29
28 var ( 30 var (
29 errNoByteSlice = errors.New("Not a byte slice") 31 errNoByteSlice = errors.New("Not a byte slice")
30 errTooLessPoints = errors.New("Too less points") 32 errTooLessPoints = errors.New("Too less points")
31 ) 33 )
32
33 const wgs84 = 4326
34 34
35 type Tin struct { 35 type Tin struct {
36 EPSG uint32 36 EPSG uint32
37 Vertices []Vertex 37 Vertices []Vertex
38 Triangles [][]int32 38 Triangles [][]int32
168 168
169 log.Printf("bbox: [[%f, %f], [%f, %f]]\n", 169 log.Printf("bbox: [[%f, %f], [%f, %f]]\n",
170 min.X, min.Y, max.X, max.Y) 170 min.X, min.Y, max.X, max.Y)
171 171
172 *t = Tin{ 172 *t = Tin{
173 EPSG: wgs84, 173 EPSG: models.WGS84,
174 Vertices: vertices, 174 Vertices: vertices,
175 Triangles: triangles, 175 Triangles: triangles,
176 Min: min, 176 Min: min,
177 Max: max, 177 Max: max,
178 } 178 }