[SCM] PostGIS branch master updated. 3.4.0rc1-911-gac4e90e9e

git at osgeo.org git at osgeo.org
Thu Feb 1 13:17:16 PST 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, master has been updated
       via  ac4e90e9ed78e581899a1d3afe2226e8112818bc (commit)
      from  c8ec52a5b4ba47d9b58fb9e06565425dd7461350 (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 ac4e90e9ed78e581899a1d3afe2226e8112818bc
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu Feb 1 13:17:13 2024 -0800

    Skip processing non-finite inputs, closes #5661

diff --git a/postgis/lwgeom_geos.c b/postgis/lwgeom_geos.c
index 2d0d9f050..b85700d1a 100644
--- a/postgis/lwgeom_geos.c
+++ b/postgis/lwgeom_geos.c
@@ -3530,6 +3530,8 @@ Datum LWGEOM_dfullywithin(PG_FUNCTION_ARGS)
 {
 	GSERIALIZED *geom1 = PG_GETARG_GSERIALIZED_P(0);
 	GSERIALIZED *geom2 = PG_GETARG_GSERIALIZED_P(1);
+	LWGEOM *lwg1 = lwgeom_from_gserialized(geom1);
+	LWGEOM *lwg2 = lwgeom_from_gserialized(geom2);
 	double radius = PG_GETARG_FLOAT8(2);
 	GEOSGeometry *buffer1 = NULL;
 	GEOSGeometry *geos1 = NULL, *geos2 = NULL;
@@ -3541,15 +3543,20 @@ Datum LWGEOM_dfullywithin(PG_FUNCTION_ARGS)
 		PG_RETURN_NULL();
 	}
 
-	if (gserialized_is_empty(geom1) || gserialized_is_empty(geom2))
+	if (lwgeom_is_empty(lwg1) || lwgeom_is_empty(lwg2))
+		PG_RETURN_BOOL(false);
+
+	if (!(lwgeom_isfinite(lwg1) && lwgeom_isfinite(lwg2)))
 		PG_RETURN_BOOL(false);
 
 	initGEOS(lwpgnotice, lwgeom_geos_error);
 
 	gserialized_error_if_srid_mismatch(geom1, geom2, __func__);
 
-	geos1 = POSTGIS2GEOS(geom1);
-	geos2 = POSTGIS2GEOS(geom2);
+	geos1 = LWGEOM2GEOS(lwg1, true);
+	geos2 = LWGEOM2GEOS(lwg2, true);
+	lwgeom_free(lwg1);
+	lwgeom_free(lwg2);
 	if (!(geos1 && geos2))
 		HANDLE_GEOS_ERROR("Geometry could not be converted to GEOS");
 

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

Summary of changes:
 postgis/lwgeom_geos.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list