let's say that I have:
- M - Main point - given by coordinates (lat, long)
- C - Collection of points - also given by coordinates (lat, long)
- R - Radius - maximum search distance
I'm trying to find all points that are within a radius from main point (neighbors).
algorithm(main_point, collection_of_points, radius) --> neighbors
Obvious solution is to calculate distances and select those points, where distance is equal or smaller than R, but I believe there are better options with better performance.
Do you know any possible solutions? I'm open for every idea (not only the best one).
I should add that I'm looking for solution where points are strongly dynamic (every point is mobile phone or car). I'd like to update point when it's neccessary (it has been moved) so frequency of updates depends on amount of connected devices (so as queries). Let's say that server will get update request every 5 second and query request every 20 second.