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

Margherita Di Leo diregola at gmail.com
Wed May 20 13:31:34 EDT 2009


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
> ******************************************
>
>   


-- 
Ing. Margherita Di Leo
Ph.D. Student 
Methods and Technologies for Environmental Monitoring
Department of Environmental Engineering and Physics (DIFA)

University of Basilicata 
Campus Macchia Romana
85100 - Potenza 
Italy

Office: +39-0971205363
Fax: +39-0971205160
E-mail: dileomargherita AT gmail DOT com
Skype: dileomargherita
URL: http://www.difa.unibas.it/A_Manager_PP.do?azione=visualizzaHomePage&id=106







More information about the grass-user mailing list