【问题标题】:Reading in multiple rasters in terra package在 terra 包中读取多个栅格
【发布时间】:2021-05-12 10:24:51
【问题描述】:

我正在更改我的空间工作流程以使用 terra 包而不是 raster 包。使用光栅包,我曾经将多个光栅直接读入堆栈。

filelist_temp <- list.files(datapath("Climate/World Clim 1 yr Monthly Weather/LCC June and July/June"), full.names = TRUE)
temp_rasters <- stack(filelist_temp)

有没有简单的方法在terra中做同样的操作?

这是我最初想出的,但它不起作用。我最终得到了 25 个 spatRasters 的列表

temp_rasters <- c(lapply(filelist_temp, rast))

【问题讨论】:

    标签: r raster r-raster terra


    【解决方案1】:

    这比我想象的要简单

    temp_rasters <- rast(filelist_temp)
    

    【讨论】:

      猜你喜欢
      • 2021-04-13
      • 2022-08-14
      • 2021-11-30
      • 2022-07-13
      • 2022-06-28
      • 2022-08-03
      • 2021-09-16
      • 2021-07-14
      • 2021-09-11
      相关资源
      最近更新 更多