Skip to content

Conversation

@tawera-manaena
Copy link
Contributor

@tawera-manaena tawera-manaena commented Nov 9, 2025

This piece of work stems from the fix/import-diff-command branch.

I've created this pull request separately so you can see this work's changes more easily.


Motivation

Our basemaps-config preview links for Elevation inserts don’t show anything in Basemaps. You can’t see the imagery until you add the following parameters:

pipeline=terrain-rgb&format=png

We need to update the cli-config package’s import command to add the pipeline and format key-value parameters automatically.

Approach

Update the code that generates the basemaps-config preview links to provide links for all supported pipelines based on the dataset type.

  • e.g. Elevation imagery should have preview links for both color-ramp and terrain-rgb.

Modifications

  • packages/cli-config/src/cli/action.import.ts

    • Updated the prepareUrls function to return an object of the following type:

      { [pipeline: string]: { [format: string]: { aerial: string; individual: string } } }
      

      For Aerial imagery, that will look something like this:

      {
        default: {
          default: {
            aerial: https://...&debug
            individual: https://...&debug
          }
        }
      }
      

      For Elevation imagery, that will look something like this:

      {
        color-ramp: {
          default: {
            individual: https://...&debug&pipeline=color-ramp
          }
        },
        terrain-rgb: {
          png: {
            individual: https://...&debug&pipeline=terrain-rgb&format=png
          }
        }
      }
      
    • Updated the outputNewLayers and outputUpdatedLayers functions to simplify the code for capturing 2193 and 3857 changes. Also, re-styled the markdown generated by each function respectively (example below).

    • Updated the outputChange function to re-style each major markdown section into a collapsible <details> element (example below).

      There's a bit of code duplication here that could be refactored into a factory-like function.

Verification

I attempted to put together a test suite to validate the behaviour of the prepareUrls function. However, I couldn't get it working correctly.

In lieu, here's an example of the updated markdown generated by the cli-config package’s import command. I've removed the config parameter from each URL so that you can preview them:


🟡🟡 Aerial Imagery Updates 🟡🟡

gebco-2020-305.75m

GEBCO Gridded Bathymetry (2020)


Individual Updates

thames_2017-2019_dsm_1m

Waikato - Thames LiDAR 1m DSM (2017-2019)

  • 2193 (NZTM2000Quad)

@tawera-manaena tawera-manaena changed the title feat(cli-config): generate QA preview URLs by pipeline feat(cli-config): generate QA preview URLs by pipeline BM-1407 Nov 9, 2025
@tawera-manaena tawera-manaena marked this pull request as ready for review November 9, 2025 17:32
@tawera-manaena tawera-manaena requested a review from a team as a code owner November 9, 2025 17:32
@tawera-manaena tawera-manaena requested review from Wentao-Kuang and ccbblin and removed request for a team November 9, 2025 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants