# clustersDbscan

Takes a set of points and partition them into clusters according to https://en.wikipedia.org/wiki/DBSCAN data clustering algorithm.
根据 DBSCAN 数据聚类算法,将一组点进行分区并分成簇。

参数

参数 类型 描述
points FeatureCollection <Point> 被聚类点
maxDistance number 生成簇的最大距离(仅以公里为单位),即任何簇点之间的最大距离
options Object 可选参数:见下文

options选项

属性 类型 默认值 描述
units string kilometers in which
mutate boolean false 允许对GeoJSON输入进行修改
minPoints number 3 生成单个簇所需的最少点数,不满足此要求的点将被分类为“边缘”或“噪声”。

返回

FeatureCollection <Point> - 每个要素都有额外的两个属性与聚类点相关联:

示例

// 在它们的属性中创建具有随机z值的随机点
var points = turf.randomPoint(100, {bbox: [0, 30, 20, 50]});
var maxDistance = 100;
var clustered = turf.clustersDbscan(points, maxDistance);
Last Updated: 6/23/2023, 10:33:35 PM