使用Google Earth Engine (GEE)下载土地覆盖数据
该代码从USGS的NLCD2016土地覆盖数据集中加载了一个影像,并剪切为感兴趣区域。然后,将其添加到地图上进行可视化,并将其导出为GeoTIFF图像进行下载。您需要将代码中的lat1、lon1、lat2和lon2替换为所需区域的经纬度坐标,并根据需要调整其他参数(例如可视化参数和导出名称)。
该代码从USGS的NLCD2016土地覆盖数据集中加载了一个影像,并剪切为感兴趣区域。然后,将其添加到地图上进行可视化,并将其导出为GeoTIFF图像进行下载。您需要将代码中的lat1、lon1、lat2和lon2替换为所需区域的经纬度坐标,并根据需要调整其他参数(例如可视化参数和导出名称)。
// Load the land cover data
var landCover = ee.Image('USGS/NLCD/NLCD2016');
// Select a region of interest
var roi = ee.Geometry.Rectangle([lon1, lat1, lon2, lat2]);
// Clip the land cover data to the region of interest
var clippedLandCover = landCover.clip(roi);
// Define the visualization parameters for the land cover data
var visParams = {
min: 0,
max: 95,
palette: [
'476ba1', 'd1def8', 'decaca', 'd99482', 'ee0000', 'ab0000',
'b3aea3', '68ab63', '1c6330', 'b5ca8f', 'a68c30', 'ccba7d',
'e3e3c2', 'caca78', '99c247', '78ae94', 'dcdcaa', 'fbff13',
'b6ff05', '27ff87', 'c24f44', 'c9c3b4', 'ffffff'
]
};
// Display the clipped land cover data on the map
Map.addLayer(clippedLandCover, visParams, 'Land Cover');
// Export the clipped land cover data as a GeoTIFF image
Export.image.toDrive({
image: clippedLandCover,
description: 'land_cover_data',
scale: 30,
region: roi
});
DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。
更多推荐



所有评论(0)