[R-sig-Geo] How to buffer a polygon by area

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Wed May 28 18:18:08 CEST 2014


On Wed, May 28, 2014 at 3:36 PM, ONKELINX, Thierry
<Thierry.ONKELINX at inbo.be> wrote:

>     while(abs(achieved.precision) > precision & steps < maxsteps){
>       buffered.perimeter <- gLength(buffered.spgeom)
>       buffer.width <- buffer.width - achieved.precision * spgeom.area /
> buffered.perimeter
>       buffered.spgeom <- gBuffer(spgeom, width = buffer.width)
>       achieved.precision <- gArea(buffered.spgeom) / spgeom.area - ratio
>       steps <- steps + 1
>     }

Is this guaranteed to converge? Could there be some polygon for which
the buffer width updating step bounces between two values like the
bistable state of an iterated function? Could a concave polygon have a
smaller perimeter for a larger buffer size? I think yes, but I'm not
sure if that would cause this method to not converge anyway...

My binary search is guaranteed to converge since buffer area is
strictly increasing with increasing buffer width...

Barry



More information about the R-sig-Geo mailing list