From 48ec91615ce7b0eb81f55e6dd182c8c2025dcbda Mon Sep 17 00:00:00 2001 From: Alice Fage Date: Fri, 19 Apr 2024 10:56:10 +1200 Subject: [PATCH] fix: pass compression as preset to tileindex-validate TDE-895 TDE-1151 (#546) #### Motivation We only want to check `webp` datasets are 8-bit so Argo Tasks tileindex-validate needs to know the dataset type. #### Modification Pass the `compression` type of the dataset to Argo Tasks tileindex-validate as `preset` for validation #### Checklist - [ ] Tests updated N/A - [x] Docs updated - [x] Issue linked in Title --- templates/argo-tasks/tile-index-validate.yml | 5 +++++ workflows/raster/README.md | 2 +- workflows/raster/standardising.yaml | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/templates/argo-tasks/tile-index-validate.yml b/templates/argo-tasks/tile-index-validate.yml index a1b5cb5a7..2556a9b51 100644 --- a/templates/argo-tasks/tile-index-validate.yml +++ b/templates/argo-tasks/tile-index-validate.yml @@ -39,6 +39,10 @@ spec: description: Output tile configuration for retiling default: 'false' + - name: preset + description: Compression type of dataset e.g. webp, lzw, dem_lerc + default: 'webp' + - name: version description: container version to use default: 'v3' @@ -78,6 +82,7 @@ spec: - '--scale={{= inputs.parameters.scale }}' - '--validate={{= inputs.parameters.validate }}' - '--retile={{= inputs.parameters.retile }}' + - '--preset={{= inputs.parameters.compression }}' - "{{= sprig.empty(inputs.parameters.source_epsg) ? '' : '--source-epsg=' + inputs.parameters.source_epsg }}" - "{{= sprig.empty(inputs.parameters.include) ? '' : '--include=' + inputs.parameters.include }}" - '{{= sprig.trim(inputs.parameters.source) }}' diff --git a/workflows/raster/README.md b/workflows/raster/README.md index c0ec484bb..e48ef9063 100644 --- a/workflows/raster/README.md +++ b/workflows/raster/README.md @@ -133,7 +133,7 @@ If no input collection ID is provided a ULID is generated and used as the collec ### [tileindex-validate](https://github.com/linz/argo-tasks/blob/master/src/commands/tileindex-validate/) -Lists tiffs from source input, validates they match a LINZ Mapsheet tile index and asserts that there will be no duplicates. +Lists tiffs from source input, validates they match a LINZ Mapsheet tile index and asserts that there will be no duplicates. Checks `webp` files are 8-bit. ### [standardise-validate](https://github.com/linz/topo-imagery/blob/master/scripts/standardise_validate.py) diff --git a/workflows/raster/standardising.yaml b/workflows/raster/standardising.yaml index 0cb4b4ad6..562f42c0d 100644 --- a/workflows/raster/standardising.yaml +++ b/workflows/raster/standardising.yaml @@ -318,6 +318,8 @@ spec: value: '{{= workflow.parameters.validate}}' - name: retile value: '{{= workflow.parameters.retile}}' + - name: preset + value: '{{= workflow.parameters.compression}}' - name: version value: '{{= workflow.parameters.version_argo_tasks}}'