Moritz,

thank you very much for your help. I understand what you mean and I'll try next 
time I have a similar problem. But in my special case now, the additional steps 
might be a little complicated. My hope was that there could be a switch or 
option to tell GRASS if I need the grouped or the single area values. For now, 
I'll calculate areas in QGIS which does not care about cats. However, thanks 
again.

Best regards, Uwe


-----Ursprüngliche Nachricht-----
Von: Moritz Lennert [mailto:mlenn...@club.worldonline.be] 
Gesendet: Mittwoch, 29. Juni 2016 17:17
An: Uwe Fischer <gisfi...@t-online.de>; grass-user@lists.osgeo.org
Betreff: Re: [GRASS-user] area calculation after dissolve

On 29/06/16 16:33, Uwe Fischer wrote:
> I have a polygon dataset which needs to be dissolved by a certain item.
> That works fine. But when I calculate the area size for the new 
> created Polygons in the next step using v.to.db, I find that the 
> system summarizes all the polygons with the same value in the dissolve 
> item, even if they are remote from each other (I mean, they do not touch).
> That might be correct if I want to handle them like a multipart 
> feature, but those are not present in GRASS as far as I know. What I 
> need is the area for each single polygon after removing the inside 
> borders, no matter what value the polygon has. How to calculate that?
>
> I found that polygons with the same dissolve item also have the same 
> cat number, which might be the reason for the common area size. But I 
> don't know how to clear that without losing the connection to the 
> database table containing the dissolve item.

You could use v.category to assign individual cat values to each polygon on a 
different layer (e.g. layer=2), add a table to layer 2 using v.db.addtable and 
then v.to.db layer=2 to fill that table.

That way you will have one layer with the original (grouped) cat values and the 
related attributes and a second layer with the new (individual) cat values and 
the related attributes. If you need to combine the two into one table, you 
could add into the layer 2 table a column for the cat in layer 1 and fill that 
using, e.g. v.distance:

v.distance from=MyPolygons from_layer=2 to=MyPolygons to_layer=1 up=cat
col=cat_lay1

Moritz

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to