Documentation
¶
Index ¶
- Variables
- type GeoID
- type S2FlatIdx
- func (idx *S2FlatIdx) Covering(gd *geodata.GeoData) (s2.CellUnion, error)
- func (idx *S2FlatIdx) GeoIdsAtCell(c s2.CellID) ([]GeoID, error)
- func (idx *S2FlatIdx) GeoIdsAtCells(cells []s2.CellID) ([]GeoID, error)
- func (idx *S2FlatIdx) GeoIdsRadiusQuery(lat, lng, radius float64) ([]GeoID, error)
- func (idx *S2FlatIdx) GeoIndex(gd *geodata.GeoData, id GeoID) error
- type S2FlatTimeIdx
- func (idx *S2FlatTimeIdx) Covering(gd *geodata.GeoData) (s2.CellUnion, error)
- func (idx *S2FlatTimeIdx) GeoTimeIdsAtCell(c s2.CellID, from time.Time, to time.Time) ([]GeoID, error)
- func (idx *S2FlatTimeIdx) GeoTimeIdsAtCells(cells []s2.CellID, from time.Time, to time.Time) ([]GeoID, error)
- func (idx *S2FlatTimeIdx) GeoTimeIdsRadiusQuery(from time.Time, to time.Time, lat, lng float64, radius float64) ([]GeoID, error)
- func (idx *S2FlatTimeIdx) GeoTimeIdsRectQuery(from time.Time, to time.Time, urlat, urlng, bllat, bllng float64) ([]GeoID, error)
- func (idx *S2FlatTimeIdx) GeoTimeIndex(gd *geodata.GeoData, t time.Time, id GeoID) error
- type S2PointIdx
- func (idx *S2PointIdx) GeoIdsAtCell(c s2.CellID) ([]GeoID, error)
- func (idx *S2PointIdx) GeoIdsAtCells(cells []s2.CellID) ([]GeoID, error)
- func (idx *S2PointIdx) GeoIdsRadiusQuery(lat, lng, radius float64) ([]GeoID, error)
- func (idx *S2PointIdx) GeoIdsRectQuery(urlat, urlng, bllat, bllng float64) ([]GeoID, error)
- func (idx *S2PointIdx) GeoPointIndex(gd *geodata.GeoData, id GeoID) ([]byte, error)
- func (idx *S2PointIdx) GeoPointKey(gd *geodata.GeoData, id GeoID) ([]byte, error)
- func (idx *S2PointIdx) PointIndex(lat, lng float64, id GeoID) ([]byte, error)
- func (idx *S2PointIdx) PointKey(lat, lng float64, id GeoID) []byte
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type S2FlatIdx ¶
S2FlatIdx a flat S2 region cover index
func NewS2FlatIdx ¶
NewS2FlatIdx returns a new indexer
func (*S2FlatIdx) GeoIdsAtCell ¶
GeoIdsAtCell returns all GeoData keys contained in the cell
func (*S2FlatIdx) GeoIdsAtCells ¶
GeoIdsAtCells returns all GeoData keys contained in the cells, without duplicates
func (*S2FlatIdx) GeoIdsRadiusQuery ¶
GeoIdsRadiusQuery returns the GeoID found in the index inside radius note you should check the returned GeoData is really inside/intersects the cap
type S2FlatTimeIdx ¶
S2FlatTimeIdx a flat S2 region cover time to index points & polygons
func NewS2FlatTimeIdx ¶
func NewS2FlatTimeIdx(s store.KVStore, prefix []byte, level int) *S2FlatTimeIdx
NewS2FlatTimeIdx returns a new indexer
func (*S2FlatTimeIdx) GeoTimeIdsAtCell ¶
func (idx *S2FlatTimeIdx) GeoTimeIdsAtCell(c s2.CellID, from time.Time, to time.Time) ([]GeoID, error)
GeoTimeIdsAtCell returns all GeoData keys contained in the cell from time from to time to
func (*S2FlatTimeIdx) GeoTimeIdsAtCells ¶
func (idx *S2FlatTimeIdx) GeoTimeIdsAtCells(cells []s2.CellID, from time.Time, to time.Time) ([]GeoID, error)
GeoTimeIdsAtCells returns all GeoData keys contained in the cells within time range, without duplicates
func (*S2FlatTimeIdx) GeoTimeIdsRadiusQuery ¶
func (idx *S2FlatTimeIdx) GeoTimeIdsRadiusQuery(from time.Time, to time.Time, lat, lng float64, radius float64) ([]GeoID, error)
GeoTimeIdsRadiusQuery query over radius in meters within time range scan from future to past
func (*S2FlatTimeIdx) GeoTimeIdsRectQuery ¶
func (idx *S2FlatTimeIdx) GeoTimeIdsRectQuery(from time.Time, to time.Time, urlat, urlng, bllat, bllng float64) ([]GeoID, error)
GeoTimeIdsRectQuery query over rect ur upper right bl bottom left scan from future to past
func (*S2FlatTimeIdx) GeoTimeIndex ¶
GeoTimeIndex is indexing the data by time and geo position it's not storing GeoData itself but only the geo index of the cover id is the key referring to the GeoData stored somewhere else it's meant to index geographical points or polygon attached to a time event could be a user position or an effect zone t is the time when the event end (can be in the future)
type S2PointIdx ¶
S2PointIdx is an s2 point index
func NewS2PointIdx ¶
func NewS2PointIdx(s store.KVStore, prefix []byte) *S2PointIdx
NewS2PointIdx returns a new indexer
func (*S2PointIdx) GeoIdsAtCell ¶
func (idx *S2PointIdx) GeoIdsAtCell(c s2.CellID) ([]GeoID, error)
GeoIdsAtCell returns all GeoData keys contained in the cell
func (*S2PointIdx) GeoIdsAtCells ¶
func (idx *S2PointIdx) GeoIdsAtCells(cells []s2.CellID) ([]GeoID, error)
GeoIdsAtCells returns all GeoData keys contained in the cells, without duplicates
func (*S2PointIdx) GeoIdsRadiusQuery ¶
func (idx *S2PointIdx) GeoIdsRadiusQuery(lat, lng, radius float64) ([]GeoID, error)
GeoIdsRadiusQuery returns the GeoID found in the index inside radius
func (*S2PointIdx) GeoIdsRectQuery ¶
func (idx *S2PointIdx) GeoIdsRectQuery(urlat, urlng, bllat, bllng float64) ([]GeoID, error)
GeoIdsRectQuery query over rect ur upper right bl bottom left
func (*S2PointIdx) GeoPointIndex ¶
GeoPointIndex is geo indexing the geo data point it's not storing GeoData itself but only the geo cell l30 of the point id is the key referring to the GeoData stored somewhere else
func (*S2PointIdx) GeoPointKey ¶
GeoPointKey is returning the key generated for a geopoint + id
func (*S2PointIdx) PointIndex ¶
func (idx *S2PointIdx) PointIndex(lat, lng float64, id GeoID) ([]byte, error)
PointIndex is geo indexing a point it's not storing GeoData itself but only the geo cell l30 of the point id is the key referring to the GeoData stored somewhere else