The Sentinel2_Water_Extraction Jupyter Notebook was developed to extract water from Sentinel-2 imagery.
Below are the instructions to get the Notebook up and running
If not already install, You will need to install Jupyter. This can be installed via pip.
pip install jupyter
Either clone or download the Jupyter Notebook
Clone this repository to your computer
git clone [email protected]:linz/emergency-management.git
Alternatively, for those not familiar with git, download the repository. This can be downloaded via the code menu in the root of this repository (see below)
Create and activate a virtual environment (optional but recommended).
Install the virtual environment
pip install virtualenv
Start create and start virtual environment
python3 -m venv .venv
source .venv/bin/activate
Install the required dependencies
pip install -r requirements.txt
Once you have the code locally, it can be executed to extract water
Open the terminal and navigate to the notebook directory
cd <path where downloaded to>/emergency-management/flooding/Sentinel2_Water_Extraction
Start the note book
$ jupyter notebook
Open the Jupyter Notebook by clicking on Sentinel2_Water_Extraction.ipynb (see image below)
Follow the steps in the Notebook to extract water polygons.
If encountering a SSL cert error, try exporting a reference to ca-certificates.crt
e.g
export CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt