Querying a perimeter around a Geocode-Location (Lat/Lon)
- by Tim
Hi,
how can I search for geo-objects in a certain perimeter ? E.g. I have several objects with Lat/Lon coordinates stored in my DB. Now I want to retrieve all the objects which lie in a specific perimeter (10 miles or 20 miles) around a given point.
I guess what I would have to do is to form some query like:
SELECT * FROM objects o where o.lat < (myPositionLat+x) AND o.lon < (myPositionLon+y)
Is this right? How do I determine/set the values for x and y?