[R-sig-Geo] simplify a polygon window

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Fri Oct 5 11:10:38 CEST 2012


On Fri, Oct 5, 2012 at 2:44 AM, Colin Rundel <rundel at gmail.com> wrote:
> The gSimplify function in rgeos wraps geos' implemention of the Douglas-Peucker algorithm so it should be easy to try it out for this particular problem, the topologyPreserve argument may also help (the geos documentation doesn't mention the specific implementation differences between the two algorithms but both are worth trying).
>
> One additional option is to play with gBuffer to simplify the polygon by expanding the polygon by a small amount and then shrinking by a slightly smaller amount.

 The Douglas-Peucker algorithm applied to polygon sections will still
create polygons that don't totally enclose the original polygon -
which was the original posters problem.

I wrote something on simplification using alpha-shapes and bunged it
up to RPubs:

http://rpubs.com/geospacedman/alphasimple

Barry



More information about the R-sig-Geo mailing list