UCL-EO / geog0111

UCL MSc coursenotes
http://www2.geog.ucl.ac.uk/~plewis/geog0111
GNU General Public License v3.0
16 stars 18 forks source link

Update is required for Summary in 040_GDAL_mosaicing_and_masking.ipynb #19

Closed wanxinyang closed 2 years ago

wanxinyang commented 2 years ago

Location: The Summary section at the end of the notebook 040_GDAL_mosaicing_and_masking.ipynb.

An update might be required for the last column in the row of gdal.BuilVRT(): replace file, sds = modis.get_files(year, doy) with

data = getModisFile(**kwargs)
for sds, sds_v in data.items():
      for doy, doy_v in sds_v.items():
            files = doy_v.keys()
            ofile = f"work/stitch_{sds}_{kwargs['year']}_{doy:03d}_{'Tiles_'+'_'.join(tiles)}.vrt"
            stitch_vrt = gdal.BuildVRT(ofile, list(doy_v.values()))
            del stitch_vrt
profLewis commented 2 years ago

done -- put an improved example in