[postgis-commits] svn - r2740 - trunk/lwgeom
postgis-commits at postgis.refractions.net
postgis-commits at postgis.refractions.net
Thu Mar 27 14:18:17 PDT 2008
Author: mcayland
Date: 2008-03-27 14:18:16 -0700 (Thu, 27 Mar 2008)
New Revision: 2740
Modified:
trunk/lwgeom/lwgeom_box2dfloat4.c
Log:
Fix bug with |>> and <<| operators - the BOX2D overabove and overbelow functions were actually wrong, causing index scans to return the wrong results. Per bug report from Tomas Karlsson.
Modified: trunk/lwgeom/lwgeom_box2dfloat4.c
===================================================================
--- trunk/lwgeom/lwgeom_box2dfloat4.c 2008-03-26 03:40:47 UTC (rev 2739)
+++ trunk/lwgeom/lwgeom_box2dfloat4.c 2008-03-27 21:18:16 UTC (rev 2740)
@@ -209,7 +209,7 @@
BOX2DFLOAT4 *box1 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(0);
BOX2DFLOAT4 *box2 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(1);
- PG_RETURN_BOOL(FPle(box1->ymin, box2->ymin));
+ PG_RETURN_BOOL(FPle(box1->ymax, box2->ymax));
}
/*
@@ -246,7 +246,7 @@
BOX2DFLOAT4 *box1 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(0);
BOX2DFLOAT4 *box2 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(1);
- PG_RETURN_BOOL(FPge(box1->ymax, box2->ymax));
+ PG_RETURN_BOOL(FPge(box1->ymin, box2->ymin));
}
/*
More information about the postgis-commits
mailing list