geowatch.demo.landsat_demodata module

geowatch.demo.landsat_demodata.grab_landsat_product(product_id=None, demo_index=0)[source]

Download and cache all items for a landsat product.

Parameters:
  • product_id (str, default=None) – The product id to download (currently NotImplemented). If unspecified, an arbitrary scene is returned.

  • demo_index (int) – hack, can be 0, 1, or 2. Regions 1 and 2 should overlap.

Returns:

groupings of files associated with this landsat product

Return type:

Dict[str, object]

Example

>>> # xdoctest: +REQUIRES(--network)
>>> from geowatch.demo.landsat_demodata import *  # NOQA
>>> product = grab_landsat_product()
>>> # xdoctest: +IGNORE_WANT
>>> print('product = {}'.format(ub.urepr(product, nl=2)))
product = {
    'bands': [
        '.../LC08/01/037/029/LC08_L1TP_037029_20130602_20170310_01_T1/LC08_L1TP_037029_20130602_20170310_01_T1_B1.TIF',
        '.../LC08/01/037/029/LC08_L1TP_037029_20130602_20170310_01_T1/LC08_L1TP_037029_20130602_20170310_01_T1_B2.TIF',
        '.../LC08/01/037/029/LC08_L1TP_037029_20130602_20170310_01_T1/LC08_L1TP_037029_20130602_20170310_01_T1_B3.TIF',
        '.../LC08/01/037/029/LC08_L1TP_037029_20130602_20170310_01_T1/LC08_L1TP_037029_20130602_20170310_01_T1_B4.TIF',
        '.../LC08/01/037/029/LC08_L1TP_037029_20130602_20170310_01_T1/LC08_L1TP_037029_20130602_20170310_01_T1_B5.TIF',
        '.../LC08/01/037/029/LC08_L1TP_037029_20130602_20170310_01_T1/LC08_L1TP_037029_20130602_20170310_01_T1_B6.TIF',
        '.../LC08/01/037/029/LC08_L1TP_037029_20130602_20170310_01_T1/LC08_L1TP_037029_20130602_20170310_01_T1_B7.TIF',
        '.../LC08/01/037/029/LC08_L1TP_037029_20130602_20170310_01_T1/LC08_L1TP_037029_20130602_20170310_01_T1_B8.TIF',
        '.../LC08/01/037/029/LC08_L1TP_037029_20130602_20170310_01_T1/LC08_L1TP_037029_20130602_20170310_01_T1_B9.TIF',
        '.../LC08/01/037/029/LC08_L1TP_037029_20130602_20170310_01_T1/LC08_L1TP_037029_20130602_20170310_01_T1_B10.TIF',
        '.../LC08/01/037/029/LC08_L1TP_037029_20130602_20170310_01_T1/LC08_L1TP_037029_20130602_20170310_01_T1_B11.TIF',
    ],
    'meta': {
        'bqa': '.../LC08/01/037/029/LC08_L1TP_037029_20130602_20170310_01_T1/LC08_L1TP_037029_20130602_20170310_01_T1_BQA.TIF',
        'mtl': '.../LC08/01/037/029/LC08_L1TP_037029_20130602_20170310_01_T1/LC08_L1TP_037029_20130602_20170310_01_T1_MTL.txt',
    },
}

References

SeeAlso:

geowatch.gis.geotiff.parse_landsat_product_id

Todo

  • [ ] parametarize scene name / identifier

  • [ ] bundle bands in a single file (gdal VRT?)

  • [X] separate data and metadata files in return structure?