[GRASS-user] Re: IN: raster-flow-direction OUT:vector-network? (achim)

Milton Cezar Ribeiro miltinho.astronauta at gmail.com
Wed May 20 20:26:06 EDT 2009


Hi there,

I don't know how to help but I believe that Achim
have, for each pixel of stream, one value like 1, 2, 4, 8, 16, 32, 64 and
128,
and each of these values can be set to only one of 8 possible directions.

Milton
brazil=toronto
2009/5/20 achim <ak7 at jupiter.uni-freiburg.de>

> Thanks for reply,
>
> but thats not exactly what I am searching for. I can not to use the
> accumulation values, because
>
>
> i) I want to figure out the watersheds on parts of the network
> (beginning from certain points of the river network to separate some
> basins on different levels; I already wrote a script to do it with the
> direction raster map, but its slow and it does not allow me to do ii)
>
> ii) I am going to do some statistics on stream lengths /accumulations on
> network parts
>
> iii) I need to separate parallel flowing streams from each other which
> does not work on my current resolution
>
>
> I start with pre-produced flow direction, accumulation...
>
> Any workaround idea or scripting tips?
>
> cheers again,
> achim
>
>
> PS: illustration on
>
> http://lists.osgeo.org/pipermail/grass-user/attachments/20090520/6198f353/rasterflow-to-network.png
>
> PPS:
> > r.mapcalc 'log_accumulation=log(abs(accumulation)+1)'
> QUESTION:
> why abs? accumulation values should be positive!?
>
> Margherita Di Leo schrieb:
>  > Hi Achim,
> >
> > i usually produce the river network starting from the flow accumulation,
> > not from the flow direction. If you have a raster elevation map you can
> > get it using r.watershed.
> > Then, i make as follows:
> >
> > r.mapcalc 'log_accumulation=log(abs(accumulation)+1)'
> >
> > r.mapcalc 'inf_river=if(log_accumulation>6)'
> >
> > 6 is a treshold value for the log_accumulation, it is a good value for
> > me but you maybe can try other values. It produces a binary map.
> >
> > Then:
> >
> > Raster -> Transform features -> Thin linear features to reduce at 1pixel
> > the lines of the binary raster inf_river and create the new file
> in_river.
> > Finally, with r.to.vect you can transform the raster in_river in a
> > vector map.
> >
> > Hope this helps
> >
> > Margherita
> >
> >> Message: 8
> >> Date: Wed, 20 May 2009 16:45:56 +0200
> >> From: achim <ak7 at jupiter.uni-freiburg.de>
> >> Subject: [GRASS-user] IN: raster-flow-direction OUT:vector-network?
> >> To: grass-user <grass-user at lists.osgeo.org>
> >> Message-ID: <4A1417A4.3040701 at jupiter.uni-freiburg.de>
> >> Content-Type: text/plain; charset="iso-8859-15"
> >>
> >> Hello,
> >>
> >> I am searching for a good idea to convert a raster-flow-direction map
> >> into a vector-network map.
> >>
> >> Probably I will have to write a script. If it is possible at all...
> >>
> >> In case of writing a script it mean to me: how to produce a line within
> >> r.mapcalc?
> >>
> >> Has anyone a hint?
> >>
> >> Cheers,
> >> achim
> >>
> >> PS:for illustration I attached a little picture
> >> -------------- next part --------------
> >> A non-text attachment was scrubbed...
> >> Name: rasterflow-to-network.png
> >> Type: image/png
> >> Size: 5162 bytes
> >> Desc: not available
> >> Url :
> >>
> http://lists.osgeo.org/pipermail/grass-user/attachments/20090520/6198f353/rasterflow-to-network.png
> >>
> >>
> >> ------------------------------
> >>
> >> _______________________________________________
> >> grass-user mailing list
> >> grass-user at lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/grass-user
> >>
> >>
> >> End of grass-user Digest, Vol 37, Issue 35
> >> ******************************************
> >>
> >>
> >
> >
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20090520/7ada1522/attachment-0001.html


More information about the grass-user mailing list