cedar.ordering module

Metadata

class cedar.ordering.Order(tracking_name, tracking_prefix, name_template=None, prefix_template=None)[source]

Bases: object

CEDAR order data

Parameters
  • tracking_name (str) – Name of the order, which is also used as the name for tracking metadata

  • tracking_prefix (str) – Directory or prefix location in storage for tracking data

  • name_template (str) – String format template for pre-ARD image and metadata names

  • prefix_template (str) – String format template for directory or prefix of pre-ARD

add(self, collection, tile, date_start, date_end, filters=None, error_if_empty=False)[source]

Add a “pre-ARD” image to the order

Parameters
  • collection (str) – Image collection

  • tile (stems.gis.grids.Tile) – Tile to create

  • date_start (datetime.datetime) – Starting time for image data

  • date_end (datetime.datetime) – Ending time for image data

  • filters (list, optional) – Earth Engine filters to apply to image collection before creating image

  • error_if_empty (bool, optional) – If True, Order.add and other methods will raise an EmptyCollectionError if the image collection result has no images. The default behavior is to log, but skip, these empty results

property collections
submit(self, store, submission_info=None, save_empty_metadata=True, export_image_kwds=None)[source]

Submit “pre-ARD” for a collection and tile to be processed

Parameters
  • store (cedar.stores.GDriveStore or cedar.stores.GCSStore) – Storage backend to use

  • submission_info (dict, optional) – Information to include in tracking metadata about the submission

  • save_empty_metadata (bool, optional) – If True, Pre-ARD image requests that have 0 results (e.g., because of spotty historical record) will store metadata, but will not start the task. If False, will not store this metadata

  • export_image_kwds (dict, optional) – Additional keywords to pass onto store.store_image

Returns

tracking_id – Tracking metadata object identitifer (an object ID for Google Drive or a remote path for GCS)

Return type

str

property tiles
cedar.ordering.create_preard_task(image, image_metadata, name, prefix, tile, store, order_info=None, export_image_kwds=None)[source]

Submit an EE pre-ARD processing task and store task info

cedar.ordering.tile_export_image_kwds(tile)[source]

Returns keywords to tile exported ee.Image by reprojecting/clipping

Parameters

tile (stems.gis.grids.Tile) – A tile

Returns

Keywords “crs”, “crs_transform”, and “dimensions”

Return type

dict[str, str]