Examples for 'stars::st_res'


obtain (spatial) resolution of a stars object

Aliases: st_res

Keywords:

### ** Examples

st_res(L7_ETMs)
   x    y 
28.5 28.5 
st_res(L7_ETMs, absolute = FALSE)
    x     y 
 28.5 -28.5 
st_res(L7_ETMs, all = TRUE)
$x
[1] 28.5

$y
[1] -28.5

$band
[1] NA
if (require(starsdata)) {
  paste0("netcdf/", c("avhrr-only-v2.19810901.nc",
    "avhrr-only-v2.19810902.nc",
    "avhrr-only-v2.19810903.nc",
    "avhrr-only-v2.19810904.nc")) |>
  system.file(package = "starsdata") |>
  read_stars(quiet = TRUE) -> x
  st_res(x) |> print()
  st_res(x, all = TRUE) |> print()
}
Loading required package: starsdata
Warning in library(package, lib.loc = lib.loc, character.only = TRUE,
logical.return = TRUE, : there is no package called 'starsdata'

[Package stars version 0.6-7 Index]