【发布时间】:2020-05-06 10:46:44
【问题描述】:
我有两个栅格:
raster1
class : RasterLayer
dimensions : 2803, 5303, 14864309 (nrow, ncol, ncell)
resolution : 0.008333333, 0.008333333 (x, y)
extent : 60.85, 105.0417, 15.95833, 39.31667 (xmin, xmax, ymin, ymax)
crs : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0
source : memory
names : npp
values : -0.345, 1.723 (min, max)
raster2
class : RasterLayer
dimensions : 2803, 5303, 14864309 (nrow, ncol, ncell)
resolution : 0.008333333, 0.008333333 (x, y)
extent : 60.85, 105.0417, 15.95833, 39.31667 (xmin, xmax, ymin, ymax)
crs : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0
source : C:/a/b/Documents/c/landuse.tif
names : landuse
values : 1, 12 (min, max)
attributes :
ID zn
from: 1 evergreen needleleaf forest
to : 12 croplands
raster2 是特定区域的土地覆盖类型,raster1 是净初级生产力值。我想计算raster 2 中每个土地覆盖类别的净初级生产力。我如何在 R 中实现这一点?
【问题讨论】: