Learn R Programming

rcrisp (version 0.3.1)

filter_clusters: Cluster the river crossings and select the shortest crossing per cluster

Description

Create 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.

Usage

filter_clusters(crossings, river, eps = 100)

Value

An object of class sf::sfc_LINESTRING including the shortest edge per cluster

Arguments

crossings

Crossing edge geometries as a simple feature object

river

The river geometry as a simple feature object

eps

DBSCAN parameter referring to the size (radius) distance of the neighborhood. Should approximate the distance between edges that we want to consider as a single river crossing