terra::rast() converts a GeoPressureR map object into a terra::SpatRaster with the data
of each stationary period stored in a different layer.
Arguments
- x
a GeoPressureR
mapobject.- names
names of the SpatRaster layers created. See
terra::names.- crs
coordinate reference system of the SpatRaster.
- ...
additional parameters for
terra::rast
Value
A terra::SpatRaster object.
See also
Other map:
map_add_mask_water(),
map_create(),
print.map()
Examples
# Load a tag with pressure and light likelihood maps computed with `geopressuretemplate()`
withr::with_dir(system.file("extdata", package = "GeoPressureR"), {
tag <- load_interim("18LX", var = "tag")
})
terra::rast(tag$map_pressure)
#> class : SpatRaster
#> size : 100, 78, 5 (nrow, ncol, nlyr)
#> resolution : 0.5, 0.5 (x, y)
#> extent : -16, 23, 0, 50 (xmin, xmax, ymin, ymax)
#> coord. ref. : lon/lat WGS 84 (EPSG:4326)
#> source(s) : memory
#> names : #1, #2, #3, #4, #5
#> min values : 0, 0, 0, 0, 0
#> max values : 1, 0.060612, 0.08361, 0.072608, 0.022843
#> time : 2017-07-27 00:00:00zUTC to 2017-08-08 00:12:30zUTC (5 steps)
