Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions packages/cli-config/src/cli/action.import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,19 @@ async function prepareUrl(
if (configImagery == null) throw new Error(`Failed to find imagery config from config bundle file. Id: ${id}`);

const center = getPreviewUrl({ imagery: configImagery });

const urls = {
layer: `${PublicUrlBase}?config=${configPath}&i=${center.name}&p=${tileMatrix.identifier}&debug#@${center.location.lat},${center.location.lon},z${center.location.zoom}`,
tag: `${PublicUrlBase}?config=${configPath}&p=${tileMatrix.identifier}&debug#@${center.location.lat},${center.location.lon},z${center.location.zoom}`,
layer: `${PublicUrlBase}@${center.location.lat},${center.location.lon},z${center.location.zoom}?config=${configPath}&i=${center.name}&p=${tileMatrix.identifier}&debug`,
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.

const elevationParameters = `&pipeline=terrain-rgb&format=png`;

urls.layer += elevationParameters;
urls.tag += elevationParameters;
}

return urls;
}

Expand Down