README
¶
RawGeo
Building block for building geospatial indexes using geohashes.
Features
- Use the Geohash algorithm to index and search data.
- Index (
lat
,lng
,ID
) data in a kv file. - Find nearest neighbors from
lag
,lng
within a givenradius
sorted by distance. - Don't designed to store data (should be handled by another component).
Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Point ¶
type Point struct { ID string Geohash string // These fields are computed query time and will be ignored when indexing Distance float64 Lat, Lng float64 }
func NewPointFromGeohash ¶
func (*Point) DistanceFrom ¶
Implements the equirectangular approximation from www.movable-type.co.uk/scripts/latlong.html (Pythagoras’ theorem on an equirectangular projection)
Returns the approximate distance in meters
type RawGeo ¶
type RawGeo struct {
// contains filtered or unexported fields
}