mirror of
https://github.com/heyarne/earth-observation-for-journalism.git
synced 2026-05-06 19:13:40 +02:00
Start re-writing 01c Coverage Analysis
This commit is contained in:
parent
4f88c03e77
commit
39668d6ca8
4 changed files with 156 additions and 238 deletions
File diff suppressed because one or more lines are too long
|
|
@ -574,12 +574,12 @@
|
|||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "fbb9c6fe07ba441ab0c616f5c43de208",
|
||||
"model_id": "72c8a326e48743a081abc45e856f654c",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"HBox(children=(HTML(value='Writing bands to /tmp/tmpezbjkn7j'), FloatProgress(value=1.0, bar_style='info', lay…"
|
||||
"HBox(children=(HTML(value='Writing bands to /tmp/tmpswjep3f9'), FloatProgress(value=1.0, bar_style='info', lay…"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -63,6 +63,26 @@ def plot_all(items, extra_kwargs=[]):
|
|||
item.plot(ax=ax, **kwargs)
|
||||
|
||||
|
||||
def plot_downloaded_products(products, area_of_interest, **kwargs):
|
||||
ax = kwargs.get('ax')
|
||||
if not ax:
|
||||
fig, ax = plt.subplots(**kwargs)
|
||||
|
||||
grey = '#777777'
|
||||
purple = '#988ED5'
|
||||
|
||||
# area of interest in background
|
||||
a = area_of_interest.plot(ax=ax, facecolor=grey)
|
||||
# product fill layer
|
||||
b = products.plot(ax=ax, facecolor=purple, alpha=kwargs.get('alpha', 0.1))
|
||||
# product stroke layer
|
||||
products.plot(ax=ax, facecolor='none', edgecolor=purple, alpha=0.4)
|
||||
|
||||
if not kwargs.get('ax'):
|
||||
ax.set(title='Area of Interest and Available Products')
|
||||
|
||||
return ax
|
||||
|
||||
def scihub_band_paths(p, bands, resolution=None):
|
||||
'''
|
||||
Given a zip file or folder at `p`, returns the paths inside p to the raster files containing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue