#1099: Polygon compareToSameClass does not account for holes --------------------------+-------------------------- Reporter: Brendan Ward | Owner: geos-devel@… Type: defect | Status: new Priority: major | Milestone: 3.9.1 Component: Default | Version: 3.9.0 Severity: Unassigned | Keywords: --------------------------+-------------------------- This function returns true even if holes are different between polygons.
Only the outer shell is compared: https://github.com/libgeos/geos/blob/3.9/src/geom/Polygon.cpp#L329-L333 This looks like it is also the same case in JTS: https://github.com/locationtech/jts/blob/jts-1.18.0/modules/core/src/main/java/org/locationtech/jts/geom/Polygon.java#L369-L396 (only the second variant compares holes) Looks like the fix here is to use a similar approach as the second function above in GEOS. Working up a PR per that approach now. -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1099> GEOS <http://trac.osgeo.org/geos> GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
_______________________________________________ geos-devel mailing list geos-devel@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/geos-devel