[GRASS-user] azimuth of lines with v.to.db?

Richard Greenwood richard.greenwood at gmail.com
Wed Oct 17 21:56:44 EDT 2007


On 10/14/07, Carlos Guâno Grohmann <carlos.grohmann at gmail.com> wrote:
> This is almost what I need. I need the results to be in range 0-360,
> from North. So I can get a rose diagram, with petals weighted
> according to azimuth frequency or to azimuth lenght, like the
> attachment.

Here is a handy formula to get from mathematical "M" angles to
geodetic "G" angles. Mathematical angles are where 0 is the X axis and
the increase counter-clockwise, and geodetic angles begin on the Y
axis and increase clockwise. The formula is in degrees. The formula is
handy because it does it in one step without if/then conditionals.

   G = (450-M) - int( (450-M) / 360) * 360

HTH,
Rich

-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com




More information about the grass-user mailing list