spatial

package
v0.0.0-...-17277e5 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Search(req SearchRequest, resolve copydb.QueryResolve, reject copydb.QueryReject) func(copydb.Pool)

Search returns items by a coordinate and a radius.

Types

type Index

type Index struct {
	*copydb.SimplePool
	// contains filtered or unexported fields
}

Index implements Geospatial index over copydb.Pool.

func NewIndex

func NewIndex(level int, newItem func() copydb.Item) *Index

NewIndex creates the index.

type SearchRequest

type SearchRequest struct {
	Lon, Lat float64
	Radius   float64
	Limit    int
	Filter   func(copydb.Item) bool
}

SearchRequest contains parameters for nearby search.

Jump to

Keyboard shortcuts

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