[postgis-tickets] r17820 - ST_RemoveRepeatedPoints: Optimize multipoints with single point

Raul raul at rmr.ninja
Tue Sep 24 03:45:43 PDT 2019


Author: algunenano
Date: 2019-09-24 03:45:43 -0700 (Tue, 24 Sep 2019)
New Revision: 17820

Modified:
   trunk/liblwgeom/lwgeom.c
Log:
ST_RemoveRepeatedPoints: Optimize multipoints with single point

References #4491
Closes https://github.com/postgis/postgis/pull/481



Modified: trunk/liblwgeom/lwgeom.c
===================================================================
--- trunk/liblwgeom/lwgeom.c	2019-09-24 10:44:10 UTC (rev 17819)
+++ trunk/liblwgeom/lwgeom.c	2019-09-24 10:45:43 UTC (rev 17820)
@@ -1615,7 +1615,7 @@
 			int use_heap = (mpt->ngeoms > out_stack_size);
 
 			/* No-op on empty */
-			if (mpt->ngeoms == 0)
+			if (mpt->ngeoms < 2)
 				return geometry_modified;
 
 			/* We cannot write directly back to the multipoint */



More information about the postgis-tickets mailing list