# Copy the ITS file to tempdir() to make sure that the examples do not
# require internet connection. You can skip the next 4 lines (and start
# directly with oe_get_keys) when running the examples locally.
res = file.copy(
from = system.file("its-example.osm.pbf", package = "osmextract"),
to = file.path(tempdir(), "test_its-example.osm.pbf"),
overwrite = TRUE
)
res = oe_get("ITS Leeds", quiet = TRUE, download_directory = tempdir())
oe_find("ITS Leeds", provider = "test", download_directory = tempdir())
oe_find(
"ITS Leeds", provider = "test",
download_directory = tempdir(), return_gpkg = FALSE
)
if (FALSE) {
oe_find("Isle of Wight", download_directory = tempdir())
oe_find("Malta", download_if_missing = TRUE, download_directory = tempdir())
oe_find(
"Leeds",
provider = "bbbike",
download_if_missing = TRUE,
download_directory = tempdir(),
return_pbf = FALSE
)}
# Remove .pbf and .gpkg files in tempdir
oe_clean(tempdir())
Run the code above in your browser using DataLab