This repository documents the impact of the ongoing war on the Gaza Strip through satellite imagery analysis. The application fetches and processes satellite images from January 2023 to the present, providing a structured approach for monitoring changes over time.
- Satellite Image Retrieval: Fetches high-resolution satellite images from Sentinel-2 (L2A & L1C) and Landsat-8 (L1C) via the Sentinel Hub Processing API and the Planet.com API.
- Configurable Grid Division: Segments the Gaza Strip into smaller sections (default 2x2 grid) for enhanced detail.
- Automated Weekly Snapshots: Retrieves imagery at weekly intervals for consistent historical comparison.
- Local Data Storage: Organizes downloaded images in structured directories along with associated metadata.
- Image Visualization: Supports before/after and timeline visualizations to track developments over time.
satellite-imagery-app
├── src
│ ├── main.py # Application entry point
│ ├── api
│ │ └── satellite_service.py # Handles API requests for imagery
│ ├── models
│ │ └── imagery_data.py # Data models for storing imagery information
│ ├── utils
│ │ └── geo_helpers.py # Utilities for geographic calculations
│ └── config
│ └── settings.py # Configuration for API keys and parameters
├── tests
│ └── test_satellite_service.py # Unit tests for API requests
├── data
│ ├── images/ # Directory for stored images (categorized by region)
│ └── metadata/ # JSON metadata for fetched images
├── requirements.txt # Dependencies
└── README.md # Documentation
git clone https://github.com/AbdooMohamedd/satellite-imagery-app.git
cd satellite-imagery-apppython -m venv venv
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # Windowspip install -r requirements.txtTo use Sentinel Hub, visit Sentinel Hub Dashboard, create a new OAuth client, and retrieve your CLIENT_ID and CLIENT_SECRET. Add these credentials to src/config/settings.py.
python src/main.py --fetchThis command:
- Retrieves weekly imagery from January 2023 to the present.
- Segments the Gaza Strip into grid sections.
- Saves images in
data/images/and metadata indata/metadata/.
python src/main.py --processCreates visual comparisons such as before/after overlays or time-lapse sequences.
python src/main.py --fetch --process--api-key YOUR_API_KEY- Provide Sentinel Hub API key.--planet-api-key YOUR_PLANET_API_KEY- Provide Planet.com API key.--instance-id YOUR_INSTANCE_ID- Sentinel Hub instance ID.--start-date YYYY-MM-DD- Set a custom start date.--end-date YYYY-MM-DD- Define an end date.--sections "lat,lon"- Adjust the grid division (e.g., "2,2").
- Image Acquisition: The script authenticates with Sentinel Hub and Planet.com, retrieves imagery based on configured parameters, and stores the results.
- Storage & Metadata: Images are saved in organized directories, while metadata (bounding boxes, timestamps, source) is logged for analysis.
- Processing & Visualization: (Optional) Users can generate before/after comparisons or time-lapse animations for visual impact.
- Dark or Black Images: Try adjusting the time window in
settings.py. - Rate Limits: Ensure API subscription permits required usage. The script includes automatic retry mechanisms.
Contributions are welcome! Please submit issues or pull requests for improvements.
This project is licensed under the Apache 2.0 License.
