environmentaltools.download.create_sentinel2_collection
- environmentaltools.download.create_sentinel2_collection(study_area: ee.Geometry, start_date: str = '2015-01-01', end_date: str = '2024-01-01', cloud_percentage: float = 15.0) ee.ImageCollection[source]
Create filtered Sentinel-2 image collection with vegetation indices.
Filters Sentinel-2 imagery based on spatial extent, date range, and cloud cover, then calculates vegetation indices for each image.
- Parameters:
study_area (ee.Geometry) – Geographic area of interest.
start_date (str, optional) – Start date in ‘YYYY-MM-DD’ format. Defaults to “2015-01-01”.
end_date (str, optional) – End date in ‘YYYY-MM-DD’ format. Defaults to “2024-01-01”.
cloud_percentage (float, optional) – Maximum cloud cover percentage. Defaults to 15.0.
- Returns:
Filtered collection with vegetation indices.
- Return type:
ee.ImageCollection
- Raises:
ValueError – If no images match the filtering criteria.
Example
>>> area = ee.Geometry.Point([-6.0, 36.8]).buffer(10000) >>> collection = create_sentinel2_collection(area, "2020-01-01", "2020-12-31")