[SCM] PostGIS branch stable-3.4 updated. 3.4.3-13-g8c26a6ed5

git at osgeo.org git at osgeo.org
Mon Oct 21 13:13:27 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.4 has been updated
       via  8c26a6ed5b437ea59aece948b5de9993eddbc83d (commit)
      from  c9ec904ae657591d7fc65d1181a5df3f113542c2 (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 8c26a6ed5b437ea59aece948b5de9993eddbc83d
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 5bc1e55c2..66d7b91e9 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,10 @@ PostGIS 3.4.4dev
 
   - #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.4.3
 2024/09/04
@@ -202,6 +206,7 @@ There are 2 new ./configure switches:
    (postgis, postgis_restore, shp2pgsql, raster2pgsql, pgsql2shp,
    pgtopo_import, pgtopo_export)
 
+<<<<<<< HEAD
 PostGIS 3.3.0
 2022/08/26
 
diff --git a/postgis/lwgeom_functions_basic.c b/postgis/lwgeom_functions_basic.c
index 0be7433ca..b00a71d6a 100644
--- a/postgis/lwgeom_functions_basic.c
+++ b/postgis/lwgeom_functions_basic.c
@@ -2179,9 +2179,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                             | 5 +++++
 postgis/lwgeom_functions_basic.c | 4 +++-
 regress/core/regress_expected    | 2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list