05 gee datasets
Introduction¶
Earth Engine has two fundamental data types: Image
for raster data and Geometry
for vector data.
Image
: the fundamental raster data type in Earth Engine.ImageCollection
: a stack or time-series of images.Geometry
: the fundamental vector data type in Earth Engine.Feature
: a Geometry with attributes.FeatureCollection
: a set of features.
Loading Earth Engine datasets¶
Earth Engine datasets can be found at https://developers.google.com/earth-engine/datasets.
Uncomment and execute the following code block to install geemap if needed.
In [1]:
Copied!
# !pip install geemap
# !pip install geemap
In [2]:
Copied!
import ee
import geemap
import ee
import geemap
In [3]:
Copied!
Map = geemap.Map()
# Add Earth Engine datasets
dem = ee.Image('USGS/SRTMGL1_003')
landsat7 = ee.Image('LE7_TOA_5YEAR/1999_2003')
states = ee.FeatureCollection("TIGER/2018/States")
# Set visualization parameters.
vis_params = {
'min': 0,
'max': 4000,
'palette': ['006633', 'E5FFCC', '662A00', 'D8D8D8', 'F5F5F5'],
}
# Add Earth Eninge layers to Map
Map.addLayer(dem, vis_params, 'SRTM DEM', True, 0.5)
Map.addLayer(
landsat7,
{'bands': ['B4', 'B3', 'B2'], 'min': 20, 'max': 200, 'gamma': 1.5},
'Landsat 7',
)
Map.addLayer(states, {}, "US States")
Map
Map = geemap.Map()
# Add Earth Engine datasets
dem = ee.Image('USGS/SRTMGL1_003')
landsat7 = ee.Image('LE7_TOA_5YEAR/1999_2003')
states = ee.FeatureCollection("TIGER/2018/States")
# Set visualization parameters.
vis_params = {
'min': 0,
'max': 4000,
'palette': ['006633', 'E5FFCC', '662A00', 'D8D8D8', 'F5F5F5'],
}
# Add Earth Eninge layers to Map
Map.addLayer(dem, vis_params, 'SRTM DEM', True, 0.5)
Map.addLayer(
landsat7,
{'bands': ['B4', 'B3', 'B2'], 'min': 20, 'max': 200, 'gamma': 1.5},
'Landsat 7',
)
Map.addLayer(states, {}, "US States")
Map
Out[3]:
Make this Notebook Trusted to load map: File -> Trust Notebook
Searching the Earth Engine Data Catalog¶
In [4]:
Copied!
Map = geemap.Map()
Map
Map = geemap.Map()
Map
Out[4]:
Make this Notebook Trusted to load map: File -> Trust Notebook
Using the datasets module¶
In [5]:
Copied!
from geemap.datasets import DATA
from geemap.datasets import DATA
In [6]:
Copied!
Map = geemap.Map()
dem = ee.Image(DATA.USGS_SRTMGL1_003)
vis_params = {
'min': 0,
'max': 4000,
'palette': ['006633', 'E5FFCC', '662A00', 'D8D8D8', 'F5F5F5'],
}
Map.addLayer(dem, vis_params, 'SRTM DEM')
Map
Map = geemap.Map()
dem = ee.Image(DATA.USGS_SRTMGL1_003)
vis_params = {
'min': 0,
'max': 4000,
'palette': ['006633', 'E5FFCC', '662A00', 'D8D8D8', 'F5F5F5'],
}
Map.addLayer(dem, vis_params, 'SRTM DEM')
Map
Out[6]:
Make this Notebook Trusted to load map: File -> Trust Notebook
Last update:
2022-03-25