[geos-devel] Buffer extends beyond flat end caps

Mike Toews mwtoews at gmail.com
Wed Oct 10 18:18:35 PDT 2012


Hi,

I'm not entirely sure if this is a bug or expected behaviour. I'm
attempting to buffer a LineString with a flat cap style or with a
single-sided buffer, except that the buffer can extend beyond the end
cap. Consider input WKT:

LINESTRING(33.193 54.345, 33.148 54.362, 30.646 55.565, 29.949 56.163,
29.351 56.676)

When buffered with a flat cap style, or only on the right side with
distances 5 to 10, the shape looks irregular. The result shows an
indent of the flat cap on the right side, but not a complete trim of
the buffer. It's difficult to describe, so take a look at screenshots
from JTS TestBuilder with the 5 and 10 buffers.

I've tried this with JTS 1.12 and with Shapely 1.2.14 (GEOS C API
1.6.2), which all have the same result.

-Mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JTS TestBuilder_2012-10-11_14-12-26.png
Type: image/png
Size: 35223 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20121011/57599b1c/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JTS TestBuilder_2012-10-11_14-13-08.png
Type: image/png
Size: 43351 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20121011/57599b1c/attachment-0003.png>


More information about the geos-devel mailing list