forked from go-spatial/tegola
-
Notifications
You must be signed in to change notification settings - Fork 0
/
layer.go
39 lines (32 loc) · 935 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/terranodo/tegola"
// 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 soemthing other then empty string.
geomField string
// GeomType is the the type of geometry returned from the SQL
geomType tegola.Geometry
// The SRID that the data in the table is stored in. This will default to WebMercator
srid int
}
func (l Layer) Name() string {
return l.name
}
func (l Layer) GeomType() tegola.Geometry {
return l.geomType
}
func (l Layer) SRID() int {
return l.srid
}
func (l Layer) GeomFieldName() string {
return l.geomField
}
func (l Layer) IDFieldName() string {
return l.idField
}