Commit 927e1f4
Update timelapse.py - Added Sampling and Orbit Selection Features (#2287)
* Update timelapse.py - Added Sampling and Orbit Selection Features
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
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update docker-image.yml
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Qiusheng Wu <[email protected]>1 parent 208e9f9 commit 927e1f4
2 files changed
Lines changed: 3590 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
| |||
0 commit comments