GEE开发之加载海拔、坡度、坡向数据
- 方法一:加载elevation、slope、aspect和hillshade数据
- 方法二:加载elevation、slope、aspect数据
前言:根据矢量图加载海拔、坡度、坡向和山体阴影。
方法一:加载elevation、slope、aspect和hillshade数据
var geometry = ee.FeatureCollection('users/www1573979951/lh');
Map.centerObject(geometry,6);
var dataset = ee.Image("USGS/SRTMGL1_003")
var terrain = ee.Algorithms.Terrain(dataset);
//海拔
var elevation = terrain.select('elevation');
//坡度
var slope = terrain.select('slope');
//坡向
var aspect = terrain.select('aspect');
//山体阴影
var hillshade = terrain.select('hillshade');
Export.image.toDrive({
image: elevation,
description: "elevation",
fileNamePrefix: "elevation",
scale: 30,
crs: "EPSG:4326",
folder: 'dem',
maxPixels: 1e13,
region: geometry});
Export.image.toDrive({
image: slope,
description: "slope",
fileNamePrefix: "slope",
scale: 30,
crs: "EPSG:4326",
folder: 'dem',
maxPixels: 1e13,
region: geometry});
Export.image.toDrive({
image: aspect,
description: "aspect",
fileNamePrefix: "aspect",
scale: 30,
crs: "EPSG:4326",
folder: 'dem',
maxPixels: 1e13,
region: geometry});
Export.image.toDrive({
image: hillshade,
description: "hillshade",
fileNamePrefix: "hillshade",
scale: 30,
crs: "EPSG:4326",
folder: 'dem',
maxPixels: 1e13,
region: geometry});
方法二:加载elevation、slope、aspect数据
var geometry = ee.FeatureCollection('users/www1573979951/hkh_boundary');
Map.centerObject(geometry,6);
var SRTM30 = ee.Image("NASA/NASADEM_HGT/001")
var elevation = SRTM30.select('elevation').clip(geometry)
var slope = ee.Terrain.slope(elevation).clip(geometry)
var aspect = ee.Terrain.aspect(SRTM30).clip(geometry)
Export.image.toDrive({
image: elevation,
description: "elevation",
fileNamePrefix: "elevation",
scale: 30,
crs: "EPSG:4326",
folder: 'dem',
maxPixels: 1e13,
region: geometry });
Export.image.toDrive({
image: slope,
description: "slope",
fileNamePrefix: "slope",
scale: 30,
crs: "EPSG:4326",
folder: 'dem',
maxPixels: 1e13,
region: geometry });
Export.image.toDrive({
image: aspect,
description: "aspect",
fileNamePrefix: "aspect",
scale: 30,
crs: "EPSG:4326",
folder: 'dem',
maxPixels: 1e13,
region: geometry });