mirror of
https://github.com/heyarne/earth-observation-for-journalism.git
synced 2026-05-06 19:13:40 +02:00
Move pip installs from notebooks to Dockerfile and configure sentinelhub auth in .netrc
This commit is contained in:
parent
9602e579d9
commit
39b70e21dc
10 changed files with 1222 additions and 451 deletions
|
|
@ -7,40 +7,6 @@
|
|||
"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,
|
||||
|
|
@ -50,12 +16,11 @@
|
|||
"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",
|
||||
"# set up ~/.netrc using the provided ~/.netrc.example in order to be properly authenticated\n",
|
||||
"api = SentinelAPI(None, None)\n",
|
||||
"\n",
|
||||
"# the \"footprint\" is what we can use to preselect a certain area;\n",
|
||||
"# the lake is at (51.7874, 14.4226)\n",
|
||||
"# the lakesentinelsat/ 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))'"
|
||||
]
|
||||
},
|
||||
|
|
@ -44091,15 +44056,6 @@
|
|||
" f.write('\\n'.join([p['link'] for _, p in products.items()]))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 49,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# ! aria2c --http-user={user} --http-passwd={password} -i link_list.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
|
|
@ -44124,7 +44080,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.7.4"
|
||||
"version": "3.8.5"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue