Skip to contents

Retrieve OpenStreetMap data for a given location, including the city boundary, the river centreline and surface, the streets, the railways, and the buildings

Usage

get_osmdata(
  city_name,
  river_name,
  network_buffer = NULL,
  buildings_buffer = NULL,
  city_boundary = TRUE,
  crs = NULL,
  force_download = FALSE
)

Arguments

city_name

A character string with the name of the city.

river_name

A character string with the name of the river.

network_buffer

Buffer distance in meters around the river to get the streets and railways, default is 0 means no network data will be downloaded

buildings_buffer

Buffer distance in meters around the river to get the buildings, default is 0 means no buildings data will be downloaded

city_boundary

A logical indicating if the city boundary should be retrieved. Default is TRUE.

crs

An integer with the EPSG code for the projection. If no CRS is specified, the default is the UTM zone for the city.

force_download

Download data even if cached data is available

Value

An list with the retrieved OpenStreetMap data sets for the given location

Examples

if (FALSE) { # interactive()
get_osmdata("Bucharest", "Dâmbovița")
}