NDVar.label_clusters(self, threshold=0, tail=0, name=None)

Find and label clusters of values exceeding a threshold

threshold : scalar

Threshold value for clusters (default 0 to find clusters of non-zero values).

tail : 0 | -1 | 1

Whether to label cluster smaller than threshold, larger than threshold, or both (default).

name : str

Name of the output NDVar (default is the current name).

clusters : NDVar

NDVar of int, each cluster labeled with a unique integer value.['cids'] contains an array of all cluster IDs.