View source: R/FetchFunctions.R
fetchUSGSProjectIndex | R Documentation |
Retrieve the USGS lidar project index file. The project index file contains project area boundaries for all USGS lidar data. Additional attributes provide information about the acquisition such as the starting and ending collection dates, pulse density, quality level, work unit identifier and the work package identifier. The index is stored in geopackage format and can be somewhat large. The index is refreshed whenever new data is added to the USGS collection.
fetchUSGSProjectIndex(
destfile = "",
url = "",
type = "WESM",
method = "libcurl",
...
)
destfile |
A character string specifying the file name for the downloaded 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 the project index file. If an empty
string, the URL for the project index corresponding |
type |
A character string specifying the index to use. Valid values
are |
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 project index manually and then use
setUSGSProjectIndex()
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:
fetchUSGSProjectIndex()
fetchUSGSProjectIndex("Project.gpkg")
fetchUSGSProjectIndex("Project.gpkg", method = "wininet")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.