[SCM] PostGIS branch master updated. 3.4.0rc1-885-g705c241cb

git at osgeo.org git at osgeo.org
Thu Jan 18 08:18:46 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  705c241cba5cf7f1c34455f9a9f4a761186ebb29 (commit)
      from  8489655ed88134a4478121041dbdb9ead12f6868 (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 705c241cba5cf7f1c34455f9a9f4a761186ebb29
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu Jan 18 08:18:42 2024 -0800

    Remove collection workaround code, since the performance regress it was working around was a phantom created by PARANOIA_LEVEL

diff --git a/liblwgeom/lwgeom_geos.c b/liblwgeom/lwgeom_geos.c
index 56eca41f3..ea4506ca7 100644
--- a/liblwgeom/lwgeom_geos.c
+++ b/liblwgeom/lwgeom_geos.c
@@ -1438,7 +1438,6 @@ lwpoly_to_points(const LWPOLY* lwpoly, uint32_t npoints, int32_t seed)
 	LWMPOINT* mpt;
 	int32_t srid = lwgeom_get_srid(lwgeom);
 	int done = 0;
-	LWPOINT **points_generated;
 
 	if (lwgeom_get_type(lwgeom) != POLYGONTYPE)
 	{
@@ -1560,7 +1559,7 @@ lwpoly_to_points(const LWPOLY* lwpoly, uint32_t npoints, int32_t seed)
 	}
 
 	/* Get an empty array of points ready to return */
-	points_generated = lwalloc0(sizeof(LWGEOM*)*npoints);
+	mpt = lwmpoint_construct_empty(srid, 0, 0);
 
 	/* Start testing points */
 	while (npoints_generated < npoints)
@@ -1596,7 +1595,8 @@ lwpoly_to_points(const LWPOLY* lwpoly, uint32_t npoints, int32_t seed)
 			}
 			if (contains == 1)
 			{
-				points_generated[npoints_generated++] = lwpoint_make2d(srid, x, y);
+				mpt = lwmpoint_add_lwpoint(mpt, lwpoint_make2d(srid, x, y));
+				npoints_generated++;
 				if (npoints_generated == npoints)
 				{
 					done = 1;
@@ -1618,13 +1618,6 @@ lwpoly_to_points(const LWPOLY* lwpoly, uint32_t npoints, int32_t seed)
 	GEOSGeom_destroy(g);
 	lwfree(cells);
 
-	mpt = lwalloc0(sizeof(LWMPOINT));
-	mpt->type = MULTIPOINTTYPE;
-	mpt->geoms = points_generated;
-	mpt->ngeoms = npoints_generated;
-	mpt->maxgeoms = npoints;
-	mpt->srid = srid;
-
 	return mpt;
 }
 

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

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


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list