Answer the question
In order to leave comments, you need to log in
How to calculate the nearest distance to the subway?
There are two tasks. Companies are placed on the map and you need to make blocks:
1. 5 closest companies with the output of how much distance they are from the current one
2. display the nearest metro to the company
at the entrance there is an address and lat, lon. Is it possible to somehow calculate everything with mysql? Maybe it's somehow mathematically (geometry after all) is considered?
Answer the question
In order to leave comments, you need to log in
It's possible, like this:
gis.stackexchange.com/questions/31628/find-points-...
If you had a base that fully supports geospatial functions (that is, it can project geographic coordinates into flat rectangular ones, for example) it would be easier.
If there are coordinates of the current point and the nearest metro station, then the direct path can be found using school geometry methods. If you need a path through the streets - through the maps API.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question