2

How do I write custom prepare scripts for the Open Data Cube format ?


The docs say the following:

We expect that many new Data Cube instances will require custom prepare scripts to be written. It is generally a straightforward task of mapping metadata from one form to another and writing out a YAML document.

That's it.

Also the official training center is not helpful as it does not say anything about it.


Can someone explain this a bit more in detail or does someone have better sources or tutorial(s) other than analyzing the non-commented sample prepare scripts ?

0

1 Answer 1

1

While the official documentation of datacube-core is not yet very useful, the project owner CEOS has a much better documentation hidden in another github project named CEOS Data Cube UI.

The topic I was looking for can be found here.


I will not copy-paste the whole documentation. But the following is the information the prepare script should output to a yaml file:

creation_dt: '2014-03-01 00:00:00'
extent:
  center_dt: '2014-03-01 11:59:59'
  coord:
    ll: {lat: -90.0000031, lon: -179.99999689999999}
    lr: {lat: -90.0000031, lon: 180.0000031}
    ul: {lat: 89.9999969, lon: -179.99999689999999}
    ur: {lat: 89.9999969, lon: 180.0000031}
  from_dt: '2014-03-01 00:00:00'
  to_dt: '2014-03-01 23:59:59'
format: {name: GeoTiff}
grid_spatial:
  projection:
    geo_ref_points:
      ll: {x: -179.9999969, y: -90.0000031}
      lr: {x: 180.0000031, y: -90.0000031}
      ul: {x: -179.9999969, y: 89.9999969}
      ur: {x: 180.0000031, y: 89.9999969}
    spatial_reference: GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]
id: e95ed0b5-ac2b-4c59-9aa8-2b3f0cd2ef40
image:
  bands:
    ice_precipitation: {path: 3B-MO-GIS.MS.MRG.3IMERG.20140301-S000000-E235959.03.V04A.ice.tif}
    liquid_precipitation: {path: 3B-MO-GIS.MS.MRG.3IMERG.20140301-S000000-E235959.03.V04A.liquid.tif}
    percent_liquid: {path: 3B-MO-GIS.MS.MRG.3IMERG.20140301-S000000-E235959.03.V04A.liquidPercent.tif}
    total_precipitation: {path: 3B-MO-GIS.MS.MRG.3IMERG.20140301-S000000-E235959.03.V04A.tif}
instrument: {name: GPM}
lineage:
  source_datasets: {}
platform: {code: GPM}
processing_level: V04A
product_type: monthly

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.