This function is used to download and extract OpenStreetMap (OSM) data based on specified zones.

make_osm(
  force_download = FALSE,
  zones_file = "input/zones.geojson",
  output_file = "input/input.osm.pbf"
)

Arguments

force_download

A logical value indicating whether to force the download of OSM data even if it already exists. Default is FALSE.

zones_file

The file path or name of the zones file in GeoJSON format. Default is "input/zones.geojson".

output_file

The file path or name of the output OSM file in PBF format. Default is "input/input.osm.pbf".

Value

This function does not return any value. It downloads and extracts OSM data based on the specified zones.

Examples

if (file.exists("input/zones.geojson")) {
  make_osm(force_download = TRUE, zones_file = "input/zones.geojson")
}