# get data
library(osmextract)
#> Data (c) OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright.
#> Check the package website, https://docs.ropensci.org/osmextract/, for more details.
munich_multilines <- oe_get(
place = "Muenches",
layer = "multilinestrings",
provider = "bbbike",
extra_tags = "route"
)
#> The input place was matched with: Muenchen
#> The chosen file was already detected in the download directory. Skip downloading.
#> The corresponding gpkg file was already detected. Skip vectortranslate operations.
#> Reading layer `multilinestrings' from data source
#> `C:\Users\andrea.gilardi\Documents\osm-data\bbbike_Muenchen.gpkg'
#> using driver `GPKG'
#> Simple feature collection with 3467 features and 5 fields
#> Geometry type: MULTILINESTRING
#> Dimension: XY
#> Bounding box: xmin: 11.06001 ymin: 47.8 xmax: 11.99999 ymax: 48.42
#> Geodetic CRS: WGS 84
# plot
library(tmap)
#> Registered S3 methods overwritten by 'stars':
#> method from
#> st_bbox.SpatRaster sf
#> st_crs.SpatRaster sf
tm_shape(munich_multilines) +
tm_lines(col = "route", palette = "Set2") +
tm_layout(legend.outside = TRUE)
Created on 2021-11-12 by the reprex package (v2.0.1)