meteoland_get_lowres_raster | R Documentation |
meteoland_get_lowres_raster
is a wrapper for the
$get_lowres_raster
method of lfcMeteoland
objects.
See also meteoland
.
meteoland_get_lowres_raster(
object,
date,
spatial = "stars",
rast_column = "rast",
bands = TRUE,
clip = NULL
)
object |
|
date |
character with the date of the raster to retrieve, i.e "2020-04-25" |
spatial |
character vector of lenght 1 indicating the type of raster object to return, "raster" or "stars", the default. |
Connection to database can be slow. Rasters retrieved from the db
are stored in a temporary cache inside the lfcMeteoland object created by
meteoland
, making subsequent calls to the same table are
faster. But, be warned that in-memory rasters can use a lot of memory!
A raster object: RasterBrick
if spatial is raster
,
stars
if spatial is stars
. See
https://r-spatial.github.io/stars/index.html for details about stars
objects and raster
for details about raster objects.
Other Meteoland functions:
meteoland_historical_points_interpolation()
,
meteoland_points_interpolation()
,
meteoland_raster_interpolation()
if (interactive()) {
meteolanddb <- meteoland()
# raster
ab_raster <- meteoland_get_lowres_raster(meteolanddb, '2020-04-25', 'raster')
# stars
ab_stars <- meteoland_get_lowres_raster(meteolanddb, '2020-04-25', 'stars')
# we can use pipes
meteolanddb |>
meteoland_get_lowres_raster('2020-04-25', 'raster')
# meteolanddb is an R6 object, so the previous examples are the same as:
meteolanddb$get_lowres_raster('2020-04-25', 'raster')
meteolanddb$get_lowres_raster('2020-04-25', 'stars')
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.