Skip to content

Commit

Permalink
Add srouce EPSG
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentao-Kuang committed Jan 13, 2025
1 parent e8a41a6 commit 6caa40d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/cogify/src/cogify/cli/cli.cog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ async function createTopoCog(ctx: CogCreationContext): Promise<URL> {
const cogCreateCommand = gdalBuildTopoRasterCommands(
new URL(`${tileId}.tiff`, ctx.tempFolder),
vrtSourceCommand.output,
options,
ctx.size?.width,
ctx.size?.height,
);
Expand Down
2 changes: 2 additions & 0 deletions packages/cogify/src/cogify/gdal.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export function gdalCreate(targetTiff: URL, color: Rgba, opt: CogifyCreationOpti
export function gdalBuildTopoRasterCommands(
targetTiff: URL,
sourceVrt: URL,
opt: CogifyCreationOptions,
width: number,
height: number,
): GdalCommand {
Expand All @@ -161,6 +162,7 @@ export function gdalBuildTopoRasterCommands(
['-stats'], // Force stats (re)computation
['-of', 'COG'], // Output format
['-srcwin', '0', '0', `${width - DEFAULT_TRIM_PIXEL_RIGHT}`, `${height}`],
['-a_srs', `EPSG:${opt.sourceEpsg}`],

// https://gdal.org/en/latest/drivers/raster/cog.html#creation-options
['-co', 'BIGTIFF=NO'],
Expand Down

0 comments on commit 6caa40d

Please sign in to comment.