[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-153-g05eaa36

git at osgeo.org git at osgeo.org
Fri Apr 23 11:44:35 PDT 2021


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  05eaa361c5a7745d335166bd8e8d708b22103170 (commit)
      from  b10a4673f2168567065c0373ba9534ea2da56f73 (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 05eaa361c5a7745d335166bd8e8d708b22103170
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri Apr 23 11:44:29 2021 -0700

    Expand POSTGIS_GEOS_VERSION from 39 to 30900 (zero padded minor/patch) so that GEOS 3.10 and future friends do not break things by accident. Closes #4899

diff --git a/configure.ac b/configure.ac
index df75fe6..48ebcd6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -708,14 +708,13 @@ if test "x$GEOS_PATCH_VERSION" = "x"; then
 	GEOS_PATCH_VERSION="0";
 fi
 GEOS_FULL_VERSION=`$GEOSCONFIG --version`
-POSTGIS_GEOS_VERSION="$GEOS_MAJOR_VERSION$GEOS_MINOR_VERSION"
 GEOS_NUMERIC_PATCH_VERSION=`printf "%02d" $GEOS_PATCH_VERSION`
 GEOS_NUMERIC_MINOR_VERSION=`printf "%02d" $GEOS_MINOR_VERSION`
-GEOS_NUMERIC_VERSION="$GEOS_MAJOR_VERSION$GEOS_NUMERIC_MINOR_VERSION$GEOS_NUMERIC_PATCH_VERSION"
+POSTGIS_GEOS_VERSION="$GEOS_MAJOR_VERSION$GEOS_NUMERIC_MINOR_VERSION$GEOS_NUMERIC_PATCH_VERSION"
 
 dnl Ensure that we are using GEOS >= 3.6.0
 AC_MSG_RESULT([checking GEOS version... $GEOS_FULL_VERSION])
-if test ! "$GEOS_NUMERIC_VERSION" -ge 30600; then
+if test ! "$POSTGIS_GEOS_VERSION" -ge 30600; then
 	AC_MSG_ERROR([PostGIS requires GEOS >= 3.6.0])
 fi
 
@@ -742,7 +741,6 @@ LIBS="$LIBS_SAVE"
 
 AC_DEFINE_UNQUOTED([POSTGIS_GEOS_VERSION], [$POSTGIS_GEOS_VERSION], [GEOS library version])
 AC_SUBST([POSTGIS_GEOS_VERSION])
-AC_SUBST([GEOS_NUMERIC_VERSION])
 
 
 dnl ===========================================================================
@@ -1695,7 +1693,7 @@ AC_MSG_RESULT([  convert:              ${IMAGEMAGICK}])
 AC_MSG_RESULT([  mathml2.dtd:          ${MATHML2_DTD}])
 AC_MSG_RESULT()
 
-if test "$GEOS_NUMERIC_VERSION" -lt 30900; then
+if test "$POSTGIS_GEOS_VERSION" -lt 30900; then
 AC_MSG_WARN([ --------- GEOS VERSION WARNING ------------ ])
 AC_MSG_WARN([  You are building against GEOS ${GEOS_FULL_VERSION}.])
 AC_MSG_WARN([])
diff --git a/liblwgeom/cunit/cu_geos.c b/liblwgeom/cunit/cu_geos.c
index 6518f3a..ed648dd 100644
--- a/liblwgeom/cunit/cu_geos.c
+++ b/liblwgeom/cunit/cu_geos.c
@@ -150,7 +150,7 @@ test_geos_makevalid(void)
 	geom3 = lwgeom_normalize(geom2); //so GEOS 3.9 and 3.10 agree
 	out_ewkt = lwgeom_to_ewkt((LWGEOM*)geom3);
 
-#if POSTGIS_GEOS_VERSION < 39
+#if POSTGIS_GEOS_VERSION < 30900
 	ASSERT_STRING_EQUAL(
 	    out_ewkt,
 	    "GEOMETRYCOLLECTION(POLYGON((92092.377 463437.77,92114.014 463463.469,92115.51207431706 463462.206937429,92115.512 463462.207,92127.546 463452.075,92117.173 463439.755,92133.675 463425.942,92122.136 463412.82600000006,92092.377 463437.77)),MULTIPOINT(92122.136 463412.826,92115.51207431706 463462.2069374289))");
diff --git a/liblwgeom/lwgeom_geos.c b/liblwgeom/lwgeom_geos.c
index 1ab3fc0..5c95561 100644
--- a/liblwgeom/lwgeom_geos.c
+++ b/liblwgeom/lwgeom_geos.c
@@ -146,7 +146,7 @@ ptarray_from_GEOSCoordSeq(const GEOSCoordSequence* cs, uint8_t want3d)
 
 	for (i = 0; i < size; i++)
 	{
-#if POSTGIS_GEOS_VERSION < 38
+#if POSTGIS_GEOS_VERSION < 30800
 		GEOSCoordSeq_getX(cs, i, &(point.x));
 		GEOSCoordSeq_getY(cs, i, &(point.y));
 		if (dims >= 3) GEOSCoordSeq_getZ(cs, i, &(point.z));
@@ -291,7 +291,7 @@ ptarray_to_GEOSCoordSeq(const POINTARRAY* pa, uint8_t fix_ring)
 			LWDEBUGF(4, "Point: %g,%g", p2d->x, p2d->y);
 		}
 
-#if POSTGIS_GEOS_VERSION < 38
+#if POSTGIS_GEOS_VERSION < 30800
 		GEOSCoordSeq_setX(sq, i, p2d->x);
 		GEOSCoordSeq_setY(sq, i, p2d->y);
 		if (dims == 3) GEOSCoordSeq_setZ(sq, i, p3d->z);
@@ -315,7 +315,7 @@ ptarray_to_GEOSCoordSeq(const POINTARRAY* pa, uint8_t fix_ring)
 			p2d = getPoint2d_cp(pa, 0);
 		for (i = pa->npoints; i < pa->npoints + append_points; i++)
 		{
-#if POSTGIS_GEOS_VERSION < 38
+#if POSTGIS_GEOS_VERSION < 30800
 			GEOSCoordSeq_setX(sq, i, p2d->x);
 			GEOSCoordSeq_setY(sq, i, p2d->y);
 #else
@@ -347,7 +347,7 @@ GBOX2GEOS(const GBOX* box)
 	GEOSCoordSequence* seq = GEOSCoordSeq_create(5, 2);
 	if (!seq) return NULL;
 
-#if POSTGIS_GEOS_VERSION < 38
+#if POSTGIS_GEOS_VERSION < 30800
 	GEOSCoordSeq_setX(seq, 0, box->xmin);
 	GEOSCoordSeq_setY(seq, 0, box->ymin);
 
@@ -430,7 +430,7 @@ LWGEOM2GEOS(const LWGEOM* lwgeom, uint8_t autofix)
 			g = GEOSGeom_createEmptyPoint();
 		else
 		{
-#if POSTGIS_GEOS_VERSION < 38
+#if POSTGIS_GEOS_VERSION < 30800
 			sq = ptarray_to_GEOSCoordSeq(lwp->point, 0);
 			g = GEOSGeom_createPoint(sq);
 #else
@@ -575,7 +575,7 @@ make_geos_point(double x, double y)
 
 	if (!seq) return NULL;
 
-#if POSTGIS_GEOS_VERSION < 38
+#if POSTGIS_GEOS_VERSION < 30800
 	GEOSCoordSeq_setX(seq, 0, x);
 	GEOSCoordSeq_setY(seq, 0, y);
 #else
@@ -595,7 +595,7 @@ make_geos_segment(double x1, double y1, double x2, double y2)
 
 	if (!seq) return NULL;
 
-#if POSTGIS_GEOS_VERSION < 38
+#if POSTGIS_GEOS_VERSION < 30800
 	GEOSCoordSeq_setX(seq, 0, x1);
 	GEOSCoordSeq_setY(seq, 0, y1);
 	GEOSCoordSeq_setX(seq, 1, x2);
@@ -706,7 +706,7 @@ lwgeom_intersection_prec(const LWGEOM* geom1, const LWGEOM* geom2, double prec)
 	if (!(g2 = LWGEOM2GEOS(geom2, AUTOFIX))) GEOS_FREE_AND_FAIL(g1);
 
 	if ( prec >= 0) {
-#if POSTGIS_GEOS_VERSION < 39
+#if POSTGIS_GEOS_VERSION < 30900
 		lwerror("Fixed-precision intersection requires GEOS-3.9 or higher");
 		GEOS_FREE_AND_FAIL(g1, g2);
 		return NULL;
@@ -784,7 +784,7 @@ lwgeom_unaryunion_prec(const LWGEOM* geom, double prec)
 	if (!(g1 = LWGEOM2GEOS(geom, AUTOFIX))) GEOS_FAIL();
 
 	if ( prec >= 0) {
-#if POSTGIS_GEOS_VERSION < 39
+#if POSTGIS_GEOS_VERSION < 30900
 		lwerror("Fixed-precision union requires GEOS-3.9 or higher");
 		GEOS_FREE_AND_FAIL(g1);
 		return NULL;
@@ -836,7 +836,7 @@ lwgeom_difference_prec(const LWGEOM* geom1, const LWGEOM* geom2, double prec)
 	if (!(g2 = LWGEOM2GEOS(geom2, AUTOFIX))) GEOS_FREE_AND_FAIL(g1);
 
 	if ( prec >= 0) {
-#if POSTGIS_GEOS_VERSION < 39
+#if POSTGIS_GEOS_VERSION < 30900
 		lwerror("Fixed-precision difference requires GEOS-3.9 or higher");
 		GEOS_FREE_AND_FAIL(g1, g2);
 		return NULL;
@@ -887,7 +887,7 @@ lwgeom_symdifference_prec(const LWGEOM* geom1, const LWGEOM* geom2, double prec)
 	if (!(g2 = LWGEOM2GEOS(geom2, AUTOFIX))) GEOS_FREE_AND_FAIL(g1);
 
 	if ( prec >= 0) {
-#if POSTGIS_GEOS_VERSION < 39
+#if POSTGIS_GEOS_VERSION < 30900
 		lwerror("Fixed-precision difference requires GEOS-3.9 or higher");
 		GEOS_FREE_AND_FAIL(g1, g2);
 		return NULL;
@@ -946,7 +946,7 @@ lwgeom_centroid(const LWGEOM* geom)
 LWGEOM*
 lwgeom_reduceprecision(const LWGEOM* geom, double gridSize)
 {
-#if POSTGIS_GEOS_VERSION < 39
+#if POSTGIS_GEOS_VERSION < 30900
 	lwerror("Precision reduction requires GEOS-3.9 or higher");
 	return NULL;
 #else
@@ -1040,7 +1040,7 @@ lwgeom_union_prec(const LWGEOM* geom1, const LWGEOM* geom2, double gridSize)
 	if (!(g2 = LWGEOM2GEOS(geom2, AUTOFIX))) GEOS_FREE_AND_FAIL(g1);
 
 	if ( gridSize >= 0) {
-#if POSTGIS_GEOS_VERSION < 39
+#if POSTGIS_GEOS_VERSION < 30900
 		lwerror("Fixed-precision union requires GEOS-3.9 or higher");
 		GEOS_FREE_AND_FAIL(g1, g2);
 		return NULL;
@@ -1097,7 +1097,7 @@ lwgeom_clip_by_rect(const LWGEOM *geom1, double x1, double y1, double x2, double
 }
 
 /* ------------ BuildArea stuff ---------------------------------------------------------------------{ */
-#if POSTGIS_GEOS_VERSION < 38
+#if POSTGIS_GEOS_VERSION < 30800
 typedef struct Face_t
 {
 	const GEOSGeometry* geom;
@@ -1362,7 +1362,7 @@ lwgeom_buildarea(const LWGEOM* geom)
 
 	if (!(g1 = LWGEOM2GEOS(geom, AUTOFIX))) GEOS_FAIL();
 
-#if POSTGIS_GEOS_VERSION < 38
+#if POSTGIS_GEOS_VERSION < 30800
 	g3 = LWGEOM_GEOS_buildArea(g1);
 #else
 	g3 = GEOSBuildArea(g1);
@@ -1760,7 +1760,7 @@ lwpoly_to_points(const LWPOLY* lwpoly, uint32_t npoints, int32_t seed)
 			if (x >= bbox.xmax || y >= bbox.ymax) continue;
 
 			gseq = GEOSCoordSeq_create(1, 2);
-#if POSTGIS_GEOS_VERSION < 38
+#if POSTGIS_GEOS_VERSION < 30800
 			GEOSCoordSeq_setX(gseq, 0, x);
 			GEOSCoordSeq_setY(gseq, 0, y);
 #else
@@ -2000,7 +2000,7 @@ lwgeom_get_geos_coordseq_2d(const LWGEOM* g, uint32_t num_points)
 			return NULL;
 		}
 
-#if POSTGIS_GEOS_VERSION < 38
+#if POSTGIS_GEOS_VERSION < 30800
 		if (!GEOSCoordSeq_setX(coords, i, tmp.x) || !GEOSCoordSeq_setY(coords, i, tmp.y))
 #else
 		if (!GEOSCoordSeq_setXY(coords, i, tmp.x, tmp.y))
diff --git a/liblwgeom/lwgeom_geos.h b/liblwgeom/lwgeom_geos.h
index ae21aef..71ec5fe 100644
--- a/liblwgeom/lwgeom_geos.h
+++ b/liblwgeom/lwgeom_geos.h
@@ -34,7 +34,7 @@
 LWGEOM* GEOS2LWGEOM(const GEOSGeometry* geom, uint8_t want3d);
 GEOSGeometry* LWGEOM2GEOS(const LWGEOM* g, uint8_t autofix);
 GEOSGeometry* GBOX2GEOS(const GBOX* g);
-#if POSTGIS_GEOS_VERSION < 38
+#if POSTGIS_GEOS_VERSION < 30800
 GEOSGeometry* LWGEOM_GEOS_buildArea(const GEOSGeometry* geom_in);
 GEOSGeometry* LWGEOM_GEOS_makeValid(const GEOSGeometry*);
 #endif
diff --git a/liblwgeom/lwgeom_geos_clean.c b/liblwgeom/lwgeom_geos_clean.c
index 3c12e25..7b720a0 100644
--- a/liblwgeom/lwgeom_geos_clean.c
+++ b/liblwgeom/lwgeom_geos_clean.c
@@ -37,7 +37,7 @@
 /* #define PARANOIA_LEVEL 2 */
 #undef LWGEOM_PROFILE_MAKEVALID
 
-#if POSTGIS_GEOS_VERSION < 38
+#if POSTGIS_GEOS_VERSION < 30800
 /*
  * Return Nth vertex in GEOSGeometry as a POINT.
  * May return NULL if the geometry has NO vertex.
@@ -360,7 +360,7 @@ lwcollection_make_geos_friendly(LWCOLLECTION* g)
 	return (LWGEOM*)ret;
 }
 
-#if POSTGIS_GEOS_VERSION < 38
+#if POSTGIS_GEOS_VERSION < 30800
 
 /*
  * Fully node given linework
@@ -932,7 +932,7 @@ lwgeom_make_valid(LWGEOM* lwgeom_in)
 		LWDEBUG(4, "geom converted to GEOS");
 	}
 
-#if POSTGIS_GEOS_VERSION < 38
+#if POSTGIS_GEOS_VERSION < 30800
 	geosout = LWGEOM_GEOS_makeValid(geosgeom);
 #else
 	geosout = GEOSMakeValid(geosgeom);
diff --git a/postgis/lwgeom_geos.c b/postgis/lwgeom_geos.c
index 117ddf0..519797f 100644
--- a/postgis/lwgeom_geos.c
+++ b/postgis/lwgeom_geos.c
@@ -274,7 +274,7 @@ Datum hausdorffdistancedensify(PG_FUNCTION_ARGS)
 PG_FUNCTION_INFO_V1(ST_FrechetDistance);
 Datum ST_FrechetDistance(PG_FUNCTION_ARGS)
 {
-#if POSTGIS_GEOS_VERSION < 37
+#if POSTGIS_GEOS_VERSION < 30700
 
 	lwpgerror("The GEOS version this PostGIS binary "
 					"was compiled against (%d) doesn't support "
@@ -282,7 +282,7 @@ Datum ST_FrechetDistance(PG_FUNCTION_ARGS)
 					POSTGIS_GEOS_VERSION);
 	PG_RETURN_NULL();
 
-#else /* POSTGIS_GEOS_VERSION >= 37 */
+#else /* POSTGIS_GEOS_VERSION >= 30700 */
 	GSERIALIZED *geom1;
 	GSERIALIZED *geom2;
 	GEOSGeometry *g1;
@@ -330,7 +330,7 @@ Datum ST_FrechetDistance(PG_FUNCTION_ARGS)
 
 	PG_RETURN_FLOAT8(result);
 
-#endif /* POSTGIS_GEOS_VERSION >= 37 */
+#endif /* POSTGIS_GEOS_VERSION >= 30700 */
 }
 
 
@@ -344,7 +344,7 @@ Datum ST_FrechetDistance(PG_FUNCTION_ARGS)
 PG_FUNCTION_INFO_V1(ST_MaximumInscribedCircle);
 Datum ST_MaximumInscribedCircle(PG_FUNCTION_ARGS)
 {
-#if POSTGIS_GEOS_VERSION < 39
+#if POSTGIS_GEOS_VERSION < 30900
 
 	lwpgerror("The GEOS version this PostGIS binary "
 	          "was compiled against (%d) doesn't support "
@@ -352,7 +352,7 @@ Datum ST_MaximumInscribedCircle(PG_FUNCTION_ARGS)
 	          POSTGIS_GEOS_VERSION);
 	          PG_RETURN_NULL();
 
-#else /* POSTGIS_GEOS_VERSION >= 39 */
+#else /* POSTGIS_GEOS_VERSION >= 30900 */
 	GSERIALIZED* geom;
 	GSERIALIZED* center;
 	GSERIALIZED* nearest;
@@ -453,7 +453,7 @@ Datum ST_MaximumInscribedCircle(PG_FUNCTION_ARGS)
 
 	PG_RETURN_DATUM(result);
 
-#endif /* POSTGIS_GEOS_VERSION >= 39 */
+#endif /* POSTGIS_GEOS_VERSION >= 30900 */
 }
 
 
diff --git a/regress/core/tests.mk.in b/regress/core/tests.mk.in
index a0f50df..21b95dc 100644
--- a/regress/core/tests.mk.in
+++ b/regress/core/tests.mk.in
@@ -131,20 +131,20 @@ ifeq ($(shell expr "$(POSTGIS_PGSQL_VERSION)" ">=" 120),1)
 		$(topsrcdir)/regress/core/computed_columns
 endif
 
-ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 37),1)
+ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 30700),1)
 	# GEOS-3.7 adds:
 	# ST_FrechetDistance
 	TESTS += \
 		$(topsrcdir)/regress/core/frechet
 endif
 
-ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 38),1)
+ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 30800),1)
 	# GEOS-3.8 adds stable pointonsurface implementation
 	TESTS += \
 		$(topsrcdir)/regress/core/geos38
 endif
 
-ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 39),1)
+ifeq ($(shell expr "$(POSTGIS_GEOS_VERSION)" ">=" 30900),1)
 	# GEOS-3.0 adds stable maximuminscribedcircle implementation
 	TESTS += \
 		$(topsrcdir)/regress/core/geos39 \
diff --git a/topology/test/Makefile.in b/topology/test/Makefile.in
index cef9108..732d01b 100644
--- a/topology/test/Makefile.in
+++ b/topology/test/Makefile.in
@@ -2,7 +2,6 @@ DATABASE=postgis_topo_regress
 
 PSQL=psql
 PERL=@PERL@
-GEOS_NUMERIC_VERSION=@GEOS_NUMERIC_VERSION@
 
 # MingW hack: rather than use PGSQL_BINDIR directly, we change to the directory and
 # then use "pwd" to return the path. This ensures that the returned path is in MSYS

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

Summary of changes:
 configure.ac                  |  8 +++-----
 liblwgeom/cunit/cu_geos.c     |  2 +-
 liblwgeom/lwgeom_geos.c       | 34 +++++++++++++++++-----------------
 liblwgeom/lwgeom_geos.h       |  2 +-
 liblwgeom/lwgeom_geos_clean.c |  6 +++---
 postgis/lwgeom_geos.c         | 12 ++++++------
 regress/core/tests.mk.in      |  6 +++---
 topology/test/Makefile.in     |  1 -
 8 files changed, 34 insertions(+), 37 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list