[GRASSLIST:364] Re: v.extract, n-flag

Moritz Lennert mlennert at club.worldonline.be
Thu Jun 12 04:51:22 EDT 2003


Thomas Hoffmann said:
> Hey to all,
>
> I would like to extract some features of vector map based on the
> attribute label. The online manual says that I should use the n flag.
> But when I use the following command:
>
> v.extract -n mapname tape=area out=new_mapname new=0 list=´search text´
>
> I get the error message: n is not a valid flag. But why and what can I
> do else?
> (I am using Grass Version 5.0.1 on Suse-Linux)
>

http://grass.itc.it/gdp/html_grass5/html/v.extract.html does not contain
any mention of a -n flag.

> Is there a way of reclassify a vector map based on the attribute label.
> If yes, I would reclassify the attributes by the attribute label and do
> a v.extract based on the attributes.
>

v.reclass uses the category number, not the label. But it shouldn't be too
hard to write a script to make the lables be the categoriy numbers,
provided that these labels are integers since categories cannot be text or
float.

Otherwise you could work with PostgreSQL and use
http://grass.itc.it/gdp/html_grass5/html/v.reclass.pg.html

Moritz




More information about the grass-user mailing list