Google Earth Engine(GEE)中的10m土地利用产品

网友投稿 1209 2022-10-22

Google Earth Engine(GEE)中的10m土地利用产品

Google Earth Engine(GEE)中的10m土地利用产品

今天介绍在GEE中可以调用的土地利用数据,ESA/WorldCover/v100 它是由欧洲航天局(ESA)基于哨兵1号和哨兵2号的影像数据,制成10m分辨率的土地利用产品,共有11个地类。 在GEE中调用代码如下: 还是以山西省为研究区

var roi = ee.FeatureCollection("users/lilei655123/shanxi");var dataset = ee.ImageCollection("ESA/WorldCover/v100").first();var lucc2020=dataset.clip(roi)var visualization = { bands: ['Map'],};Map.centerObject(roi);Map.addLayer(lucc2020, visualization, "Landcover");function addLegend(palette, names) {var panel = ui.Panel();panel.style().set({ width: '200px', position: 'bottom-right'});var intro = ui.Panel([ ui.Label({ value: '土地利用类型', style: {fontSize: '20px', fontWeight: 'bold'} }),]);panel.add(intro);Map.add(panel);// 添加图例颜色以及说明var addLegendLabel = function(color, name) { var showColor = ui.Label({ style: { backgroundColor: color, padding: '10px', margin: '0 0 10px 0' } }); var desc = ui.Label({ value: name, style: {margin: '0 0 8px 8px'} }); //颜色和说明是水平放置 return ui.Panel({ widgets: [showColor, desc], layout: ui.Panel.Layout.Flow('horizontal') }); }; //添加所有的图例列表 for (var i = 0; i < palette.length; i++) { var label = addLegendLabel(palette[i], names[i]); panel.add(label); } }var palette = ['006400','ffbb22','ffff4c','f096ff','fa0000','b4b4b4','f0f0f0','0064c8','0096a0','00cf75','fae6a0'];var names = ["Trees","Shrubland","Grassland","Cropland","Built-up","Barren","Built-up","Snow and ice","Open water","Herbaceous wetland","Mangroves","Moss and lichen"];addLegend(palette, names);

显示结果如下:

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Win10风格的UI框架。Windows10 style UI framework.
下一篇:使用Vue.js框架实现NGA客户端
相关文章

 发表评论

暂时没有评论,来抢沙发吧~