47 image thumbnails
Uncomment the following line to install geemap if needed.
In [ ]:
Copied!
# !pip install geemap
# !pip install geemap
How to download image thumbnails from an ImageCollection¶
In [ ]:
Copied!
import os
import ee
import geemap
import os
import ee
import geemap
In [ ]:
Copied!
Map = geemap.Map()
Map = geemap.Map()
In [ ]:
Copied!
roi = ee.Geometry.Point([-122.44, 37.75])
collection = (
ee.ImageCollection("LANDSAT/LC08/C01/T1_SR")
.filterBounds(roi)
.sort("CLOUD_COVER")
.limit(10)
)
image = collection.first()
roi = ee.Geometry.Point([-122.44, 37.75])
collection = (
ee.ImageCollection("LANDSAT/LC08/C01/T1_SR")
.filterBounds(roi)
.sort("CLOUD_COVER")
.limit(10)
)
image = collection.first()
In [ ]:
Copied!
vis_params = {
"bands": ["B6", "B5", "B4"],
"min": 0,
"max": 6000,
"gamma": 1.4,
}
Map.addLayer(image, vis_params, "LANDSAT 7")
Map.setCenter(-122.44, 37.75, 8)
Map
vis_params = {
"bands": ["B6", "B5", "B4"],
"min": 0,
"max": 6000,
"gamma": 1.4,
}
Map.addLayer(image, vis_params, "LANDSAT 7")
Map.setCenter(-122.44, 37.75, 8)
Map
In [ ]:
Copied!
out_img = os.path.expanduser("~/Downloads/landsat.png")
out_img = os.path.expanduser("~/Downloads/landsat.png")
In [ ]:
Copied!
geemap.get_image_thumbnail(image, out_img, vis_params, dimensions=500, format="png")
geemap.get_image_thumbnail(image, out_img, vis_params, dimensions=500, format="png")
In [ ]:
Copied!
geemap.show_image(out_img)
geemap.show_image(out_img)
In [ ]:
Copied!
out_dir = os.path.expanduser("~/Downloads")
out_dir = os.path.expanduser("~/Downloads")
In [ ]:
Copied!
geemap.get_image_collection_thumbnails(
collection, out_dir, vis_params, dimensions=500, format="jpg"
)
geemap.get_image_collection_thumbnails(
collection, out_dir, vis_params, dimensions=500, format="jpg"
)