Download and process OpenStreetMap (OSM) road lines within a specified geographical place,
from the Geofabrik database. It is a wrapper around
functions in the package osmextract, and
processes the downloaded files for subsequent analyses. Refer to package osmextract for
more details and options for input arguments when downloading the data.
Usage
get_roads_osm(
place,
date = NULL,
dir_raw = osmextract::oe_download_directory(),
filename = NULL,
...
)Arguments
- place
sfobject (with projected coordinate reference system). Geographical area to match with the (.osm.pbf) file in the data archive. Argument passed toosmextract::oe_match().- date
Date of OSM data snapshot to download. Refer to https://download.geofabrik.de for the specific dates available. Defaults to
NULL(download the latest available data).- dir_raw
character. Directory to download the raw unprocessed OSM data. Passed to argument
download_directoryinosmextract::oe_read().- filename
character (optional). File path to export output data (GeoJSON format).
- ...
Other arguments passed to
osmextract::oe_read().
