Python3 code to automatically download data from the sentinelhub website from a .csv file by converting it to geojson file.
polygon_csv_to_pd_landslides.py
: Takes in a .csv file, sorts the useful columns and transforms into pandas dataframe and creates shorter .csv file.format_polygon_landslide_csv.py
: Takes the appropiate columns and creates a geojson file with polygons.polygon_advanced_data_download_batch.py
: accesses sentinel hub and downloads the data.unzip_files.py
: unzips downloaded data.
Run each of the files in the given order. To access the SentinelHub website you will need to create an account. Include the username and password as strings in the designated space in the file polygon_advanced_data_download_batch.py
.
Create a Python3 virtual environment if you do not have admin permissions (instructions given for Linux).
python3 -m pip install --user virtualenv
python3 -m venv my_virtual_env
source my_virtual_env/bin/activate
The name of the environment will now appear in brackets on the terminal.
deactivate
Libraries needed (make sure the installed version is compatible with Python3):
pip3 install matplotlib
pip3 install pandas
pip3 install geopandas
pip3 install geojson
pip3 install sentinelsat
pip3 install DateTime
pip3 install zipfile
pip3 install glob3