[GRASS-user] Calculating Azimuth of Stream Main Channel [RESOLVED]

Rich Shepard rshepard at appl-ecosys.com
Thu Nov 8 08:34:48 PST 2012


On Wed, 7 Nov 2012, Markus Neteler wrote:

> http://grass.osgeo.org/gdp/html_grass64/v.to.db.html
> option=azimuth: line azimuth, calculated as angle between North
> direction and endnode direction at startnode

Markus,

   For the record this module does the job. I've not looked at the source but
from experience applying it to the mainchannel maps produced by r.basin that
'endnode' and 'startnode' appear to depend on which side of the mountain
range the basin is located.

   In this project there are 7 basins of interest, 2 on the east side of the
range and 5 on the west side. v.to.db appears to take the startnode at the
western end coordinates and calculate the azimuth to the eastern end
coordinates regardless of the line shape between the two points. This is
fine with me since valley bottoms are rarely straight unless the US Army
Corps of Engineers has worked on them. :-) So on the 5 basins draining to
the west I add 180 degrees to the reported azimuth and the result is from
headwater to mouth. What's interesting is that one east side basin was
calculate the other way, from east to west, so I need to subtract 180
degrees from this result to have the azimuth from valley head to confluence.

   Thanks for pointing this out to me. It's one of the hidden gems in GRASS
not visible from the one-line descriptions in the module list.

Much appreciated,

Rich






More information about the grass-user mailing list