[geos-devel] [GEOS] #760: Snapping leaves segments below tolerance

GEOS geos-trac at osgeo.org
Tue Dec 29 03:13:33 PST 2015

#760: Snapping leaves segments below tolerance
 Reporter:  strk        |      Owner:  geos-devel@…
     Type:  defect      |     Status:  new
 Priority:  major       |  Milestone:  3.5.1
Component:  Default     |    Version:  3.5.0
 Severity:  Unassigned  |   Keywords:
 Snapping a geometry to another should result in an output that does not
 move again on subsequent snapping to the same geometry. At least, I'd
 think such behaviour would be to be preferred, for stability.

 In the following case it takes two iterations to reach that point:

 WITH inp AS (
    0.001 as tol,
    'LINESTRING(599671.37338031 4889182.65265274,599671.369855744
     ::geometry as src,
    'LINESTRING(599671.37 4889664.32,599665.52 4889680.18,599671.37
 4889683.4,599671.37 4889781.87)'
     ::geometry as tgt
  ST_AsText(ST_Snap(src , tgt , tol)),
  ST_AsText(ST_Snap(ST_Snap(src , tgt , tol), tgt, tol)),
  ST_AsText(ST_Snap(ST_Snap(ST_Snap(src , tgt , tol), tgt, tol), tgt, tol))
 FROM inp;

Ticket URL: <https://trac.osgeo.org/geos/ticket/760>
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