-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNASADEM
32 lines (24 loc) · 870 Bytes
/
NASADEM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
var geometry = ee.Geometry.Rectangle(-1, 51, 0.5, 52) // london
var geometry = ee.Geometry.Rectangle(113.7, 22.08, 114.5, 22.68) // hong kong
var geometry = ee.Geometry.Rectangle(-74.5, 40.36, -73.5, 41.16) // nyc
// Import the dataset and select the elevation band.
var dataset = ee.Image('NASA/NASADEM_HGT/001');
var elevation = dataset.select('elevation');
// Add a white background image to the map.
var background = ee.Image(1);
Map.addLayer(background, {min: 0, max: 1});
// Set elevation visualization properties.
var elevationVis = {
min: 0,
max: 500,
};
// Set elevation <= 0 as transparent and add to the map.
Map.addLayer(elevation.updateMask(elevation.gt(0)), elevationVis, 'Elevation');
Map.setCenter(17.93, 7.71, 2);
Export.image.toDrive({
image: elevation,
description: 'dem_nyc',
maxPixels: 1e13,
scale: 30,
region: geometry
});