{ "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": 2, "metadata": {}, "outputs": [], "source": [ "from sentinelsat import SentinelAPI, read_geojson, geojson_to_wkt\n", "from datetime import date\n", "import datetime\n", "import os" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "# --------------------------------------------------------------------------#\n", "# adjust these lines to search for pictures of the fire you want to look at #\n", "# you should not need to changed anything below this cell #\n", "# --------------------------------------------------------------------------#\n", "\n", "fire_start_date = date(2020, 5, 28)\n", "fire_end_date = date(2020, 6, 1)\n", "fire_location = 'POINT (13.16832 52.25156)' # note that this is in the order longitude, latitude (or x, y)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "api = SentinelAPI(os.getenv('SCIHUB_USERNAME'), os.getenv('SCIHUB_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": 5, "metadata": {}, "outputs": [], "source": [ "two_weeks = datetime.timedelta(days=14)\n", "products = api.query(fire_location,\n", " platformname='Sentinel-2',\n", " processinglevel='Level-2A',\n", " date=(fire_start_date - two_weeks, fire_end_date + two_weeks),\n", " cloudcoverpercentage=(0,30))" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Found 9 results\n" ] } ], "source": [ "print('Found {} results'.format(len(products)))" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "OrderedDict([('eb6b190c-7c19-4784-bc37-7a78d0cd8ca3',\n", " {'title': 'S2B_MSIL2A_20200602T100559_N0214_R022_T32UQC_20200602T135324',\n", " 'link': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('eb6b190c-7c19-4784-bc37-7a78d0cd8ca3')/$value\",\n", " 'link_alternative': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('eb6b190c-7c19-4784-bc37-7a78d0cd8ca3')/\",\n", " 'link_icon': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('eb6b190c-7c19-4784-bc37-7a78d0cd8ca3')/Products('Quicklook')/$value\",\n", " 'summary': 'Date: 2020-06-02T10:05:59.024Z, Instrument: MSI, Mode: , Satellite: Sentinel-2, Size: 967.17 MB',\n", " 'beginposition': datetime.datetime(2020, 6, 2, 10, 5, 59, 24000),\n", " 'endposition': datetime.datetime(2020, 6, 2, 10, 5, 59, 24000),\n", " 'ingestiondate': datetime.datetime(2020, 6, 2, 18, 59, 28, 210000),\n", " 'orbitnumber': 16922,\n", " 'relativeorbitnumber': 22,\n", " 'vegetationpercentage': 79.760271,\n", " 'notvegetatedpercentage': 16.597427,\n", " 'waterpercentage': 1.019245,\n", " 'unclassifiedpercentage': 0.647649,\n", " 'mediumprobacloudspercentage': 0.416336,\n", " 'highprobacloudspercentage': 0.890086,\n", " 'snowicepercentage': 3.6e-05,\n", " 'cloudcoverpercentage': 1.382211,\n", " 'level1cpdiidentifier': 'S2B_OPER_MSI_L1C_TL_EPAE_20200602T130134_A016922_T32UQC_N02.09',\n", " 'gmlfootprint': '\\n \\n \\n 51.32467880575696,11.978601830497047 51.34611323200043,11.987408449329669 51.49192253343463,12.047655196300749 51.6377307348429,12.108267095324493 51.78351193213143,12.169312975129742 51.929272266674246,12.230601402802682 52.074978862471525,12.292143016447412 52.2206525469624,12.353763303487082 52.29966031613883,12.387354358116424 52.26313739791785,13.539979680877822 51.27892518278613,13.442095184333063 51.32467880575696,11.978601830497047\\n \\n \\n',\n", " 'footprint': 'MULTIPOLYGON (((13.442095184333063 51.27892518278613, 13.539979680877822 52.26313739791785, 12.387354358116424 52.29966031613883, 12.353763303487082 52.2206525469624, 12.292143016447412 52.074978862471525, 12.230601402802682 51.929272266674246, 12.169312975129742 51.78351193213143, 12.108267095324493 51.6377307348429, 12.047655196300749 51.49192253343463, 11.987408449329669 51.34611323200043, 11.978601830497047 51.32467880575696, 13.442095184333063 51.27892518278613)))',\n", " 'format': 'SAFE',\n", " 'processingbaseline': '02.14',\n", " 'platformname': 'Sentinel-2',\n", " 'filename': 'S2B_MSIL2A_20200602T100559_N0214_R022_T32UQC_20200602T135324.SAFE',\n", " 'instrumentname': 'Multi-Spectral Instrument',\n", " 'instrumentshortname': 'MSI',\n", " 'size': '967.17 MB',\n", " 's2datatakeid': 'GS2B_20200602T100559_016922_N02.14',\n", " 'producttype': 'S2MSI2A',\n", " 'platformidentifier': '2017-013A',\n", " 'orbitdirection': 'DESCENDING',\n", " 'platformserialidentifier': 'Sentinel-2B',\n", " 'processinglevel': 'Level-2A',\n", " 'identifier': 'S2B_MSIL2A_20200602T100559_N0214_R022_T32UQC_20200602T135324',\n", " 'uuid': 'eb6b190c-7c19-4784-bc37-7a78d0cd8ca3'}),\n", " ('f6f9ca26-8737-471b-9660-72791b848f27',\n", " {'title': 'S2B_MSIL2A_20200602T100559_N0214_R022_T33UUT_20200602T135324',\n", " 'link': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('f6f9ca26-8737-471b-9660-72791b848f27')/$value\",\n", " 'link_alternative': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('f6f9ca26-8737-471b-9660-72791b848f27')/\",\n", " 'link_icon': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('f6f9ca26-8737-471b-9660-72791b848f27')/Products('Quicklook')/$value\",\n", " 'summary': 'Date: 2020-06-02T10:05:59.024Z, Instrument: MSI, Mode: , Satellite: Sentinel-2, Size: 1.04 GB',\n", " 'beginposition': datetime.datetime(2020, 6, 2, 10, 5, 59, 24000),\n", " 'endposition': datetime.datetime(2020, 6, 2, 10, 5, 59, 24000),\n", " 'ingestiondate': datetime.datetime(2020, 6, 2, 18, 45, 41, 3000),\n", " 'orbitnumber': 16922,\n", " 'relativeorbitnumber': 22,\n", " 'vegetationpercentage': 80.038351,\n", " 'notvegetatedpercentage': 16.0503,\n", " 'waterpercentage': 1.044029,\n", " 'unclassifiedpercentage': 0.725302,\n", " 'mediumprobacloudspercentage': 0.525706,\n", " 'highprobacloudspercentage': 0.908005,\n", " 'snowicepercentage': 3.6e-05,\n", " 'cloudcoverpercentage': 1.503143,\n", " 'level1cpdiidentifier': 'S2B_OPER_MSI_L1C_TL_EPAE_20200602T130134_A016922_T33UUT_N02.09',\n", " 'gmlfootprint': '\\n \\n \\n 51.639856453280196,12.109157239970283 51.78351193213143,12.169312975129742 51.929272266674246,12.230601402802682 52.074978862471525,12.292143016447412 52.2206525469624,12.353763303487082 52.319976750799796,12.395992122145 52.34305438492137,13.675924550313963 51.35607984388353,13.704578464673325 51.3280532483229,12.12921085152078 51.639856453280196,12.109157239970283\\n \\n \\n',\n", " 'footprint': 'MULTIPOLYGON (((12.12921085152078 51.3280532483229, 13.704578464673325 51.35607984388353, 13.675924550313963 52.34305438492137, 12.395992122145 52.319976750799796, 12.353763303487082 52.2206525469624, 12.292143016447412 52.074978862471525, 12.230601402802682 51.929272266674246, 12.169312975129742 51.78351193213143, 12.109157239970283 51.639856453280196, 12.12921085152078 51.3280532483229)))',\n", " 'format': 'SAFE',\n", " 'processingbaseline': '02.14',\n", " 'platformname': 'Sentinel-2',\n", " 'filename': 'S2B_MSIL2A_20200602T100559_N0214_R022_T33UUT_20200602T135324.SAFE',\n", " 'instrumentname': 'Multi-Spectral Instrument',\n", " 'instrumentshortname': 'MSI',\n", " 'size': '1.04 GB',\n", " 's2datatakeid': 'GS2B_20200602T100559_016922_N02.14',\n", " 'producttype': 'S2MSI2A',\n", " 'platformidentifier': '2017-013A',\n", " 'orbitdirection': 'DESCENDING',\n", " 'platformserialidentifier': 'Sentinel-2B',\n", " 'processinglevel': 'Level-2A',\n", " 'identifier': 'S2B_MSIL2A_20200602T100559_N0214_R022_T33UUT_20200602T135324',\n", " 'uuid': 'f6f9ca26-8737-471b-9660-72791b848f27'}),\n", " ('3886a9bb-2a36-470e-b4fb-204177ee4a14',\n", " {'title': 'S2B_MSIL2A_20200602T100559_N0214_R022_T32UQD_20200602T135324',\n", " 'link': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('3886a9bb-2a36-470e-b4fb-204177ee4a14')/$value\",\n", " 'link_alternative': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('3886a9bb-2a36-470e-b4fb-204177ee4a14')/\",\n", " 'link_icon': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('3886a9bb-2a36-470e-b4fb-204177ee4a14')/Products('Quicklook')/$value\",\n", " 'summary': 'Date: 2020-06-02T10:05:59.024Z, Instrument: MSI, Mode: , Satellite: Sentinel-2, Size: 772.78 MB',\n", " 'beginposition': datetime.datetime(2020, 6, 2, 10, 5, 59, 24000),\n", " 'endposition': datetime.datetime(2020, 6, 2, 10, 5, 59, 24000),\n", " 'ingestiondate': datetime.datetime(2020, 6, 2, 18, 40, 48, 771000),\n", " 'orbitnumber': 16922,\n", " 'relativeorbitnumber': 22,\n", " 'vegetationpercentage': 81.825465,\n", " 'notvegetatedpercentage': 14.382508,\n", " 'waterpercentage': 2.633392,\n", " 'unclassifiedpercentage': 0.319243,\n", " 'mediumprobacloudspercentage': 0.098212,\n", " 'highprobacloudspercentage': 0.239379,\n", " 'snowicepercentage': 2.1e-05,\n", " 'cloudcoverpercentage': 0.361835,\n", " 'level1cpdiidentifier': 'S2B_OPER_MSI_L1C_TL_EPAE_20200602T130134_A016922_T32UQD_N02.09',\n", " 'gmlfootprint': '\\n \\n \\n 52.21284902200581,12.350462395368869 52.2206525469624,12.353763303487082 52.36633012201262,12.415699786858166 52.51194199175493,12.47808001229512 52.65754848189568,12.5407946185535 52.80313660845604,12.603698138951865 52.94869104851679,12.667166015291048 53.09422646557383,12.731188091140115 53.18706351332835,12.772119136933904 53.1594219676414,13.634183017449221 52.17548471916956,13.531032170485291 52.21284902200581,12.350462395368869\\n \\n \\n',\n", " 'footprint': 'MULTIPOLYGON (((13.531032170485291 52.17548471916956, 13.634183017449221 53.1594219676414, 12.772119136933904 53.18706351332835, 12.731188091140115 53.09422646557383, 12.667166015291048 52.94869104851679, 12.603698138951865 52.80313660845604, 12.5407946185535 52.65754848189568, 12.47808001229512 52.51194199175493, 12.415699786858166 52.36633012201262, 12.353763303487082 52.2206525469624, 12.350462395368869 52.21284902200581, 13.531032170485291 52.17548471916956)))',\n", " 'format': 'SAFE',\n", " 'processingbaseline': '02.14',\n", " 'platformname': 'Sentinel-2',\n", " 'filename': 'S2B_MSIL2A_20200602T100559_N0214_R022_T32UQD_20200602T135324.SAFE',\n", " 'instrumentname': 'Multi-Spectral Instrument',\n", " 'instrumentshortname': 'MSI',\n", " 'size': '772.78 MB',\n", " 's2datatakeid': 'GS2B_20200602T100559_016922_N02.14',\n", " 'producttype': 'S2MSI2A',\n", " 'platformidentifier': '2017-013A',\n", " 'orbitdirection': 'DESCENDING',\n", " 'platformserialidentifier': 'Sentinel-2B',\n", " 'processinglevel': 'Level-2A',\n", " 'identifier': 'S2B_MSIL2A_20200602T100559_N0214_R022_T32UQD_20200602T135324',\n", " 'uuid': '3886a9bb-2a36-470e-b4fb-204177ee4a14'}),\n", " ('10190cf1-5690-48a3-b71e-861629703a3f',\n", " {'title': 'S2B_MSIL2A_20200602T100559_N0214_R022_T33UUU_20200602T135324',\n", " 'link': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('10190cf1-5690-48a3-b71e-861629703a3f')/$value\",\n", " 'link_alternative': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('10190cf1-5690-48a3-b71e-861629703a3f')/\",\n", " 'link_icon': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('10190cf1-5690-48a3-b71e-861629703a3f')/Products('Quicklook')/$value\",\n", " 'summary': 'Date: 2020-06-02T10:05:59.024Z, Instrument: MSI, Mode: , Satellite: Sentinel-2, Size: 822.93 MB',\n", " 'beginposition': datetime.datetime(2020, 6, 2, 10, 5, 59, 24000),\n", " 'endposition': datetime.datetime(2020, 6, 2, 10, 5, 59, 24000),\n", " 'ingestiondate': datetime.datetime(2020, 6, 2, 18, 40, 43, 331000),\n", " 'orbitnumber': 16922,\n", " 'relativeorbitnumber': 22,\n", " 'vegetationpercentage': 82.099664,\n", " 'notvegetatedpercentage': 13.586709,\n", " 'waterpercentage': 3.124119,\n", " 'unclassifiedpercentage': 0.343115,\n", " 'mediumprobacloudspercentage': 0.114752,\n", " 'highprobacloudspercentage': 0.213117,\n", " 'snowicepercentage': 3e-05,\n", " 'cloudcoverpercentage': 0.345483,\n", " 'level1cpdiidentifier': 'S2B_OPER_MSI_L1C_TL_EPAE_20200602T130134_A016922_T33UUU_N02.09',\n", " 'gmlfootprint': '\\n \\n \\n 52.23137459287384,12.358321903656456 52.36633012201262,12.415699786858166 52.51194199175493,12.47808001229512 52.65754848189568,12.5407946185535 52.80313660845604,12.603698138951865 52.94869104851679,12.667166015291048 53.09422646557383,12.731188091140115 53.226293171356296,12.789415151489028 53.24196354764364,13.648341514492438 52.25515074878083,13.678544065009483 52.23137459287384,12.358321903656456\\n \\n \\n',\n", " 'footprint': 'MULTIPOLYGON (((12.358321903656456 52.23137459287384, 13.678544065009483 52.25515074878083, 13.648341514492438 53.24196354764364, 12.789415151489028 53.226293171356296, 12.731188091140115 53.09422646557383, 12.667166015291048 52.94869104851679, 12.603698138951865 52.80313660845604, 12.5407946185535 52.65754848189568, 12.47808001229512 52.51194199175493, 12.415699786858166 52.36633012201262, 12.358321903656456 52.23137459287384)))',\n", " 'format': 'SAFE',\n", " 'processingbaseline': '02.14',\n", " 'platformname': 'Sentinel-2',\n", " 'filename': 'S2B_MSIL2A_20200602T100559_N0214_R022_T33UUU_20200602T135324.SAFE',\n", " 'instrumentname': 'Multi-Spectral Instrument',\n", " 'instrumentshortname': 'MSI',\n", " 'size': '822.93 MB',\n", " 's2datatakeid': 'GS2B_20200602T100559_016922_N02.14',\n", " 'producttype': 'S2MSI2A',\n", " 'platformidentifier': '2017-013A',\n", " 'orbitdirection': 'DESCENDING',\n", " 'platformserialidentifier': 'Sentinel-2B',\n", " 'processinglevel': 'Level-2A',\n", " 'identifier': 'S2B_MSIL2A_20200602T100559_N0214_R022_T33UUU_20200602T135324',\n", " 'uuid': '10190cf1-5690-48a3-b71e-861629703a3f'}),\n", " ('e385d397-4d1b-4fa2-a1ce-917f420c86dd',\n", " {'title': 'S2A_MSIL2A_20200531T102031_N0214_R065_T33UUU_20200531T134031',\n", " 'link': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('e385d397-4d1b-4fa2-a1ce-917f420c86dd')/$value\",\n", " 'link_alternative': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('e385d397-4d1b-4fa2-a1ce-917f420c86dd')/\",\n", " 'link_icon': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('e385d397-4d1b-4fa2-a1ce-917f420c86dd')/Products('Quicklook')/$value\",\n", " 'summary': 'Date: 2020-05-31T10:20:31.024Z, Instrument: MSI, Mode: , Satellite: Sentinel-2, Size: 1.08 GB',\n", " 'beginposition': datetime.datetime(2020, 5, 31, 10, 20, 31, 24000),\n", " 'endposition': datetime.datetime(2020, 5, 31, 10, 20, 31, 24000),\n", " 'ingestiondate': datetime.datetime(2020, 5, 31, 20, 21, 27, 279000),\n", " 'orbitnumber': 25802,\n", " 'relativeorbitnumber': 65,\n", " 'vegetationpercentage': 64.504254,\n", " 'notvegetatedpercentage': 12.461859999999998,\n", " 'waterpercentage': 1.727065,\n", " 'unclassifiedpercentage': 2.7562089999999997,\n", " 'mediumprobacloudspercentage': 2.646953,\n", " 'highprobacloudspercentage': 3.436161,\n", " 'snowicepercentage': 1e-05,\n", " 'cloudcoverpercentage': 16.51298,\n", " 'level1cpdiidentifier': 'S2A_OPER_MSI_L1C_TL_MPS__20200531T123341_A025802_T33UUU_N02.09',\n", " 'gmlfootprint': '\\n \\n \\n 53.21197782662703,12.004760925069467 53.24196354764364,13.648341514492438 52.25515074878083,13.678544065009483 52.22621087043558,12.071595116334858 53.21197782662703,12.004760925069467\\n \\n \\n',\n", " 'footprint': 'MULTIPOLYGON (((12.071595116334858 52.22621087043558, 13.678544065009483 52.25515074878083, 13.648341514492438 53.24196354764364, 12.004760925069467 53.21197782662703, 12.071595116334858 52.22621087043558)))',\n", " 'format': 'SAFE',\n", " 'processingbaseline': '02.14',\n", " 'platformname': 'Sentinel-2',\n", " 'filename': 'S2A_MSIL2A_20200531T102031_N0214_R065_T33UUU_20200531T134031.SAFE',\n", " 'instrumentname': 'Multi-Spectral Instrument',\n", " 'instrumentshortname': 'MSI',\n", " 'size': '1.08 GB',\n", " 's2datatakeid': 'GS2A_20200531T102031_025802_N02.14',\n", " 'producttype': 'S2MSI2A',\n", " 'platformidentifier': '2015-028A',\n", " 'orbitdirection': 'DESCENDING',\n", " 'platformserialidentifier': 'Sentinel-2A',\n", " 'processinglevel': 'Level-2A',\n", " 'identifier': 'S2A_MSIL2A_20200531T102031_N0214_R065_T33UUU_20200531T134031',\n", " 'uuid': 'e385d397-4d1b-4fa2-a1ce-917f420c86dd'}),\n", " ('141d5ea4-6099-4851-84bc-0b218f29acff',\n", " {'title': 'S2A_MSIL2A_20200531T102031_N0214_R065_T32UQD_20200531T134031',\n", " 'link': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('141d5ea4-6099-4851-84bc-0b218f29acff')/$value\",\n", " 'link_alternative': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('141d5ea4-6099-4851-84bc-0b218f29acff')/\",\n", " 'link_icon': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('141d5ea4-6099-4851-84bc-0b218f29acff')/Products('Quicklook')/$value\",\n", " 'summary': 'Date: 2020-05-31T10:20:31.024Z, Instrument: MSI, Mode: , Satellite: Sentinel-2, Size: 1.08 GB',\n", " 'beginposition': datetime.datetime(2020, 5, 31, 10, 20, 31, 24000),\n", " 'endposition': datetime.datetime(2020, 5, 31, 10, 20, 31, 24000),\n", " 'ingestiondate': datetime.datetime(2020, 5, 31, 20, 19, 33, 992000),\n", " 'orbitnumber': 25802,\n", " 'relativeorbitnumber': 65,\n", " 'vegetationpercentage': 62.34713800000001,\n", " 'notvegetatedpercentage': 12.86919,\n", " 'waterpercentage': 1.4165520000000003,\n", " 'unclassifiedpercentage': 3.272478,\n", " 'mediumprobacloudspercentage': 3.2621960000000003,\n", " 'highprobacloudspercentage': 4.964586,\n", " 'snowicepercentage': 0.00010300000000000001,\n", " 'cloudcoverpercentage': 18.031512,\n", " 'level1cpdiidentifier': 'S2A_OPER_MSI_L1C_TL_MPS__20200531T123341_A025802_T32UQD_N02.09',\n", " 'gmlfootprint': '\\n \\n \\n 53.21199287188401,11.994640922848319 53.1594219676414,13.634183017449221 52.17548471916956,13.531032170485291 52.226225391291045,11.927820031395214 53.21199287188401,11.994640922848319\\n \\n \\n',\n", " 'footprint': 'MULTIPOLYGON (((13.531032170485291 52.17548471916956, 13.634183017449221 53.1594219676414, 11.994640922848319 53.21199287188401, 11.927820031395214 52.226225391291045, 13.531032170485291 52.17548471916956)))',\n", " 'format': 'SAFE',\n", " 'processingbaseline': '02.14',\n", " 'platformname': 'Sentinel-2',\n", " 'filename': 'S2A_MSIL2A_20200531T102031_N0214_R065_T32UQD_20200531T134031.SAFE',\n", " 'instrumentname': 'Multi-Spectral Instrument',\n", " 'instrumentshortname': 'MSI',\n", " 'size': '1.08 GB',\n", " 's2datatakeid': 'GS2A_20200531T102031_025802_N02.14',\n", " 'producttype': 'S2MSI2A',\n", " 'platformidentifier': '2015-028A',\n", " 'orbitdirection': 'DESCENDING',\n", " 'platformserialidentifier': 'Sentinel-2A',\n", " 'processinglevel': 'Level-2A',\n", " 'identifier': 'S2A_MSIL2A_20200531T102031_N0214_R065_T32UQD_20200531T134031',\n", " 'uuid': '141d5ea4-6099-4851-84bc-0b218f29acff'}),\n", " ('307f637d-7c03-433c-84f9-5b405e5359d1',\n", " {'title': 'S2A_MSIL2A_20200528T101031_N0214_R022_T32UQC_20200528T120203',\n", " 'link': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('307f637d-7c03-433c-84f9-5b405e5359d1')/$value\",\n", " 'link_alternative': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('307f637d-7c03-433c-84f9-5b405e5359d1')/\",\n", " 'link_icon': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('307f637d-7c03-433c-84f9-5b405e5359d1')/Products('Quicklook')/$value\",\n", " 'summary': 'Date: 2020-05-28T10:10:31.024Z, Instrument: MSI, Mode: , Satellite: Sentinel-2, Size: 970.71 MB',\n", " 'beginposition': datetime.datetime(2020, 5, 28, 10, 10, 31, 24000),\n", " 'endposition': datetime.datetime(2020, 5, 28, 10, 10, 31, 24000),\n", " 'ingestiondate': datetime.datetime(2020, 5, 28, 21, 29, 2, 675000),\n", " 'orbitnumber': 25759,\n", " 'relativeorbitnumber': 22,\n", " 'vegetationpercentage': 49.832988,\n", " 'notvegetatedpercentage': 9.795959,\n", " 'waterpercentage': 0.636676,\n", " 'unclassifiedpercentage': 5.086867,\n", " 'mediumprobacloudspercentage': 5.77434,\n", " 'highprobacloudspercentage': 19.921573,\n", " 'snowicepercentage': 0.016041,\n", " 'cloudcoverpercentage': 26.565775,\n", " 'level1cpdiidentifier': 'S2A_OPER_MSI_L1C_TL_EPAE_20200528T111757_A025759_T32UQC_N02.09',\n", " 'gmlfootprint': '\\n \\n \\n 51.32505346153446,11.966617943653802 51.43329107357663,12.011412106661703 51.5791272428628,12.072157436358427 51.72499098223669,12.133167812069996 51.87086233896356,12.1944272059878 52.016627758367285,12.256016093050308 52.162340230795984,12.317900601067976 52.300011890814396,12.37625902692045 52.26313739791785,13.539979680877822 51.27892518278613,13.442095184333063 51.32505346153446,11.966617943653802\\n \\n \\n',\n", " 'footprint': 'MULTIPOLYGON (((13.442095184333063 51.27892518278613, 13.539979680877822 52.26313739791785, 12.37625902692045 52.300011890814396, 12.317900601067976 52.162340230795984, 12.256016093050308 52.016627758367285, 12.1944272059878 51.87086233896356, 12.133167812069996 51.72499098223669, 12.072157436358427 51.5791272428628, 12.011412106661703 51.43329107357663, 11.966617943653802 51.32505346153446, 13.442095184333063 51.27892518278613)))',\n", " 'format': 'SAFE',\n", " 'processingbaseline': '02.14',\n", " 'platformname': 'Sentinel-2',\n", " 'filename': 'S2A_MSIL2A_20200528T101031_N0214_R022_T32UQC_20200528T120203.SAFE',\n", " 'instrumentname': 'Multi-Spectral Instrument',\n", " 'instrumentshortname': 'MSI',\n", " 'size': '970.71 MB',\n", " 's2datatakeid': 'GS2A_20200528T101031_025759_N02.14',\n", " 'producttype': 'S2MSI2A',\n", " 'platformidentifier': '2015-028A',\n", " 'orbitdirection': 'DESCENDING',\n", " 'platformserialidentifier': 'Sentinel-2A',\n", " 'processinglevel': 'Level-2A',\n", " 'identifier': 'S2A_MSIL2A_20200528T101031_N0214_R022_T32UQC_20200528T120203',\n", " 'uuid': '307f637d-7c03-433c-84f9-5b405e5359d1'}),\n", " ('57da8930-aa23-46ba-aa5a-e2095311f492',\n", " {'title': 'S2A_MSIL2A_20200521T102031_N0214_R065_T33UUT_20200521T115134',\n", " 'link': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('57da8930-aa23-46ba-aa5a-e2095311f492')/$value\",\n", " 'link_alternative': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('57da8930-aa23-46ba-aa5a-e2095311f492')/\",\n", " 'link_icon': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('57da8930-aa23-46ba-aa5a-e2095311f492')/Products('Quicklook')/$value\",\n", " 'summary': 'Date: 2020-05-21T10:20:31.024Z, Instrument: MSI, Mode: , Satellite: Sentinel-2, Size: 1.05 GB',\n", " 'beginposition': datetime.datetime(2020, 5, 21, 10, 20, 31, 24000),\n", " 'endposition': datetime.datetime(2020, 5, 21, 10, 20, 31, 24000),\n", " 'ingestiondate': datetime.datetime(2020, 5, 22, 7, 30, 18, 555000),\n", " 'orbitnumber': 25659,\n", " 'relativeorbitnumber': 65,\n", " 'cloudcoverpercentage': 17.745118,\n", " 'highprobacloudspercentage': 1.104698,\n", " 'mediumprobacloudspercentage': 0.655001,\n", " 'snowicepercentage': 1e-05,\n", " 'vegetationpercentage': 66.193372,\n", " 'waterpercentage': 0.514889,\n", " 'notvegetatedpercentage': 14.012413,\n", " 'unclassifiedpercentage': 0.655595,\n", " 'gmlfootprint': '\\n \\n \\n 52.31402323817268,12.065798228229744 52.34305438492137,13.675924550313963 51.35607984388353,13.704578464673325 51.3280532483229,12.12921085152078 52.31402323817268,12.065798228229744\\n \\n \\n',\n", " 'format': 'SAFE',\n", " 'instrumentshortname': 'MSI',\n", " 'instrumentname': 'Multi-Spectral Instrument',\n", " 'footprint': 'MULTIPOLYGON (((12.12921085152078 51.3280532483229, 13.704578464673325 51.35607984388353, 13.675924550313963 52.34305438492137, 12.065798228229744 52.31402323817268, 12.12921085152078 51.3280532483229)))',\n", " 's2datatakeid': 'GS2A_20200521T102031_025659_N02.14',\n", " 'platformidentifier': '2015-028A',\n", " 'orbitdirection': 'DESCENDING',\n", " 'platformserialidentifier': 'Sentinel-2A',\n", " 'processingbaseline': '02.14',\n", " 'processinglevel': 'Level-2A',\n", " 'producttype': 'S2MSI2A',\n", " 'platformname': 'Sentinel-2',\n", " 'size': '1.05 GB',\n", " 'filename': 'S2A_MSIL2A_20200521T102031_N0214_R065_T33UUT_20200521T115134.SAFE',\n", " 'level1cpdiidentifier': 'S2A_OPER_MSI_L1C_TL_EPAE_20200521T111735_A025659_T33UUT_N02.09',\n", " 'identifier': 'S2A_MSIL2A_20200521T102031_N0214_R065_T33UUT_20200521T115134',\n", " 'uuid': '57da8930-aa23-46ba-aa5a-e2095311f492'}),\n", " ('daa6a1bc-b662-4182-ab48-d7e6bc614be3',\n", " {'title': 'S2A_MSIL2A_20200521T102031_N0214_R065_T32UQC_20200521T115134',\n", " 'link': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('daa6a1bc-b662-4182-ab48-d7e6bc614be3')/$value\",\n", " 'link_alternative': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('daa6a1bc-b662-4182-ab48-d7e6bc614be3')/\",\n", " 'link_icon': \"https://scihub.copernicus.eu/apihub/odata/v1/Products('daa6a1bc-b662-4182-ab48-d7e6bc614be3')/Products('Quicklook')/$value\",\n", " 'summary': 'Date: 2020-05-21T10:20:31.024Z, Instrument: MSI, Mode: , Satellite: Sentinel-2, Size: 1.06 GB',\n", " 'beginposition': datetime.datetime(2020, 5, 21, 10, 20, 31, 24000),\n", " 'endposition': datetime.datetime(2020, 5, 21, 10, 20, 31, 24000),\n", " 'ingestiondate': datetime.datetime(2020, 5, 22, 7, 27, 49, 486000),\n", " 'orbitnumber': 25659,\n", " 'relativeorbitnumber': 65,\n", " 'cloudcoverpercentage': 12.009189,\n", " 'highprobacloudspercentage': 0.680134,\n", " 'mediumprobacloudspercentage': 0.410549,\n", " 'snowicepercentage': 1.3e-05,\n", " 'vegetationpercentage': 69.962603,\n", " 'waterpercentage': 0.560493,\n", " 'notvegetatedpercentage': 16.038644,\n", " 'unclassifiedpercentage': 0.589756,\n", " 'gmlfootprint': '\\n \\n \\n 52.31403780479302,11.933615765809156 52.26313739791785,13.539979680877822 51.27892518278613,13.442095184333063 51.32806731121396,11.870215764132041 52.31403780479302,11.933615765809156\\n \\n \\n',\n", " 'format': 'SAFE',\n", " 'instrumentshortname': 'MSI',\n", " 'instrumentname': 'Multi-Spectral Instrument',\n", " 'footprint': 'MULTIPOLYGON (((13.442095184333063 51.27892518278613, 13.539979680877822 52.26313739791785, 11.933615765809156 52.31403780479302, 11.870215764132041 51.32806731121396, 13.442095184333063 51.27892518278613)))',\n", " 's2datatakeid': 'GS2A_20200521T102031_025659_N02.14',\n", " 'platformidentifier': '2015-028A',\n", " 'orbitdirection': 'DESCENDING',\n", " 'platformserialidentifier': 'Sentinel-2A',\n", " 'processingbaseline': '02.14',\n", " 'processinglevel': 'Level-2A',\n", " 'producttype': 'S2MSI2A',\n", " 'platformname': 'Sentinel-2',\n", " 'size': '1.06 GB',\n", " 'filename': 'S2A_MSIL2A_20200521T102031_N0214_R065_T32UQC_20200521T115134.SAFE',\n", " 'level1cpdiidentifier': 'S2A_OPER_MSI_L1C_TL_EPAE_20200521T111735_A025659_T32UQC_N02.09',\n", " 'identifier': 'S2A_MSIL2A_20200521T102031_N0214_R065_T32UQC_20200521T115134',\n", " 'uuid': 'daa6a1bc-b662-4182-ab48-d7e6bc614be3'})])" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "products" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "from collections import Counter" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "('T32UQC', 3)" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# to reduce download size, only download products for one tile\n", "tiles = Counter([p['filename'].split('_')[5] for _, p in products.items()])\n", "most_common_tile, amount = tiles.most_common(1)[0]\n", "most_common_tile, amount" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [], "source": [ "# we create the directory structure we need for the following notebooks\n", "! mkdir -p input/raster" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Downloading: 0%| | 2.10M/1.01G [00:00<00:53, 18.8MB/s]\n", "Downloading: 1%| | 6.29M/1.01G [00:00<00:46, 21.7MB/s]\n", "Downloading: 1%| | 10.5M/1.01G [00:00<00:41, 24.0MB/s]\n", "Downloading: 1%|▏ | 13.6M/1.01G [00:00<00:38, 25.7MB/s]\n", "Downloading: 2%|▏ | 18.9M/1.01G [00:00<00:33, 30.0MB/s]\n", "Downloading: 2%|▏ | 25.2M/1.01G [00:00<00:28, 35.1MB/s]\n", "Downloading: 3%|▎ | 30.4M/1.01G [00:00<00:26, 37.5MB/s]\n", "Downloading: 3%|▎ | 34.6M/1.01G [00:00<00:27, 36.2MB/s]\n", "Downloading: 3%|▎ | 30.4M/1.02G [00:00<00:25, 38.3MB/s]\u001b[A\n", "Downloading: 4%|▍ | 38.8M/1.01G [00:01<00:28, 34.2MB/s]\n", "Downloading: 4%|▍ | 44.0M/1.01G [00:01<00:25, 37.8MB/s]\n", "Downloading: 5%|▍ | 49.3M/1.01G [00:01<00:23, 40.4MB/s]\n", "Downloading: 6%|▌ | 59.8M/1.01G [00:01<00:21, 44.0MB/s]\n", "Downloading: 6%|▌ | 57.7M/1.02G [00:01<00:21, 44.3MB/s]\u001b[A\n", "Downloading: 6%|▋ | 65.0M/1.01G [00:01<00:21, 43.2MB/s]\n", "Downloading: 7%|▋ | 70.3M/1.01G [00:01<00:23, 40.7MB/s]\n", "Downloading: 7%|▋ | 74.4M/1.01G [00:01<00:24, 38.9MB/s]\n", "Downloading: 8%|▊ | 79.7M/1.01G [00:01<00:22, 42.0MB/s]\n", "Downloading: 8%|▊ | 84.9M/1.01G [00:02<00:20, 44.5MB/s]\n", "Downloading: 9%|▉ | 91.2M/1.01G [00:02<00:19, 48.4MB/s]\n", "Downloading: 10%|█ | 106M/1.01G [00:02<00:16, 55.3MB/s] \n", "Downloading: 12%|█▏ | 118M/1.01G [00:02<00:16, 54.5MB/s]\n", "Downloading: 13%|█▎ | 127M/1.01G [00:02<00:15, 58.8MB/s]\n", "Downloading: 13%|█▎ | 134M/1.01G [00:02<00:14, 60.2MB/s]\n", "Downloading: 14%|█▍ | 141M/1.01G [00:03<00:14, 59.8MB/s]\n", "Downloading: 14%|█▍ | 147M/1.01G [00:03<00:14, 60.2MB/s]\n", "Downloading: 15%|█▌ | 154M/1.01G [00:03<00:13, 63.6MB/s]\n", "Downloading: 17%|█▋ | 171M/1.01G [00:03<00:12, 68.7MB/s]\n", "Downloading: 18%|█▊ | 179M/1.01G [00:03<00:11, 69.8MB/s]\n", "Downloading: 18%|█▊ | 187M/1.01G [00:03<00:11, 70.6MB/s]\n", "Downloading: 20%|█▉ | 201M/1.01G [00:03<00:11, 71.2MB/s]\n", "Downloading: 21%|██ | 209M/1.01G [00:03<00:11, 71.3MB/s]\n", "Downloading: 21%|██▏ | 217M/1.01G [00:04<00:11, 72.0MB/s]\n", "Downloading: 15%|█▌ | 157M/1.02G [00:04<00:29, 29.4MB/s]\u001b[A\n", "Downloading: 22%|██▏ | 224M/1.01G [00:04<00:14, 55.9MB/s]\n", "Downloading: 23%|██▎ | 233M/1.01G [00:04<00:12, 60.7MB/s]\n", "Downloading: 24%|██▍ | 241M/1.01G [00:04<00:11, 65.1MB/s]\n", "Downloading: 25%|██▍ | 249M/1.01G [00:04<00:11, 67.0MB/s]\n", "Downloading: 25%|██▌ | 256M/1.01G [00:04<00:12, 61.6MB/s]\n", "Downloading: 26%|██▌ | 263M/1.01G [00:04<00:13, 57.0MB/s]\n", "Downloading: 27%|██▋ | 269M/1.01G [00:04<00:12, 57.8MB/s]\n", "Downloading: 27%|██▋ | 277M/1.01G [00:05<00:11, 61.6MB/s]\n", "Downloading: 28%|██▊ | 285M/1.01G [00:05<00:11, 65.0MB/s]\n", "Downloading: 29%|██▉ | 294M/1.01G [00:05<00:10, 67.4MB/s]\n", "Downloading: 19%|█▉ | 193M/1.02G [00:05<00:26, 30.8MB/s]\u001b[A\n", "Downloading: 30%|██▉ | 302M/1.01G [00:05<00:10, 68.9MB/s]\n", "Downloading: 31%|███ | 310M/1.01G [00:05<00:09, 71.1MB/s]\n", "Downloading: 32%|███▏ | 327M/1.01G [00:05<00:09, 74.2MB/s]\n", "Downloading: 20%|██ | 207M/1.02G [00:05<00:26, 30.8MB/s]\u001b[A\n", "Downloading: 33%|███▎ | 336M/1.01G [00:05<00:09, 74.1MB/s]\n", "Downloading: 35%|███▍ | 352M/1.01G [00:06<00:08, 77.0MB/s]\n", "Downloading: 36%|███▌ | 361M/1.01G [00:06<00:08, 77.8MB/s]\n", "Downloading: 36%|███▋ | 369M/1.01G [00:06<00:08, 77.6MB/s]\n", "Downloading: 22%|██▏ | 223M/1.02G [00:06<00:25, 30.9MB/s]\u001b[A\n", "Downloading: 37%|███▋ | 377M/1.01G [00:06<00:08, 77.4MB/s]\n", "Downloading: 39%|███▉ | 394M/1.01G [00:06<00:09, 68.6MB/s]\n", "Downloading: 40%|███▉ | 403M/1.01G [00:06<00:08, 70.7MB/s]\n", "Downloading: 40%|████ | 410M/1.01G [00:06<00:09, 65.9MB/s]\n", "Downloading: 24%|██▍ | 243M/1.02G [00:06<00:24, 32.2MB/s]\u001b[A\n", "Downloading: 41%|████ | 417M/1.01G [00:07<00:10, 59.4MB/s]\n", "Downloading: 42%|████▏ | 424M/1.01G [00:07<00:10, 56.6MB/s]\n", "Downloading: 42%|████▏ | 430M/1.01G [00:07<00:10, 55.4MB/s]\n", "Downloading: 43%|████▎ | 436M/1.01G [00:07<00:10, 53.8MB/s]\n", "Downloading: 44%|████▎ | 442M/1.01G [00:07<00:11, 50.7MB/s]\n", "Downloading: 44%|████▍ | 448M/1.01G [00:07<00:12, 46.8MB/s]\n", "Downloading: 45%|████▍ | 453M/1.01G [00:07<00:12, 44.1MB/s]\n", "Downloading: 45%|████▌ | 458M/1.01G [00:07<00:13, 42.5MB/s]\n", "Downloading: 46%|████▌ | 463M/1.01G [00:08<00:13, 41.9MB/s]\n", "Downloading: 46%|████▌ | 469M/1.01G [00:08<00:13, 41.8MB/s]\n", "Downloading: 47%|████▋ | 474M/1.01G [00:08<00:13, 41.3MB/s]\n", "Downloading: 47%|████▋ | 478M/1.01G [00:08<00:13, 41.1MB/s]\n", "Downloading: 48%|████▊ | 483M/1.01G [00:08<00:12, 40.9MB/s]\n", "Downloading: 48%|████▊ | 488M/1.01G [00:08<00:14, 36.7MB/s]\n", "Downloading: 48%|████▊ | 492M/1.01G [00:08<00:17, 30.4MB/s]\n", "Downloading: 49%|████▉ | 496M/1.01G [00:09<00:19, 27.3MB/s]\n", "Downloading: 31%|███ | 312M/1.02G [00:08<00:25, 27.7MB/s]\u001b[A\n", "Downloading: 49%|████▉ | 499M/1.01G [00:09<00:20, 25.1MB/s]\n", "Downloading: 50%|████▉ | 502M/1.01G [00:09<00:21, 23.8MB/s]\n", "Downloading: 50%|████▉ | 505M/1.01G [00:09<00:21, 23.2MB/s]\n", "Downloading: 50%|█████ | 509M/1.01G [00:09<00:22, 23.0MB/s]\n", "Downloading: 50%|█████ | 512M/1.01G [00:09<00:21, 22.9MB/s]\n", "Downloading: 33%|███▎ | 331M/1.02G [00:09<00:26, 26.0MB/s]\u001b[A\n", "Downloading: 51%|█████ | 515M/1.01G [00:10<00:24, 20.4MB/s]\n", "Downloading: 51%|█████ | 518M/1.01G [00:10<00:25, 19.3MB/s]\n", "Downloading: 51%|█████▏ | 520M/1.01G [00:10<00:26, 18.5MB/s]\n", "Downloading: 52%|█████▏ | 524M/1.01G [00:10<00:27, 17.9MB/s]\n", "Downloading: 52%|█████▏ | 526M/1.01G [00:10<00:27, 18.0MB/s]\n", "Downloading: 52%|█████▏ | 528M/1.01G [00:10<00:27, 17.9MB/s]\n", "Downloading: 52%|█████▏ | 531M/1.01G [00:10<00:26, 18.1MB/s]\n", "Downloading: 53%|█████▎ | 535M/1.01G [00:11<00:26, 18.4MB/s]\n", "Downloading: 53%|█████▎ | 537M/1.01G [00:11<00:25, 18.5MB/s]\n", "Downloading: 53%|█████▎ | 539M/1.01G [00:11<00:26, 18.2MB/s]\n", "Downloading: 53%|█████▎ | 541M/1.01G [00:11<00:25, 18.8MB/s]\n", "Downloading: 54%|█████▍ | 545M/1.01G [00:11<00:24, 19.2MB/s]\n", "Downloading: 54%|█████▍ | 547M/1.01G [00:11<00:24, 19.4MB/s]\n", "Downloading: 54%|█████▍ | 551M/1.01G [00:11<00:23, 19.7MB/s]\n", "Downloading: 54%|█████▍ | 553M/1.01G [00:12<00:23, 20.0MB/s]\n", "Downloading: 55%|█████▍ | 556M/1.01G [00:12<00:22, 20.4MB/s]\n", "Downloading: 55%|█████▌ | 559M/1.01G [00:12<00:21, 20.7MB/s]\n", "Downloading: 55%|█████▌ | 562M/1.01G [00:12<00:21, 21.1MB/s]\n", "Downloading: 56%|█████▌ | 565M/1.01G [00:12<00:20, 21.7MB/s]\n", "Downloading: 39%|███▊ | 394M/1.02G [00:12<00:25, 24.2MB/s]\u001b[A\n", "Downloading: 56%|█████▌ | 568M/1.01G [00:12<00:20, 21.9MB/s]\n", "Downloading: 56%|█████▋ | 571M/1.01G [00:12<00:20, 22.1MB/s]\n", "Downloading: 57%|█████▋ | 575M/1.01G [00:13<00:19, 22.2MB/s]\n", "Downloading: 57%|█████▋ | 578M/1.01G [00:13<00:19, 22.9MB/s]\n", "Downloading: 57%|█████▋ | 581M/1.01G [00:13<00:19, 22.2MB/s]\n", "Downloading: 58%|█████▊ | 584M/1.01G [00:13<00:18, 22.7MB/s]\n", "Downloading: 58%|█████▊ | 587M/1.01G [00:13<00:18, 22.6MB/s]\n", "Downloading: 58%|█████▊ | 590M/1.01G [00:13<00:18, 23.2MB/s]\n", "Downloading: 59%|█████▊ | 593M/1.01G [00:13<00:17, 23.6MB/s]\n", "Downloading: 42%|████▏ | 426M/1.02G [00:13<00:22, 26.1MB/s]\u001b[A\n", "Downloading: 59%|█████▉ | 597M/1.01G [00:13<00:17, 24.2MB/s]\n", "Downloading: 59%|█████▉ | 600M/1.01G [00:14<00:16, 24.7MB/s]\n", "Downloading: 59%|█████▉ | 603M/1.01G [00:14<00:16, 25.3MB/s]\n", "Downloading: 60%|█████▉ | 606M/1.01G [00:14<00:15, 25.7MB/s]\n", "Downloading: 60%|██████ | 609M/1.01G [00:14<00:15, 26.0MB/s]\n", "Downloading: 60%|██████ | 612M/1.01G [00:14<00:15, 26.1MB/s]\n", "Downloading: 61%|██████ | 616M/1.01G [00:14<00:15, 26.3MB/s]\n", "Downloading: 61%|██████ | 619M/1.01G [00:14<00:14, 27.2MB/s]\n", "Downloading: 61%|██████▏ | 622M/1.01G [00:14<00:13, 28.1MB/s]\n", "Downloading: 62%|██████▏ | 625M/1.01G [00:15<00:13, 28.6MB/s]\n", "Downloading: 62%|██████▏ | 628M/1.01G [00:15<00:13, 28.9MB/s]\n", "Downloading: 63%|██████▎ | 634M/1.01G [00:15<00:12, 30.0MB/s]\n", "Downloading: 63%|██████▎ | 639M/1.01G [00:15<00:12, 30.7MB/s]\n", "Downloading: 63%|██████▎ | 643M/1.01G [00:15<00:11, 31.1MB/s]\n", "Downloading: 64%|██████▍ | 647M/1.01G [00:15<00:11, 31.8MB/s]\n", "Downloading: 64%|██████▍ | 651M/1.01G [00:15<00:11, 32.2MB/s]\n", "Downloading: 65%|██████▍ | 655M/1.01G [00:15<00:11, 32.5MB/s]\n", "Downloading: 65%|██████▌ | 660M/1.01G [00:16<00:10, 32.9MB/s]\n", "Downloading: 65%|██████▌ | 664M/1.01G [00:16<00:10, 33.0MB/s]\n", "Downloading: 66%|██████▌ | 668M/1.01G [00:16<00:10, 33.4MB/s]\n", "Downloading: 66%|██████▋ | 672M/1.01G [00:16<00:10, 33.7MB/s]\n", "Downloading: 67%|██████▋ | 676M/1.01G [00:16<00:09, 33.9MB/s]\n", "Downloading: 67%|██████▋ | 681M/1.01G [00:16<00:09, 34.3MB/s]\n", "Downloading: 49%|████▉ | 501M/1.02G [00:16<00:18, 27.9MB/s]\u001b[A\n", "Downloading: 68%|██████▊ | 685M/1.01G [00:16<00:09, 33.8MB/s]\n", "Downloading: 68%|██████▊ | 689M/1.01G [00:16<00:09, 34.5MB/s]\n", "Downloading: 68%|██████▊ | 693M/1.01G [00:17<00:09, 35.0MB/s]\n", "Downloading: 69%|██████▉ | 697M/1.01G [00:17<00:08, 35.5MB/s]\n", "Downloading: 69%|██████▉ | 701M/1.01G [00:17<00:08, 35.9MB/s]\n", "Downloading: 70%|██████▉ | 710M/1.01G [00:17<00:08, 36.9MB/s]\n", "Downloading: 70%|███████ | 714M/1.01G [00:17<00:08, 37.0MB/s]\n", "Downloading: 71%|███████ | 718M/1.01G [00:17<00:07, 37.3MB/s]\n", "Downloading: 71%|███████ | 722M/1.01G [00:17<00:07, 37.5MB/s]\n", "Downloading: 72%|███████▏ | 727M/1.01G [00:17<00:07, 37.8MB/s]\n", "Downloading: 72%|███████▏ | 735M/1.01G [00:18<00:07, 38.6MB/s]\n", "Downloading: 73%|███████▎ | 739M/1.01G [00:18<00:07, 39.0MB/s]\n", "Downloading: 73%|███████▎ | 743M/1.01G [00:18<00:06, 39.3MB/s]\n", "Downloading: 74%|███████▎ | 748M/1.01G [00:18<00:06, 39.6MB/s]\n", "Downloading: 74%|███████▍ | 752M/1.01G [00:18<00:06, 39.7MB/s]\n", "Downloading: 75%|███████▍ | 756M/1.01G [00:18<00:06, 40.0MB/s]\n", "Downloading: 75%|███████▍ | 760M/1.01G [00:18<00:06, 40.1MB/s]\n", "Downloading: 75%|███████▌ | 764M/1.01G [00:18<00:06, 40.1MB/s]\n", "Downloading: 76%|███████▌ | 769M/1.01G [00:18<00:06, 40.2MB/s]\n", "Downloading: 76%|███████▌ | 773M/1.01G [00:19<00:05, 40.3MB/s]\n", "Downloading: 77%|███████▋ | 777M/1.01G [00:19<00:05, 40.3MB/s]\n", "Downloading: 77%|███████▋ | 781M/1.01G [00:19<00:05, 40.7MB/s]\n", "Downloading: 77%|███████▋ | 785M/1.01G [00:19<00:05, 39.3MB/s]\n", "Downloading: 78%|███████▊ | 791M/1.01G [00:19<00:05, 40.4MB/s]\n", "Downloading: 78%|███████▊ | 796M/1.01G [00:19<00:05, 41.1MB/s]\n", "Downloading: 79%|███████▉ | 801M/1.01G [00:19<00:05, 41.8MB/s]\n", "Downloading: 80%|███████▉ | 806M/1.01G [00:19<00:04, 42.2MB/s]\n", "Downloading: 80%|████████ | 812M/1.01G [00:20<00:04, 42.8MB/s]\n", "Downloading: 81%|████████ | 817M/1.01G [00:20<00:04, 42.8MB/s]\n", "Downloading: 61%|██████ | 623M/1.02G [00:19<00:09, 40.0MB/s]\u001b[A\n", "Downloading: 81%|████████ | 822M/1.01G [00:20<00:04, 43.4MB/s]\n", "Downloading: 82%|████████▏ | 827M/1.01G [00:20<00:04, 43.5MB/s]\n", "Downloading: 82%|████████▏ | 833M/1.01G [00:20<00:04, 43.6MB/s]\n", "Downloading: 83%|████████▎ | 843M/1.01G [00:20<00:03, 44.5MB/s]\n", "Downloading: 84%|████████▎ | 848M/1.01G [00:20<00:03, 45.2MB/s]\n", "Downloading: 84%|████████▍ | 854M/1.01G [00:20<00:03, 45.5MB/s]\n", "Downloading: 85%|████████▍ | 859M/1.01G [00:21<00:03, 45.8MB/s]\n", "Downloading: 85%|████████▌ | 864M/1.01G [00:21<00:03, 46.2MB/s]\n", "Downloading: 86%|████████▌ | 869M/1.01G [00:21<00:03, 46.5MB/s]\n", "Downloading: 86%|████████▌ | 875M/1.01G [00:21<00:02, 46.9MB/s]\n", "Downloading: 87%|████████▋ | 880M/1.01G [00:21<00:02, 47.4MB/s]\n", "Downloading: 87%|████████▋ | 885M/1.01G [00:21<00:02, 47.7MB/s]\n", "Downloading: 88%|████████▊ | 890M/1.01G [00:21<00:02, 47.8MB/s]\n", "Downloading: 88%|████████▊ | 895M/1.01G [00:21<00:02, 48.0MB/s]\n", "Downloading: 89%|████████▉ | 901M/1.01G [00:21<00:02, 48.2MB/s]\n", "Downloading: 89%|████████▉ | 906M/1.01G [00:22<00:02, 48.4MB/s]\n", "Downloading: 90%|████████▉ | 911M/1.01G [00:22<00:02, 47.8MB/s]\n", "Downloading: 91%|█████████ | 922M/1.01G [00:22<00:01, 48.5MB/s]\n", "Downloading: 91%|█████████▏| 927M/1.01G [00:22<00:01, 49.1MB/s]\n", "Downloading: 92%|█████████▏| 932M/1.01G [00:22<00:01, 48.6MB/s]\n", "Downloading: 92%|█████████▏| 937M/1.01G [00:22<00:01, 48.6MB/s]\n", "Downloading: 93%|█████████▎| 948M/1.01G [00:22<00:01, 49.4MB/s]\n", "Downloading: 94%|█████████▍| 953M/1.01G [00:23<00:01, 50.0MB/s]\n", "Downloading: 94%|█████████▍| 958M/1.01G [00:23<00:01, 50.4MB/s]\n", "Downloading: 95%|█████████▌| 964M/1.01G [00:23<00:00, 50.8MB/s]\n", "Downloading: 96%|█████████▌| 969M/1.01G [00:23<00:00, 51.0MB/s]\n", "Downloading: 96%|█████████▌| 974M/1.01G [00:23<00:00, 51.3MB/s]\n", "Downloading: 97%|█████████▋| 979M/1.01G [00:23<00:00, 51.3MB/s]\n", "Downloading: 97%|█████████▋| 985M/1.01G [00:23<00:00, 51.4MB/s]\n", "Downloading: 98%|█████████▊| 990M/1.01G [00:23<00:00, 51.0MB/s]\n", "Downloading: 98%|█████████▊| 995M/1.01G [00:23<00:00, 51.1MB/s]\n", "Downloading: 99%|█████████▊| 1.00G/1.01G [00:23<00:00, 51.8MB/s]\n", "Downloading: 99%|█████████▉| 1.01G/1.01G [00:24<00:00, 51.4MB/s]\n", "Downloading: 100%|██████████| 1.01G/1.01G [00:24<00:00, 41.9MB/s]\n", "MD5 checksumming: 1%| | 7.59M/1.01G [00:00<00:13, 73.8MB/s]\n", "Downloading: 77%|███████▋ | 789M/1.02G [00:24<00:06, 36.4MB/s]\u001b[A\n", "MD5 checksumming: 3%|▎ | 26.0M/1.01G [00:00<00:12, 76.7MB/s]\n", "MD5 checksumming: 4%|▍ | 43.6M/1.01G [00:00<00:10, 92.4MB/s]\n", "MD5 checksumming: 7%|▋ | 66.7M/1.01G [00:00<00:08, 113MB/s] \n", "MD5 checksumming: 12%|█▏ | 117M/1.01G [00:00<00:05, 157MB/s] \n", "MD5 checksumming: 14%|█▍ | 141M/1.01G [00:00<00:04, 176MB/s]\n", "MD5 checksumming: 16%|█▋ | 167M/1.01G [00:00<00:04, 194MB/s]\n", "MD5 checksumming: 19%|█▉ | 192M/1.01G [00:01<00:03, 209MB/s]\n", "MD5 checksumming: 21%|██▏ | 218M/1.01G [00:01<00:03, 221MB/s]\n", "MD5 checksumming: 27%|██▋ | 271M/1.01G [00:01<00:03, 242MB/s]\n", "MD5 checksumming: 29%|██▉ | 297M/1.01G [00:01<00:02, 247MB/s]\n", "MD5 checksumming: 32%|███▏ | 323M/1.01G [00:01<00:02, 252MB/s]\n", "MD5 checksumming: 34%|███▍ | 349M/1.01G [00:01<00:02, 254MB/s]\n", "MD5 checksumming: 37%|███▋ | 375M/1.01G [00:01<00:02, 256MB/s]\n", "MD5 checksumming: 40%|███▉ | 401M/1.01G [00:01<00:02, 249MB/s]\n", "MD5 checksumming: 42%|████▏ | 426M/1.01G [00:01<00:02, 244MB/s]\n", "MD5 checksumming: 44%|████▍ | 451M/1.01G [00:02<00:02, 240MB/s]\n", "MD5 checksumming: 49%|████▉ | 500M/1.01G [00:02<00:02, 241MB/s]\n", "MD5 checksumming: 52%|█████▏ | 524M/1.01G [00:02<00:02, 239MB/s]\n", "MD5 checksumming: 54%|█████▍ | 548M/1.01G [00:02<00:01, 234MB/s]\n", "MD5 checksumming: 56%|█████▋ | 571M/1.01G [00:02<00:01, 233MB/s]\n", "MD5 checksumming: 59%|█████▊ | 595M/1.01G [00:02<00:01, 232MB/s]\n", "MD5 checksumming: 61%|██████ | 618M/1.01G [00:02<00:01, 232MB/s]\n", "MD5 checksumming: 63%|██████▎ | 641M/1.01G [00:02<00:01, 231MB/s]\n", "MD5 checksumming: 68%|██████▊ | 688M/1.01G [00:03<00:01, 234MB/s]\n", "MD5 checksumming: 70%|███████ | 712M/1.01G [00:03<00:01, 234MB/s]\n", "MD5 checksumming: 72%|███████▏ | 735M/1.01G [00:03<00:01, 226MB/s]\n", "MD5 checksumming: 75%|███████▍ | 758M/1.01G [00:03<00:01, 219MB/s]\n", "MD5 checksumming: 77%|███████▋ | 780M/1.01G [00:03<00:01, 214MB/s]\n", "MD5 checksumming: 79%|███████▉ | 801M/1.01G [00:03<00:01, 212MB/s]\n", "MD5 checksumming: 81%|████████ | 823M/1.01G [00:03<00:00, 207MB/s]\n", "MD5 checksumming: 83%|████████▎ | 843M/1.01G [00:03<00:00, 202MB/s]\n", "MD5 checksumming: 85%|████████▌ | 864M/1.01G [00:03<00:00, 201MB/s]\n", "MD5 checksumming: 87%|████████▋ | 886M/1.01G [00:04<00:00, 207MB/s]\n", "MD5 checksumming: 90%|████████▉ | 908M/1.01G [00:04<00:00, 211MB/s]\n", "MD5 checksumming: 92%|█████████▏| 930M/1.01G [00:04<00:00, 214MB/s]\n", "MD5 checksumming: 97%|█████████▋| 980M/1.01G [00:04<00:00, 232MB/s]\n", "MD5 checksumming: 100%|██████████| 1.01G/1.01G [00:04<00:00, 222MB/s]\n", "\n", "Downloading: 96%|█████████▌| 973M/1.02G [00:28<00:01, 36.2MB/s]\u001b[A\n", "Downloading: 96%|█████████▌| 977M/1.02G [00:28<00:01, 33.6MB/s]\u001b[A\n", "Downloading: 96%|█████████▋| 981M/1.02G [00:29<00:01, 33.4MB/s]\u001b[A\n", "Downloading: 97%|█████████▋| 986M/1.02G [00:29<00:00, 33.0MB/s]\u001b[A\n", "Downloading: 97%|█████████▋| 990M/1.02G [00:29<00:01, 20.8MB/s]\u001b[A\n", "Downloading: 98%|█████████▊| 993M/1.02G [00:29<00:01, 22.3MB/s]\u001b[A\n", "Downloading: 98%|█████████▊| 996M/1.02G [00:29<00:00, 24.1MB/s]\u001b[A\n", "Downloading: 98%|█████████▊| 1.00G/1.02G [00:29<00:00, 26.4MB/s]\u001b[A\n", "Downloading: 0%| | 0.00/1.14G [00:00" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "# preview the first downloaded image\n", "with r.open(band_paths(downloaded[1], ['TCI'], '20m')[0]) as true_color:\n", " fig, (axr, axg, axb) = plt.subplots(1,3, figsize=(21,7))\n", " plot.show((true_color, 1), ax=axr, cmap='Reds', title='red channel')\n", " plot.show((true_color, 2), ax=axg, cmap='Greens', title='green channel')\n", " plot.show((true_color, 3), ax=axb, cmap='Blues', title='blue channel')\n", " plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.6" } }, "nbformat": 4, "nbformat_minor": 4 }