@basemaps/cli 6.25.0 → 6.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/build/cli/base.cli.d.ts +0 -18
  3. package/build/cli/base.cli.d.ts.map +1 -1
  4. package/build/cli/base.cli.js +1 -60
  5. package/build/cli/cogify/__tests__/batch.job.test.d.ts +2 -0
  6. package/build/cli/cogify/__tests__/batch.job.test.d.ts.map +1 -0
  7. package/build/cli/cogify/__tests__/batch.job.test.js +69 -0
  8. package/build/cli/cogify/{__test__ → __tests__}/semver.test.d.ts +0 -0
  9. package/build/cli/cogify/__tests__/semver.test.d.ts.map +1 -0
  10. package/build/cli/cogify/{__test__ → __tests__}/semver.test.js +0 -0
  11. package/build/cli/cogify/action.cog.d.ts +1 -1
  12. package/build/cli/cogify/action.cog.d.ts.map +1 -1
  13. package/build/cli/cogify/action.cog.js +104 -54
  14. package/build/cli/cogify/action.job.d.ts +1 -0
  15. package/build/cli/cogify/action.job.d.ts.map +1 -1
  16. package/build/cli/cogify/action.job.js +11 -4
  17. package/build/cli/cogify/{action.batch.d.ts → batch.job.d.ts} +11 -13
  18. package/build/cli/cogify/batch.job.d.ts.map +1 -0
  19. package/build/cli/cogify/{action.batch.js → batch.job.js} +88 -62
  20. package/build/cli/cogify/imagery.config.d.ts +13 -0
  21. package/build/cli/cogify/imagery.config.d.ts.map +1 -0
  22. package/build/cli/cogify/imagery.config.js +46 -0
  23. package/build/cli/cogify/index.d.ts +1 -1
  24. package/build/cli/cogify/index.d.ts.map +1 -1
  25. package/build/cli/cogify/index.js +1 -3
  26. package/build/cli/folder.d.ts +2 -0
  27. package/build/cli/folder.d.ts.map +1 -1
  28. package/build/cli/folder.js +6 -0
  29. package/build/cli/util.d.ts +5 -0
  30. package/build/cli/util.d.ts.map +1 -1
  31. package/build/cli/util.js +15 -2
  32. package/build/cog/{__test__ → __tests__}/builder.test.d.ts +0 -0
  33. package/build/cog/__tests__/builder.test.d.ts.map +1 -0
  34. package/build/cog/{__test__ → __tests__}/builder.test.js +0 -0
  35. package/build/cog/{__test__ → __tests__}/cog.stac.job.test.d.ts +0 -0
  36. package/build/cog/__tests__/cog.stac.job.test.d.ts.map +1 -0
  37. package/build/cog/{__test__ → __tests__}/cog.stac.job.test.js +2 -1
  38. package/build/cog/{__test__ → __tests__}/cog.test.d.ts +0 -0
  39. package/build/cog/__tests__/cog.test.d.ts.map +1 -0
  40. package/build/cog/{__test__ → __tests__}/cog.test.js +0 -0
  41. package/build/cog/{__test__ → __tests__}/cog.vrt.test.d.ts +0 -0
  42. package/build/cog/__tests__/cog.vrt.test.d.ts.map +1 -0
  43. package/build/cog/{__test__ → __tests__}/cog.vrt.test.js +1 -1
  44. package/build/cog/{__test__ → __tests__}/cutline.test.d.ts +0 -0
  45. package/build/cog/__tests__/cutline.test.d.ts.map +1 -0
  46. package/build/cog/{__test__ → __tests__}/cutline.test.js +2 -1
  47. package/build/cog/{__test__ → __tests__}/projection.loader.test.d.ts +0 -0
  48. package/build/cog/__tests__/projection.loader.test.d.ts.map +1 -0
  49. package/build/cog/{__test__ → __tests__}/projection.loader.test.js +0 -0
  50. package/build/cog/{__test__ → __tests__}/source.tiff.testhelper.d.ts +0 -0
  51. package/build/cog/__tests__/source.tiff.testhelper.d.ts.map +1 -0
  52. package/build/cog/{__test__ → __tests__}/source.tiff.testhelper.js +0 -0
  53. package/build/cog/builder.d.ts +1 -5
  54. package/build/cog/builder.d.ts.map +1 -1
  55. package/build/cog/builder.js +4 -28
  56. package/build/cog/cog.stac.job.d.ts +11 -0
  57. package/build/cog/cog.stac.job.d.ts.map +1 -1
  58. package/build/cog/cog.stac.job.js +6 -5
  59. package/build/cog/constants.d.ts +1 -1
  60. package/build/cog/constants.d.ts.map +1 -1
  61. package/build/cog/constants.js +1 -1
  62. package/build/cog/cutline.d.ts +1 -1
  63. package/build/cog/cutline.d.ts.map +1 -1
  64. package/build/cog/cutline.js +2 -2
  65. package/build/cog/job.factory.d.ts.map +1 -1
  66. package/build/cog/job.factory.js +8 -9
  67. package/build/cog/types.d.ts +1 -0
  68. package/build/cog/types.d.ts.map +1 -1
  69. package/build/gdal/{__test__ → __tests__}/gdal.progress.test.d.ts +0 -0
  70. package/build/gdal/__tests__/gdal.progress.test.d.ts.map +1 -0
  71. package/build/gdal/{__test__ → __tests__}/gdal.progress.test.js +0 -0
  72. package/build/gdal/{__test__ → __tests__}/gdal.test.d.ts +0 -0
  73. package/build/gdal/__tests__/gdal.test.d.ts.map +1 -0
  74. package/build/gdal/{__test__ → __tests__}/gdal.test.js +0 -0
  75. package/package.json +6 -6
  76. package/build/cli/cogify/__test__/action.batch.test.d.ts +0 -2
  77. package/build/cli/cogify/__test__/action.batch.test.d.ts.map +0 -1
  78. package/build/cli/cogify/__test__/action.batch.test.js +0 -23
  79. package/build/cli/cogify/__test__/semver.test.d.ts.map +0 -1
  80. package/build/cli/cogify/action.batch.d.ts.map +0 -1
  81. package/build/cog/__test__/builder.test.d.ts.map +0 -1
  82. package/build/cog/__test__/cog.stac.job.test.d.ts.map +0 -1
  83. package/build/cog/__test__/cog.test.d.ts.map +0 -1
  84. package/build/cog/__test__/cog.vrt.test.d.ts.map +0 -1
  85. package/build/cog/__test__/cutline.test.d.ts.map +0 -1
  86. package/build/cog/__test__/projection.loader.test.d.ts.map +0 -1
  87. package/build/cog/__test__/source.tiff.testhelper.d.ts.map +0 -1
  88. package/build/gdal/__test__/gdal.progress.test.d.ts.map +0 -1
  89. package/build/gdal/__test__/gdal.test.d.ts.map +0 -1
@@ -1,11 +1,13 @@
1
1
  import { TileMatrixSet } from '@basemaps/geo';
2
2
  import { Env, fsa, LogConfig, Projection } from '@basemaps/shared';
3
- import { CommandLineAction } from '@rushstack/ts-command-line';
4
3
  import Batch from 'aws-sdk/clients/batch.js';
5
4
  import { createHash } from 'crypto';
6
- import { CogStacJob } from '../../cog/cog.stac.job.js';
7
5
  const JobQueue = 'CogBatchJobQueue';
8
6
  const JobDefinition = 'CogBatchJob';
7
+ const ChunkJobMax = 1000;
8
+ const ChunkLargeUnit = 200; // Up to 5 large files in one job
9
+ const ChunkMiddleUnit = 50; // Up to 20 middle files in one job
10
+ const ChunkSmallUnit = 20; // Up to 50 small files in one job
9
11
  /** The base alignment level used by GDAL, Tiffs that are bigger or smaller than this should scale the compute resources */
10
12
  const MagicAlignmentLevel = 7;
11
13
  const ResolutionRegex = /((?:\d[\.\-])?\d+)m/;
@@ -21,38 +23,38 @@ export function extractResolutionFromName(name) {
21
23
  return -1;
22
24
  return parseFloat(matches[1].replace('-', '.')) * 1000;
23
25
  }
