Open eklem opened 4 years ago
Test this library? https://github.com/chrisveness/latlon-geohash
The geohash approach doesn't work since the hashes isn't sortable on distance from a point. But maybe Euclidean Distance could be worth a look? Then it would only function as a sorting algorithm since the calculation is done in real time.
Use case - exploratory type search:
https://github.com/zeke/euclidean-distance https://en.wikipedia.org/wiki/Euclidean_distance
Test with different sets of longtitude and latitude.
Creating a geo-search-helper
library to make it easy to set up geographical search and exploration based on documents with only longtitude and latitude data.
And actually, geohash can be used in combination with Euclidean distance. You could search for stuff close to a point with the matcher.
Search based on your position and position on search results
Using geohash: http://geohash.org/site/tips.html