[GRASS-user] easy question.

Moritz Lennert mlennert at club.worldonline.be
Thu Jun 11 12:19:53 EDT 2009

On 09/06/09 18:36, Glynn Clements wrote:
> achim wrote:
>> I have a vector layer with category numbers with very very high numbers.
>> Thats not very useful for further work. Now I want to change the cats to
>> an ascending order (1,2,3,...,n).
>> Is that possible in an easy way? Or even if there is a complicated one
>> it would be great.
> r.reclass can create a reclass map. You can generate the reclass rules
> using r.category and awk, e.g.:
> r.category oldmap | awk '{print $1,"=",NR}' | r.reclass in=oldmap out=newmap

As the OP is about vectors, here's a vector approach:

v.category option=del
v.category option=add


P.S. For posterity, try to use more explicit subject lines for your 
mails ;-)

More information about the grass-user mailing list