# [OSM-dev] Question about Calculating Radius from GPS cord

David Earl david at frankieandshadow.com
Fri Aug 8 16:02:10 BST 2008

```On 08/08/2008 14:30, Fire Girl wrote:
> I am working with OSM data, and would like to be able to spec out 5 mile
> bounding boxes from certain GPS points.
>
> After research into this problem, I am to understand that each degree of
> latitude is approximately 69 miles (111 kilometers) apart with a slight
> variance (68.703 - 69.407 miles) between the equator and the poles, and
> that each degree of longitude is widest at the equator @ 69.172 miles
> (111.321 kilometers) and gradually shrinks to zero at the poles. : ) :)
>
> So what does this mean?  If I want to take a input point, like lets say,
>
> 167.9 lat
> -29.1 lon
>
> or
>
> -63.1
> 18.1
>
> Can someone say with authority, what the 'calculus' would be to
> definitivly construct a NSWE bounding box with a 5 mile radius around
> those points?.... that would be basically close enough or accurate? :)

If you want accuracy, then you are asking the wrong question, because
the "bounding box" will be a curved section of a surface of the earth
(or, rather, the approximation to it defined by the ellipsoid for the
datum you're using for the lat/lon coordinates - unless you want to
start taking altitude and terrain into account), not a flat
straight-edged box. So if you want to talk in terms of flat bounding
boxes, you have to start asking "in what projection?" etc.

If all you want is the lat/lon of the corners an approximate  box
parallel to lines of latitude and longitude approx 5 miles across, then
you could indeed just add and subtract 2.5/69ths of a degree of latitude
and 2.5/f of a degree of longitude, where f is the approx length of one
degree at that latitude, i.e. f = 69 * sin(latitude) miles (with the
reasonable approximation that the earth is a sphere, so the trigonometry
is trivial).

David

```