[geos-devel] Re: [GEOS] #522: Exception on overlay between valid linestrings [JTS fails too]

GEOS geos-trac at osgeo.org
Fri Mar 30 05:20:54 EDT 2012


#522: Exception on overlay between valid linestrings [JTS fails too]
------------------------+---------------------------------------------------
 Reporter:  strk        |       Owner:  geos-devel@…              
     Type:  defect      |      Status:  new                       
 Priority:  major       |   Milestone:  3.3.3                     
Component:  Default     |     Version:  3.3.2                     
 Severity:  Unassigned  |    Keywords:  jtsfail                   
------------------------+---------------------------------------------------

Comment(by strk):

 Debugging output from GEOS is interesting:

 {{{
 Trying with original input.
 Original exception: TopologyException: found non-noded intersection
 between LINESTRING (-1.1205e+06 851294, -1.1205e+06 851343) and LINESTRING
 (-1.1205e+06 851343, -1.1205e+06 851342) at -1120500.0000001257
 851343.3885007716
 Trying with Common Bits Remover (CBR)
 CBR: result (before common-bits addition) is INVALID: Self-intersection at
 or near point -1120500.0000001257 851294.29919294897
 (-1120500.0000001257285 851294.29919294896536)
 CBR: TopologyException: Result of overlay became invalid after re-addin
 common bits of operand coordinates: Self-intersection at or near point
 -1120500.0000001257 851294.29919294897 at -1120500.0000001257
 851294.29919294897
 Trying with snapping
 Computed snap tolerance: 7.8501591251697397784e-09
 Computed common bits: -1120512 849920
 SNAP: snapped geom 0 is INVALID: Self-intersection at or near point
 11.999999874271452 1422.23860077071 (11.999999874271452427
 1422.2386007707100362)
 SNAP: snapped geom 0: self-unioning
 SNAP: snapped geom 0 self-unioned is INVALID: Self-intersection at or near
 point 11.999999874271452 1422.23860077071 (11.999999874271452427
 1422.2386007707100362)
 SNAP: TopologyException: found non-noded intersection between LINESTRING
 (12 1379.82, 12 1423.39) and LINESTRING (12 1423.39, 12 1422.24) at
 11.999999874271452 1423.3885007716017
 EXCEPTION on case 1 test 1: TopologyException: found non-noded
 intersection between LINESTRING (-1.1205e+06 851294, -1.1205e+06 851343)
 and LINESTRING (-1.1205e+06 851343, -1.1205e+06 851342) at
 -1120500.0000001257 851343.3885007716
 }}}

 It basically tells us that the "Common bits removal" heuristic did succeed
 in give a result, BUT such result is invalid due to self-intersection.

 When it comes to the "Snap" heuristic snapping itself creates invalid
 results.

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


More information about the geos-devel mailing list