Skip to content
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

feat(cogify): Update the cogify create cog to support topo raster. BM-1116 #3388

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

Wentao-Kuang
Copy link
Contributor

@Wentao-Kuang Wentao-Kuang commented Jan 8, 2025

Motivation

Update the cogify create cog cli to support for both topo-raster cog and aerial raster cog creation together, so we can use the argo-task topo-stac-creation to prepare the stac files for topo raster map and reuse the create cog cli to do the cog creation.

Modifications

  1. Added the --topo flag for the create command tag takes the topo50 and topo250 stac files to create topo raster cogs.
  2. Update create cover to read imagery name from linz:slug if exists.

Verification

Test workflow the topo raster standardised

@Wentao-Kuang Wentao-Kuang added the container build pull request container for testing label Jan 8, 2025
@Wentao-Kuang Wentao-Kuang added container build pull request container for testing and removed container build pull request container for testing labels Jan 9, 2025
@Wentao-Kuang Wentao-Kuang added container build pull request container for testing and removed container build pull request container for testing labels Jan 10, 2025
@Wentao-Kuang Wentao-Kuang added container build pull request container for testing and removed container build pull request container for testing labels Jan 10, 2025
@Wentao-Kuang Wentao-Kuang marked this pull request as ready for review January 12, 2025 21:01
@Wentao-Kuang Wentao-Kuang requested a review from a team as a code owner January 12, 2025 21:01
@Wentao-Kuang Wentao-Kuang changed the title feat(cogify): Update the cogify create cog to support topo raster. feat(cogify): Update the cogify create cog to support topo raster. BM-1116 Jan 12, 2025

return {
command: 'gdal_translate',
output: targetTiff,
args: [
['-of', 'COG'],
cfg.srcwin ? ['-srcwin', cfg.srcwin[0], cfg.srcwin[1], cfg.srcwin[2], cfg.srcwin[3]] : undefined,
cfg.bigTIFF ? ['-co', `BIGTIFF=${cfg.bigTIFF}`] : ['-co', 'BIGTIFF=IF_NEEDED'], // BigTiff is somewhat slower and most (All?) of the COGS should be well below 4GB
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need bigtiffs? everything should be well below 4gb?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We set big tiff as no in the topo-raster, and If_needed for all others atm.

@Wentao-Kuang Wentao-Kuang added container build pull request container for testing and removed container build pull request container for testing labels Jan 13, 2025
@Wentao-Kuang Wentao-Kuang added container build pull request container for testing and removed container build pull request container for testing labels Jan 13, 2025
@Wentao-Kuang Wentao-Kuang added container build pull request container for testing and removed container build pull request container for testing labels Jan 13, 2025
@Wentao-Kuang Wentao-Kuang added container build pull request container for testing and removed container build pull request container for testing labels Jan 13, 2025
@@ -142,3 +146,45 @@ export function gdalCreate(targetTiff: URL, color: Rgba, opt: CogifyCreationOpti
.map(String),
};
}

export function gdalBuildTopoRasterCommands(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export function gdalBuildTopoRasterCommands(
export function gdalBuildTopoCog(

To mirror the naming convention used here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
container build pull request container for testing
Development

Successfully merging this pull request may close these issues.

3 participants