[geos-devel] Problems with BufferOp when using BufferParameters

Markus Meyer meyer at mesw.de
Wed Oct 26 06:14:59 EDT 2011

Hi everyone,

I'm using GEOS 3.3.0 on Microsoft Visual Studio 2008 (Windows 7) for 
buffering lines using BufferOp.

I would like to use the BufferParameters class to control extended 
parameters. However, it seems that I must be using the BufferOp class 
the wrong way because my parameters are never accepted. To explain this, 
I created a simple test program which offsets a rectangle.

When I do the buffering with the static function Buffer::bufferOp() the 
resulting geometry looks OK:

     // Working code
     geos::geom::Polygon* pPolygon = dynamic_cast<geos::geom::Polygon*>(
             pLineString, fOffset, 16,

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(

     geos::operation::buffer::BufferOp op(pLineString, params);
     geos::geom::Polygon* pPolygon =

 From my understanding, the results of both code snipets should be the same.

Here you can find a plot of the results in both cases:


Any help is greatly appreciated.

Best regards,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: geos_rectangle_buffer_fail.png
Type: image/png
Size: 26606 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20111026/a94bf316/geos_rectangle_buffer_fail-0001.png

More information about the geos-devel mailing list