I have stored in db a circle areas represented by center point (lat,lon) and radius of the circle. The fields: id, lat, lon, point, radius Now I have a some other point on the map.
My goal is to find in which areas this point exists. Already have a function for searching all points in specified area, but now I need a little different behave and find all areas contain specified point.
How will look a query which will work as mentioned?
I have done research and found that in mysql 5.7 there is more spatial functions. One that comes with upgrade is SST_Distance_Sphere which worked for me! So decided to make upgrade on my server and use this SQL: