Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fence ¶
Fence is an s2 represented FenceStorage it contains an S2 loop and the associated metadata
func NewFenceFromStorage ¶
func NewFenceFromStorage(rs *geostore.FenceStorage) *Fence
NewFenceFromStorage returns a Fence from a FenceStorage Fence can be extended, FenceStorage is a protocol buffer instance
func (*Fence) ToGeoJSON ¶
func (f *Fence) ToGeoJSON() *geojson.FeatureCollection
ToGeoJSON transforms a Region to a valid GeoJSON
type Fences ¶
type Fences []*Fence
Fences a slice of *Fence (type used mainly to return one GeoJSON of the regions)
func (*Fences) ToGeoJSON ¶
func (f *Fences) ToGeoJSON() *geojson.FeatureCollection
ToGeoJSON transforms a set of Fences to a valid GeoJSON
type GeoFenceDB ¶
type GeoFenceDB interface { // returns a Fence by it's storage id FenceByID(loopID uint64) *Fence // returns the fence for the corresponding lat, lng coordinates StubbingQuery(lat, lng float64, opts ...QueryOptionsFunc) (Fences, error) // RectQuery perform rectangular query ur upper right bl bottom left RectQuery(urlat, urlng, bllat, bllng float64, opts ...QueryOptionsFunc) (Fences, error) // RadiusQuery is performing a radius query RadiusQuery(lat, lng, radius float64, opts ...QueryOptionsFunc) (Fences, error) // Store a Fence into the DB StoreFence(rs *geostore.FenceStorage, cover []uint64) error // Close the DB Close() error }
GeoFenceDB is the main interface to store and query your geo database
type Import ¶
type Import struct { FeatureImport bool // contains filtered or unexported fields }
func NewGeoJSONImport ¶
type QueryOptions ¶
type QueryOptions struct { // Returns all fences when multiple fences match MultipleFences bool }
queryOptions used to pass options to DB queries
type QueryOptionsFunc ¶
type QueryOptionsFunc func(*QueryOptions)
func WithMultipleFences ¶
func WithMultipleFences(mf bool) QueryOptionsFunc
WithMultipleFences enable multi fences in responses
type S2Interval ¶
S2Interval is a CellID interval conforms augmentedtree Interval interface
func (*S2Interval) HighAtDimension ¶
func (s *S2Interval) HighAtDimension(d uint64) int64
HighAtDimension returns an integer representing the higher bound at the requested dimension.
func (*S2Interval) ID ¶
func (s *S2Interval) ID() uint64
ID should be a unique ID representing this interval. This is used to identify which interval to delete from the tree if there are duplicates.
func (*S2Interval) LowAtDimension ¶
func (s *S2Interval) LowAtDimension(d uint64) int64
LowAtDimension returns an integer representing the lower bound at the requested dimension.
func (*S2Interval) OverlapsAtDimension ¶
func (s *S2Interval) OverlapsAtDimension(iv augmentedtree.Interval, d uint64) bool
OverlapsAtDimension should return a bool indicating if the provided interval overlaps this interval at the dimension requested.
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
db
|
|
Package geostore is a generated protocol buffer package.
|
Package geostore is a generated protocol buffer package. |
Package regionagogosvc is a generated protocol buffer package.
|
Package regionagogosvc is a generated protocol buffer package. |