R/oi_cycle_crossings.R
oi_cycle_crossings.Rd
Function to get OSM data based on cyclist crossing infrastructure.
oi_cycle_crossings(osm_sf, remove=FALSE)
A sf
and data.frame
object containing OpenStreetMap
infrastructure data, obtained from the
osmextract
function.
Boolean - If TRUE, features that do not form part of cycle
crossings are removed from the osm_sf
before being returned.
an sf
object with openinfra_cycle_crossings column added.
Note: the osm_sf
must contain the following tags:
c("cycleway", "crossing", "bicycle", "crossing_island", "crossing:island", "crossing:ref", "crossing_ref")
Note: The osm_sf
must contain linestring geometries rather than nodes.
Further motivation behind this function can be found
here.
data = example_data
example_output = oi_cycle_crossings(data)
plot(example_output["openinfra_cycle_crossings"])