Get the location of files
This function takes a place name and it returns the path of .pbf and
.gpkg files associated with it.
oe_find( place, provider = "geofabrik", download_directory = oe_download_directory(), download_if_missing = FALSE, ... )
place |
Description of the geographical area that should be matched with
a |
provider |
Which provider should be used to download the data? Available
providers can be found with the following command: |
download_directory |
Directory where the files downloaded by osmextract
are stored. By default it is equal to |
download_if_missing |
Attempt to download the file if it cannot be
found? |
... |
Extra arguments that are passed to |
The matching between the existing files (saved in a directory
specified by download_directory parameter) and the input place is
performed using list.files, setting a pattern equal to the basename of
the URL associated to the input place. For example, if you specify
place = "Isle of Wight", then the input place is matched with a URL of
a .osm.pbf file (via oe_match()) and the matching is performed setting a
pattern equal to the basename of that URL.
If there is no file in download_directory that can be matched with the
basename and download_if_missing parameter is equal to TRUE, then the
function tries to download and translate a new file from the chosen
provider (geofabrik is the default provider). If download_if_missing
parameter is equal to FALSE (default value), then the function stops with
an error.
A character vector of length one (or two) representing the path(s) of the
corresponding .pbf (and .gpkg) files.
res = oe_get("ITS Leeds", provider = "test")
oe_find("ITS Leeds", provider = "test")
## Not run:
oe_find("Isle of Wight")
oe_find("Isle of Wight", download_if_missing = TRUE)
oe_find("Leeds", provider = "bbbike", download_if_missing = TRUE)
## End(Not run)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.