From 2345ed4760cfb963e9533024b7d369b8c4bfe8b8 Mon Sep 17 00:00:00 2001 From: Geoff Jacobsen Date: Fri, 12 Jun 2020 12:40:52 +1200 Subject: [PATCH] fix(cli): fix regression quadkey.vrt missing '-allow_projection_difference' (#770) --- packages/cli/src/cog/__test__/quadkey.vrt.test.ts | 2 +- packages/cli/src/cog/quadkey.vrt.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/cog/__test__/quadkey.vrt.test.ts b/packages/cli/src/cog/__test__/quadkey.vrt.test.ts index 4bc9c88e4..b978ab075 100644 --- a/packages/cli/src/cog/__test__/quadkey.vrt.test.ts +++ b/packages/cli/src/cog/__test__/quadkey.vrt.test.ts @@ -239,7 +239,7 @@ o.spec('quadkey.vrt', () => { o((runSpy.calls[0] as any).args).deepEquals([ 'gdalbuildvrt', - ['-hidenodata', '-addalpha', '/tmp/my-tmp-folder/source.vrt', vtif1, vtif2], + ['-hidenodata', '-allow_projection_difference', '-addalpha', '/tmp/my-tmp-folder/source.vrt', vtif1, vtif2], logger, ]); diff --git a/packages/cli/src/cog/quadkey.vrt.ts b/packages/cli/src/cog/quadkey.vrt.ts index a23369e52..7b79eedcc 100644 --- a/packages/cli/src/cog/quadkey.vrt.ts +++ b/packages/cli/src/cog/quadkey.vrt.ts @@ -11,7 +11,7 @@ import { GdalCommand } from '../gdal/gdal.command'; * Build the VRT for the needed source imagery */ async function buildPlainVrt(job: CogJob, vrtPath: string, gdalCommand: GdalCommand, logger: LogType): Promise { - const buildOpts = ['-hidenodata']; + const buildOpts = ['-hidenodata', '-allow_projection_difference']; if (job.output.vrt.addAlpha) { buildOpts.push('-addalpha'); }