mirror of
https://github.com/heyarne/earth-observation-for-journalism.git
synced 2026-05-07 03:23:40 +02:00
Remove unnecessary helper scihub_product_ids
This commit is contained in:
parent
c1fe0f31d4
commit
99678b9792
5 changed files with 4973 additions and 1006 deletions
|
|
@ -307,7 +307,6 @@
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"from tqdm.notebook import tqdm\n",
|
"from tqdm.notebook import tqdm\n",
|
||||||
"from sentinel_helpers import scihub_product_ids\n",
|
|
||||||
"\n",
|
"\n",
|
||||||
"gdf = gdf.sort_values(by='cloudcoverpercentage', ascending=False)\n",
|
"gdf = gdf.sort_values(by='cloudcoverpercentage', ascending=False)\n",
|
||||||
"geometry = footprint.iloc[0].geometry\n",
|
"geometry = footprint.iloc[0].geometry\n",
|
||||||
|
|
@ -551,7 +550,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 11,
|
"execution_count": 19,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
|
|
@ -559,8 +558,8 @@
|
||||||
"dst_path = Path('input/raster/true_color_pipeline')\n",
|
"dst_path = Path('input/raster/true_color_pipeline')\n",
|
||||||
"! mkdir -p {dst_path}\n",
|
"! mkdir -p {dst_path}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"subset = scihub_product_ids(gdf.loc[:idx])\n",
|
"product_ids = gdf.loc[:idx, 'uuid'].values\n",
|
||||||
"downloads = api.download_all(subset, dst_path)"
|
"downloads, _m _ = api.download_all(subset, dst_path)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -833,15 +833,6 @@
|
||||||
"! mkdir -p {dst_path}"
|
"! mkdir -p {dst_path}"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": 21,
|
|
||||||
"metadata": {},
|
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
|
||||||
"from sentinel_helpers import scihub_product_ids"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 22,
|
"execution_count": 22,
|
||||||
|
|
@ -908,7 +899,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"downloads = api.download_all(scihub_product_ids(largest_intersections), dst_path)\n",
|
"downloads, _, _ = api.download_all(largest_intersections['uuid'].values, dst_path)\n",
|
||||||
"downloads"
|
"downloads"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -926,7 +917,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"downloaded_bytes_total = sum(p['downloaded_bytes'] for p in downloads[0].values())\n",
|
"downloaded_bytes_total = sum(p['downloaded_bytes'] for p in downloads.values())\n",
|
||||||
"print(f'Downloaded {(downloaded_bytes_total / 1024 ** 3):.2f}GB')"
|
"print(f'Downloaded {(downloaded_bytes_total / 1024 ** 3):.2f}GB')"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
4968
true-color-image/01c Coverage Analysis.ipynb
Normal file
4968
true-color-image/01c Coverage Analysis.ipynb
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue