Skip to content

Commit

Permalink
feat: require a stac collection.json when importing into basemaps
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha committed Jul 16, 2024
1 parent baaccbc commit f8e2de5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions workflows/basemaps/imagery-import-cogify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ spec:
- name: source
description: Source imagery location "s3://linz-imagery"
value: 's3://linz-imagery-staging/test/sample/'

- name: require_stac_collection
description: Validate that a STAC collection.json exists with the source
value: 'true'
enum:
- 'true'
- 'false'

- name: create_pull_request
description: 'Create pull request after importing imagery.'
Expand Down Expand Up @@ -176,6 +183,8 @@ spec:
value: '{{ inputs.parameters.cutline_blend }}'
- name: group_size
value: '{{ inputs.parameters.group_size }}'
- name: require_stac_collection
value: '{{ inputs.parameters.require_stac_collection }}'
- name: create-pull-request
template: create-pull-request
arguments:
Expand All @@ -196,6 +205,7 @@ spec:
- name: cutline_blend
- name: group_size
- name: preset
- name: require_stac_collection
dag:
tasks:
# generate a tile covering from the source imagery
Expand All @@ -215,6 +225,8 @@ spec:
value: '{{ inputs.parameters.cutline }}'
- name: cutline_blend
value: '{{ inputs.parameters.cutline_blend }}'
- name: require_stac_collection
value: '{{ inputs.parameters.require_stac_collection }}'

# Group covering output into chunks to pass to create-cog
- name: group
Expand Down Expand Up @@ -286,6 +298,7 @@ spec:
- name: cutline
- name: cutline_blend
- name: preset
- name: require_stac_collection
container:
image: ghcr.io/linz/basemaps/cli:{{ workflow.parameters.version_basemaps_cli }}
resources:
Expand All @@ -299,6 +312,7 @@ spec:
- 'cover'
- '--preset={{ inputs.parameters.preset }}'
- '--tile-matrix={{ inputs.parameters.tile_matrix }}'
- '--require-stac-collection={{ inputs.parameters.require_stac_collection }}'
- "{{= sprig.empty(inputs.parameters.cutline) ? '' : '--cutline=' + inputs.parameters.cutline }}"
- '--cutline-blend={{ inputs.parameters.cutline_blend }}'
- '--target={{= sprig.trim(inputs.parameters.target) }}'
Expand Down

0 comments on commit f8e2de5

Please sign in to comment.