[postgis-tickets] [SCM] PostGIS branch stable-3.0 updated. 3.0.7-12-gb768f1c9d

git at osgeo.org git at osgeo.org
Sat Oct 29 06:35:52 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.0 has been updated
       via  b768f1c9d014a0f82a2d776b57304f91c8c6d4f2 (commit)
       via  4af1190b7ce3ece4712c95dbf918e2879c79a2fd (commit)
       via  54071eeb620a9b6a0a5855f13aff1592e8e75c36 (commit)
      from  26a6a68139a0889cb822892774f96ed6fb001cad (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 b768f1c9d014a0f82a2d776b57304f91c8c6d4f2
Merge: 4af1190b7 26a6a6813
Author: Regina Obe <lr at pcorp.us>
Date:   Sat Oct 29 09:35:42 2022 -0400

    Merge branch 'stable-3.0' of git.osgeo.org:postgis/postgis into stable-3.0


commit 4af1190b7ce3ece4712c95dbf918e2879c79a2fd
Author: Regina Obe <lr at pcorp.us>
Date:   Sat Oct 29 00:47:24 2022 -0400

    Berrie64  changes
    1. Error on first fail
    2. Do garden tests
    3. Use Geos 3.9 build run

diff --git a/ci/berrie64/postgis_regress.sh b/ci/berrie64/postgis_regress.sh
index e3ec00030..f1a1871d0 100644
--- a/ci/berrie64/postgis_regress.sh
+++ b/ci/berrie64/postgis_regress.sh
@@ -1,11 +1,14 @@
-#!/bin/bash
+#!/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
 ## label is set by jenkins
 #export label=${label}
 
+export GEOS_VER=3.9.4
 export WORKSPACE=/home/jenkins/workspace
+export GEOS_PATH=${WORKSPACE}/geos/rel-${GEOS_VER}
 
 cd ${WORKSPACE}/PostGIS_Worker_Run/label/${label}/$BRANCH
 export OS_BUILD=64
@@ -18,7 +21,7 @@ export PGDATA=$PGPATH/data_${PGPORT}
 export PGHOST=localhost
 
 sh autogen.sh
-./configure --with-pgconfig=${PGPATH}/bin/pg_config --with-library-minor-version
+./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
@@ -26,6 +29,8 @@ make check RUNTESTFLAGS="-v"
 make install
 make check RUNTESTFLAGS="-v --extension"
 err_status=$?
+make garden
+err_status=$?
 
 if [ -d $PGDATA/postmaster.pid ] ; then
 	$PGCTL stop -D $PGDATA -s -m fast

commit 54071eeb620a9b6a0a5855f13aff1592e8e75c36
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.0.8

diff --git a/NEWS b/NEWS
index f394d180c..563b072df 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ YYYY/MM/DD
   - Add schema qual to upgrade util
   - #5240, ST_DumpPoints crash with empty polygon (Regina Obe)
   - #4648, Check function ownership at extension packaging time (Sandro Santilli)
+  - #5241, Crash on ST_SnapToGrid with empty multis (Regina Obe)
 
 PostGIS 3.0.7
 2022/08/18
diff --git a/liblwgeom/lwgeom.c b/liblwgeom/lwgeom.c
index 8f9a5705b..a07ca53a1 100644
--- a/liblwgeom/lwgeom.c
+++ b/liblwgeom/lwgeom.c
@@ -2144,6 +2144,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                             | 1 +
 ci/berrie64/postgis_regress.sh   | 9 +++++++--
 liblwgeom/lwgeom.c               | 1 +
 regress/core/snaptogrid.sql      | 4 ++++
 regress/core/snaptogrid_expected | 2 ++
 5 files changed, 15 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list