[GRASS-user] many polys / 1 cat

Nikos Alexandris nikos.alexandris at felis.uni-freiburg.de
Mon Jan 26 14:02:47 EST 2009


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



More information about the grass-user mailing list