如何从Landsat图像中提取值并绘制R中不同材料的光谱图

问题描述

我有一个区域的shapefile,我想获取该区域中不同材料(例如水,道路或植被)的光谱轮廓。看起来像这样吗?

Spectral Profile Graph

什么是最好的方法?

我已经将shapefile加载到r中,但是不确定如何从Landsat栅格堆栈中提取值。

```{r}
landsat<-stack(B1,B2,B3,B4,B5,B6,B7)
roi <- readOGR("roi.shp")
shapes
```

提前谢谢

解决方法

使用以下代码

df[['team_1','team_2']] = df.Game.str.split(' @',expand = True)
df['home'] = df['team 2']

您的栅格对象和roi应该具有相同的坐标系。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...