[geos-devel] [GEOS] #731: GEOSEqualsExact returns False where GEOSEquals returns True

GEOS geos-trac at osgeo.org
Thu Jul 9 01:23:41 PDT 2015


#731: GEOSEqualsExact returns False where GEOSEquals returns True
------------------------+--------------------------
 Reporter:  mwtoews     |      Owner:  geos-devel@…
     Type:  defect      |     Status:  new
 Priority:  minor       |  Milestone:  3.4.3
Component:  Default     |    Version:  3.4.2
 Severity:  Unassigned  |   Keywords:
------------------------+--------------------------
 For example using Shapely with GEOS 3.4.2-CAPI-1.8.2 r3921,
 {{{
 from shapely.wkt import loads
 A = loads('LINESTRING (20 20, 20 100, 100 20, 20 20)')
 B = loads('MULTILINESTRING ((20 20, 20 100, 60 60), (60 60, 100 20, 20
 20))')
 A.almost_equals(B)  # False
 A.disjoint(B) # False
 A.equals(B)  # True
 A.relate(B)  # 1FFFFFFF2
 }}}
 Note that Shapely calls GEOSEqualsExact using the method named
 almost_equals. Both almost_equals and equals should be True, but only
 almost_equals is False.

 And for a test case with precision issues, where GEOSEqualsExact should
 ideally return True is as follows:
 {{{
 A = loads('LINESTRING (20 20, 20 150, 100 20, 20 20)')
 B = loads('MULTILINESTRING ((20 20, 20 150, 69.52380952380952
 69.52380952380952), (69.52380952380952 69.52380952380952, 100 20, 20
 20))')
 A.almost_equals(B)  # False
 A.disjoint(B)  # False
 A.equals(B)  # False
 A.relate(B)  # 1F1FFF1F2
 }}}

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