Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GpsToAbsolute ¶
GpsToAbsolute converts the x (longitude) and y (latitude) values of gps coordinates to absolute values to be used on a grid that starts with 0,0 in the bottom-right corner, and ends with xMax,yMax in the top-right corner.
Types ¶
type InMemGeoStore ¶
type InMemGeoStore struct { Root *QuadTree // contains filtered or unexported fields }
func NewGeoStoreInMem ¶
func NewGeoStoreInMem(root *QuadTree) *InMemGeoStore
func (*InMemGeoStore) Find ¶
func (g *InMemGeoStore) Find(lat, long float64) uint64
func (*InMemGeoStore) FindNearest ¶
func (g *InMemGeoStore) FindNearest( lat, long, maxDistance float64, limit int, ) []uint64
Find will return a slice of nodes that are nearest to the provided lat/long coordinates. Currently, we are just going to return the nodes in the same quadrant in which this node would otherwise be inserted and will leave implementing max distance and limit for later.
func (*InMemGeoStore) Insert ¶
func (g *InMemGeoStore) Insert(node *Node)
func (*InMemGeoStore) Shutdown ¶
func (g *InMemGeoStore) Shutdown() error
type QuadTree ¶
Click to show internal directories.
Click to hide internal directories.