npn_download_geospatial | R Documentation |
Function for directly downloading any arbitrary Geospatial layer data from the NPN Geospatial web services.
npn_download_geospatial(
coverage_id,
date,
format = "geotiff",
output_path = NULL
)
coverage_id |
The coverage id (machine name) of the layer for which to
retrieve. Applicable values can be found via the |
date |
Specify the date param for the layer retrieved. This can be a
calendar date formatted YYYY-mm-dd or it could be a string integer
representing day of year. It can also be |
format |
The output format of the raster layer retrieved. Defaults to
|
output_path |
Optional value. When set, the raster will be piped to the file path specified. When left unset, this function will return a terra::SpatRaster object. |
Information about the layers can also be viewed at the getCapbilities page directly: https://geoserver.usanpn.org/geoserver/wms?request=GetCapabilities
returns nothing when output_path
is set, otherwise a
terra::SpatRaster object meeting the coverage_id
, date
and format
parameters specified.
## Not run:
ras <- npn_download_geospatial("si-x:30yr_avg_six_bloom", "255")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.