[geos-commits] r4081 - trunk/src/geom/prep

svn_geos at osgeo.org svn_geos at osgeo.org
Wed Aug 12 11:55:04 PDT 2015


Author: pramsey
Date: 2015-08-12 11:55:04 -0700 (Wed, 12 Aug 2015)
New Revision: 4081

Modified:
   trunk/src/geom/prep/PreparedPoint.cpp
Log:
Fix corner case of comparing preparedpoint to point


Modified: trunk/src/geom/prep/PreparedPoint.cpp
===================================================================
--- trunk/src/geom/prep/PreparedPoint.cpp	2015-08-12 16:57:25 UTC (rev 4080)
+++ trunk/src/geom/prep/PreparedPoint.cpp	2015-08-12 18:55:04 UTC (rev 4081)
@@ -18,6 +18,7 @@
 
 
 #include <geos/geom/prep/PreparedPoint.h>
+#include <geos/geom/Point.h>
 
 namespace geos {
 namespace geom { // geos.geom
@@ -28,6 +29,10 @@
 {
 	if (! envelopesIntersect( g)) return false;
 
+	const Point *pt_geom = dynamic_cast<const Point *>(g);
+	if (pt_geom) 
+        return getGeometry().equals(g);
+
 	// This avoids computing topology for the test geometry
 	return isAnyTargetComponentInTest( g);
 }



More information about the geos-commits mailing list