[postgis-commits] svn - r3075 - trunk/lwgeom

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Tue Oct 7 21:25:42 PDT 2008


Author: pramsey
Date: 2008-10-07 21:25:40 -0700 (Tue, 07 Oct 2008)
New Revision: 3075

Modified:
   trunk/lwgeom/lwgeom_geos_c.c
Log:
Fix minor logic error in intersects() bbox shortcut.


Modified: trunk/lwgeom/lwgeom_geos_c.c
===================================================================
--- trunk/lwgeom/lwgeom_geos_c.c	2008-10-07 23:51:14 UTC (rev 3074)
+++ trunk/lwgeom/lwgeom_geos_c.c	2008-10-08 04:25:40 UTC (rev 3075)
@@ -1424,7 +1424,7 @@
 	                getbox2d_p(SERIALIZED_FORM(geom2), &box2) )
 	{
 		if ( ( box2.xmin < box1.xmin ) || ( box2.xmax > box1.xmax ) ||
-		                ( box2.ymin < box1.ymin ) || ( box2.ymax > box1.ymax ) )
+		     ( box2.ymin < box1.ymin ) || ( box2.ymax > box1.ymax ) )
 		{
 			PG_RETURN_BOOL(FALSE);
 		}
@@ -2083,7 +2083,7 @@
 		if ( box2.xmax < box1.xmin ) PG_RETURN_BOOL(FALSE);
 		if ( box2.xmin > box1.xmax ) PG_RETURN_BOOL(FALSE);
 		if ( box2.ymax < box1.ymin ) PG_RETURN_BOOL(FALSE);
-		if ( box2.ymin > box2.ymax ) PG_RETURN_BOOL(FALSE);
+		if ( box2.ymin > box1.ymax ) PG_RETURN_BOOL(FALSE);
 	}
 
 	/*



More information about the postgis-commits mailing list