0

The f I have one pair of latitude and longitude and a radius

How can I create a box around this pair based on the radius?

Johny19
  • 5,364
  • 14
  • 61
  • 99
  • If coordinates are (x,y) and radius is r then one simple bounding box can be formed from 4 points (x - r, y - r) (x + r, y - r), (x - r, y + r), (x + r, y + r). – Shashank Feb 23 '15 at 15:09
  • Knowing that r is given in km. Is this going to work? – Johny19 Feb 23 '15 at 18:41

1 Answers1

-1

So, supposing that (latitude,longitude) is the center of your circle, the bounding box (square) that contains the circle would have its corners at the following positions:

(latitude-radius,longitude-radius)

(latitude-radius,longitude+radius)

(latitude+radius,longitude+radius)

(latitude+radius,longitude-radius)

jbernardo
  • 159
  • 7