rast.map: Construct a SpatRaster from a 'map'

View source: R/rast.map.R

rast.mapR Documentation

Construct a SpatRaster from a map

Description

This function convert a GeoPressureR map object into a terra::SpatRaster with the data of each stationary periods stored in a different layer.

Usage

rast.map(x, names = glue::glue("#{map$stap$stap_id}"), crs = "epsg:4326", ...)

Arguments

x

a GeoPressureR map object

names

names of the SpatRaster layers created. See terra::names.

crs

character. Description of the Coordinate Reference System (map projection) in PROJ.4, WKT or authority:code notation. See crs. If this argument is missing, and the x coordinates are within -360 .. 360 and the y coordinates are within -90 .. 90, longitude/latitude is assigned

...

additional parameters for terra::rast

Value

A terra::SpatRaster object.

See Also

Other map: map_create(), print.map()

Examples

withr::with_dir(system.file("extdata", package = "GeoPressureR"), {
  tag <- tag_create("18LX", quiet = TRUE) |>
    tag_label(quiet = TRUE) |>
    tag_label(quiet = TRUE) |>
    tag_set_map(
      extent = c(-16, 23, 0, 50),
      scale = 4
    ) |>
    geopressure_map(quiet = TRUE)
})

rast.map(tag$map_pressure)


Rafnuss/GeoPressureR documentation built on April 17, 2025, 12:58 p.m.