[GRASS-dev] calculating bearing

Markus Neteler neteler at itc.it
Wed May 16 08:22:01 EDT 2007

On Wed, May 16, 2007 at 08:40:06PM +1200, Hamish wrote:
> Michael Barton wrote:
> > 
> > Is there a simple formula to calculate bearing if you have the
> > beginning xy of a line and the ending xy of the line?
> trig:  angle = atan(y/x)    [or atan2()]
> see Glynn's warnings in the archives about that going undefined at places.
> see also:
>   g.manual m.cogo
> it gets ugly with lat/lon great circle calculations as the bearing isn't
> steady. (but there are map projections that help with that)
> I've got some matlab functions for doing this if m.cogo isn't your cup
> of tea.

Would you mind to add more examples to the m.cogo page?
At least I don't really understand how to use it.


More information about the grass-dev mailing list