Skip to content

Conversation

@tawera-manaena
Copy link
Contributor

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

Motivation

Our basemaps-config preview URLs for Elevation inserts no longer show anything in Basemaps. Example here.

You can't see the imagery until you add the following parameters to such URLs:

pipeline=terrain-rgb&format=png

We need to update our cli-config package's import command to add the pipeline and format parameters automatically.

Modifications

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

    • Updated the prepareUrl function so that the following key-value pairs are appended to URLs for elevation category imagery:

      &pipeline=terrain-rgb&format=png
      

Verification

I attempted to introduce a unit test - but abandoned it as I had issues faking the BasemapsConfigProvider mem parameter required to call the prepareURL function.

Instead, I ran the import command locally and inspected the URLs produced in the generated markdown:

node build/bin.js import
--config s3://linz-basemaps/config/config-latest.json.gz
--output markdown.md
--target /local/modified-config.json # clone of the latest config with a few imagery entries removed

Individual Inserts

thames-2017-2019-dsm-1m

christchurch-urban-2020-2021-0.075m

tag: `${PublicUrlBase}@${center.location.lat},${center.location.lon},z${center.location.zoom}?config=${configPath}&p=${tileMatrix.identifier}&debug`,
};

if (configImagery.category?.toLowerCase() === 'elevation') {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we can rely on the category for determining what pipeline we should use.

Some elevation datasets I believe are not terrain-rgb datasets, there are also other datasets that will need the pipeline parameter. some of these will also have more than one output pipeline that may need to be referenced.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, good to know. Let me think on this for a moment.

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.

3 participants