90 naip timelapse
Uncomment the following line to install geemap if needed.
In [ ]:
Copied!
# !pip install geemap
# !pip install geemap
In [ ]:
Copied!
import ee
import geemap
import ee
import geemap
If run into errors, uncomment the following line to update the package and restart the kernel to take effect.
In [ ]:
Copied!
# geemap.update_package()
# geemap.update_package()
In [ ]:
Copied!
Map = geemap.Map()
Map
Map = geemap.Map()
Map
Create a region of interest.
In [ ]:
Copied!
region = ee.Geometry.Polygon(
[
[
[-99.101934, 47.12745],
[-99.101934, 47.156232],
[-99.033441, 47.156232],
[-99.033441, 47.12745],
[-99.101934, 47.12745],
]
]
)
region = ee.Geometry.Polygon(
[
[
[-99.101934, 47.12745],
[-99.101934, 47.156232],
[-99.033441, 47.156232],
[-99.033441, 47.12745],
[-99.101934, 47.12745],
]
]
)
In [ ]:
Copied!
Map.addLayer(region)
Map.centerObject(region)
Map.addLayer(region)
Map.centerObject(region)
Create a timeseries
In [ ]:
Copied!
collection = geemap.naip_timeseries(region, RGBN=True)
collection = geemap.naip_timeseries(region, RGBN=True)
In [ ]:
Copied!
images = collection.toList(collection.size())
images = collection.toList(collection.size())
Get image dates
In [ ]:
Copied!
dates = geemap.image_dates(collection).getInfo()
dates = geemap.image_dates(collection).getInfo()
In [ ]:
Copied!
size = images.size().getInfo()
size = images.size().getInfo()
Add images to the map
In [ ]:
Copied!
for i in range(size):
image = ee.Image(images.get(i))
Map.addLayer(image, {'bands': ['N', 'R', 'G']}, dates[i][:4])
for i in range(size):
image = ee.Image(images.get(i))
Map.addLayer(image, {'bands': ['N', 'R', 'G']}, dates[i][:4])
Create s timelapse
In [ ]:
Copied!
timelapse = geemap.naip_timelapse(
region, out_gif="naip.gif", bands=['N', 'R', 'G'], frames_per_second=3, mp4=True
)
geemap.show_image(timelapse)
timelapse = geemap.naip_timelapse(
region, out_gif="naip.gif", bands=['N', 'R', 'G'], frames_per_second=3, mp4=True
)
geemap.show_image(timelapse)