0

I am given a bounding box, latitude and longitude, which are the following: Bounding box = 59.3518076,59.5915769,24.55017,24.9262831 Latitude = 59.4372155 Longitude = 24.7453688

My question is, how do i convert bounding box into radius using those 3 parameters?

Evald
  • 122
  • 10
  • There is already a question like this: [Here](http://stackoverflow.com/questions/1689096/calculating-bounding-box-a-certain-distance-away-from-a-lat-long-coordinate-in-j) –  Oct 12 '14 at 21:22
  • Sadly, they're asking for bounding box in that question. I do have one but i have no idea how to convert it back into radius :) – Evald Oct 12 '14 at 21:25
  • If you read the whole thing, you will see that he is also trying to get a radius. I would scroll down and read the top two answers. –  Oct 12 '14 at 21:27
  • i did but still i have no idea how to convert my bounding box into radius – Evald Oct 12 '14 at 21:31

1 Answers1

-1

Here's the algorithm in my opinion:

sabas
  • 743
  • 8
  • 18
  • Thank you, i will try this. I also found a way to use entire bounding box in my code but i will keep the original idea in mind – Evald Oct 13 '14 at 11:17
  • I implemented the algorithm (which gives both dimensions of the bounding box, so needs only to check only for the minimum. I used the haversine function https://github.com/sabas/sabas.github.io/blob/master/tools/bboxcalculator.html#L123 – sabas Nov 14 '14 at 15:25