diff --git a/packages/cogify/src/cogify/gdal.command.ts b/packages/cogify/src/cogify/gdal.command.ts index d41c66eee..e3cf35d33 100644 --- a/packages/cogify/src/cogify/gdal.command.ts +++ b/packages/cogify/src/cogify/gdal.command.ts @@ -20,7 +20,7 @@ function getTargetOptions(opt: CogifyCreationOptions): TargetOptions { if (opt.tileMatrix) { const tileMatrix = TileMatrixSets.find(opt.tileMatrix); if (tileMatrix == null) throw new Error('Unable to find tileMatrix: ' + opt.tileMatrix); - targetOpts.targetSrs = tileMatrix.projection.toEpsgString(); + if (opt.noReprojecting == null) targetOpts.targetSrs = tileMatrix.projection.toEpsgString(); if (opt.tile) { const bounds = tileMatrix.tileToSourceBounds(opt.tile); diff --git a/packages/cogify/src/cogify/stac.ts b/packages/cogify/src/cogify/stac.ts index 752894f04..2dfe7e917 100644 --- a/packages/cogify/src/cogify/stac.ts +++ b/packages/cogify/src/cogify/stac.ts @@ -15,7 +15,7 @@ export interface CogifyCreationOptions { tile?: Tile; /** Tile matrix to create the tiles against */ - tileMatrix?: string; + tileMatrix: string; /** Projection of source imagery */ sourceEpsg: number;