[GRASS-user] problems with v.segment of longest flow path

James Maas (MED) J.Maas at uea.ac.uk
Sun May 8 14:15:45 PDT 2016


I'm working with GRASS 7.0.3 on Ubuntu Linux and attempting to create and partition a longest flow path in a catchment comprised of 25km2 basin, the original DEM is a 5 m resolution.


Most of the process appears to work well until I attempt to create segments of the vector map of the longest flow path this segment rules file.

====================

P 1 1 -10%
P 2 1 -20%
P 3 1 -30%
P 4 1 -40%
P 5 1 -50%
P 6 1 -60%
P 7 1 -70%
P 8 1 -80%
P 9 1 -90%
========================

First I use r.watershed like this to create the various raster maps,

r.watershed elevation=topmod_demfill threshold=20000 drainage=topmod_drain \
    stream=topmod_streams basin=topmod_basin convergence=5 --overwrite

Next I use r.stream.order to get the strahler numbers and then find the outlet coordinates

Next I use r.water.outlet as such to get the basin,

r.water.outlet input=topmod_drain output=topmod_basin \
      coordinates=$E_outflow,$N_outflow --overwrite

And find the longest flow path, in raster format as such

r.lfp input=topmod_drain output=topmod_lfp \
      coordinates=$E_outflow,$N_outflow --overwrite

All seems to work well up to this point.  I've found two ways to convert the raster map of the longest flow path to a vector map.  The first is using v.lfp but it truncates the lfp map, almost in half, only shows the last half in the new vector lfp.  Any ideas why it might do this?

v.lfp input=topmod_lfp output=topmod_lfpv coordinates=$E_outflow,$N_outflow \
      --verbose --overwrite

The other way is to use r.to.vect, which appears to work well, now the new vector lfp map (jamrlfp) is the same shape and length as the original raster lfp map.  However the next job is to do the segmentation using the above rules file like this,

v.segment input=jamrlfp output=outlets rules=$segment_rules \
 --overwrite --verbose

And for some reason it only creates the very first outlet (segment).

Sorry for the long missive, but I end up with two questions:


  1.  Any suggestions as to why v.lfp is not doing the conversion correctly but r.to.vect appears to do it correctly?
  2.  Any suggestions as to why v.segment is not working correctly and creating the 9 segments correctly?


Thanks,


Dr. Jim Maas
University of East Anglia

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20160508/121d7be6/attachment.html>


More information about the grass-user mailing list