I have this coordinates:
lat: 45.815005 lon: 15.978501
and i have mysql table with lat and lon coordinates stored as float
what i need is to get all coordinate in 500 meters around me?
so basicly my problem is to add X meters to my coordinate location
Also: how can i separate coordinate 45.815005 (45 | 81 | 50 | 05 ???) so i can store them in mysql using indexes for quicker search?
MySQL supports a spatial extension (quoting) :
MySQL supports spatial extensions to enable the generation, storage, and analysis of geographic features.
Using those, instead of storing coordinates your own way, might help, when it comes to geographical manipulations.
来源:https://stackoverflow.com/questions/5390497/calculating-gps-coordinate-radius