osmdata_as_sf | R Documentation |
Query the Overpass API for a key:value pair within a given bounding box (provided as lat/lon coordiates). Results are cached, so that new queries with the same input parameters will be loaded from disk.
osmdata_as_sf(key, value, aoi, force_download = FALSE)
key |
A character string with the key to filter the data |
value |
A character string with the value to filter the data |
aoi |
An area of interest, provided either as as sf object or "bbox" or as a vector ("xmin", "ymin", "xmax", "ymax") |
force_download |
Download data even if cached data is available |
An sf object with the retrieved OpenStreetMap data
bb <- get_osm_bb("Bucharest")
osmdata_as_sf("highway", "motorway", bb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.