Product Definition

A product definition document describes the measurements and common metadata for a collection of datasets.

name: landsat8_example_product
description: Landsat 8 example product
metadata_type: eo3

metadata:
    product:
        name: landsat8_example_product
    # Alternatively, include specific items to match
    # properties:
        # eo:instrument: OLI_TIRS
        # eo:platform: landsat-8

measurements:
    - name: 'red'
      aliases: [band_4, sr_band4]
      dtype: int16
      nodata: -9999
      units: 'reflectance'
    - name: 'blue'
      aliases: [band_2, sr_band2]
      dtype: int16
      nodata: -9999
      units: 'reflectance'
    - name: 'pixel_qa'
      aliases: [pixel_quality, level2_qa]
      dtype: uint16
      nodata: 1
      units: 'bit_index'
      flags_definition:
        pixel_qa:
          bits: [0,1,2,3,4,5,6,7,8,9,10,11]
          description: Level 2 pixel quality band 
          values:
            1: Fill
            2: Clear
            4: Water
            8: Cloud shadow
            16: Snow
            32: Cloud
            64: Cloud Confidence Low Bit
            128: Cloud Confidence High Bit
            256: Cirrus Confidence Low Bit
            512: Cirrus Confidence High Bit
            1024: Terrain Occlusion
            2048: Unused  # Be careful of repeated names which could confuse the masking code
        # Alternatively or additionally, use the bit on/off method
        fill:
          bits: 0
          description: No data
          values: {0: false, 1: true}
        clear:
          bits: 1
          description: Clear
          values: {0: no_clear_land, 1: clear_land}
        # ...
        cloud_confidence:
          bits: [6, 7]
          description: Cloud confidence
          values: {0: none, 1: low, 2: medium, 3: high}
        # ...
            
name

Product name

description

Product description

metadata_type

Name of the Metadata Type Definition

license

The license of the data.

This is either a SPDX License identifier (eg ‘CC-BY-SA-4.0’) or ‘various’ or ‘proprietary’

metadata

Dictionary containing bits of metadata common to all the datasets in the product.

It is used during indexing to match datasets to their products. That is, the keys and values defined here must also be in the Dataset Documents.

In the above example, product: name would match a specific product.

load (optional)

Define default projections and resolution to use when loading data from this product. User supplied load options take precedence over settings configured here.

crs

Coordinate reference system to use as a fallback when loading data from this product. 'EPSG:<code>' or WKT string.

resolution.{x,y}

Default resolution to use during dc.load(..) specified in projection units. Use latitude, longitude if the projection is geographic and x, y otherwise.

align.{x,y} (optional)

By default pixel grid is aligned such that pixel boundaries fall on x,y axis. This option allows to translate pixel grid. For example, to ensure that pixel center of a 30m pixel grid is coincidental with 0,0 use align:{x:15,y:15}.

storage (optional)

Describes some of common storage attributes of all the datasets. While optional defining this will make product data easier to access and use. This only applies to products that have data arranged on a regular grid, for example ingested products are like that.

crs

Coordinate reference system common to all the datasets in the product. 'EPSG:<code>' or WKT string.

resolution

Resolution of the data of all the datasets in the product specified in projection units. Use latitude, longitude if the projection is geographic and x, y otherwise.

tile_size

Size of the tiles for the data to be stored in specified in projection units. Use latitude and longitude if the projection is geographic, otherwise use x and y.

origin

Coordinates of the bottom-left or top-left corner of the (0,0) tile specified in projection units. If coordinates are for top-left corner, ensure that the latitude or y dimension of tile_size is negative so tile indexes count downward. Use latitude and longitude if the projection is geographic, otherwise use x and y.

measurements

List of measurements in this product. The measurement names defined here need to match 1:1 with the measurement key names defined in the Dataset Documents.

name

Name of the measurement

units

Units of the measurement

dtype

Data type. One of (u)int(8,16,32,64), float32, float64

nodata

No data value

scale_factor,add_offset (optional)

Mapping from pixel value to real value real = scale_factor*pixel_value + add_offset.

spectral_definition (optional)

Spectral response of the reflectance measurement.

spectral_definition:
     wavelength: [410, 411, 412]
     response: [0.0261, 0.029, 0.0318]
flags_definition (optional)

Bit flag meanings of the bitset ‘measurement’

flags_definition:
    platform:
      bits: [0,1,2,3]
      description: Platform name
      values:
        0: terra
        1: aqua_terra
        2: aqua
    contiguous:
      bits: 8
      description: All bands for this pixel contain non-null values
      values: {0: false, 1: true}