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 following options for the stac item linz_basemaps:options that allow to config into the dgal commands via these settings from stac files.
  2. Example of topo-raster configs for cog creation:
  "linz_basemaps:options": {
      "tileId": "CI01_v1-00",
      "tileMatrix": "NZTM2000",
      "preset": "webp",
      "blockSize": 512,
      "bigTIFF": "no",
      "compression": "webp",
      "quality": 100,
      "overviewCompress": "webp",
      "overviewQuality": 90,
      "overviewResampling": "lanczos",
      "sourceEpsg": 3793,
      "addalpha": true,
      "noReprojecting": true,
      "srcwin": [
        0,
        0,
        5669.3,
        8505
      ]
    },
  1. Add tileId to set as xyz Tile Id for aerial map or mapsheet Id for topo raster map.
  2. Add noReprojecting to set in order to skip the reprojecting step in gdalwrapvrt, as well as to set the target projection as the source in dgaltranslate
  3. Update create cover to read imagery name from linz:slug if exists.

Verification

Test imported topo raster previews:

  1. NZTM
  2. Webmactor

Test workflow the topo raster standardised

  1. topo50
  2. topo250

Test basemaps import workflow with background.

  1. topo250 nz mainland
  2. topo250 chatham islands
  3. topo50 nz mainland
  4. topo50 chatham islands

Test on existing aerial map import feature that is not impacted.

  1. test basemaps imagery import

@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
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.

2 participants