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

fix(cogify): use a URL in the cogify STAC documents #2843

Merged
merged 2 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion packages/cogify/src/tile.cover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export async function createTileCover(ctx: TileCoverContext): Promise<TileCoverR
// Add the source imagery as a STAC Link
for (const src of source) {
const srcLink: CogifyLinkSource = {
href: src.name,
href: new URL(src.name, ctx.imagery.url).href,
blacha marked this conversation as resolved.
Show resolved Hide resolved
rel: 'linz_basemaps:source',
type: 'image/tiff; application=geotiff;',
};
Expand Down
5 changes: 4 additions & 1 deletion packages/config/src/json/tiff.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ interface TiffSummary {
projection: number;
/** Ground sample distance, number of meters per pixel */
gsd: number;
/** STAC collection if it was found with the imagery */
/** STAC collection if it was found with the imagery */
collection?: StacCollection;
/** URL to the base of the imagery */
url: string;
}

export type ConfigImageryTiff = ConfigImagery & TiffSummary;
Expand Down Expand Up @@ -150,6 +152,7 @@ export async function imageryFromTiffUrl(target: URL, Q: LimitFunction, log?: Lo
tileMatrix: tileMatrix?.identifier ?? 'none',
gsd: params.gsd,
uri: targetPath,
url: target.href,
bounds: params.bounds,
files: params.files,
collection: stac ?? undefined,
Expand Down
Loading