| get_osm_streets | R Documentation |
Get OpenStreetMap streets
get_osm_streets(aoi, crs = NULL, highway_values = NULL, force_download = FALSE)
aoi |
Area of interest as sf object or bbox. Required, no default. |
crs |
A numeric vector of length one with the EPSG code of the CRS |
highway_values |
A character vector with the highway values to retrieve. If left NULL, the function retrieves the following values: "motorway", "trunk", "primary", "secondary", "tertiary" |
force_download |
Download data even if cached data is available |
An object of class sf::sfc_LINESTRING
# Set parameters
bb <- get_osm_bb("Bucharest")
crs <- 31600 # National projected CRS
# Get streets with default values
get_osm_streets(aoi = bb, crs = crs)
# Specify street categories to be retrieved
get_osm_streets(aoi = bb, crs = crs, highway_values = "primary")
# Ensure that data is not retrieved from cache
get_osm_streets(aoi = bb, crs = crs, force_download = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.