[GRASS-user] Merge polygone with same attribut of a shapefile

Moritz Lennert mlennert at club.worldonline.be
Fri May 17 00:23:29 PDT 2013


On 16/05/13 14:10, BLANDENIER Lucien wrote:
> Dear all,
>
> I'm trying to merge all polygones with the same attribut of a shapefile. I saw it is possible to merge adjacent polygone with r.dissolve but I didn't found how to do this with polygones that are not adjacent. Is there a way to do this?
>
> My goal is to minimise the number of feature into my table in order to have only one feature by category, but containing several polygones.

If your common attribute is of type integer or string, it's actually 
quite simple:

v.reclass YourMap output=NewMap col=CommonAttributeColumn

then

v.to.db or v.rast.stats will give you aggregate values per category, 
i.e. across all polygons that share the same attribute.

Moritz


More information about the grass-user mailing list