[postgis-tickets] r17533 - Change handling of index search tolerance, it's already in a prior function
Paul Ramsey
pramsey at cleverelephant.ca
Fri Jun 14 09:49:54 PDT 2019
Author: pramsey
Date: 2019-06-14 09:49:54 -0700 (Fri, 14 Jun 2019)
New Revision: 17533
Modified:
trunk/liblwgeom/gserialized1.c
trunk/postgis/gserialized_gist_nd.c
Log:
Change handling of index search tolerance, it's already in a prior function
Modified: trunk/liblwgeom/gserialized1.c
===================================================================
--- trunk/liblwgeom/gserialized1.c 2019-06-14 08:55:37 UTC (rev 17532)
+++ trunk/liblwgeom/gserialized1.c 2019-06-14 16:49:54 UTC (rev 17533)
@@ -1680,13 +1680,12 @@
fbox[fbox_pos++] = gbox->ymin;
fbox[fbox_pos++] = gbox->ymax;
/* Optionally copy in higher dims */
- if (g_ndims > 2)
+ if(gserialized_has_z(g) || gserialized_is_geodetic(g))
{
fbox[fbox_pos++] = gbox->zmin;
fbox[fbox_pos++] = gbox->zmax;
}
- /* Optionally copy in higher dims */
- if (g_ndims > 3)
+ if(gserialized_has_m(g) && ! gserialized_is_geodetic(g))
{
fbox[fbox_pos++] = gbox->mmin;
fbox[fbox_pos++] = gbox->mmax;
Modified: trunk/postgis/gserialized_gist_nd.c
===================================================================
--- trunk/postgis/gserialized_gist_nd.c 2019-06-14 08:55:37 UTC (rev 17532)
+++ trunk/postgis/gserialized_gist_nd.c 2019-06-14 16:49:54 UTC (rev 17533)
@@ -620,7 +620,6 @@
gserialized_expand(GSERIALIZED *g, double distance)
{
GBOX gbox;
- float fdistance = (float)distance;
gbox_init(&gbox);
/* Get our bounding box out of the geography, return right away if
@@ -628,7 +627,7 @@
if (gserialized_get_gbox_p(g, &gbox) == LW_FAILURE)
return g;
- gbox_expand(&gbox, 1.01 * fdistance);
+ gbox_expand(&gbox, distance);
return gserialized_set_gbox(g, &gbox);
}
More information about the postgis-tickets
mailing list