Write complete text for dNBR comparisons

This commit is contained in:
heyarne 2021-02-26 17:17:26 +00:00
commit 7c5c62fcb0
6 changed files with 1325 additions and 435 deletions

View file

@ -27,7 +27,7 @@
"\n",
"The variables below are configuration parameters of the pipeline.\n",
"Please note that the pipeline does not do any verification of these parameters.\n",
"Misconfigurations can break the cells below."
"Bad configurations can break the cells below."
]
},
{
@ -922,6 +922,13 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.6"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {},
"version_major": 2,
"version_minor": 0
}
}
},
"nbformat": 4,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -90,15 +90,15 @@ def scihub_band_paths(p, bands, resolution=None):
rasters = p.glob('**/*.jp2')
# take only the paths that contain one of the given bands
rasters = [Path(raster) for band in bands for raster in rasters if band in raster]
rasters = [raster for band in bands for raster in rasters if band in raster]
# if a resolution is given, further discard the bands we don't need
if resolution:
rasters = [raster for raster in rasters if resolution in raster.name]
rasters = [raster for raster in rasters if resolution in raster]
if p.suffix == '.zip':
# we have to reformat the paths to
rasters = [Path(f'zip+file://{p}!/{r.name}') for r in rasters]
# we have to reformat the paths to point inside the zip archive
rasters = [f'zip+file://{p}!/{r}' for r in rasters]
return rasters
@ -223,7 +223,7 @@ def geodataframe_on_map(geodataframe):
'''
bbox = geodataframe.unary_union.bounds
minx, miny, maxx, maxy = bbox
m = folium.Map([0, 0], tiles='cartodbpositron')
m = folium.Map([0, 0], tiles='cartodbpositron', scroll_wheel_zoom=False)
folium.GeoJson(geodataframe.to_json()).add_to(m)
m.fit_bounds([[miny, minx], [maxy, maxx]])
return m