landfireAPI {rlandfire} | R Documentation |
Call the LANDFIRE Product Service (LFPS) API
Description
landfireAPI
downloads LANDFIRE data by calling the LFPS API
Usage
landfireAPI(
products,
aoi,
projection = NULL,
resolution = NULL,
edit_rule = NULL,
edit_mask = NULL,
path = NULL,
max_time = 10000,
method = "curl",
verbose = TRUE
)
Arguments
products |
Product names as character vector (see: Products Table) |
aoi |
Area of interest as character or numeric vector defined by
latitude and longitude in decimal degrees in WGS84 and ordered
|
projection |
Optional. A numeric value of the WKID for the output projection Default is a localized Albers projection. |
resolution |
Optional. A numeric value between 30-9999 specifying the resample resolution in meters. Default is 30m. |
edit_rule |
Optional. A list of character vectors ordered "operator class" "product", "operator", "value". Limited to fuel theme products only. (see: LFPS Guide) |
edit_mask |
Optional. Not currently functional |
path |
Path to |
max_time |
Maximum time, in seconds, to wait for job to be completed. |
method |
Passed to |
verbose |
If FALSE suppress all status messages |
Value
Returns a landfire_api
object with named elements:
-
request
- list with elementsquery
,date
,url
,job_id
,dwl_url
-
content
- Informative messages passed from API -
response
- Full response -
status
- Final API status, one of "Failed", "Succeeded", or "Timed out" -
path
- path to save directory
Examples
## Not run:
products <- c("ASP2020", "ELEV2020", "140CC")
aoi <- c("-123.7835", "41.7534", "-123.6352", "41.8042")
projection <- 6414
resolution <- 90
edit_rule <- list(c("condition","ELEV2020","lt",500), c("change", "140CC", "st", 181))
save_file <- tempfile(fileext = ".zip")
resp <- landfireAPI(products, aoi, projection, resolution, edit_rule = edit_rule, path = save_file)
## End(Not run)