Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
geoindex
✓ github.com/hailocab/go-geoindex
Creates an in-memory geo-index and finds nearest points.
package main
import (
"fmt"
"github.com/hailocab/go-geoindex"
)
func main() {
idx := geoindex.New(geoindex.DefaultOptions)
idx.Add("point1", 40.7128, -74.0060)
points := idx.Nearest(40.7128, -74.0060, 5, geoindex.Km)
for _, p := range points {
fmt.Println(p.Id, p.Lat, p.Lon)
}
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20160127134810-64631bfe9711latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.