0
点赞
收藏
分享

微信扫一扫

Google Earth Engine(GEE)——Error: Exported bands must have compatible data types; found inconsistent


错误:

Error: Exported bands must have compatible data types; found inconsistent types: Int16 and Byte. (Error code: 3) 

这个问题的来源于博客:

​​(400条消息) Google Earth Engine(GEE)——利用归一化建筑指数NDBI(不透水层)提取建筑物_此星光明2021年博客之星云计算Top3的博客_ndbi提取建筑物​​

原有的下载代码:

//下载影像
Export.image.toDrive({
image: scol_clip,
description: '2011_sr',
folder: 'training02',
scale: 30,
crs:'EPSG:4326',
region:hh
});


 我们看到当我们运行到这个结果的时候会出现这个问题:这里scol_clip打印出来的结果是image类型,而我们下载的image是一个整个image,所以就无法识别,我们需要改进一下下载的代码。我们可以直接选择我们要下载的波段进行下载就行了,因为每一个波段都是整形,这样就把上面的问题解决了。

Google Earth Engine(GEE)——Error: Exported bands must have compatible data types; found inconsistent_error

修改后的代码:

//方法1不选择波段,全波段影像下载
Export.image.toDrive({
image: scol_clip.select("NDBI").int16(),
description: '2011_sr',
folder: 'training02',
scale: 30,
crs:'EPSG:4326',
region:hh
});

//方法2不选择波段,只选择NDBI波段,这样默认就是整形
Export.image.toDrive({
image: scol_clip.select("NDBI"),
description: '2011_sr',
folder: 'training02',
scale: 30,
crs:'EPSG:4326',
region:hh
});

Google Earth Engine(GEE)——Error: Exported bands must have compatible data types; found inconsistent_error_02



举报

相关推荐

0 条评论