[GRASS-user] Recategorize Multi-Part Vector Layer?

Nemo bokkenka at yahoo.com
Thu Apr 9 09:19:37 EDT 2009


I work for a county forest in n'rn Wisconsin.  The forest is about 200,000 acres.  It is divided into management blocks called compartments, averaging about 700 acres each.  The comps are then divided into their component stands, based on timber type, size, density, age, etc.

I have the forest in a personal geodatabase in ArcView 9.x.  To help distribute the data to the other foresters, I output the vector data to a shapefile and add the table data to it, so all the data is in one table.

AV doesn't support topology (and can really mess up boundaries betweeen adjoining polygons), so before joining the table data, I import the shapefile into GRASS to clean it up.  While the stands is in GRASS, I dissolve the stands to the comp number to make a comps layer.  I have GRASS compute the acreage of both layers, and then export to shapefiles.

I have a short script that does it all for me, but have one small problem...  A handful of the comps are multi-part polygons.  GRASS calculates the acreage based on the cat number, and the cat number equals the comp number after the dissolve.  When it exports the shapefile, each polygon gets the total acreage of the comp.

For example, comp 100 is made up of two polygons; one is 100 acres and the other is 400 acres.  In the shapefile, each polygon is 500 acres.

How do I recategorize the comps layer so that it doesn't double-count the multi-part polygons?  I've tried a number of combinations with v.category, v.reclass, and v.db.*, but haven't found the right one.

Thanks,

Nemo


More information about the grass-user mailing list