Clusters each feature in a collection, adding a new column to each feature containing the cluster number to which it has been assigned.
Usage | Returns |
---|---|
FeatureCollection.cluster(clusterer, outputName) | FeatureCollection |
Argument | Type | Details |
---|---|---|
this: features | FeatureCollection | The collection of features to cluster. Each feature must contain all the properties in the clusterer's schema. |
clusterer | Clusterer | The clusterer to use. |
outputName | String, default: "cluster" | The name of the output property to be added. |
Examples
JavaScript
// Your example goes here!
Python
# Your example goes here!