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

Lennox Antoine lxnyce at gmail.com
Mon Jan 28 20:45:34 EST 2008


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
>
>
> Meek, Allan (Contractor) wrote:
> > This is a bit of a long shot, but I'm hoping I might find some help
> > here.
> >
> > I have a start lat/long position, a distance, and a heading. Is there an
> > easy way (in OGR or elsewhere) to calculate the end lat/long position
> > (after travelling the given distance on the given heading)?
> >
> > I have a working formula for calculating the distance and heading
> > between two lat/long positions, but I wanted to see if I can get around
> > having to rework this to solve my problem.
> >
> > Any help would be appreciated!
> >
> > Thanks,
> > Allan
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
> >
> >
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
-Lennox
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080128/3c2c882c/attachment.html


More information about the gdal-dev mailing list