
Cluster the river crossings and select the shortest crossing per cluster
Source:R/segments.R
filter_clusters.RdCreate groups of edges that are crossing the river in nearby locations, using a density-based clustering method (DBSCAN). This is to make sure that edges representing e.g. different lanes of the same street are treated as part of the same crossing. For each cluster, select the shortest edge.
Value
An object of class sf::sfc_LINESTRING including the shortest edge
per cluster