Split Map in earth engine¶
In [1]:
Copied!
# For google colab or first time setup, install the package first using the following command:
# !pip install geohub
# For google colab or first time setup, install the package first using the following command:
# !pip install geohub
In [2]:
Copied!
import ee
import geohub.foliumap as geohub
import ee
import geohub.foliumap as geohub
In [3]:
Copied!
ee.Initialize()
ee.Initialize()
In [4]:
Copied!
ee.Authenticate()
ee.Authenticate()
Out[4]:
True
In [5]:
Copied!
layer1 = ee.Image('NASA/NASADEM_HGT/001') # NASADEM: NASA NASADEM Digital Elevation 30m
layer2 = ee.Image('JRC/GSW1_4/GlobalSurfaceWater') # JRC Global Surface Water Mapping Layers
# Define the visualization parameters.
vis_params1 = {
'min': 0,
'max': 2000,
}
vis_params2 = {
'bands': ['occurrence'],
'min': 0,
'max': 100,
'palette': ['ffffff', 'ffbbbb', '0000ff']
}
# Create a map.
m = geohub.Map()
# Create a split map.
m = m.split_map(layer1, layer2, vis_params1, vis_params2)
# Display the split map.
m
layer1 = ee.Image('NASA/NASADEM_HGT/001') # NASADEM: NASA NASADEM Digital Elevation 30m
layer2 = ee.Image('JRC/GSW1_4/GlobalSurfaceWater') # JRC Global Surface Water Mapping Layers
# Define the visualization parameters.
vis_params1 = {
'min': 0,
'max': 2000,
}
vis_params2 = {
'bands': ['occurrence'],
'min': 0,
'max': 100,
'palette': ['ffffff', 'ffbbbb', '0000ff']
}
# Create a map.
m = geohub.Map()
# Create a split map.
m = m.split_map(layer1, layer2, vis_params1, vis_params2)
# Display the split map.
m
Out[5]:
Make this Notebook Trusted to load map: File -> Trust Notebook