From 5afbb5f1c71229e5ec1967c4bdd66b1297a12347 Mon Sep 17 00:00:00 2001 From: paulfouquet <86932794+paulfouquet@users.noreply.github.com> Date: Fri, 9 Feb 2024 10:37:36 +1300 Subject: [PATCH] feat: category uses identifier instead of human readable names TDE-985 (#386) #### Motivation `collection_from_items.py` script is going to accept identifiers for `--category` (https://github.com/linz/topo-imagery/pull/765) #### Modification Change the `category` enum to a list of identifier instead of human readable names. #### Checklist - [ ] Tests updated N/A - [x] Docs updated - [x] Issue linked in Title --- workflows/raster/README.md | 10 +++++----- workflows/raster/standardising.yaml | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/workflows/raster/README.md b/workflows/raster/README.md index d7d40127e..0d834a3b8 100644 --- a/workflows/raster/README.md +++ b/workflows/raster/README.md @@ -28,7 +28,7 @@ In addition, a Basemaps link is produced enabling visual QA. | compression | enum | webp | Standardised file format | | cutline | str | | (Optional) location of a cutline file to cut the imagery to `.fgb` or `.geojson` (leave blank if no cutline) | | collection_id | str | | (Optional) Provide a Collection ID if re-processing an existing published survery, otherwise a ULID will be generated for the collection.json ID field. | -| category | enum | Urban Aerial Photos | Dataset type for collection metadata, also used to Build Dataset title & description | +| category | enum | urban-aerial-photos | Dataset type for collection metadata, also used to Build Dataset title & description | | gsd | str | 0.3m | Dataset GSD for collection metadata, also used to build dataset title | | producer | enum | Unknown | Imagery producer :warning: Ignored if `producer_list` is used. | | producer_list | str | | List of imagery producers, separated by semicolon (;). :warning: Has no effect unless a semicolon delimited list is entered. | @@ -61,7 +61,7 @@ In addition, a Basemaps link is produced enabling visual QA. | compression | webp | | cutline | s3://linz-imagery-staging/cutline/bay-of-plenty_2021-2022.fgb | | collection_id | 01FP371BHWDSREECKQAH9E8XQ | -| category | Rural Aerial Photos | +| category | rural-aerial-photos | | gsd | 0.3m | | producer | Aerial Surveys | | licensor | Toitū Te Whenua Land Information New Zealand | @@ -356,7 +356,7 @@ target: 's3://linz-imagery-example/canterbury/christchurch_2021_0.05m/rgb/2193/' scale: '500' group: '29' cutline: 's3://linz-imagery-cutline-example/historical-imagery-cutlines/2023-01-16_84fd68f/SNC50451-combined.fgb' -category: Urban Aerial Photos +category: urban-aerial-photos gsd: 0.05m producer: 'Aerial Surveys' licensor: 'Toitū Te Whenua Land Information New Zealand' @@ -367,7 +367,7 @@ end_datetime: '2021-12-02' ### Submitting from the command line using the `-p` (`--parameter`) option (standardising-publish-import): ```bash -argo submit workflows/raster/standardising-publish-import.yaml -n argo -p ticket="AIP-55" -p region="canterbury" -p source="s3://linz-imagery-source-example/aerial-imagery/new-zealand/christchurch_urban_2021_0.05m_RGB/" -p target="s3://linz-imagery-example/canterbury/christchurch_2021_0.05m/rgb/2193/" -p scale="500" -p group="29" -p cutline="s3://linz-imagery-cutline-example/historical-imagery-cutlines/2023-01-16_84fd68f/SNC50451-combined.fgb" -p gsd="0.05m" -p producer="Aerial Surveys" -p licensor="Toitū Te Whenua Land Information New Zealand" -p start_datetime="2021-11-02" -p end_datetime="2021-12-02" -p category="Urban Aerial Photos" -p name="christchurch_2021_0.05m" -p tile-matrix="NZTM2000Quad/WebMercatorQuad" -p blend="20" -p aligned-level="6" -p create-pull-request="true" +argo submit workflows/raster/standardising-publish-import.yaml -n argo -p ticket="AIP-55" -p region="canterbury" -p source="s3://linz-imagery-source-example/aerial-imagery/new-zealand/christchurch_urban_2021_0.05m_RGB/" -p target="s3://linz-imagery-example/canterbury/christchurch_2021_0.05m/rgb/2193/" -p scale="500" -p group="29" -p cutline="s3://linz-imagery-cutline-example/historical-imagery-cutlines/2023-01-16_84fd68f/SNC50451-combined.fgb" -p gsd="0.05m" -p producer="Aerial Surveys" -p licensor="Toitū Te Whenua Land Information New Zealand" -p start_datetime="2021-11-02" -p end_datetime="2021-12-02" -p category="urban-aerial-photos" -p name="christchurch_2021_0.05m" -p tile-matrix="NZTM2000Quad/WebMercatorQuad" -p blend="20" -p aligned-level="6" -p create-pull-request="true" ``` ### Submitting from the command line using a parameters yaml file and the `-f` (`--parameter-file`) option (standardising-publish-import): @@ -392,7 +392,7 @@ licensor: '' licensor_list: 'Waka Kotahi; Nelson City Council;Tasman District Council' start_datetime: '2021-11-02' end_datetime: '2021-12-02' -category: 'Urban Aerial Photos' +category: 'urban-aerial-photos' name: 'christchurch_2021_0.05m' tile-matrix: 'NZTM2000Quad/WebMercatorQuad' blend: '20' diff --git a/workflows/raster/standardising.yaml b/workflows/raster/standardising.yaml index 988e1d08c..6762f5ad7 100644 --- a/workflows/raster/standardising.yaml +++ b/workflows/raster/standardising.yaml @@ -102,15 +102,15 @@ spec: description: '(Optional) If an existing dataset add collection ID here, else a new one will be generated.' value: '' - name: category - value: 'Urban Aerial Photos' + value: 'urban-aerial-photos' enum: - - 'Aerial Photos' - - 'Urban Aerial Photos' - - 'Rural Aerial Photos' - - 'Scanned Aerial Photos' - - 'DEM' - - 'DSM' - - 'Satellite Imagery' + - 'aerial-photos' + - 'urban-aerial-photos' + - 'rural-aerial-photos' + - 'scanned-aerial-photos' + - 'dem' + - 'dsm' + - 'satellite-imagery' - name: gsd description: 'Dataset GSD (e.g., "0.3m")' - name: producer