[SCM] PostGIS branch master updated. 3.5.0-272-gc06333052

git at osgeo.org git at osgeo.org
Tue Apr 15 11:52:47 PDT 2025


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, master has been updated
       via  c06333052c9be44691ab20b1e8523921e02d8870 (commit)
      from  6144d2ad57f2d5b436eff83a1c58e3f2e1963b91 (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 c06333052c9be44691ab20b1e8523921e02d8870
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Tue Apr 15 11:46:12 2025 -0700

    Update POSTGIS_GDAL_VERSION to use Mmmpp format

diff --git a/configure.ac b/configure.ac
index ccb778064..45022c713 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1587,7 +1587,8 @@ if test "x$with_raster" != "xno"; then
 
 	dnl GDAL version constants, update here
 	GDAL_MIN_VERSION=2.0.0
-	GDAL_MIN_VERSION_NUMBER=180 dnl TODO: Use GDAL version calculation MAJOR*1000+MINOR*100+REV*10+BUILD
+	dnl Compare to POSTGIS_GDAL_VERSION
+	GDAL_MIN_VERSION_NUMBER=20000
 
 	AC_ARG_WITH(
 		[gdalconfig],
@@ -1613,13 +1614,12 @@ if test "x$with_raster" != "xno"; then
 		GDAL_MINOR_VERSION=`$GDAL_CONFIG --version | cut -d. -f2 | sed 's/[[^0-9]]//g'`
 		GDAL_PATCH_VERSION=`$GDAL_CONFIG --version | cut -d. -f3 | sed 's/[[^0-9]]//g'`
 		GDAL_FULL_VERSION=`$GDAL_CONFIG --version`
-		POSTGIS_GDAL_VERSION="$GDAL_MAJOR_VERSION$GDAL_MINOR_VERSION"
-		GDAL_VERSION_NUMBER="$GDAL_MAJOR_VERSION$GDAL_MINOR_VERSION$GDAL_PATCH_VERSION"
+		POSTGIS_GDAL_VERSION=`echo $GDAL_FULL_VERSION | $PERL -nle 'printf "%d%02d%02d\n",$1,$2,$3 if /(\d+)\.(\d+)\.(\d+)/'`
 
 		AC_MSG_RESULT([$GDAL_FULL_VERSION])
 
 		dnl Ensure we are using minimum required version of GDAL
-		if test ! "$GDAL_VERSION_NUMBER" -ge "$GDAL_MIN_VERSION_NUMBER" ; then
+		if test ! "$POSTGIS_GDAL_VERSION" -ge "$GDAL_MIN_VERSION_NUMBER" ; then
 			AC_MSG_ERROR([PostGIS raster requires GDAL >= $GDAL_MIN_VERSION. Use --without-raster to build without raster support.])
 		fi
 
diff --git a/raster/rt_core/rt_gdal.c b/raster/rt_core/rt_gdal.c
index 6303c5ee9..748a8ff12 100644
--- a/raster/rt_core/rt_gdal.c
+++ b/raster/rt_core/rt_gdal.c
@@ -157,7 +157,7 @@ int rt_raster_gdal_contour(
 		return _rti_contour_arg_destroy(&arg);
 
 	/* Polygonize is 2.4+ only */
-#if POSTGIS_GDAL_VERSION >= 24
+#if POSTGIS_GDAL_VERSION >= 20400
 	arg.dst.gtype = polygonize ? wkbPolygon : wkbLineString;
 #else
 	arg.dst.gtype = wkbLineString;
diff --git a/raster/rt_core/rt_raster.c b/raster/rt_core/rt_raster.c
index ca055cf6c..55ccee6f9 100644
--- a/raster/rt_core/rt_raster.c
+++ b/raster/rt_core/rt_raster.c
@@ -2825,7 +2825,7 @@ rt_raster_gdal_rasterize(
 		_dim[1] == 0
 	) {
 
-#if POSTGIS_GDAL_VERSION > 18
+#if POSTGIS_GDAL_VERSION > 10800
 
 		RASTER_DEBUG(3, "Adjusting extent for GDAL > 1.8 by half the scale on X-axis");
 		extent.MinX -= (_scale[0] / 2.);
diff --git a/raster/rt_pg/rtpostgis.c b/raster/rt_pg/rtpostgis.c
index fadaa9611..228717f36 100644
--- a/raster/rt_pg/rtpostgis.c
+++ b/raster/rt_pg/rtpostgis.c
@@ -269,7 +269,7 @@ rt_pg_options(const char* varname)
 static stringlist_t *vsi_option_stringlist = NULL;
 
 
-#if POSTGIS_GDAL_VERSION < 23
+#if POSTGIS_GDAL_VERSION < 20300
 
 /*
 * For older versions of GDAL we  have extracted the list of options
@@ -341,7 +341,7 @@ rt_pg_vsi_load_all_options(void)
 	stringlist_sort(vsi_option_stringlist);
 }
 
-#else /* POSTGIS_GDAL_VERSION < 23 */
+#else /* POSTGIS_GDAL_VERSION < 20300 */
 
 /*
 * For newer versions of GDAL the VSIGetFileSystemOptions() call returns
@@ -413,7 +413,7 @@ rt_pg_vsi_load_all_options(void)
 	stringlist_sort(vsi_option_stringlist);
 }
 
-#endif /* POSTGIS_GDAL_VERSION < 23 */
+#endif /* POSTGIS_GDAL_VERSION < 20300 */
 
 
 static bool

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

Summary of changes:
 configure.ac               | 8 ++++----
 raster/rt_core/rt_gdal.c   | 2 +-
 raster/rt_core/rt_raster.c | 2 +-
 raster/rt_pg/rtpostgis.c   | 6 +++---
 4 files changed, 9 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list