osmdata_as_sf {rcrisp} | R Documentation |
Retrieve OpenStreetMap data as sf object
Description
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.
Usage
osmdata_as_sf(key, value, aoi, force_download = FALSE)
Arguments
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 |
Value
An sf object with the retrieved OpenStreetMap data
Examples
bb <- get_osm_bb("Bucharest")
osmdata_as_sf("highway", "motorway", bb)
[Package rcrisp version 0.1.4 Index]