[GRASS-user] Add category for each centroid

Hi,

I have a vector map with several polygons each having a centroid. All
polygons have the same category:

v.db.select bb

cat|ART
1|1

Now, I want to have a category for each polygon or each centroid. With
that, I hope to be able to access each polygon separately. I tried
everything I can find the in the manual, but apparently not the correct
command....

Any idea?

Thanks a lot!
Sebastian

Sebastian wrote:

I have a vector map with several polygons each
having a centroid. All polygons have the same
category:

> v.db.select bb
cat|ART
1|1

Now, I want to have a category for each polygon
or each centroid. With that, I hope to be able to
access each polygon separately. I tried
everything I can find the in the manual, but
apparently not the correct command....

Any idea?

remove all cats, then re-apply new ones with v.category:

v.category option=del type=centroid
v.category option=add type=centroid cat=1 step=1

Hamish

On 06/11/11 11:13, Hamish wrote:

Sebastian wrote:

I have a vector map with several polygons each
having a centroid. All polygons have the same
category:

v.db.select bb

cat|ART
1|1

Now, I want to have a category for each polygon
or each centroid. With that, I hope to be able to
access each polygon separately. I tried
everything I can find the in the manual, but
apparently not the correct command....

Any idea?

remove all cats, then re-apply new ones with v.category:

v.category option=del type=centroid
v.category option=add type=centroid cat=1 step=1

Thanks for the hint!

After the commands above (and this what I missed), the categories have
to be inserted in the table:
v.to.db option=cat

Cheers
Sebastian