cluster_stop_nodes: Cluster stop nodes by distance

cluster_stop_nodesR Documentation

Cluster stop nodes by distance

Description

Finds the pairs of nodes within max_dist of each other with find_stop_pairs_within() and merges them with cpp_merge_stop_clusters().

Usage

cluster_stop_nodes(lat, lon, max_dist)

Arguments

lat, lon

Numeric vectors with the coordinates of each node, in degrees.

max_dist

A number, in meters.

Value

An integer vector with the cluster of each node. When every pair of nodes is surely within max_dist, all nodes are in cluster 1 and the pairs are not calculated.


gtfstools documentation built on Oct. 28, 2026, 5:13 p.m.