| get_osm_city_boundary | R Documentation |
This function retrieves the city boundary from OpenStreetMap based on a bounding box with the OSM tags "place:city" and "boundary:administrative". The result is filtered by the city name.
get_osm_city_boundary(
bb,
city_name,
crs = NULL,
multiple = FALSE,
force_download = FALSE
)
bb |
Bounding box of class |
city_name |
A case-sensitive character vector of length 1 with the name of the city |
crs |
Coordinate reference system as EPSG code |
multiple |
A logical indicating if multiple city boundaries should be returned. By default, only the first one is returned. |
force_download |
Download data even if cached data is available |
An object of class sf::sfc_POLYGON or sf::sfc_MULTIPOLYGON
with the city boundary
bb <- get_osm_bb("Bucharest")
crs <- get_utm_zone(bb)
get_osm_city_boundary(bb = bb, city_name = "Bucharest", crs = crs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.