[geos-commits] r4132 - branches/3.4/src/geom/prep

svn_geos at osgeo.org svn_geos at osgeo.org
Mon Dec 14 09:25:26 PST 2015


Author: strk
Date: 2015-12-14 09:25:26 -0800 (Mon, 14 Dec 2015)
New Revision: 4132

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

Modified: branches/3.4/src/geom/prep/PreparedPoint.cpp
===================================================================
--- branches/3.4/src/geom/prep/PreparedPoint.cpp	2015-12-14 17:20:49 UTC (rev 4131)
+++ branches/3.4/src/geom/prep/PreparedPoint.cpp	2015-12-14 17:25:26 UTC (rev 4132)
@@ -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