source:
  type: swift
  kwargs:
    username: !env '${OS_USERNAME_DOWNLOAD}'
    password: !env '${OS_PASSWORD_DOWNLOAD}'
    tenant_name: !env '${OS_TENANT_NAME_DOWNLOAD}'
    tenant_id: !env '${OS_TENANT_ID_DOWNLOAD}'
    region_name: !env '${OS_REGION_NAME_DOWNLOAD}'
    auth_url: !env '${OS_AUTH_URL_DOWNLOAD}'
    auth_version: !env '${ST_AUTH_VERSION_DOWNLOAD}'
    user_domain_name: !env '${OS_USER_DOMAIN_NAME_DOWNLOAD}'
target:
  type: swift
  kwargs:
    username: !env '${OS_USERNAME}'
    password: !env '${OS_PASSWORD}'
    tenant_name: !env '${OS_TENANT_NAME}'
    tenant_id: !env '${OS_TENANT_ID}'
    region_name: !env '${OS_REGION_NAME}'
    auth_version: !env '${ST_AUTH_VERSION}'
    auth_url: !env '${OS_AUTH_URL}'
    user_domain_name: !env '${OS_USER_DOMAIN_NAME}'

workdir: /mnt/data/workdir

# metadata file to look for in downloaded tar/zip file
metadata_glob: '*GSC*.xml'
glob_case: false

# extractors for Product type / level
type_extractor:
  xpath:
    - /gsc:report/gsc:opt_metadata/gml:using/eop:EarthObservationEquipment/eop:platform/eop:Platform/eop:shortName/text()
level_extractor:
  # xpath can also be a list of xpaths to be tried one after another
  xpath: substring-after(substring-after(/gsc:report/gsc:opt_metadata/gml:metaDataProperty/gsc:EarthObservationMetaData/eop:parentIdentifier/text(), '/'), '/')
preprocessing:
  defaults:
    move_files: true
    data_file_globs:
      - '*.tif'
      - '*.jp2'
    georeference:
      type: gcp
      order: 2
    output:
      options:
        format: COG
        dstSRS: 'EPSG:4326'
        creationOptions:
          - BLOCKSIZE=512
          - COMPRESS=DEFLATE
          - NUM_THREADS=8
          - BIGTIFF=IF_SAFER
          - OVERVIEWS=AUTO
  types:
    PH1B: # just to pass validation
      nested: true
        