This script efficiently extracts satellite imagery chips from Sentinel-2 datasets based on given geo-coordinates from a GeoJSON file. The script employs ray
for parallel processing, ensuring fast extraction for multiple coordinates and dates. Each image chip is then saved as a JPEG file.
- Parallel Processing: Utilizes the
ray
library for concurrent extraction. - GeoJSON Input: Extracts chips based on points provided in a GeoJSON file.
- Dynamic Year Range: Allows extraction for a defined range of years.
- Cloud Cover Filter: Filters out images with cloud cover beyond a set threshold.
- Sentinel-2 Data: Extracts images from Sentinel-2 L2A datasets.
- Python 3.x
- ray
- geopandas
- numpy
- osgeo
- loguru
- satsearch
- shapely
- Modify the script's
years
variable to set your desired range of years for extraction. - Modify the
geojson_file
path variable to point to your GeoJSON file. - Run the script.
$ python3 chips.py
Logging is implemented using the loguru library. Any issues or progress are logged using this. If you encounter issues, refer to the log outputs for more information.
For any contributions or feedback, please contact the script maintainer or open an issue on the project's GitHub repository https://github.com/tharlestsa/s2-chips.