[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-84-g4b0e00a

git at osgeo.org git at osgeo.org
Wed Feb 17 17:38:38 PST 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  4b0e00a4e28013f9c3575532524fe2a6653f0658 (commit)
      from  23b0eb52b8f6480836fa99de55837ee6d1c2846f (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 4b0e00a4e28013f9c3575532524fe2a6653f0658
Author: Daniel Baston <dbaston at gmail.com>
Date:   Wed Feb 17 20:34:04 2021 -0500

    Allow DBSCAN cluster to form when recordset length = minPoints
    
    Fixes #4853

diff --git a/liblwgeom/lwgeom_geos_cluster.c b/liblwgeom/lwgeom_geos_cluster.c
index 76c707f..2438663 100644
--- a/liblwgeom/lwgeom_geos_cluster.c
+++ b/liblwgeom/lwgeom_geos_cluster.c
@@ -401,7 +401,7 @@ union_dbscan_general(LWGEOM** geoms, uint32_t num_geoms, UNIONFIND* uf, double e
 		*in_a_cluster_ret = in_a_cluster;
 
 	/* Bail if we don't even have enough inputs to make a cluster. */
-	if (num_geoms <= min_points)
+	if (num_geoms < min_points)
 	{
 		if (!in_a_cluster_ret)
 			lwfree(in_a_cluster);
diff --git a/regress/core/tickets.sql b/regress/core/tickets.sql
index d4bf140..c73b72a 100644
--- a/regress/core/tickets.sql
+++ b/regress/core/tickets.sql
@@ -1318,3 +1318,6 @@ SELECT '#4727', _ST_DistanceTree('SRID=4326;POLYGON((-179.9 -85.05112877980659,
 SELECT '#4796', st_astext(st_snaptogrid(st_normalize(st_simplifypreservetopology('MULTISURFACE(((178632.044 397744.007,178631.118 397743.786,178646.399 397679.574,178693.864 397690.889,178698.958 397669.487,178700.206 397669.784,178758.532 397683.689,178748.351 397726.468,178752.199 397727.384,178748.782 397741.904,178744.897 397740.98,178738.157 397769.303,178632.044 397744.007)))'::geometry,1)),1));
 
 SELECT '#4812', st_srid('SRID=999999;POINT(1 1)'::geometry);
+
+SELECT '#4853', ST_ClusterDBSCAN(geom,  eps := 0.000906495804256269, minpoints := 4) OVER() AS cid FROM (VALUES ('0101000020E6100000E4141DC9E5934B40D235936FB6193940'::geometry), ('0101000020E6100000C746205ED7934B40191C25AFCE193940'::geometry), ('0101000020E6100000C780ECF5EE934B40B6BE4868CB193940'::geometry), ('0101000020E6100000ABB2EF8AE0934B404451A04FE4193940'::geometry)) AS t(geom);
+
diff --git a/regress/core/tickets_expected b/regress/core/tickets_expected
index 7f346c6..515b09f 100644
--- a/regress/core/tickets_expected
+++ b/regress/core/tickets_expected
@@ -439,3 +439,7 @@ ERROR:  LWGEOM_addpoint: Invalid offset
 #4727|0
 #4796|POLYGON((178632 397744,178738 397769,178745 397741,178749 397742,178752 397727,178748 397726,178759 397684,178699 397669,178694 397691,178646 397680,178632 397744))
 #4812|999999
+#4853|0
+#4853|0
+#4853|0
+#4853|0

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

Summary of changes:
 liblwgeom/lwgeom_geos_cluster.c | 2 +-
 regress/core/tickets.sql        | 3 +++
 regress/core/tickets_expected   | 4 ++++
 3 files changed, 8 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list