I canโt point you to an existing library that has better performance, but as I recall, GeoModel is open source, and the code is not difficult to understand. We found that we could improve some of the improvements by adjusting the code according to our scenario.
For example, if you donโt need the closest -n, you just need X-results from a specific bounding box or radius, maybe you can improve the speed of GeoModel, since GeoModel should currently get each record in the corresponding geohash and then sort for closest in memory. (The details of this implementation are left as an exercise for the reader.)
You might also consider setting up the number of geohash usage levels. If you have a lot of dense data and request small areas, you can significantly increase performance by saving 16 levels instead of 8 or 12.
(I donโt look at the source of GeoModel now, but I remember when I last used it a few months ago, so take it with salt and dive into the source code yourself.)
npdoty
source share