lsru.Espa.order

Espa.order(scene_list, products, format='gtiff', note=None, resampling='nn', resolution=None, projection=None, extent=None, extent_units='dd', verbose=False)[source]

Place a pre-procesing order to espa

Parameters:
  • scene_list (list) – List of Landsat scene ids
  • products (list) – List of products to order for pre-processing See Espa.get_available_products() to get information on available products
  • format (str) – Pre-processing file format. See Espa.formats for information on available formats
  • note (str) – Optional human readable message to pass to the order
  • resampling (str) – Resamping method to be used when reprojecting or resizing ordered images. See Espa.resampling_methods for valid values.
  • resolution (float) – Ouput resolution (optional). If specified, the pre-processing order will be resized to the specified resolution. If set to None (default), no resizing is performed and products are processed at their original resolution (usually 30m).
  • projection (dict) – Optional dictionary with projection name and projection parameter values. Ordered products are re-projected to the specified projection when set. See Espa.projections for list and format of supported projections
  • extent (tuple) – Bounding box to use to crop the pre-processed products bounding box is in the form of a (left, bottom, right, top) tuple. This is optional and requires a projection to be set.
  • extent_units (str) – Units of the provided extent. 'dd' (decimal degrees) is the default. If `meters' bounds are specified according to the coordinate reference system space.
  • verbose (bool) – Prints the json body being sent. Useful for debugging purposes

Example

>>> from lsru import Espa, Usgs
>>> import datetime
>>> espa = Espa()
>>> usgs = Usgs()
>>> usgs.login()
>>> scene_list = usgs.search(collection='LANDSAT_8_C1',
...                          bbox=(3.5, 43.4, 4, 44),
...                          begin=datetime.datetime(2014,1,1),
...                          end=datetime.datetime(2018,1,1))
>>> scene_list = [x['displayId'] for x in scene_list]
>>> order = espa.order(scene_list, products=['sr', 'pixel_qa'])
Returns:The method is mostly used for its side effect of placing a pre-processing order on the espa platform. It also returns a the lsru.Order instance corresponding to the order
Return type:lsru.Order