This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sedona.git
The following commit(s) were added to refs/heads/master by this push:
new 4094e40d1f [SEDONA-684] DBSCAN: allow epsilon = 0 (#1709)
4094e40d1f is described below
commit 4094e40d1f0c838a7e8da639856a545f80c88742
Author: James Willis <[email protected]>
AuthorDate: Mon Dec 2 23:23:35 2024 -0800
[SEDONA-684] DBSCAN: allow epsilon = 0 (#1709)
Co-authored-by: jameswillis <[email protected]>
---
.../src/main/scala/org/apache/sedona/stats/clustering/DBSCAN.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/spark/common/src/main/scala/org/apache/sedona/stats/clustering/DBSCAN.scala
b/spark/common/src/main/scala/org/apache/sedona/stats/clustering/DBSCAN.scala
index 02a6145cb2..e4cd1f90b4 100644
---
a/spark/common/src/main/scala/org/apache/sedona/stats/clustering/DBSCAN.scala
+++
b/spark/common/src/main/scala/org/apache/sedona/stats/clustering/DBSCAN.scala
@@ -141,7 +141,7 @@ object DBSCAN {
epsilon: Double,
minPts: Int,
geometry: String): Unit = {
- require(epsilon > 0, "epsilon must be greater than 0")
+ require(epsilon >= 0, "epsilon must not be negative")
require(minPts > 0, "minPts must be greater than 0")
require(geo_df.columns.contains(geometry), "geometry column not found in
dataframe")
require(