With the advancement of space satellite technology, accessing free satellite images for research and development has become more accessible. This repository provides an example of collecting time-series multispectral satellite imagery from Sentinel Hub using their API. The goal is to facilitate access to real-time multispectral satellite images for research purposes and monitoring changes on the Earth's surface over time.
This script defines a function named sentinel()
responsible for retrieving time-series multispectral satellite imagery data from the Sentinel Hub API. It requires parameters such as OAuth client ID, client secret, coordinates of the region of interest, evaluation script for data processing, start and end dates for the data retrieval period, and the path to save the retrieved image data in TIFF format.
This script utilizes the get_tiff_files()
function to search for the downloaded TIFF files and extract them. It then employs the plt_tif_file()
function to display the bands of the multispectral image.
sentinelhub
Python package: Install usingpip install sentinelhub
.rasterio
Python package: Install usingpip install rasterio
.matplotlib
Python package: Install usingpip install matplotlib
.
To use these scripts:
- Replace the placeholders
'Your Sentinel Hub OAuth client ID'
and'Your Sentinel Hub OAuth client secret'
in both scripts with your actual Sentinel Hub OAuth credentials. - Modify the
coordinates of the region of interest
,evaluation script to process the data
,start and end dates for the data retrieval period
, andpath to save retrieved image data
insentinel_hub_get_data.py
as per your requirements. - Run
sentinel_hub_get_data.py
to fetch the satellite imagery data.
To access Sentinel Hub, you can visit their website here. You will need to register and obtain your OAuth client ID and client secret to use their API.
Ensure that you provide correct credentials and configure the scripts according to your requirements before executing them. Additionally, make sure you have the necessary permissions and quota for accessing the Sentinel Hub API.