I am trying to create a x mile square (or circle) around a central point, where all sides of the square would be x miles from the centre. I need the 4 corner coordinates.
It is scrambling my brain trying to get my head round it? I can work out the distance between two points using the haversine formula but maths is seriously not my strong point and I don't understand sin,cos etc.. and trying sort this out has lost me!
I have come across Calculating Latitude/Longitude X miles from point? but I just don't get it!
Would anyone be kind enough to explain how I do this in apples and pears terms?
To explain exactly what I trying to do;
I have a website, where users can search for buildings in a specific area. They will enter a town or place (which I will know the lat long of) and they search within a specific radius of say 10 miles of the place.
I need to find the min/max lat and longs of the 10mile radius so I can query my database using a where clause similar to:
Where buildingLat <= maxLat
and buildingLat <= minLat
and buildingLong >= minLong
or buildingLong >= maxLong
I need some kind of formula!
My coordinates are in decimal degrees