[GRASS-user] generalize polygons including holes

Robert Nuske rnuske at gwdg.de
Thu Feb 5 01:00:04 PST 2015


> >>> 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.
> 
> As GRASS 7 will come out really soon, and the current release candidates
> are quite stable, I recommend you switch to GRASS 7.


Thanks a lot for testing on current and future GRASS Versions.
Will use this as reason to finally try GRASS 7 ;-)

I actually couldn't believe that it is not a user error. Seemed a very common 
requirement to treat outer and inner boundaries alike while simplifying.


cheers
  robert



More information about the grass-user mailing list