| walk_build_network | R Documentation |
Converts user-supplied or downloaded spatial street data into a clean, pedestrian-routing graph structure. Computes edge travel times at a constant walking speed, optionally performs geometric repairs (planarization, endpoint snapping) at the user's discretion, and prepares Compressed Sparse Row (CSR) topology via compiled Rust.
walk_build_network(
data,
crs = NULL,
walk_speed_kmh = 4.5,
repair = FALSE,
planarize = FALSE,
snap_tolerance_m = 0,
keep_components = c("largest", "all"),
drop_classes = c("motorway", "trunk"),
drop_subclasses = TRUE,
verbose = TRUE
)
data |
An |
crs |
Optional target metric CRS (e.g. |
walk_speed_kmh |
Walking design speed in km/h (default is 4.5 km/h, the international pedestrian planning standard, approx. 1.25 m/s). |
repair |
Logical. If |
planarize |
Logical. If |
snap_tolerance_m |
Numeric. Threshold in meters to snap endpoint gaps. Default is 0.0 (no snapping). A value between 2.0 and 5.0 is recommended for imperfect street databases. |
keep_components |
Character. Either |
drop_classes |
Character vector of road classes to exclude (e.g. |
drop_subclasses |
Logical. If |
verbose |
Logical. If |
A walk_network S3 object containing:
nodes |
|
edges |
|
csr |
List with Compressed Sparse Row topology arrays ( |
walk_speed_kmh |
The walking speed used. |
giant_comp_id |
ID of the giant connected component. |
crs |
The coordinate reference system of the network. |
data(streets_cusco)
net <- walk_build_network(streets_cusco, verbose = FALSE)
print(net)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.