View source: R/FetchFunctions.R
fetchUSGSTileIndex | R Documentation |
Downloads the USGS tile index file from the USGS rockyweb server. The tile index is the LPC_TESM geopackage that is updated by the USGS as new lidar data are added to the published collection of data. This file is large so it usually makes sense to download it once and keep a local copy. However, the files also changes daily so if you want the latest index, you should download the index more frequently.
fetchUSGSTileIndex(destfile = "", url = "", method = "libcurl", ...)
destfile |
A character string specifying the file name for the downloaded tile index. If not provided or empty, the index is stored in the current working directory using the filename in the url. |
url |
A character string with the URL for tile index file. If an empty string, FESM_LPC_TILE.gpkg from the USGS rockyweb server is used. |
method |
Method used with |
... |
Additional arguments passed to |
When retrieving large files, it may be necessary to increase the timeout period so downloads can complete. This is done using the following line of code (sets timeout to 5000 seconds):
options(timeout = max(5000, getOption("timeout")))
You can also download the tile index manually and then use setUSGSTileIndex()
to activate the index for use with USGSlidar
functions.
An (invisible) integer code, 0 for success and non-zero for failure.
This is the value returned from download.file
.
## Not run:
fetchUSGSTileIndex("")
fetchUSGSTileIndex("Tiles.gpkg")
fetchUSGSTileIndex("Tiles.gpkg", method = "wininet")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.