Well, here is where I get lost. Because of the islands. The polygons of interest all have category=5 and the island have no cats. If I delete the cats and add them again, the islands will get categories.
I just tough of this: Maybe create a new column and copy the old categories there. Then delete and add all categories again and calculate the statistics. After that, all I need to do is look for the old_cat column to find the area of each polygon that is NOT AN ISLAND. Does that sound reasonable? Any better (smarter) way of doing this? I really need to understand this vector/database business better.... Cheers and thanks Daniel On Mon, Jan 26, 2009 at 5:02 PM, Nikos Alexandris <[email protected]> wrote: > On Mon, 2009-01-26 at 16:40 -0200, Daniel Victoria wrote: >> Hi all, >> >> I imported a landcover shapefile in grass and I'm interested in only >> one of the land cover class. So after importing with v.in.ogr and >> running v.clean with bpol, I extracted only the class I'm interested >> and now I want to get some statistics for each class polygon. >> >> The problem is that this shapefile is one of those "multipart" files, >> that is, only one line in the attribute column for many polygons. That >> is, all polygons have category = 5. To make things worse, there are >> islands... >> >> So, to calculate the stats for each polygon I though about removing >> the categories and adding them back again, to later use v.to.db but, >> then the island will get categories too. >> >> So, any hints as to how should I go about it? >> >> Thanks >> Daniel > > Hi Daniel. > > Isn't it possible to assign new cats to specific features? > > v.category in=A out=A.del option=del type=boundaries # or type=line > v.category in=A.del out=B option=add type=boundaries # or type=line > > Regards, Nikos > > _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
