[postgis-tickets] [SCM] PostGIS branch stable-3.1 updated. 3.1.1-15-g517e07f

git at osgeo.org git at osgeo.org
Wed Feb 17 18:14:02 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, stable-3.1 has been updated
       via  517e07fb99e7a2b2c1849256f8fa950ab3295b02 (commit)
       via  8d87f1ffd131a359214ef0c0ef84609db83fc3a8 (commit)
      from  0bece15c745d387c5006ce66ce845cadcc7986a7 (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 517e07fb99e7a2b2c1849256f8fa950ab3295b02
Author: Daniel Baston <dbaston at gmail.com>
Date:   Wed Feb 17 21:13:45 2021 -0500

    Update NEWS for #4853

diff --git a/NEWS b/NEWS
index 44d0283..799458f 100644
--- a/NEWS
+++ b/NEWS
@@ -8,7 +8,8 @@ PostGIS 3.1.2
   - #4817, handle more complex compound coordinate dystems (Paul Ramsey)
   - #4842, Only do axis flips on CRS that have a "Lat" as the first column (Paul Ramsey)
   - Support recent Proj versions that have removed pj_get_release (Paul Ramsey)
-  - $4835, Adjust tolerance for geodetic calculations (Paul Ramsey)
+  - #4835, Adjust tolerance for geodetic calculations (Paul Ramsey)
+  - #4853, DBSCAN cluster not formed when recordset length equal to minPoints (Dan Baston)
 
 
 PostGIS 3.1.1

commit 8d87f1ffd131a359214ef0c0ef84609db83fc3a8
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 da3ea27..a9b357b 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 181f22f..f35829f 100644
--- a/regress/core/tickets_expected
+++ b/regress/core/tickets_expected
@@ -440,3 +440,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:
 NEWS                            | 3 ++-
 liblwgeom/lwgeom_geos_cluster.c | 2 +-
 regress/core/tickets.sql        | 3 +++
 regress/core/tickets_expected   | 4 ++++
 4 files changed, 10 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list