Skip to content

Latest commit

 

History

History
37 lines (36 loc) · 1.56 KB

odc_examples.md

File metadata and controls

37 lines (36 loc) · 1.56 KB

ODC examples

Convert to Zarr and Index

  1. Convert to Zarr (see zarrify for usage instructions)
    zarrify --outpath <zarr_output_dir> --chunk x:2000 --chunk y:2000 <path_to_dataset>
    
  2. Generate agdc_metadata file (see Zarr prepare scripts)
    1. EO example with LS5 dataset
      python examples/prepare_zarr_ls5.py <zarr_output_dir_nbar>
      
    2. EO3 example (Recommended) with LS8 dataset
      python examples/eo3/eo3prepare_usgs_espa_ls8c1_l2_zarr.py -p docs/config_samples/dataset_types/usgs_espa_ls8c1_sr_zarr.yaml <zarr_output_dir>
      
  3. Initialise ODC DB
    datacube -v system init
    
  4. Adding product definition
    datacube product add docs/config_samples/dataset_types/ls5_scenes_zarr.yaml
    
  5. Index scenes
    1. Option 1: Index scenes on Disk (Recommended)
      datacube dataset add <zarr_output_dir>
      
    2. Option 2: Index scenes on S3 using odc-tools (Recommended)
      s3-find --skip-check 's3://<bucket>/<path_to_scenes>/*/agdc-metadata.yaml' | s3-to-tar | dc-index-from-tar --ignore-lineage
      
    3. Option 3: Index scenes on S3 using index_from_s3_bucket.py
      python index_from_s3_bucket.py <bucket> -p <prefix> --suffix="agdc-metadata.yaml"