[GRASS-user] Extraction of outlets from r.stream.extract vector
Markus Metz
markus.metz.giswork at googlemail.com
Mon Aug 8 02:40:23 EDT 2011
On Sun, Aug 7, 2011 at 5:44 PM, Jarek Jasiewicz
<jarek.jasiewicz at gmail.com> wrote:
> Layer 2 means addational attribute table
> To automate basin analysis r.stream.basins allow to use stream id to find
> outlet coordinates see documentation for details
Layer 2 does *not* mean an additional attribute table, that is a
common misunderstanding. The stream vector produced by
r.stream.extract has categories in layer 2 as described in the manual,
but no attribute table for layer 2, only an attribute table for layer
1.
You can add an attribute table to layer 2 with (replacing
"mystreamvect" with the actual vector map name)
STREAM_VECT="mystreamvect"
v,db.addtable map=$STREAM_VECT layer=2 columns="cat integer,label varchar(20)"
v.to.db map=$STREAM_VECT layer=2 type=point option=cat column=cat
v.db.update map=$STREAM_VECT layer=2 column=label where="cat = 0" value='start'
v.db.update map=$STREAM_VECT layer=2 column=label where="cat = 1"
value='intermediate'
v.db.update map=$STREAM_VECT layer=2 column=label where="cat = 2" value='outlet'
HTH,
Markus M
>
> On Aug 7, 2011 7:14 AM, "Rosca Bogdan" <roscao at gmail.com> wrote:
>> Hi. I have tried to extract the outlets from stream vector obtained with
>> r.stream.extract but I cannot find layer 2. In the plugin description it
>> says that layer 2 contain the categories that I looking for. Please help,
>> I
>> need these outlets (or better the coordinates) in order to write a shell
>> script for automatic analyses of some basins.
>> Bogdan Rosca
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>
More information about the grass-user
mailing list