Skip to content

Commit

Permalink
Imagery: Elevation source enhancement (JAXA ALOS DSM 30m)
Browse files Browse the repository at this point in the history
- Changing elevation data source from NASA SRTM to JAXA ALOS (v3/v2.2)
- Updating elevation info from DEM to DSM
- Updating elevation resolution from 90m to 30m
- Updating legend according to changes
  • Loading branch information
IndigoWizard committed Jun 10, 2023
1 parent 89a4638 commit d32b8e1
Show file tree
Hide file tree
Showing 2 changed files with 259 additions and 255 deletions.
482 changes: 241 additions & 241 deletions webmap.html

Large diffs are not rendered by default.

32 changes: 18 additions & 14 deletions webmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,22 @@ def add_ee_layer(self, ee_image_object, vis_params, name):

# ########## Elevation

# ##### NASA DEM (Digital Elevation Model) collection: 30m resolution
dem = ee.Image('CGIAR/SRTM90_V4').clip(aoi)
# ##### JAXA ALOS DSM: Global 30m (Digital Surface Model)
dem = ee.Image('JAXA/ALOS/AW3D30/V2_2').clip(aoi)

# visual parameters for the DEM imagery
# masking the DSM to the surface of the earth only
dem = dem.updateMask(dem.gt(0))

# visual parameters for the DSM imagery
dem_params = {
'min': 0,
'max': 905
'max': 905,
'bands': ['AVE_DSM']
}

# ##### Elevation
# deriving elevation from previous DEM
elevation = dem.select('elevation').clip(aoi)
# deriving elevation from previous DSM
elevation = dem.select('AVE_DSM').clip(aoi)

# visual parameters for the elevation imagery
elevation_params = {
Expand All @@ -103,7 +107,7 @@ def add_ee_layer(self, ee_image_object, vis_params, name):
}

# ##### Slopes (30m resolution)
# deriving slopes from previous DEM through Elevation
# deriving slopes from previous DSM through Elevation
slopes = ee.Terrain.slope(elevation).clip(aoi)

# visual parameters for the slopes imagery
Expand All @@ -115,14 +119,14 @@ def add_ee_layer(self, ee_image_object, vis_params, name):
}

# ##### Contour lines
# deriving countour lines from previous DEM through Terrain
contours = geemap.create_contours(dem, 0, 905, 20, region=aoi)
# deriving countour lines from previous DSM through Terrain
contours = geemap.create_contours(elevation, 0, 905, 20, region=aoi)

# visual parameters for the contour lines
contours_params = {
'min': 0,
'max': 1000,
'palette': ['#440044', '#00FFFF', '#00FFFF', '#00FFFF'],
'palette' : ['#053061', '#2166ac', '#4393c3', '#92c5de', '#d1e5f0', '#f7f7f7', '#fddbc7', '#f4a582', '#d6604d', '#b2182b', '#67001f'],
'opacity': 0.3
}

Expand Down Expand Up @@ -696,8 +700,8 @@ def getNDWI(image_2):
TCI = m.add_ee_layer(image_satellite, image_params, 'Sentinel-2 True Colors')

# ##### SRTM elevation & slopes
# adding DEM layer
#m.add_ee_layer(dem, dem_params, 'NASA DEM 30m')
# adding DSM layer
#m.add_ee_layer(dem, dem_params, 'NASA DSM 30m')

# adding Hillshades
HILLSHADE = m.add_ee_layer(hillshade, hillshade_params, "Hillshade")
Expand Down Expand Up @@ -889,8 +893,8 @@ def getNDWI(image_2):
</div>
<div class="index-gradient-container">
<div class='legend-scale' id="DEM">
<h4>DEM</h4>
<div class='legend-scale' id="DSM">
<h4>DSM</h4>
<div class="inside-container">
<div class="gradient-block">
<span id="dem-gradient"></span>
Expand Down

0 comments on commit d32b8e1

Please sign in to comment.