{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Flutungsbeginn war der 12.4.2019. Wir versuchen mit Daten der Sentinel-1- und -2-Satelliten nachzuvollziehen, wie hoch der Wasserstand zum jeweiligen Zeitpunkt war." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Collecting sentinelsat\n", " Using cached https://files.pythonhosted.org/packages/5c/79/c2ac7b71dd13db95a9b83865bbbc7f1e4359c2b141bedad21b0e181fa06e/sentinelsat-0.13-py2.py3-none-any.whl\n", "Requirement already satisfied: click in /home/rus/.anaconda/lib/python3.7/site-packages (from sentinelsat) (7.0)\n", "Collecting html2text\n", " Downloading https://files.pythonhosted.org/packages/ae/88/14655f727f66b3e3199f4467bafcc88283e6c31b562686bf606264e09181/html2text-2020.1.16-py3-none-any.whl\n", "Requirement already satisfied: six in /home/rus/.anaconda/lib/python3.7/site-packages (from sentinelsat) (1.14.0)\n", "Collecting geomet\n", " Downloading https://files.pythonhosted.org/packages/c9/81/156ca48f950f833ddc392f8e3677ca50a18cb9d5db38ccb4ecea55a9303f/geomet-0.2.1.post1-py3-none-any.whl\n", "Collecting geojson>=2\n", " Using cached https://files.pythonhosted.org/packages/e4/8d/9e28e9af95739e6d2d2f8d4bef0b3432da40b7c3588fbad4298c1be09e48/geojson-2.5.0-py2.py3-none-any.whl\n", "Requirement already satisfied: tqdm in /home/rus/.anaconda/lib/python3.7/site-packages (from sentinelsat) (4.36.1)\n", "Requirement already satisfied: requests in /home/rus/.anaconda/lib/python3.7/site-packages (from sentinelsat) (2.22.0)\n", "Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /home/rus/.anaconda/lib/python3.7/site-packages (from requests->sentinelsat) (3.0.4)\n", "Requirement already satisfied: certifi>=2017.4.17 in /home/rus/.anaconda/lib/python3.7/site-packages (from requests->sentinelsat) (2019.11.28)\n", "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/rus/.anaconda/lib/python3.7/site-packages (from requests->sentinelsat) (1.24.2)\n", "Requirement already satisfied: idna<2.9,>=2.5 in /home/rus/.anaconda/lib/python3.7/site-packages (from requests->sentinelsat) (2.8)\n", "Installing collected packages: html2text, geomet, geojson, sentinelsat\n", "Successfully installed geojson-2.5.0 geomet-0.2.1.post1 html2text-2020.1.16 sentinelsat-0.13\n" ] } ], "source": [ "! pip install sentinelsat" ] }, { "cell_type": "code", "execution_count": 47, "metadata": {}, "outputs": [], "source": [ "from sentinelsat import SentinelAPI, read_geojson, geojson_to_wkt\n", "from datetime import date\n", "\n", "user = 'heyarne'\n", "password='FhnNfPppxNbBm7wCoCGLnfly'\n", "api = SentinelAPI(user, password)\n", "\n", "# the \"footprint\" is what we can use to preselect a certain area;\n", "# the lake is at (51.7874, 14.4226)\n", "footprint = 'POLYGON((14.359428613281251 51.806620319822734,14.466545312500001 51.806620319822734,14.466545312500001 51.757343872357566,14.359428613281251 51.757343872357566,14.359428613281251 51.806620319822734))'" ] }, { "cell_type": "code", "execution_count": 31, "metadata": {}, "outputs": [], "source": [ "products = api.query(footprint,\n", " platformname='Sentinel-2',\n", " processinglevel='Level-2A',\n", " date=(date(2019,4,1), date.today()),\n", " cloudcoverpercentage=(0,30))" ] }, { "cell_type": "code", "execution_count": 51, "metadata": {}, "outputs": [], "source": [ "# we create the directory structure we need for the following notebooks\n", "! mkdir -p input/raster" ] }, { "cell_type": "code", "execution_count": 50, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "\n", "\n", "Downloading: 14%|█▍ | 159M/1.13G [00:00