Answer the question
In order to leave comments, you need to log in
What is the best system for finding the nearest points?
Hello. The crux of the matter is as follows. I find it difficult to choose the approach by which I will do the search for the nearest points near the point.
A little about the task:
1. There is a table with stores in the database
2. A point is given
3. It is necessary to find the nearest stores to the point.
It is advised to dig towards Google MAPS. Okay, but is it possible to do something like that there? What if there are many shops?
I am thinking about using MySQL and PHP tools, there is a Spatial index for points in the database, I have never used it, but I think to dig in this direction.
Who had experience in similar tasks? What approach can you recommend?
Answer the question
In order to leave comments, you need to log in
Spatial will only give you geometric proximity. But what if the nearest store in a straight line is 300 meters across the river, and a couple of kilometers to the bridge? According to the mind, you need to build routes through Google Maps or Yandex Maps and compare the length of the routes. Again, for a pedestrian and a motorist, the routes will be different.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question