I have a shapefile with overlapping polygons. After importing I thus end up
with a vector layer with for each unique polygon (feature) one or more
category values (i.e., one to many relationship).

Now I want to create a second attribute table linked to layer 2 with a cat
column with for each polygon (for each internal feature id) an unique
category.

Next, I want to use this to count the number of categories linked to each
unique feature id.

I know this has been asked and answered before, but the solutions (copied
below) do not work for me.

This worked, I think, in GRASS 6, but it doesn't in G7 because a new vector
map needs to be defined
>* v.category op=add layer=2 type=centroid*
>* v.to.db type=centroid option=cat*

The below does not create an attribute table with unique attributes for
each unique feature.



*> v.in.ogr dsn=test_polygones.shp out=polygons > v.db.addtable polygons
layer=2 > v.category polygons option=add layer=2 type=centroid
out=polygons_tmp > v.to.db polygons_tmp type=centroid option=cat layer=2
col=cat*
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to