-
-
Notifications
You must be signed in to change notification settings - Fork 192
/
layer.go
39 lines (32 loc) · 936 Bytes
/
layer.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package postgis
import "github.com/go-spatial/geom"
// layer holds information about a query.
type Layer struct {
// The Name of the layer
name string
// The SQL to use when querying PostGIS for this layer
sql string
// The ID field name, this will default to 'gid' if not set to something other then empty string.
idField string
// The Geometery field name, this will default to 'geom' if not set to something other then empty string.
geomField string
// GeomType is the the type of geometry returned from the SQL
geomType geom.Geometry
// The SRID that the data in the table is stored in. This will default to WebMercator
srid uint64
}
func (l Layer) Name() string {
return l.name
}
func (l Layer) GeomType() geom.Geometry {
return l.geomType
}
func (l Layer) SRID() uint64 {
return l.srid
}
func (l Layer) GeomFieldName() string {
return l.geomField
}
func (l Layer) IDFieldName() string {
return l.idField
}