Skip to content

Commit

Permalink
Stop target srs if nonreprojection is set
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentao-Kuang committed Jan 9, 2025
1 parent da266fa commit ff0e4b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cogify/src/cogify/gdal.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion packages/cogify/src/cogify/stac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ff0e4b4

Please sign in to comment.