[geos-commits] r2112 - trunk/source/geom

svn_geos at osgeo.org svn_geos at osgeo.org
Tue Jan 29 12:37:22 EST 2008


Author: benjubb
Date: 2008-01-29 12:37:22 -0500 (Tue, 29 Jan 2008)
New Revision: 2112

Modified:
   trunk/source/geom/Geometry.cpp
Log:
Patch to fix bug in ticket #171




Modified: trunk/source/geom/Geometry.cpp
===================================================================
--- trunk/source/geom/Geometry.cpp	2008-01-22 19:34:27 UTC (rev 2111)
+++ trunk/source/geom/Geometry.cpp	2008-01-29 17:37:22 UTC (rev 2112)
@@ -422,9 +422,10 @@
 	if (isRectangle()) {
 		return predicate::RectangleContains::contains((Polygon&)*this, *g);
 	}
-	if (g->isRectangle()) {
-		return predicate::RectangleContains::contains((const Polygon&)*g, *this);
-	}
+	// Incorrect: contains is not commutative
+	//if (g->isRectangle()) {
+	//	return predicate::RectangleContains::contains((const Polygon&)*g, *this);
+	//}
 
 	IntersectionMatrix *im=relate(g);
 	bool res=im->isContains();



More information about the geos-commits mailing list