Documentation ¶
Index ¶
- Constants
- Variables
- func AutoConfig(gpkgPath string) (map[string]interface{}, error)
- func Cleanup()
- func NewTileProvider(config dict.Dicter) (provider.Tiler, error)
- type BinaryHeader
- func (h *BinaryHeader) Envelope() []float64
- func (h *BinaryHeader) EnvelopeType() envelopeType
- func (h *BinaryHeader) IsGeometryEmpty() bool
- func (h *BinaryHeader) IsStandardGeometry() bool
- func (h *BinaryHeader) Magic() [2]byte
- func (h *BinaryHeader) SRSId() int32
- func (h *BinaryHeader) Size() int
- func (h *BinaryHeader) Version() uint8
- type ErrInvalidFilePath
- type GeomColumn
- type GeomTableDetails
- type Layer
- type Provider
Constants ¶
const ( EnvelopeTypeNone = envelopeType(0) EnvelopeTypeXY = envelopeType(1) EnvelopeTypeXYZ = envelopeType(2) EnvelopeTypeXYM = envelopeType(3) EnvelopeTypeXYZM = envelopeType(4) EnvelopeTypeInvalid = envelopeType(5) )
const ( Name = "gpkg" DefaultSRID = tegola.WebMercator DefaultIDFieldName = "fid" DefaultGeomFieldName = "geom" )
const ( ConfigKeyFilePath = "filepath" ConfigKeyLayers = "layers" ConfigKeyLayerName = "name" ConfigKeyTableName = "tablename" ConfigKeySQL = "sql" ConfigKeyGeomIDField = "id_fieldname" ConfigKeyFields = "fields" )
config keys
Variables ¶
var (
ErrMissingLayerName = errors.New("gpkg: layer is missing 'name'")
)
var Magic = [2]byte{0x47, 0x50}
Magic is the magic number encode in the header. It should be 0x4750
Functions ¶
func AutoConfig ¶ added in v0.7.0
Creates a config instance of the type NewTileProvider() requires including all available feature
tables in the gpkg at 'gpkgPath'.
Types ¶
type BinaryHeader ¶
type BinaryHeader struct {
// contains filtered or unexported fields
}
BinaryHeader is the gpkg header that accompainies every feature.
func NewBinaryHeader ¶
func NewBinaryHeader(data []byte) (*BinaryHeader, error)
NewBinaryHeader decodes the data into the BinaryHeader
func (*BinaryHeader) Envelope ¶
func (h *BinaryHeader) Envelope() []float64
Envelope is the bounding box of the feature, used for searching. If the EnvelopeType is EvelopeTypeNone, then there isn't a envelope encoded and a search without an index will need to be preformed. This is to save space.
func (*BinaryHeader) EnvelopeType ¶
func (h *BinaryHeader) EnvelopeType() envelopeType
EnvelopeType is the type of the envelope that is provided.
func (*BinaryHeader) IsGeometryEmpty ¶
func (h *BinaryHeader) IsGeometryEmpty() bool
IsGeometryEmpty tells us if the geometry should be considered empty.
func (*BinaryHeader) IsStandardGeometry ¶
func (h *BinaryHeader) IsStandardGeometry() bool
IsStandardGeometery is the geometry a core/extended geometry type, or a user defined geometry type.
func (*BinaryHeader) Magic ¶
func (h *BinaryHeader) Magic() [2]byte
Magic is the magic number encode in the header. It should be 0x4750
func (*BinaryHeader) SRSId ¶
func (h *BinaryHeader) SRSId() int32
SRSId is the SRS id of the feature.
func (*BinaryHeader) Size ¶
func (h *BinaryHeader) Size() int
Size is the size of the header in bytes.
func (*BinaryHeader) Version ¶
func (h *BinaryHeader) Version() uint8
Version is the version number encode in the header.
type ErrInvalidFilePath ¶
type ErrInvalidFilePath struct {
FilePath string
}
func (ErrInvalidFilePath) Error ¶
func (e ErrInvalidFilePath) Error() string
type GeomColumn ¶
type GeomColumn struct {
// contains filtered or unexported fields
}
type GeomTableDetails ¶
type GeomTableDetails struct {
// contains filtered or unexported fields
}