-
Notifications
You must be signed in to change notification settings - Fork 2
feat(basemaps): Topo raster maps standardisation workflow. BM-1128 #932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 tasks
Contributor
|
@Wentao-Kuang - I've made a minor adjustment to the workflow in Argo. We need to bring those changes here. Before After |
github-merge-queue bot
pushed a commit
to linz/basemaps
that referenced
this pull request
Feb 27, 2025
…1116 (#3388) ### Motivation As a Basemaps user, I want to consume the NZTopo 50 & 250 Maps [as a tile service]. ### Modifications This work comprises a series of additions and modifications to the `basemaps/cogify` package. These changes allow us to generate [STAC] files for an NZTopo Map Series imagery collection. They also allow us to generate standardised and cloud-optimised GeoTIFFs from the map sheet files of such collections. We have adjusted the `basemaps/cogify` package to handle the following collections stored in the AWS S3 [TopoReleaseArchive] directory: ``` s3://topographic-upload/TopoReleaseArchive/NZTopo50_GeoTif_Gridless/ s3://topographic-upload/TopoReleaseArchive/NZTopo250_GeoTif_Gridless/ ``` There is also a [new Argo workflow in development][pr-argo-workflow] that depends on this work as part of its process flow. The workflow's purpose is to automate the standardisation of an NZTopo Map Series imagery collection. ### Generating STAC files This works defines a new process for generating a nested directory structure of STAC files for an NZTopo Map Series imagery collection. The process operates as follows: 1. Loads the collection of GeoTiff images into memory 6. Extracts the map code, version, and metadata (e.g. EPSG) from each image 7. Identifies the latest version of each map sheet by code 8. Groups the images by EPSG 9. Generates a StacItem file for each image, and a StacCollection file for each EPSG grouping 10. Structures the groups of StacItem and StacCollection files into a directory tree 11. Saves the files as they are structured to a target location #### Outputs The command groups the images by EPSG and then structures the generated StacItem and StacCollection files, as illustrated: | Schema | Example | | - | - | | ![][schema] | ![][example] | The command then saves the generated tree of folders and files into the target location directory. ### Processing Map Sheet files This work extends the `create` CLI command of the `basemaps/cogify` package. This extension allows the command to recognise and process the map sheet files of an NZTopo Map Series imagery collection by way of particular properties added to the accompanying STAC files. [as a tile service]: #3365 (comment) [STAC]: https://stacspec.org/en [TopoReleaseArchive]: https://linz-topographic-upload.s3.ap-southeast-2.amazonaws.com/topographic/TopoReleaseArchive/ [pr-argo-workflow]: linz/topo-workflows#932 [schema]: https://github.com/user-attachments/assets/2f4eddd7-eb2c-4796-8ab7-b3d9eca9140f [example]: https://github.com/user-attachments/assets/8f111ba6-befd-44b5-9566-db07a07089ed --------- Co-authored-by: Blayne Chard <[email protected]> Co-authored-by: Tawera Manaena <[email protected]>
tawera-manaena
approved these changes
Feb 28, 2025
d14cbb0 to
586b53a
Compare
tawera-manaena
previously approved these changes
Feb 28, 2025
tawera-manaena
approved these changes
Feb 28, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Modification
This work defines a new Argo
topo-maps-standardisingworkflow and an update to the existingimagery-import-cogifyworkflow. We have used this work to generate and publish the NZ Topo Gridless Maps layer to basemaps.topo-maps-standardising(new)This work defines a new Argo topo-maps-standardising workflow for coordinating the standardisation of an NZTopo Map Series imagery collection. We have designed the workflow to handle the following collections stored in the AWS S3 TopoReleaseArchive directory:
To support this workflow, we have introduced new Topo Raster processes to the
basemaps\cogifypackage. This workflow executes these new processes as part of its process flow.This workflow has two key steps:
For an NZTopo Map Series imagery collection:
From this, we can pass the resulting directories into the imagery-import-cogify workflow to process the standardised imagery into basemaps, either for previewing, or publishing.
imagery-import-cogify(update)This work also updates the imagery-import-cogify workflow to support the new background parameter for the CLI
createcommand of thebasemaps/cogifypackage. This allows the command to override any transparent pixels with a fixed colour. In this work's context, this allows us to eliminate imagery artifacts that used to appear around the COGs, particularly for NZTopo Map Series imagery.