index

package
v0.10.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2022 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Candidate

type Candidate interface{} // mmmmmaybe?

type Index

type Index interface {
	IndexFeature(geojson.Feature) error
	Cache() cache.Cache
	Close() error
	GetIntersectsByCoord(geom.Coord, filter.Filter) (spr.StandardPlacesResults, error)
	GetCandidatesByCoord(geom.Coord) (*pip.GeoJSONFeatureCollection, error)
	GetIntersectsByPath(geom.Path, filter.Filter) ([]spr.StandardPlacesResults, error)
}

func NewSpatialiteIndex

func NewSpatialiteIndex(db *database.SQLiteDatabase, c cache.Cache) (Index, error)

type RTreeIndex

type RTreeIndex struct {
	Index
	Logger *log.WOFLogger
	// contains filtered or unexported fields
}

func NewRTreeIndex

func NewRTreeIndex(c cache.Cache) (*RTreeIndex, error)

func (*RTreeIndex) Cache

func (r *RTreeIndex) Cache() cache.Cache

func (*RTreeIndex) GetCandidatesByCoord

func (r *RTreeIndex) GetCandidatesByCoord(coord geom.Coord) (*pip.GeoJSONFeatureCollection, error)

func (*RTreeIndex) GetIntersectsByCoord

func (r *RTreeIndex) GetIntersectsByCoord(coord geom.Coord, filters filter.Filter) (spr.StandardPlacesResults, error)

func (*RTreeIndex) GetIntersectsByPath

func (r *RTreeIndex) GetIntersectsByPath(path geom.Path, filters filter.Filter) ([]spr.StandardPlacesResults, error)

func (*RTreeIndex) IndexFeature

func (r *RTreeIndex) IndexFeature(f geojson.Feature) error

type RTreeResults

type RTreeResults struct {
	spr.StandardPlacesResults `json:",omitempty"`
	Places                    []spr.StandardPlacesResult `json:"places"`
}

func (*RTreeResults) Results

func (r *RTreeResults) Results() []spr.StandardPlacesResult

type RTreeSpatialIndex

type RTreeSpatialIndex struct {
	Id string
	// contains filtered or unexported fields
}

func (RTreeSpatialIndex) Bounds

func (sp RTreeSpatialIndex) Bounds() *rtreego.Rect

func (RTreeSpatialIndex) Close

func (sp RTreeSpatialIndex) Close() error

type SpatialiteIndex

type SpatialiteIndex struct {
	Index
	Logger *log.WOFLogger
	// contains filtered or unexported fields
}

func (*SpatialiteIndex) Cache

func (i *SpatialiteIndex) Cache() cache.Cache

func (*SpatialiteIndex) Close

func (i *SpatialiteIndex) Close() error

func (*SpatialiteIndex) GetCandidatesByCoord

func (i *SpatialiteIndex) GetCandidatesByCoord(coord geom.Coord) (*pip.GeoJSONFeatureCollection, error)

func (*SpatialiteIndex) GetIntersectsByCoord

func (i *SpatialiteIndex) GetIntersectsByCoord(coord geom.Coord, f filter.Filter) (spr.StandardPlacesResults, error)

func (*SpatialiteIndex) GetIntersectsByPath

func (i *SpatialiteIndex) GetIntersectsByPath(path geom.Path, f filter.Filter) ([]spr.StandardPlacesResults, error)

func (*SpatialiteIndex) IndexFeature

func (i *SpatialiteIndex) IndexFeature(f geojson.Feature) error

type SpatialiteResults

type SpatialiteResults struct {
	spr.StandardPlacesResults `json:",omitempty"`
	Places                    []spr.StandardPlacesResult `json:"places"`
}

func (*SpatialiteResults) Results

func (r *SpatialiteResults) Results() []spr.StandardPlacesResult

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL