[gdal-dev] Lat/long & distance/heading calculation

Meek, Allan (Contractor) Allan.Meek at drdc-rddc.gc.ca
Tue Jan 29 10:22:22 EST 2008


Thanks to everybody for the replies. I had actually found the formula
for distance between 

two lat-lon coordinates on this page. If only I'd scrolled down a little
bit, I'd have found this 

formula!

 

Allan

 

________________________________

From: Lennox Antoine [mailto:lxnyce at gmail.com] 
Sent: January 28, 2008 8:46 PM
To: Ray Gardener
Cc: Meek, Allan (Contractor); gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] Lat/long & distance/heading calculation

 

This might be what you're looking for :
http://www.movable-type.co.uk/scripts/latlong.html

Look for the section : Destination point given distance and bearing from
start point

-Lennox

On Jan 28, 2008 7:55 PM, Ray Gardener <rayg at daylongraphics.com> wrote:

If you can use UTM or similar coords, then

x = cos(heading) * distance + start_pos_x
y = sin(heading) * distance + start_pos_y

Assuming heading in clockwise radians with north = up.

Then you can inverse transform (x, y) from UTM to lat/lon.

Ray






-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080129/b913e033/attachment-0001.html


More information about the gdal-dev mailing list