cartagen.kmeans_simplification#
- kmeans_simplification(points, ratio)#
Reduce a set of points by simplification using K-Means clustering.
For each K-Means cluster calculated depending on the ratio, the point closest to the cluster’s centroid is selected.
For more information about K-Means clustering, here is a link to the related wikipedia article
- Parameters:
points (
GeoDataFrameofPoint) – The points to reduce.ratio (
float) – A value between 0 (all points are removed) and 1 (all points are kept).
- Returns:
points (
GeoDataFrameofPoint) – The provided set of points with one new attributes:’selected_kmeans’: Set to True if the point has been selected.
See also
kmeans_selectionReduce a set of points by selection using K-Means clustering.
kmeans_aggregationReduce a set of points by aggregation using K-Means clustering.