[GRASS-user] generalize polygons including holes

Markus Metz markus.metz.giswork at gmail.com
Thu Feb 5 01:06:42 PST 2015


On Thu, Feb 5, 2015 at 9:36 AM, Moritz Lennert
<mlennert at club.worldonline.be> wrote:
> [Please keep conversations on the list]
>
> On 04/02/15 16:12, Robert Nuske wrote:
>>
>> Hi Moritz
>>
>>>> is there a way to generalize polygons including their holes?
>>>> I am not too worried about topology, there are only polygons of one
>>>> class
>>>> in the dataset.
>>>>
>>>>
>>>> I tried the following
>>>> v.generalize in=m3 out=m5 type=area method=douglas threshold=5000
>>>>
>>>> which simplified the "outer boundaries" okay but did not touch the
>>>> "inner
>>>> boundaries"/ holes of the polygon.
>>>>
>>>>
>>>> Outer boundaries are on the left side in the picture and holes on the
>>>> right
>>>> http://i.imgur.com/hHKr15m.png
>>>
>>>
>>> It looks like the red boundaries are the generalized version of the
>>> original blue ones. Is that correct ? Are you sure that the original
>>> boundaries of the holes are identical to the new ones ? Could you
>>> display the result with polygon fill color set to transparent ?
>>
>>
>> That's right.
>> Original vector map is blue and simplified vector is red.
>> Both layers are 50% opaque in the following image
>> http://i.imgur.com/Rsx7Kh1.png
>
>
> I imagine you are using GRASS 6 ? I can confirm the issue there with GRASS
> 6.4.4, but it has been solved in GRASS 7. See the attached image where you
> have two holes: both have been generalized with method=douglas (black =
> original, red=lower threshold, blue=higher threshold). You can clearly see
> that generalization is also happening for the hole boundaries.

The right hole has not been generalized properly, the resultant
boundary intersects with itself. This has been fixed in GRASS 7
recently. Do you get the same result with recent GRASS 7.1?

v.generalize does not distinguish between outer and inner rings, it
simply goes through all boundaries and generalizes each one.

Markus M

>
> As GRASS 7 will come out really soon, and the current release candidates are
> quite stable, I recommend you switch to GRASS 7.
>
> Moritz
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user


More information about the grass-user mailing list