Go Geo Grid Search
Go Geo Grid Search,
is a Go package for performing fast K-closest queries of places on Earth.
Given an array of objects that have latitude and longitude,
a starting point and the number of desired results K,
return K objects closest to the starting point.
Unlike some other libraries,
ggsearch does not require a bounding box
or any other pre-built index of the objects being queried.
ggsearch builds its own sparse grid of the locations
and queries it in a spiral fashion starting from the query point.
ggsearch was built for speed. On a t2.micro AWS instance a Web service running ggsearch queried a data set of 40,000 places in 5 ms/request.
ggsearch is built for querying populated areas and as such querying near the poles is not going to produce the right results.
Released under the MIT license.