我正在尝试将不同位置的不同光栅数据集合并为一个光栅对象。我刚刚发现
stars
r中的包可能会做到这一点,我非常喜欢这个包,因为很多
tidyverse
方法是兼容的。然而,我没有找到一个好的功能来实现这样的功能
row_bind()
。例如,如果我有两个单独的
星星
来自两个状态的对象,我想将它们合并为一个
星星
对象请参见以下示例:
library(tidyverse)
library(stars)
rhode = read_stars('Data/zz/Rhode.tif') %>%
st_transform(crs = 4326) %>%
rename(ndvi = `Rhode.tif`)
delaware = read_stars('Data/zz/Delaware.tif') %>%
st_transform(crs = 4326) %>%
rename(ndvi = `Delaware.tif`)
以下是两个
星星
对象外观:
> rhode
stars object with 2 dimensions and 1 attribute
attribute(s):
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
ndvi [1] 0.214 0.44665 0.4922 0.4827789 0.5251 0.7493 189
dimension(s):
from to offset delta refsys point values x/y
x 1 18 NA NA WGS 84 FALSE [18x20] -71.925,...,-71.075 [x]
y 1 20 NA NA WGS 84 FALSE [18x20] 41.075,...,42.025 [y]
curvilinear grid
> delaware
stars object with 2 dimensions and 1 attribute
attribute(s):
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
ndvi [1] -0.128 0.3935 0.4543 0.4296167 0.48755 0.607 270
dimension(s):
from to offset delta refsys point values x/y
x 1 18 NA NA WGS 84 FALSE [18x30] -75.825,...,-74.975 [x]
y 1 30 NA NA WGS 84 FALSE [18x30] 38.425,...,39.875 [y]
curvilinear grid
有没有一个简单的函数可以将这两者结合起来
星星
对象合并为单个
星星
对象
如有任何建议,我们将不胜感激!