[postgis-tickets] [SCM] PostGIS branch stable-3.2 updated. 3.2.3-20-g730b2d494

git at osgeo.org git at osgeo.org
Fri Oct 28 16:01:30 PDT 2022


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.2 has been updated
       via  730b2d49444d94eec52c36d57822c66b6c1e89d2 (commit)
       via  cadb787b89e711c82bfd4cff5a32163c9c5d06d5 (commit)
      from  d1caeacdb6a708f7ddc86c5180942429c29a70eb (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 730b2d49444d94eec52c36d57822c66b6c1e89d2
Author: Regina Obe <lr at pcorp.us>
Date:   Fri Oct 28 19:01:23 2022 -0400

    Change berrie64 to stop on first error

diff --git a/ci/berrie64/postgis_regress.sh b/ci/berrie64/postgis_regress.sh
index 108c39a57..4b11dd61f 100644
--- a/ci/berrie64/postgis_regress.sh
+++ b/ci/berrie64/postgis_regress.sh
@@ -1,4 +1,5 @@
 #!/usr/bin/env bash
+set -e
 # Berrie64 is a 64-bit Rasberry Pi Arm managed by Bruce Rindahl
 ## BRANCH is passed in via jenkins which is set via gitea web hook
 #export BRANCH=618a67b1d6fc223dd5a4c0b02c824939f21dbd65
@@ -15,7 +16,7 @@ echo $PATH
 cd ${WORKSPACE}/PostGIS_Worker_Run/label/${label}/$BRANCH
 
 sh autogen.sh
-./configure --with-pgconfig=${PGPATH}/bin/pg_config --with-geosconfig=${GEOS_PATH}/bin/geos-config
+./configure --with-pgconfig=${PGPATH}/bin/pg_config --with-geosconfig=${GEOS_PATH}/bin/geos-config --with-library-minor-version
 #make clean
 make
 export err_status=0
@@ -23,20 +24,15 @@ make check RUNTESTFLAGS="-v"
 make install
 
 make check RUNTESTFLAGS="-v --extension"
-if [ "$?" != "0" ]; then
-	err_status=$?
-fi
+err_status=$?
 
 make garden
-if [ "$?" != "0" ]; then
-	err_status=$?
-fi
+err_status=$?
 
 utils/check_all_upgrades.sh \
     `grep '^POSTGIS_' Version.config | cut -d= -f2 | paste -sd '.'`
- if [ "$?" != "0" ]; then
-   err_status=$?
- fi
+err_status=$?
+
 
 if [ -d $PGDATA/postmaster.pid ] ; then
 	$PGCTL stop -D $PGDATA -s -m fast

commit cadb787b89e711c82bfd4cff5a32163c9c5d06d5
Author: Regina Obe <lr at pcorp.us>
Date:   Thu Oct 27 19:18:56 2022 -0400

    Fix crash in ST_SnapToGrid on Empties
    References #5241 for PostGIS 3.2.4

diff --git a/NEWS b/NEWS
index 11e950982..0be5c010a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,5 @@
 PostGIS 3.2.4
-2022/10/xx
+2022/11/xx
 
 This version requires PostgreSQL 9.6-15, GEOS 3.6 or higher, and Proj 4.9+
 Additional features are enabled if you are running GEOS 3.9+
@@ -14,6 +14,7 @@ Proj 6.1+, and PostgreSQL 14+.
   - #5255, GH598, Remove forced static linking on shp2pgsql, pgsql2shp (Maxim Kochetkov)
   - #5255, GH702, Remove forced static linking on raster2pgsql (Thomas Petazzoni)
   - #4648, Check function ownership at extension packaging time (Sandro Santilli)
+  - #5241, Crash on ST_SnapToGrid with empty multis (Regina Obe)
 
 
 PostGIS 3.2.3
diff --git a/liblwgeom/lwgeom.c b/liblwgeom/lwgeom.c
index b5d022d1c..12e64327d 100644
--- a/liblwgeom/lwgeom.c
+++ b/liblwgeom/lwgeom.c
@@ -2149,6 +2149,7 @@ void
 lwgeom_grid_in_place(LWGEOM *geom, const gridspec *grid)
 {
 	if (!geom) return;
+	if (lwgeom_is_empty(geom)) return;
 	switch ( geom->type )
 	{
 		case POINTTYPE:
diff --git a/regress/core/snaptogrid.sql b/regress/core/snaptogrid.sql
index 0b6f5bd97..ae12da4d9 100644
--- a/regress/core/snaptogrid.sql
+++ b/regress/core/snaptogrid.sql
@@ -19,3 +19,7 @@ WITH geom AS
     SELECT ST_SnapToGrid('POLYGON((0 0, 10 0, 10 10, 10.6 10, 10.5 10.5, 10 10, 0 10, 0 0))', 'POINT(0 0)', 10, 10, 10, 10) as g
 )
 Select ST_AsText(g) as geometry, postgis_getbbox(g) AS box from geom;
+
+-- #5241
+SELECT '#5241' AS t, ST_AsText(ST_SnapToGrid( ST_GeomFromText('MULTIPOLYGON (((9 9, 9 1, 1 1, 2 4, 7 7, 9 9)), EMPTY)', 4326),  20.1, 20.1, 20.1, 20.1));
+SELECT '#5241' AS t, ST_AsText(ST_SnapToGrid( ST_GeomFromText('MULTIPOLYGON (((9 9, 9 1, 1 1, 2 4, 7 7, 9 9)), EMPTY)', 4326), 0.2, 0.2, 0.2, 0.2));
diff --git a/regress/core/snaptogrid_expected b/regress/core/snaptogrid_expected
index 518c1734b..2e8f2b4ab 100644
--- a/regress/core/snaptogrid_expected
+++ b/regress/core/snaptogrid_expected
@@ -5,3 +5,5 @@ t
 t
 POLYGON((0 0,10 0,10 10,0 10,0 0))|BOX(0 0,10 10)
 POLYGON((0 0,10 0,10 10,0 10,0 0))|BOX(0 0,10 10)
+#5241|MULTIPOLYGON EMPTY
+#5241|MULTIPOLYGON(((9 9,9 1,1 1,2 4,7.000000000000001 7.000000000000001,9 9)))

-----------------------------------------------------------------------

Summary of changes:
 NEWS                             |  3 ++-
 ci/berrie64/postgis_regress.sh   | 16 ++++++----------
 liblwgeom/lwgeom.c               |  1 +
 regress/core/snaptogrid.sql      |  4 ++++
 regress/core/snaptogrid_expected |  2 ++
 5 files changed, 15 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list