News for hackers. Stuff that matters.
Re:Phoenix 1.7.0 Released: Built-In Tailwind, Verified Route... by peoplefromibiza on Monday March 06, 2023 @03:12AM (#35038619)
simple solution: store the geohashes and compare prefixes, each prefix length is equivalent to a distance.

https://en.wikipedia.org/wiki/Geohash#Digits_and_precision_i...

you can use this pure Elixir library

https://hex.pm/packages/geohash

or this NIF that wraps a much faster C library

https://hex.pm/packages/geohash_nif

or use one of the many geo libraries, like this one

https://github.com/yltsrc/geocalc

There are no comments on this comment yet.