feat(cogify): migrate argo-task work to basemaps-cogify BM-1127 #3393
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
As a Basemaps user, I want to consume the NZTopo 50 & 250 Maps as a tile service.
Modifications
This work defines a new CLI command. The command's purpose is to generate STAC files for an NZTopo Map Series imagery collection. We have designed the command to process the following collections stored in the AWS S3 TopoReleaseArchive directory:
There is also a new Argo workflow in development that depends on this work. The workflow's purpose is to automate the standardisation of an NZTopo Map Series imagery collection. The workflow executes this command as a step in its process flow.
CLI Command:
topo-stac-creation
Arguments
The arguments that can be passed to the command are as follows:
Title
The name/title of the Map Series imagery collection.
Raster Topographic Maps 50k
Source
The source directory URL of the Map Series imagery collection.
s3://topographic-upload/TopoReleaseArchive/NZTopo50_GeoTif_Gridless/
Target
The target directory URL into which to save the generated directory structure of StacItem and StacCollection files.
s3://linz-workflows-scratch/<date>/<hash>/
Scale
The scale of the Map Series imagery collection's map sheets.
topo25
,topo50
, ortopo250
Resolution
The resolution of the Map Series imagery collection's map sheets.
gridded_600dpi
orgridless_600dpi
Latest Only
A flag used to indicate whether all of the generated files should be saved to the target location, or only that of each map sheet's latest version.
true
orfalse
Process
The command processes a collection as follows:
Outputs
The command groups the images by EPSG and then structures the generated StacItem and StacCollection files, as illustrated:
The command then saves the generated tree of folders and files into the target location directory.
Limitations
Tile Matrices
For each image in a collection, the command extracts the EPSG of the image and converts it to a runtime
Epsg
Enum value. This value is then mapped to the EPSG's corresponding Tile Matrix definition. At this time, there is no such Tile Matrix definition for the Chatham Islands EPSG code, 3793. The task will need to be updated once Basemaps supports this definition.