24
- export class ActionBatchJob extends CommandLineAction {
25
- constructor() {
26
- super({
27
- actionName: 'batch',
28
- summary: 'AWS batch jobs',
29
- documentation: 'Submit a list of cogs to a AWS Batch queue to be process',
30
- });
31
- }
26
+ export class BatchJob {
32
27
  /**
33
28
  * Create a id for a job
34
29
  *
35
30
  * This needs to be within `[a-Z_-]` upto 128 characters log
36
31
  * @param job job to process
37
- * @param fileName output filename
32
+ * @param fileNames output filename
38
33
  * @returns job id
39
34
  */
40
- static id(job, fileName) {
35
+ static id(job, fileNames) {
41
36
  // Job names are uncontrolled so hash the name and grab a small slice to use as a identifier
42
37
  const jobName = createHash('sha256').update(job.name).digest('hex').slice(0, 16);
43
- return `${job.id}-${jobName}-${fileName}`.slice(0, 128);
38
+ fileNames.sort((a, b) => a.localeCompare(b));
39
+ return `${job.id}-${jobName}-${fileNames.join('_')}`.slice(0, 128);
44
40
  }
45
- static async batchOne(jobPath, job, batch, name, isCommit) {
46
- const jobName = ActionBatchJob.id(job, name);
47
- const tile = TileMatrixSet.nameToTile(name);
48
- const alignmentLevels = Projection.findAlignmentLevels(job.tileMatrix, tile, job.source.gsd);
49
- // Give 25% more memory to larger jobs
50
- const resDiff = 1 + Math.max(alignmentLevels - MagicAlignmentLevel, 0) * 0.25;
51
- const memory = 3900 * resDiff;
41
+ static async batchOne(jobPath, job, batch, names, isCommit) {
42
+ const jobName = BatchJob.id(job, names);
43
+ let memory = 3900;
44
+ if (names.length === 1) {
45
+ // Calculate the larger file to provision memory if there is only one imagery in job.
46
+ const tile = TileMatrixSet.nameToTile(names[0]);
47
+ const alignmentLevels = Projection.findAlignmentLevels(job.tileMatrix, tile, job.source.gsd);
48
+ // Give 25% more memory to larger jobs
49
+ const resDiff = 1 + Math.max(alignmentLevels - MagicAlignmentLevel, 0) * 0.25;
50
+ memory *= resDiff;
51
+ }
52
52
  if (!isCommit) {
53
53
  return { jobName, jobId: '', memory };
54
54
  }
55
- const commandStr = ['-V', 'cog', '--job', jobPath, '--commit', '--name', name];
55
+ let commandStr = ['-V', 'cog', '--job', jobPath, '--commit'];
56
+ for (const name of names)
57
+ commandStr = commandStr.concat(['--name', name]);
56
58
  const batchJob = await batch
57
59
  .submitJob({
58
60
  jobName,
@@ -88,14 +90,7 @@ export class ActionBatchJob extends CommandLineAction {
88
90
  }
89
91
  return okMap;
90
92
  }
91
- async onExecute() {
92
- var _a, _b, _c;
93
- if (((_a = this.job) === null || _a === void 0 ? void 0 : _a.value) == null) {
94
- throw new Error('Failed to read parameters');
95
- }
96
- await ActionBatchJob.batchJob(await CogStacJob.load(this.job.value), (_b = this.commit) === null || _b === void 0 ? void 0 : _b.value, (_c = this.oneCog) === null || _c === void 0 ? void 0 : _c.value, LogConfig.get());
97
- }
98
- static async batchJob(job, commit = false, oneCog, logger) {
93
+ static async batchJob(job, commit = false, logger) {
99
94
  var _a;
100
95
  const jobPath = job.getJobPath('job.json');
101
96
  if (!jobPath.startsWith('s3://')) {
@@ -105,23 +100,38 @@ export class ActionBatchJob extends CommandLineAction {
105
100
  const region = (_a = Env.get('AWS_DEFAULT_REGION')) !== null && _a !== void 0 ? _a : 'ap-southeast-2';
106
101
  const batch = new Batch({ region });
107
102
  fsa.configure(job.output.location);
108
- const runningJobs = await ActionBatchJob.getCurrentJobList(batch);
109
- const stats = await Promise.all(job.output.files.map(async ({ name }) => {
110
- if (oneCog != null && oneCog !== name)
111
- return { name, ok: true };
112
- const jobName = ActionBatchJob.id(job, name);
103
+ const runningJobs = await BatchJob.getCurrentJobList(batch);
104
+ // Prepare chunk job and individual jobs based on imagery size.
105
+ const jobs = await this.getJobs(job);
106
+ // Get all the existing output tiffs
107
+ const targetPath = job.getJobPath();
108
+ const existTiffs = [];
109
+ for await (const fileName of fsa.list(job.getJobPath())) {
110
+ if (fileName.endsWith('.tiff'))
111
+ existTiffs.push(fileName);
112
+ }
113
+ const toSubmit = [];
114
+ for (const names of jobs) {
115
+ // Check existence of batch job running
116
+ const jobName = BatchJob.id(job, names);
113
117
  const isRunning = runningJobs.get(jobName);
114
118
  if (isRunning) {
115
119
  logger.info({ jobName }, 'JobRunning');
116
- return { name, ok: true };
120
+ continue;
121
+ }
122
+ // Check existence of all the output tiffs.
123
+ let allExists = true;
124
+ for (const name of names) {
125
+ if (!existTiffs.includes(job.getJobPath(`${name}.tiff`)))
126
+ allExists = false;
117
127
  }
118
- const targetPath = job.getJobPath(`${name}.tiff`);
119
- const exists = await fsa.exists(targetPath);
120
- if (exists)
121
- logger.info({ targetPath }, 'FileExists');
122
- return { name, ok: exists };
123
- }));
124
- const toSubmit = stats.filter((f) => f.ok === false).map((c) => c.name);
128
+ if (allExists) {
129
+ logger.info({ targetPath, names }, 'FileExists');
130
+ continue;
131
+ }
132
+ // Ready to submit
133
+ toSubmit.push(names);
134
+ }
125
135
  if (toSubmit.length === 0) {
126
136
  logger.info('NoJobs');
127
137
  return;
@@ -132,8 +142,8 @@ export class ActionBatchJob extends CommandLineAction {
132
142
  jobQueue: JobQueue,
133
143
  jobDefinition: JobDefinition,
134
144
  }, 'JobSubmit');
135
- for (const name of toSubmit) {
136
- const jobStatus = await ActionBatchJob.batchOne(jobPath, job, batch, name, commit);
145
+ for (const names of toSubmit) {
146
+ const jobStatus = await BatchJob.batchOne(jobPath, job, batch, names, commit);
137
147
  logger.info(jobStatus, 'JobSubmitted');
138
148
  }
139
149
  if (!commit) {
@@ -141,23 +151,39 @@ export class ActionBatchJob extends CommandLineAction {
141
151
  return;
142
152
  }
143
153
  }
144
- onDefineParameters() {
145
- this.job = this.defineStringParameter({
146
- argumentName: 'JOB',
147
- parameterLongName: '--job',
148
- description: 'Job config source to access',
149
- required: true,
150
- });
151
- this.oneCog = this.defineStringParameter({
152
- argumentName: 'COG_NAME',
153
- parameterLongName: '--one-cog',
154
- description: 'Restrict batch to build a single COG file',
155
- required: false,
156
- });
157
- this.commit = this.defineFlagParameter({
158
- parameterLongName: '--commit',
159
- description: 'Begin the transformation',
160
- required: false,
161
- });
154
+ /**
155
+ * Prepare the jobs from job files, and chunk the small images into single
156
+ * @returns List of jobs including single job and chunk jobs.
157
+ */
158
+ static async getJobs(job) {
159
+ const jobs = [];
160
+ let chunkJob = [];
161
+ let chunkUnit = 0; // Calculate the chunkUnit based on the size
162
+ for (const file of job.output.files) {
163
+ const imageSize = file.width / job.output.gsd;
164
+ if (imageSize > 16385) {
165
+ jobs.push([file.name]);
166
+ }
167
+ else if (imageSize > 8193) {
168
+ chunkJob.push(file.name);
169
+ chunkUnit += ChunkLargeUnit;
170
+ }
171
+ else if (imageSize > 4097) {
172
+ chunkJob.push(file.name);
173
+ chunkUnit += ChunkMiddleUnit;
174
+ }
175
+ else {
176
+ chunkJob.push(file.name);
177
+ chunkUnit += ChunkSmallUnit;
178
+ }
179
+ if (chunkUnit >= ChunkJobMax) {
180
+ jobs.push(chunkJob);
181
+ chunkJob = [];
182
+ chunkUnit = 0;
183
+ }
184
+ }
185
+ if (chunkJob.length > 0)
186
+ jobs.push(chunkJob);
187
+ return jobs;
162
188
  }
163
189
  }
@@ -0,0 +1,13 @@
1
+ import { LogType } from '@basemaps/shared';
2
+ import { CogStacJob } from '../../cog/cog.stac.job';
3
+ /**
4
+ * Prepare and insert Imagery Config for the cog creation job.
5
+ * @returns
6
+ */
7
+ export declare function insertConfigImagery(job: CogStacJob, logger: LogType): Promise<void>;
8
+ /**
9
+ * Prepare and insert TileSet Config for the cog creation job.
10
+ * @returns
11
+ */
12
+ export declare function insertConfigTileSet(job: CogStacJob, logger: LogType): Promise<void>;
13
+ //# sourceMappingURL=imagery.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imagery.config.d.ts","sourceRoot":"","sources":["../../../src/cli/cogify/imagery.config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBzF;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBzF"}
@@ -0,0 +1,46 @@
1
+ import { Config, TileSetType } from '@basemaps/config';
2
+ import { ImageFormat } from '@basemaps/geo';
3
+ /**
4
+ * Prepare and insert Imagery Config for the cog creation job.
5
+ * @returns
6
+ */
7
+ export async function insertConfigImagery(job, logger) {
8
+ const now = Date.now();
9
+ const imgId = Config.Imagery.id(job.id);
10
+ const configImagery = {
11
+ id: imgId,
12
+ name: job.name,
13
+ createdAt: now,
14
+ updatedAt: now,
15
+ projection: job.tileMatrix.projection.code,
16
+ tileMatrix: job.tileMatrix.identifier,
17
+ uri: job.getJobPath(),
18
+ bounds: job.output.bounds,
19
+ files: job.output.files,
20
+ };
21
+ if (Config.Imagery.isWriteable())
22
+ Config.Imagery.put(configImagery);
23
+ logger.info({ imgId }, 'CogCreate:InsertConfigImagery');
24
+ }
25
+ /**
26
+ * Prepare and insert TileSet Config for the cog creation job.
27
+ * @returns
28
+ */
29
+ export async function insertConfigTileSet(job, logger) {
30
+ const now = Date.now();
31
+ const tsId = Config.TileSet.id(job.id);
32
+ const imId = Config.Imagery.id(job.id);
33
+ const tileSet = {
34
+ type: TileSetType.Raster,
35
+ format: ImageFormat.Webp,
36
+ id: tsId,
37
+ name: job.name,
38
+ layers: [{ [job.tileMatrix.projection.code]: imId, name: job.name, minZoom: 0, maxZoom: 32 }],
39
+ background: { r: 0, g: 0, b: 0, alpha: 0 },
40
+ createdAt: now,
41
+ updatedAt: now,
42
+ };
43
+ if (Config.TileSet.isWriteable())
44
+ Config.TileSet.put(tileSet);
45
+ logger.info({ tsId }, 'CogCreate:InsertConfigTileSet');
46
+ }
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
+ import { BaseCommandLine } from '@basemaps/shared/build/cli/base.js';
2
3
  import 'source-map-support/register.js';
3
- import { BaseCommandLine } from '../base.cli.js';
4
4
  export declare class CogifyCommandLine extends BaseCommandLine {
5
5
  constructor();
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/cogify/index.ts"],"names":[],"mappings":";AACA,OAAO,gCAAgC,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAKjD,qBAAa,iBAAkB,SAAQ,eAAe;;CAUrD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/cogify/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,gCAAgC,CAAC;AAIxC,qBAAa,iBAAkB,SAAQ,eAAe;;CASrD"}
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env node
2
+ import { BaseCommandLine } from '@basemaps/shared/build/cli/base.js';
2
3
  import 'source-map-support/register.js';
3
- import { BaseCommandLine } from '../base.cli.js';
4
- import { ActionBatchJob } from './action.batch.js';
5
4
  import { ActionCogCreate } from './action.cog.js';
6
5
  import { ActionJobCreate } from './action.job.js';
7
6
  export class CogifyCommandLine extends BaseCommandLine {
@@ -12,7 +11,6 @@ export class CogifyCommandLine extends BaseCommandLine {
12
11
  });
13
12
  this.addAction(new ActionCogCreate());
14
13
  this.addAction(new ActionJobCreate());
15
- this.addAction(new ActionBatchJob());
16
14
  }
17
15
  }
18
16
  new CogifyCommandLine().run();
@@ -1,3 +1,5 @@
1
1
  /** Make a temp folder inside TEMP_FOLDER's path */
2
2
  export declare function makeTempFolder(folder: string): Promise<string>;
3
+ /** Make a tiff folder inside TEMP_FOLDER's path */
4
+ export declare function makeTiffFolder(tmpFolder: string, name: string): Promise<string>;
3
5
  //# sourceMappingURL=folder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"folder.d.ts","sourceRoot":"","sources":["../../src/cli/folder.ts"],"names":[],"mappings":"AAIA,mDAAmD;AACnD,wBAAsB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAMpE"}
1
+ {"version":3,"file":"folder.d.ts","sourceRoot":"","sources":["../../src/cli/folder.ts"],"names":[],"mappings":"AAIA,mDAAmD;AACnD,wBAAsB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAMpE;AAED,mDAAmD;AACnD,wBAAsB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAKrF"}
@@ -9,3 +9,9 @@ export async function makeTempFolder(folder) {
9
9
  await fs.mkdir(folderPath, { recursive: true });
10
10
  return folderPath;
11
11
  }
12
+ /** Make a tiff folder inside TEMP_FOLDER's path */
13
+ export async function makeTiffFolder(tmpFolder, name) {
14
+ const folderPath = path.join(tmpFolder, name);
15
+ await fs.mkdir(folderPath, { recursive: true });
16
+ return folderPath;
17
+ }
@@ -1,3 +1,4 @@
1
+ import { CogStacJob } from '../cog/cog.stac.job.js';
1
2
  /**
2
3
  * Invalidate the cloudfront distribution cache when updating imagery sets
3
4
  */
@@ -14,4 +15,8 @@ export declare function getStaticBucket(): Promise<string | null>;
14
15
  * @returns whether the item was updated
15
16
  */
16
17
  export declare function uploadStaticFile(filePath: string, target: string, contentType: string, cacheControl: string): Promise<boolean>;
18
+ /**
19
+ * Prepare QA urls with center location
20
+ */
21
+ export declare function prepareUrl(job: CogStacJob): Promise<string>;
17
22
  //# sourceMappingURL=util.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/cli/util.ts"],"names":[],"mappings":"AAkBA;;GAEG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,MAAM,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CA+B5F;AAED,eAAO,MAAM,OAAO,cAAc,CAAC;AAEnC,wBAAsB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQjF;AAOD,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQ9D;AAMD;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,OAAO,CAAC,CA6BlB"}
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/cli/util.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAUpD;;GAEG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,MAAM,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CA+B5F;AAED,eAAO,MAAM,OAAO,cAAc,CAAC;AAEnC,wBAAsB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQjF;AAOD,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQ9D;AAMD;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,OAAO,CAAC,CA6BlB;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CASjE"}
package/build/cli/util.js CHANGED
@@ -1,8 +1,8 @@
1
- import { fsa, LogConfig } from '@basemaps/shared';
1
+ import { Env, fsa, LogConfig, Projection } from '@basemaps/shared';
2
2
  import CloudFormation from 'aws-sdk/clients/cloudformation.js';
3
3
  import CloudFront from 'aws-sdk/clients/cloudfront.js';
4
4
  import S3 from 'aws-sdk/clients/s3.js';
5
- import { CliId } from './base.cli.js';
5
+ import { CliId } from '@basemaps/shared/build/cli/base.js';
6
6
  import crypto from 'crypto';
7
7
  import path from 'path';
8
8
  import { gzip } from 'zlib';
@@ -113,3 +113,16 @@ export async function uploadStaticFile(filePath, target, contentType, cacheContr
113
113
  .promise();
114
114
  return true;
115
115
  }
116
+ /**
117
+ * Prepare QA urls with center location
118
+ */
119
+ export async function prepareUrl(job) {
120
+ const bounds = job.output.bounds;
121
+ const center = { x: bounds.x + bounds.width / 2, y: bounds.y + bounds.height / 2 };
122
+ const proj = Projection.get(job.tileMatrix.projection);
123
+ const centerLatLon = proj.toWgs84([center.x, center.y]).map((c) => c.toFixed(6));
124
+ const targetZoom = Math.max(job.tileMatrix.findBestZoom(job.output.gsd) - 12, 0);
125
+ const base = Env.get(Env.PublicUrlBase);
126
+ const url = `${base}/?i=${job.id}&p=${job.tileMatrix.identifier}&debug#@${centerLatLon[1]},${centerLatLon[0]},z${targetZoom}`;
127
+ return url;
128
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builder.test.d.ts","sourceRoot":"","sources":["../../../src/cog/__tests__/builder.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cog.stac.job.test.d.ts","sourceRoot":"","sources":["../../../src/cog/__tests__/cog.stac.job.test.ts"],"names":[],"mappings":""}
@@ -1,6 +1,6 @@
1
1
  import { Bounds, Epsg, EpsgCode, GoogleTms, Nztm2000Tms, Stac } from '@basemaps/geo';
2
2
  import { Projection } from '@basemaps/shared';
3
- import { mockFileOperator } from '@basemaps/shared/build/file/__test__/file.operator.test.helper.js';
3
+ import { mockFileOperator } from '@basemaps/shared/build/file/__tests__/file.operator.test.helper.js';
4
4
  import { round } from '@basemaps/test/build/rounding.js';
5
5
  import o from 'ospec';
6
6
  import { CogStacJob } from '../cog.stac.job.js';
@@ -137,6 +137,7 @@ o.spec('CogJob', () => {
137
137
  bounds: { x: 1, y: 2, width: 2, height: 3 },
138
138
  oneCogCovering: true,
139
139
  },
140
+ processingId: undefined,
140
141
  });
141
142
  o(job.id).equals(id);
142
143
  o(job.source.gsd).equals(0.075);
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cog.test.d.ts","sourceRoot":"","sources":["../../../src/cog/__tests__/cog.test.ts"],"names":[],"mappings":""}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cog.vrt.test.d.ts","sourceRoot":"","sources":["../../../src/cog/__tests__/cog.vrt.test.ts"],"names":[],"mappings":""}
@@ -1,6 +1,6 @@
1
1
  import { EpsgCode, GoogleTms, Nztm2000Tms } from '@basemaps/geo';
2
2
  import { fsa, LogConfig } from '@basemaps/shared';
3
- import { qkToName } from '@basemaps/shared/build/proj/__test__/test.util.js';
3
+ import { qkToName } from '@basemaps/shared/build/proj/__tests__/test.util.js';
4
4
  import { round } from '@basemaps/test/build/rounding.js';
5
5
  import o from 'ospec';
6
6
  import path from 'path';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cutline.test.d.ts","sourceRoot":"","sources":["../../../src/cog/__tests__/cutline.test.ts"],"names":[],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  import { Bounds, EpsgCode, GoogleTms, Nztm2000Tms } from '@basemaps/geo';
2
- import { qkToName } from '@basemaps/shared/build/proj/__test__/test.util.js';
2
+ import { qkToName } from '@basemaps/shared/build/proj/__tests__/test.util.js';
3
3
  import { round } from '@basemaps/test/build/rounding.js';
4
4
  import o from 'ospec';
5
5
  import path from 'path';
@@ -8,6 +8,7 @@ import { Cutline, polyContainsBounds } from '../cutline.js';
8
8
  import { SourceTiffTestHelper } from './source.tiff.testhelper.js';
9
9
  const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
10
10
  o.spec('cutline', () => {
11
+ o.specTimeout(1000);
11
12
  const testDir = `${__dirname}/../../../__test.assets__`;
12
13
  o.spec('filterSourcesForName', () => {
13
14
  o('fully within same projection', async () => {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projection.loader.test.d.ts","sourceRoot":"","sources":["../../../src/cog/__tests__/projection.loader.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.tiff.testhelper.d.ts","sourceRoot":"","sources":["../../../src/cog/__tests__/source.tiff.testhelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,WAAW,EAAa,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,eAAO,MAAM,oBAAoB;kBACjB,UAAU;mCAgBW,WAAW,EAAE;+BAmBrB,WAAW,EAAE,GAAG,MAAM,EAAE;CAGpD,CAAC"}
@@ -6,8 +6,6 @@ import { LimitFunction } from 'p-limit';
6
6
  import { Cutline } from './cutline.js';
7
7
  import { CogBuilderMetadata, SourceMetadata } from './types.js';
8
8
  export declare const InvalidProjectionCode = 32767;
9
- export declare const CacheVersion = "v3";
10
- export declare const CacheFolder = "./.cache";
11
9
  /**
12
10
  * Attempt to guess the projection based off the WKT
13
11
  *
@@ -41,13 +39,11 @@ export declare class CogBuilder {
41
39
  * @param logger
42
40
  */
43
41
  findNoData(tiff: CogTiff): number | null;
44
- /** Cache the bounds lookup so we do not have to requery the bounds between CLI calls */
45
- private getMetadata;
46
42
  /**
47
43
  * Generate a list of tiles that need to be generated to cover the source tiffs
48
44
  * @param tiffs list of source imagery to be converted
49
45
  * @returns List of Tile bounds covering tiffs
50
46
  */
51
- build(tiffs: ChunkSource[], cutline: Cutline): Promise<CogBuilderMetadata>;
47
+ build(tiffs: ChunkSource[], cutline: Cutline, maxImageSize?: number): Promise<CogBuilderMetadata>;
52
48
  }
53
49
  //# sourceMappingURL=builder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/cog/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,IAAI,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAyC,OAAO,EAAc,MAAM,kBAAkB,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAuB,MAAM,iBAAiB,CAAC;AAG/D,OAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGhD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEhE,eAAO,MAAM,qBAAqB,QAAQ,CAAC;AAC3C,eAAO,MAAM,YAAY,OAAO,CAAC;AACjC,eAAO,MAAM,WAAW,aAAa,CAAC;AAEtC;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAO/D;AAED,qBAAa,UAAU;IACrB,CAAC,EAAE,aAAa,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,aAAa,CAAC;IACzB,OAAO,CAAC,EAAE,IAAI,CAAC;IAGf,kBAAkB,cAAqB;IAEvC;;OAEG;gBACS,SAAS,EAAE,a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S,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,IAAI;IAO1F;;;OAGG;IACG,MAAM,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC;IAoF7D,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAuBnC;;;;OAIG;IACH,UAAU,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI;IAaxC;;;;OAIG;IACG,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAaxG"}
@@ -1,15 +1,10 @@
1
1
  import { Bounds, Epsg } from '@basemaps/geo';
2
- import { CompositeError, fsa, LoggerFatalError, Projection } from '@basemaps/shared';
2
+ import { CompositeError, LoggerFatalError, Projection } from '@basemaps/shared';
3
3
  import { CogTiff, TiffTag, TiffTagGeo } from '@cogeotiff/core';
4
- import { createHash } from 'crypto';
5
- import { existsSync, mkdirSync } from 'fs';
6
4
  import pLimit from 'p-limit';
7
- import * as path from 'path';
8
5
  import { basename } from 'path';
9
6
  import { ProjectionLoader } from './projection.loader.js';
10
7
  export const InvalidProjectionCode = 32767;
11
- export const CacheVersion = 'v3'; // bump this number to invalidate the cache
12
- export const CacheFolder = './.cache';
13
8
  /**
14
9
  * Attempt to guess the projection based off the WKT
15
10
  *
@@ -155,35 +150,16 @@ export class CogBuilder {
155
150
  }
156
151
  return noDataNum;
157
152
  }
158
- /** Cache the bounds lookup so we do not have to requery the bounds between CLI calls */
159
- async getMetadata(tiffs) {
160
- const cacheKey = path.join(CacheFolder, CacheVersion +
161
- createHash('sha256')
162
- .update(this.targetTms.projection.toString())
163
- .update(tiffs.map((c) => c.uri).join('\n'))
164
- .digest('hex')) + '.json';
165
- if (existsSync(cacheKey)) {
166
- this.logger.debug({ path: cacheKey }, 'MetadataCacheHit');
167
- const metadata = await fsa.readJson(cacheKey);
168
- metadata.resZoom = Projection.getTiffResZoom(this.targetTms, metadata.pixelScale);
169
- return metadata;
170
- }
171
- const metadata = await this.bounds(tiffs);
172
- mkdirSync(CacheFolder, { recursive: true });
173
- await fsa.writeJson(cacheKey, metadata);
174
- this.logger.debug({ path: cacheKey }, 'MetadataCacheMiss');
175
- return metadata;
176
- }
177
153
  /**
178
154
  * Generate a list of tiles that need to be generated to cover the source tiffs
179
155
  * @param tiffs list of source imagery to be converted
180
156
  * @returns List of Tile bounds covering tiffs
181
157
  */
182
- async build(tiffs, cutline) {
183
- const metadata = await this.getMetadata(tiffs);
158
+ async build(tiffs, cutline, maxImageSize) {
159
+ const metadata = await this.bounds(tiffs);
184
160
  // Ensure that the projection definition is loaded
185
161
  await ProjectionLoader.load(metadata.projection);
186
- const files = cutline.optimizeCovering(metadata);
162
+ const files = cutline.optimizeCovering(metadata, maxImageSize);
187
163
  let union = null;
188
164
  for (const bounds of files) {
189
165
  if (union == null)
@@ -5,6 +5,8 @@ import { GdalCogBuilderResampling } from '../gdal/gdal.config.js';
5
5
  import { CogBuilderMetadata, CogJob, CogJobJson, CogOutputProperties, CogSourceProperties, FeatureCollectionWithCrs } from './types.js';
6
6
  export declare const MaxConcurrencyDefault = 50;
7
7
  export interface JobCreationContext {
8
+ /** Custom Imagery Name if defined */
9
+ imageryName?: string;
8
10
  /** Source config */
9
11
  sourceLocation: FileConfig | FileConfigPath;
10
12
  /** Output config */
@@ -32,11 +34,19 @@ export interface JobCreationContext {
32
34
  * Override the source projection
33
35
  */
34
36
  projection?: Epsg;
37
+ /**
38
+ * Override Maximum Image Pixel Size
39
+ */
40
+ maxImageSize?: number;
35
41
  /**
36
42
  * Resampling method
37
43
  * @Default GdalCogBuilderDefaults.resampling
38
44
  */
39
45
  resampling?: GdalCogBuilderResampling;
46
+ /**
47
+ * Override job processing Id
48
+ */
49
+ processingId?: string;
40
50
  };
41
51
  /**
42
52
  * Should this job be submitted to batch now?
@@ -66,6 +76,7 @@ export interface CogJobCreateParams {
66
76
  export declare class CogStacJob implements CogJob {
67
77
  json: CogJobJson;
68
78
  private cacheTargetZoom?;
79
+ processingId: string;
69
80
  /**
70
81
  * Load the job.json
71
82
 
@@ -1 +1 @@
1
- {"version":3,"file":"cog.stac.job.d.ts","sourceRoot":"","sources":["../../src/cog/cog.stac.job.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,IAAI,EAKJ,aAAa,EAEd,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,UAAU,EACV,cAAc,EAKf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAA8C,MAAM,iBAAiB,CAAC;AAE3F,OAAO,EAA0B,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAG1F,OAAO,EACL,kBAAkB,EAClB,MAAM,EACN,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,MAAM,WAAW,kBAAkB;IACjC,oBAAoB;IACpB,cAAc,EAAE,UAAU,GAAG,cAAc,CAAC;IAE5C,oBAAoB;IACpB,cAAc,EAAE,UAAU,CAAC;IAE3B,6CAA6C;IAC7C,OAAO,CAAC,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IAEF,UAAU,EAAE,aAAa,CAAC;IAE1B,QAAQ,CAAC,EAAE;QACT,sBAAsB;QACtB,EAAE,CAAC,EAAE,MAAM,CAAC;QAEZ;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QAEjB;;;WAGG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB;;WAEG;QACH,UAAU,CAAC,EAAE,IAAI,CAAC;QAElB;;;WAGG;QACH,UAAU,CAAC,EAAE,wBAAwB,CAAC;KACvC,CAAC;IAEF;;;OAGG;IACH,K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