[geos-devel] [GEOS] #712: Single-sided buffer gives unexpected result

GEOS geos-trac at osgeo.org
Fri Sep 15 03:15:47 PDT 2017


#712: Single-sided buffer gives unexpected result
------------------------+---------------------------
 Reporter:  pmeems      |       Owner:  geos-devel@…
     Type:  defect      |      Status:  new
 Priority:  major       |   Milestone:  3.6.3
Component:  Default     |     Version:  3.4.2
 Severity:  Unassigned  |  Resolution:
 Keywords:              |
------------------------+---------------------------
Changes (by jrkleemann):

 * cc: jrkleemann (added)
 * priority:  minor => major


Comment:

 I have the same problem right now. I have analysed the GEOS code a bit and
 here is my conclusion so far:
 These "wings" seem to be the intended behaviour. This happens, when the
 input linestring has an inside turn with too short segments (relative to
 the angle of the turn). More specifically this happens, when the offset
 segments (the original segment offseted by distance) don't intersect.

 The wings are created by inserting the start-/endpoints of the offset
 segments into the offset curve. I will attach an image showing the
 internal curve (blue) used for building the polygon. The arrow show the
 direction of the curve. Red is the resulting Polygon.

 I tried tuning the GEOS code, so instead of the closing segments (wings)
 the intersection points of the offset segments and the original segmets
 are inserted (green circles in the image). This leaves us with the
 internal curve (blue) in the second image. In (my) theory this should
 remove the wings and leave us with the correct polygon. Instead this
 results in an
 {{{util::TopologyException}}}
 in
 {{{void DirectedEdgeStar::computeDepths(DirectedEdge *de)}}}. The method
 is called from the class {{{BufferSubgraph}}};

 I have not looked into the {{{BufferSubgraph}}} class so far. Maybe there
 is a way to workaround the crash.

 I'll upgrade the ticket to major priority. Maybe someone with a deeper
 knowledge of the algorithm can look into this.

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/712#comment:4>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).


More information about the geos-devel mailing list