I'm doing some compare of prices in same location based on GPS coordinates. So e.g. I've got an item with coordinates:
lat: 45.815005
lng: 15.978501
I want to search in my MySQL database for each items which are e.g. 500 meters around that place. (it doesn't need to be circle, just 500 meters on X
and 500 meters on Y
both ways). Lat
and lng
are stored as a separate columns type float(10,6)
in my DB
I am aware of the fact it's not easy to calculate exact lng and lat but I'm fine if I miss few meters each site.
This is pretty complex question but I would be thankful for any advise which will kickoff my start.