98 timelapse fading
Uncomment the following line 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
Add fading effect to existing GIF.
In [3]:
Copied!
url = "https://i.imgur.com/ZWSZC5z.gif"
url = "https://i.imgur.com/ZWSZC5z.gif"
In [4]:
Copied!
geemap.show_image(url, verbose=False)
geemap.show_image(url, verbose=False)
In [5]:
Copied!
out_gif = "gif_fading.gif"
out_gif = "gif_fading.gif"
In [6]:
Copied!
geemap.gif_fading(url, out_gif, verbose=False)
geemap.gif_fading(url, out_gif, verbose=False)
sh: 1: ffmpeg: not found sh: 1: Syntax error: Unterminated quoted string
In [7]:
Copied!
geemap.show_image(out_gif)
geemap.show_image(out_gif)
Create a timelapse from scratch and add fading effect.
In [8]:
Copied!
Map = geemap.Map()
Map.add_basemap("HYBRID")
Map
Map = geemap.Map()
Map.add_basemap("HYBRID")
Map
Out[8]:
Make this Notebook Trusted to load map: File -> Trust Notebook
Sierra Gorda and Spence copper mines, Chile
In [9]:
Copied!
roi = ee.Geometry.Polygon(
[
[
[-69.315491, -22.837104],
[-69.315491, -22.751488],
[-69.190006, -22.751488],
[-69.190006, -22.837104],
[-69.315491, -22.837104],
]
]
)
roi = ee.Geometry.Polygon(
[
[
[-69.315491, -22.837104],
[-69.315491, -22.751488],
[-69.190006, -22.751488],
[-69.190006, -22.837104],
[-69.315491, -22.837104],
]
]
)
In [10]:
Copied!
Map.addLayer(roi, {}, "ROI")
Map.centerObject(roi)
Map.addLayer(roi, {}, "ROI")
Map.centerObject(roi)
In [11]:
Copied!
title = "Sierra Gorda copper mines, Chile"
out_gif = "timelapse.gif"
title = "Sierra Gorda copper mines, Chile"
out_gif = "timelapse.gif"
In [12]:
Copied!
geemap.landsat_timelapse(
roi,
out_gif,
start_year=2004,
end_year=2010,
frames_per_second=1,
title=title,
fading=False,
)
geemap.landsat_timelapse(
roi,
out_gif,
start_year=2004,
end_year=2010,
frames_per_second=1,
title=title,
fading=False,
)
Generating URL... Downloading GIF image from https://earthengine.googleapis.com/v1alpha/projects/earthengine-legacy/videoThumbnails/a4d88a7e418cf02df6912337a479c0df-0ed43b5ec8b4ce81da38e35ce06bf510:getPixels Please wait ... The GIF image has been saved to: /home/runner/work/geospatial-notebooks/geospatial-notebooks/docs/geemap/timelapse.gif ffmpeg is not installed on your computer.
Out[12]:
'/home/runner/work/geospatial-notebooks/geospatial-notebooks/docs/geemap/timelapse.gif'
In [13]:
Copied!
geemap.show_image(out_gif)
geemap.show_image(out_gif)
In [14]:
Copied!
out_fading_gif = "timelapse_fading.gif"
out_fading_gif = "timelapse_fading.gif"
In [15]:
Copied!
geemap.landsat_timelapse(
roi,
out_fading_gif,
start_year=2004,
end_year=2010,
frames_per_second=1,
title=title,
fading=True,
)
geemap.landsat_timelapse(
roi,
out_fading_gif,
start_year=2004,
end_year=2010,
frames_per_second=1,
title=title,
fading=True,
)
Generating URL... Downloading GIF image from https://earthengine.googleapis.com/v1alpha/projects/earthengine-legacy/videoThumbnails/a4d88a7e418cf02df6912337a479c0df-cda16af58b56f08a39538386fbcabbe2:getPixels Please wait ... The GIF image has been saved to: /home/runner/work/geospatial-notebooks/geospatial-notebooks/docs/geemap/timelapse_fading.gif ffmpeg is not installed on your computer.
sh: 1: ffmpeg: not found sh: 1: Syntax error: Unterminated quoted string
Out[15]:
'/home/runner/work/geospatial-notebooks/geospatial-notebooks/docs/geemap/timelapse_fading.gif'
In [16]:
Copied!
geemap.show_image(out_fading_gif)
geemap.show_image(out_fading_gif)
Last update:
2022-03-14