Update timelapse.py - Added Sampling and Orbit Selection Features#2287
Merged
giswqs merged 5 commits intogee-community:masterfrom Oct 2, 2025
Merged
Update timelapse.py - Added Sampling and Orbit Selection Features#2287giswqs merged 5 commits intogee-community:masterfrom
giswqs merged 5 commits intogee-community:masterfrom
Conversation
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
for more information, see https://pre-commit.ci
Member
|
Can you provide a notebook with examples for the added functionality? |
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. |
Member
|
Can you add the examples as |
giswqs
approved these changes
Oct 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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