[GRASS-user] split 'multi-polygons' in grass, how to?

Martin Koch m.koch at bridgis.nl
Mon Aug 12 04:29:52 PDT 2013


Dear grass mailing list readers,

I'm scripting a big project with vector data in grass using Python and the GRASS Python scripting library.

At some point I use 'dissolve' to remove a whole lot of boundaries.

In the resulting map not all centroids have identical cats. They represent areas with identical attributes, having one record with that data in the database. Effectively this gives me something like 'multi-polygons'.
For the next step in my process, I need all centroids to have unique cats, with their own attributes-record in the database. I have to 'split' the 'multi polygons' (in geometry-terms) so to say.

Anyone a good suggestion how to handle this properly? With geometry I would be able to dump the individual areas from a multi-polygon.

There are areas in my map without a centroid, representing holes which have to stay a hole. Throwing away all centroids, creating new ones and doing a v.what on the original layer is a bit buggy at times (as some areas tend to be very slender and such).

Kind regards,

Martin

p.s. Some years ago, doing something similar, I did not have this problem, and dissolve returned a fresh cat for every area, with its attributes in the database table.

_____________________________
Martin Koch

Teamleider data


[cid:F65EE6E3-D764-43A4-82AD-8ADD2B784DAA]

------------- volgend deel ------------
Een HTML-bijlage is gescrubt...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20130812/6d07dbd2/attachment-0001.html>
------------- volgend deel ------------
Een niet-tekst bijlage is gescrubt...
Naam: PastedGraphic-1.tiff
Type: image/tiff
Grootte: 39702 bytes
Omschrijving: PastedGraphic-1.tiff
URL : <http://lists.osgeo.org/pipermail/grass-user/attachments/20130812/6d07dbd2/attachment-0001.tiff>


More information about the grass-user mailing list