From: Paul Ramsey Date: Mon, 6 Oct 2008 19:51:44 +0000 (+0000) Subject: Fix slight error in box shortcut logic in prepared intersects. X-Git-Tag: 1.3.4rc1~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ddffff26aa69d06fd32713ebb48daafac53d0119;p=postgis Fix slight error in box shortcut logic in prepared intersects. git-svn-id: http://svn.osgeo.org/postgis/branches/1.3@3069 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/lwgeom/lwgeom_geos_c.c b/lwgeom/lwgeom_geos_c.c index a7045d0c6..ebdb2b70f 100644 --- a/lwgeom/lwgeom_geos_c.c +++ b/lwgeom/lwgeom_geos_c.c @@ -4047,7 +4047,7 @@ Datum containsPrepared(PG_FUNCTION_ARGS) 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); } #ifdef PGIS_DEBUG @@ -4121,7 +4121,7 @@ Datum containsProperlyPrepared(PG_FUNCTION_ARGS) 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); } @@ -4187,7 +4187,7 @@ Datum coversPrepared(PG_FUNCTION_ARGS) 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); } @@ -4255,7 +4255,7 @@ Datum intersectsPrepared(PG_FUNCTION_ARGS) getbox2d_p(SERIALIZED_FORM(geom2), &box2) ) { if (( box2.xmax < box1.xmin ) || ( box2.xmin > box1.xmax ) || - ( box2.ymax < box1.ymin ) || ( box2.ymin > box2.ymax )) + ( box2.ymax < box1.ymin ) || ( box2.ymin > box1.ymax )) PG_RETURN_BOOL(FALSE); }