[geos-devel] Problems with BufferOp when using BufferParameters

Sandro Santilli strk at keybit.net
Wed Oct 26 08:12:55 EDT 2011


On Wed, Oct 26, 2011 at 12:14:59PM +0200, Markus Meyer wrote:


>     // Working code
>     geos::geom::Polygon* pPolygon = dynamic_cast<geos::geom::Polygon*>(
>         geos::operation::buffer::BufferOp::bufferOp(
>             pLineString, fOffset, 16,
>             geos::operation::buffer::BufferParameters::CAP_ROUND));
> 
> When I do the buffering by using the BufferOp and BufferParameters
> class directly, the resulted geometry looks very strange:
> 
>     // Not working code
>     geos::operation::buffer::BufferParameters params(
>         16,
>         geos::operation::buffer::BufferParameters::CAP_ROUND);
> 
>     geos::operation::buffer::BufferOp op(pLineString, params);
>     geos::geom::Polygon* pPolygon =
>         dynamic_cast<geos::geom::Polygon*>(op.getResultGeometry(fOffset));
> 
> From my understanding, the results of both code snipets should be the same.

You're right. They should.
Could you file a ticket for this on http://trac.osgeo.org/geos ?
Also try the attached patch (attach it to the ticket if it works).
Thanks !

Note: you shouldn't be using the C++ interface :)

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alias.patch
Type: text/x-diff
Size: 932 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20111026/7b07cdd3/alias.bin


More information about the geos-devel mailing list