4 ms·
I figure you're just rounding latlons to 2 decimal places and putting people in buckets?
by Vanit 10y ago
I figure you're just rounding latlons to 2 decimal places and putting people in buckets?
- problems 10y agoLatlons will not get you meters with accuracy. You need to use Vincenty's formulae.
- theveloped 10y agoThis is indeed very similar to how initial sorting of the database is done. To improve accuracy (over performance) further sorting is done. Like mentioned the non-linearity with regard to latitude makes standard trigonometry useless. In my case I opted for the haversine formula (https://en.wikipedia.org/wiki/Haversine_formula https://en.wikipedia.org/wiki/Haversine_formula) this is pretty accurate on the small range of 1km