Convenience wrapper around `osmdata` to download road geometries and return an `sf` object that can be passed into `roads_to_segments()`.
fetch_osm_roads(
place,
key = "highway",
value = NULL,
extra_tags = NULL,
layer = c("osm_lines", "osm_multilines", "osm_polygons", "osm_multipolygons"),
quiet = TRUE,
...
)An `sf` object with road geometries.
A character place name (passed to `osmdata::getbb()`) or a bounding box object accepted by `osmdata::opq()`.
OSM feature key to query. Default is `"highway"`.
Optional character vector of OSM feature values. For example, `c("primary", "secondary")`.
Optional named list of additional tags passed to `osmdata::add_osm_feature()`.
Which OSM layer to return. Defaults to `"osm_lines"`.
Logical; suppress osmdata messages. Default TRUE.
Additional arguments passed to `osmdata::osmdata_sf()`.