今天来分享一下在GEE计算坡度和坡向,所使用的DEM数据为
‘USGS/SRTMGL1_003’,由美国太空总署(NASA)和国家测绘局(NIMA)联合测量。2000年2月11日,美国发射的“奋进”号飞机上搭载SRTM系统,共计进行了222小时23分钟的数据采集工作,获取北纬60度至南纬60度之间总面积超过1.19亿平方公里的雷达影像数据,覆盖地球80%以上的陆地表面。SRTM系统获取的雷达影像的数据量约9.8万亿字节,经过两年多的数据处理,制成了数字地形高程模型(DEM),即现在的SRTM地形产品数据。
SRTM地形数据按精度可以分为SRTM1和SRTM3,分别对应的分辨率精度为30米和90米数据。
以宁夏为研究区
在var roi = ee.FeatureCollection("users/lilei655123/Ningxia");
Map.centerObject(roi,7)
//研究区自己定义为roi
//SRTM
var srtm = ee.Image('USGS/SRTMGL1_003');
var elevation = srtm.select('elevation').clip(roi);
//计算坡度
var slope = ee.Terrain.slope(elevation).clip(roi);
//计算坡向
var aspect = ee.Terrain.aspect(srtm);
// 将坡向值拉伸到-1————1之间
//-1代表正西、1代表正东方向
var asImage = aspect.divide(180).multiply(Math.PI).sin().clip(roi);
Map.addLayer(slope, {min: 0, max:30}, 'slope');//坡度
Map.addLayer(asImage, {min:-1,max:1}, 'asImage')//坡向
print(slope,'slope')
下载DEM
Export.image.toDrive({
image: elevation,
description: 'elevation',
scale: 30,
maxPixels: 1e13,
region:roi,
fileFormat: 'GeoTIFF',
});
Export.image.toDrive({
image: slope,
description: 'slope',
scale: 30,
maxPixels: 1e13,
region:roi,
fileFormat: 'GeoTIFF',
});
Export.image.toDrive({
image: asImage,
description: 'asImage',
scale: 30,
maxPixels: 1e13,
region:roi,
fileFormat: 'GeoTIFF',
});
计算结果显示:
感谢关注,欢迎转发!
声明:仅供学习使用!