[SCM] PostGIS branch stable-3.3 updated. 3.3.7-9-g496db9d19
git at osgeo.org
git at osgeo.org
Mon Oct 21 13:15:28 PDT 2024
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, stable-3.3 has been updated
via 496db9d19e74923b78bb597f26b82ca75b701f71 (commit)
from b825f7f167e46da6261ff63ba3b917f95d52ccdb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 496db9d19e74923b78bb597f26b82ca75b701f71
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Mon Oct 21 11:48:27 2024 -0700
ST_TileEnvelope with margin is not clipped fully to WM extent, references #5799
diff --git a/NEWS b/NEWS
index 00acdff96..8cdf2cd94 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,10 @@ PostGIS 3.3.8dev
- #5782, Improve robustness of min distance calculation (Sandro Santilli)
+* Breaking Changes *
+
+ - #5799, make ST_TileEnvelope clips envelopes to tile plane extent (Paul Ramsey)
+
PostGIS 3.3.7
2024-09-05
diff --git a/postgis/lwgeom_functions_basic.c b/postgis/lwgeom_functions_basic.c
index 1a872aa94..c512315b9 100644
--- a/postgis/lwgeom_functions_basic.c
+++ b/postgis/lwgeom_functions_basic.c
@@ -2176,9 +2176,11 @@ Datum ST_TileEnvelope(PG_FUNCTION_ARGS)
y1 = bbox.ymax - tileGeoSizeY * (y + 1 + margin);
y2 = bbox.ymax - tileGeoSizeY * (y - margin);
- /* Clip y-axis to the given bounds */
+ /* Clip the final tile bounds to the bounds of the tile plane */
if (y1 < bbox.ymin) y1 = bbox.ymin;
if (y2 > bbox.ymax) y2 = bbox.ymax;
+ if (x1 < bbox.xmin) x1 = bbox.xmin;
+ if (x2 > bbox.xmax) x2 = bbox.xmax;
PG_RETURN_POINTER(
geometry_serialize(
diff --git a/regress/core/regress_expected b/regress/core/regress_expected
index bd34c236a..42a03aaaf 100644
--- a/regress/core/regress_expected
+++ b/regress/core/regress_expected
@@ -204,7 +204,7 @@ ERROR: ST_TileEnvelope: Invalid tile y value, 1
234|POLYGON((-100 87.5,-100 100,-87.5 100,-87.5 87.5,-100 87.5))
235|POLYGON((0 -12.5,0 0,25 0,25 -12.5,0 -12.5))
236|POLYGON((-20037508.34 -20037508.34,-20037508.34 20037508.34,20037508.34 20037508.34,20037508.34 -20037508.34,-20037508.34 -20037508.34))
-237|POLYGON((-22041259.18 -2003750.83,-22041259.18 20037508.34,2003750.83 20037508.34,2003750.83 -2003750.83,-22041259.18 -2003750.83))
+237|POLYGON((-20037508.34 -2003750.83,-20037508.34 20037508.34,2003750.83 20037508.34,2003750.83 -2003750.83,-20037508.34 -2003750.83))
238|POLYGON((-15028131.26 -20037508.34,-15028131.26 -5009377.09,5009377.09 -5009377.09,5009377.09 -20037508.34,-15028131.26 -20037508.34))
239|POLYGON((0 0,0 0,0 0,0 0,0 0))
ERROR: ST_TileEnvelope: Margin must not be less than -50%, margin=-0.510000
-----------------------------------------------------------------------
Summary of changes:
NEWS | 4 ++++
postgis/lwgeom_functions_basic.c | 4 +++-
regress/core/regress_expected | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list