R interface to the CycleStreets.net LTN. See API docs.

ways(
  bb,
  pat = "c047ed46f7b50b18",
  base_url = "https://api.cyclestreets.net/v2/mapdata?",
  limit = 400,
  types = "way",
 
    wayFields = "name,ridingSurface,id,cyclableText,quietness,speedMph,speedKmph,pause,color",
  zoom = 16
)

Arguments

bb

An sf or 'bounding box' like object

pat

The API key used. By default this uses Sys.getenv("CYCLESTREETS").

base_url

The base url from which to construct API requests (with default set to main server)

Examples

if (FALSE) {

u = paste0("https://api.cyclestreets.net/v2/mapdata?key=c047ed46f7b50b18",
  "&limit=400&types=way&wayFields=name,ridingSurface,id,cyclableText,",
  "quietness,speedMph,speedKmph,pause,color&zoom=16&",
  "bbox=-9.160863,38.754642,-9.150128,38.75764")
ways_test = sf::read_sf(u)
bb <- "0.101131,52.195807,0.170288,52.209719"
way_data <- ways(bb)
plot(way_data)
bb <- stplanr::routes_fast_sf
way_data <- ways(bb)
plot(way_data)
}