Answer the question
In order to leave comments, you need to log in
Find nearest point in coordinate system?
There is a table in the database with coordinates in the format 55.888755,37.430337 and the given coordinates themselves in the same format. How to find nearest coordinates to given coordinates? The algorithm itself is interesting, not the code of course =)
Answer the question
In order to leave comments, you need to log in
1) We take an array with points
2) We take a given point
3) Find the distance between points
4) ???
5) Profit!!1
PS
By reference, the formula for the coordinates on the plane. If necessary, taking into account the curvature of the earth -> google.
I will write the algorithm "on the forehead".
Walk through each point in the database - find the distance between two points (between a given point and a point in the database);
Among these values, find the minimum.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question