Skip to content

Update timelapse.py - Added Sampling and Orbit Selection Features#2287

Merged
giswqs merged 5 commits intogee-community:masterfrom
franz-geoeco:master
Oct 2, 2025
Merged

Update timelapse.py - Added Sampling and Orbit Selection Features#2287
giswqs merged 5 commits intogee-community:masterfrom
franz-geoeco:master

Conversation

@franz-geoeco
Copy link
Copy Markdown
Contributor

Added Sampling and Orbit Selection Features
New Sampling Capabilities for Time Series Functions Added comprehensive sampling functionality to Sentinel-1, Sentinel-2, and Landsat timelapse functions:

New Functions Added:

sentinel1_timelapse_with_samples() - Sentinel-1 timelapse with point sampling and time series charts sentinel2_timelapse_with_samples() - Sentinel-2 timelapse with point sampling and time series charts landsat_timelapse_with_samples() - Landsat timelapse with point sampling and time series charts

Key Sampling Features:

Sample Point Support: Up to 5 sample points with customizable markers (cross, circle, square)
Interactive Time Series Charts: Side-by-side visualization showing temporal data at sample locations
Multi-band Sampling: Support for sampling multiple bands/indices simultaneously
Flexible Chart Positioning: Charts can be positioned right, left, or bottom of the timelapse
Custom Styling: Configurable marker colors, sizes, chart titles, and axis labels

Enhanced Index Support:

Sentinel-2: Added support for NDVI, EVI, NDWI, MNDWI, NDBI, NBR, SAVI, GNDVI, NDRE, CIRE
Landsat: Added support for NDVI, EVI, NDWI, MNDWI, NDBI, NBR, SAVI, GNDVI, NDMI, TCB, TCG, TCW, MSAVI2, VARI, MCARI
Index Visualization: Automatic palette and visualization parameter selection for indices
Index Calculation Functions: calculate_sentinel2_indices() and calculate_landsat_indices()

Enhanced Sentinel-1 Orbit Control
Updated sentinel1_timelapse() function with orbit selection:

Orbit Parameter: Added orbit parameter accepting ['ascending'], ['descending'], or ['ascending', 'descending']
Backward Compatibility: Defaults to both orbits if not specified
Consistent Implementation: Applied orbit filtering across all Sentinel-1 functions including legacy versions

Updated Functions:

sentinel1_timelapse() - Now includes orbit parameter sentinel1_timelapse_legacy() - Updated with orbit parameter sentinel1_timeseries() - Enhanced orbit filtering logic

Technical Implementation Details
Helper Functions Added:

add_sample_markers_to_gif() - Adds point markers to GIF frames create_time_series_chart_frames() - Generates animated chart frames combine_gif_with_chart() - Merges timelapse with charts get_pixel_coordinates_from_geo() - Geographic to pixel coordinate conversion draw_cross_marker(), draw_circle_marker(), draw_square_marker() - Marker rendering functions

franz-geoeco and others added 2 commits July 30, 2025 10:54
Added Sampling and Orbit Selection Features
New Sampling Capabilities for Time Series Functions
Added comprehensive sampling functionality to Sentinel-1, Sentinel-2, and Landsat timelapse functions:

New Functions Added:

sentinel1_timelapse_with_samples() - Sentinel-1 timelapse with point sampling and time series charts
sentinel2_timelapse_with_samples() - Sentinel-2 timelapse with point sampling and time series charts
landsat_timelapse_with_samples() - Landsat timelapse with point sampling and time series charts



Key Sampling Features:

Sample Point Support: Up to 5 sample points with customizable markers (cross, circle, square)
Interactive Time Series Charts: Side-by-side visualization showing temporal data at sample locations
Multi-band Sampling: Support for sampling multiple bands/indices simultaneously
Flexible Chart Positioning: Charts can be positioned right, left, or bottom of the timelapse
Custom Styling: Configurable marker colors, sizes, chart titles, and axis labels

Enhanced Index Support:

Sentinel-2: Added support for NDVI, EVI, NDWI, MNDWI, NDBI, NBR, SAVI, GNDVI, NDRE, CIRE
Landsat: Added support for NDVI, EVI, NDWI, MNDWI, NDBI, NBR, SAVI, GNDVI, NDMI, TCB, TCG, TCW, MSAVI2, VARI, MCARI
Index Visualization: Automatic palette and visualization parameter selection for indices
Index Calculation Functions: calculate_sentinel2_indices() and calculate_landsat_indices()

Enhanced Sentinel-1 Orbit Control
Updated sentinel1_timelapse() function with orbit selection:

Orbit Parameter: Added orbit parameter accepting ['ascending'], ['descending'], or ['ascending', 'descending']
Backward Compatibility: Defaults to both orbits if not specified
Consistent Implementation: Applied orbit filtering across all Sentinel-1 functions including legacy versions

Updated Functions:

sentinel1_timelapse() - Now includes orbit parameter
sentinel1_timelapse_legacy() - Updated with orbit parameter
sentinel1_timeseries() - Enhanced orbit filtering logic

Technical Implementation Details
Helper Functions Added:

add_sample_markers_to_gif() - Adds point markers to GIF frames
create_time_series_chart_frames() - Generates animated chart frames
combine_gif_with_chart() - Merges timelapse with charts
get_pixel_coordinates_from_geo() - Geographic to pixel coordinate conversion
draw_cross_marker(), draw_circle_marker(), draw_square_marker() - Marker rendering functions
@giswqs
Copy link
Copy Markdown
Member

giswqs commented Jul 30, 2025

Can you provide a notebook with examples for the added functionality?

@franz-geoeco
Copy link
Copy Markdown
Contributor Author

Hello @giswqs, I hope you like it here. If not, I can also add it to my merge request as a jupyter notebook.
sampling_features_notebook.md

@giswqs
Copy link
Copy Markdown
Member

giswqs commented Aug 13, 2025

Can you add the examples as 153_sentinel_timelpase.ipynb and put it under docs/notebook ?
https://github.com/gee-community/geemap/tree/master/docs/notebooks

@giswqs giswqs linked an issue Aug 13, 2025 that may be closed by this pull request
@giswqs giswqs merged commit 927e1f4 into gee-community:master Oct 2, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add orbit selection parameter to Sentinel-1 timelapse functions

2 participants