[GRASS-user] Calculating Azimuth of Stream Main Channel

   I need the compass direction (azimuth) of the main channels in identified
sub-basins delineated by r.basin. I've looked at the list of vector and
raster modules (both regular and add-on) without seeing one that will
provide this output.

   Is there a module that can take a basin's mainchannel map and identify the
compass direction in which it flows?

TIA,

Rich

On Wed, Nov 7, 2012 at 11:39 PM, Rich Shepard <rshepard@appl-ecosys.com> wrote:

  I need the compass direction (azimuth) of the main channels in identified
sub-basins delineated by r.basin. I've looked at the list of vector and
raster modules (both regular and add-on) without seeing one that will
provide this output.

  Is there a module that can take a basin's mainchannel map and identify the
compass direction in which it flows?

You may want to check:
http://grass.osgeo.org/gdp/html_grass64/m.cogo.html

and
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

On Wed, 7 Nov 2012, Markus Neteler wrote:

You may want to check:
http://grass.osgeo.org/gdp/html_grass64/m.cogo.html
and
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,

   Thanks very much. I did not check the m. modules and overlooked v.to.db.

Regards,

Rich

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. :slight_smile: 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

On Thu, Nov 8, 2012 at 5:34 PM, Rich Shepard <rshepard@appl-ecosys.com> wrote:
...

  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.

Yes - this is why I still think that the manual should be upgraded:

make documentation be full text searchable: use sphinx
https://trac.osgeo.org/grass/ticket/151

Markus

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.

AFAIU azimuth calculation by v.to.db depends on the vector line direction.

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Calculating-Azimuth-of-Stream-Main-Channel-tp5014672p5015340.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Sat, 10 Nov 2012, Helmut Kudrnovsky wrote:

AFAIU azimuth calculation by v.to.db depends on the vector line direction.

Helmut,

   This I assumed. The lines I used are the mainchannel maps produced by
r.basin. Given that r.basin should apply the same process to each sub-basin
it defines I did not expect one basin to be different. Shrug.

   From a practical perspective -- running one basin at a time -- it's not an
issue; at least, not for me.

Thanks,

Rich