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

Moritz

P.S. For posterity, try to use more explicit subject lines for your mails ;-)
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to