[OSM-dev] Question about Calculating Radius from GPS cord
R.E.Wolff at BitWizard.nl
Fri Aug 8 16:44:11 BST 2008
On Fri, Aug 08, 2008 at 04:02:10PM +0100, David Earl wrote:
> 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? :)
A degree longitude is about 40000km / 360 * cos (lat).
A degree lattitude is about 40000km / 360.
So 5 miles would be in longitude:
5 / (40000 / 1.609 / 360 * cos (lat))
5 / (40000 / 1.609 / 360)
lattidude. This comes to about 0.0725, 0.0725/cos(lat) degrees for
5 miles (lat, lon).
This defines an almost-square where the circle would be almost
This especially doesn't work near the poles.
** R.E.Wolff at BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement.
Does it sit on the couch all day? Is it unemployed? Please be specific!
Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ
More information about the dev