Function to recategorise OSM data based on the type of cycle infrastructure.

oi_cycle_separation(osm_sf, remove=FALSE)

Arguments

osm_sf
  • A sf and data.frame object containing OpenStreetMap infrastructure data, obtained from the osmextract function.

remove
  • Boolean, FALSE by default, if TRUE, removes ways that are not part of any dedicated cycling infrastructure.

Value

The provided osm_sf is returned with an additional column, openinfra_cycle_infa, which indicates the type of cycling infrastructure mapped as being one of the following values: c("[cycle crossing](https://tinyurl.com/cycle-crossing)", "[cycle lane](https://tinyurl.com/cycle-lane)", "Mixed traffic - 20 mph" (no cycling infrastructure, carriageway maxspeed is 20 mph), "Mixed traffic - NA maxspeed" (no cycling infrastructure, carriageway maxspeed value is NA), "Segregated - cycleway/track" ( infrastructure is segregated from carriageway by definition and is either a [cycleway](https://tinyurl.com/higway-cycleway) or a [cycle track](https://tinyurl.com/cycle-track)), "shared lane/busway" (there is a lane drawn for cyclists, but it is either shared with a [busway](https://tinyurl.com/sahre-bus) or a [shared lane](https://tinyurl.com/share-lane) with carriageway users)

Details

This function recetegorises OSM data on cycling infrastructure to one of the protection categories defined within the LTN1/20 guidance (Mixed Traffic | Cycle Lanes | Protected Cycling Space).

Note: The osm_sf must contain the following tags: c("cycleway", "cycleway_left", "cycleway_right", "cycleway_both")

Examples

library(sf)
data = example_data
example_output = oi_cycle_separation(data, remove=TRUE)
plot(example_output$geometry)