Skip to content

Commit

Permalink
fix(cogify): use a URL in the cogify STAC documents (#2843)
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha authored Jul 17, 2023
1 parent 9b859c8 commit eb3f0fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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,
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

0 comments on commit eb3f0fe

Please sign in to comment.