@loaders.gl/tile-converter 4.2.0-alpha.5 → 4.2.0-beta.1
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.
- package/dist/3d-tiles-converter/3d-tiles-converter.d.ts +1 -1
- package/dist/3d-tiles-converter/3d-tiles-converter.d.ts.map +1 -1
- package/dist/3d-tiles-converter/3d-tiles-converter.js +42 -22
- package/dist/3d-tiles-converter/helpers/b3dm-converter.d.ts.map +1 -1
- package/dist/3d-tiles-converter/helpers/b3dm-converter.js +4 -0
- package/dist/3d-tiles-converter/helpers/load-i3s.d.ts.map +1 -1
- package/dist/3d-tiles-converter/helpers/load-i3s.js +3 -28
- package/dist/converter-cli.js +4 -2
- package/dist/converter.min.cjs +95 -95
- package/dist/deps-installer/deps-installer.d.ts.map +1 -1
- package/dist/deps-installer/deps-installer.js +9 -1
- package/dist/i3s-converter/helpers/attribute-metadata-info.js +4 -1
- package/dist/i3s-converter/helpers/batch-ids-extensions.d.ts.map +1 -1
- package/dist/i3s-converter/helpers/batch-ids-extensions.js +2 -1
- package/dist/i3s-converter/helpers/coordinate-converter.js +2 -2
- package/dist/i3s-converter/helpers/feature-attributes.d.ts.map +1 -1
- package/dist/i3s-converter/helpers/feature-attributes.js +4 -2
- package/dist/i3s-converter/helpers/geometry-attributes.js +6 -5
- package/dist/i3s-converter/helpers/geometry-converter.d.ts +15 -1
- package/dist/i3s-converter/helpers/geometry-converter.d.ts.map +1 -1
- package/dist/i3s-converter/helpers/geometry-converter.js +52 -12
- package/dist/i3s-converter/helpers/gltf-attributes.d.ts.map +1 -1
- package/dist/i3s-converter/helpers/gltf-attributes.js +12 -14
- package/dist/i3s-converter/helpers/node-index-document.d.ts +8 -1
- package/dist/i3s-converter/helpers/node-index-document.d.ts.map +1 -1
- package/dist/i3s-converter/helpers/node-index-document.js +18 -11
- package/dist/i3s-converter/helpers/node-pages.d.ts.map +1 -1
- package/dist/i3s-converter/helpers/node-pages.js +27 -26
- package/dist/i3s-converter/helpers/preprocess-3d-tiles.d.ts.map +1 -1
- package/dist/i3s-converter/helpers/progress.d.ts.map +1 -1
- package/dist/i3s-converter/helpers/progress.js +23 -18
- package/dist/i3s-converter/helpers/tileset-traversal.d.ts +8 -1
- package/dist/i3s-converter/helpers/tileset-traversal.d.ts.map +1 -1
- package/dist/i3s-converter/helpers/tileset-traversal.js +12 -3
- package/dist/i3s-converter/i3s-converter.d.ts.map +1 -1
- package/dist/i3s-converter/i3s-converter.js +190 -66
- package/dist/i3s-converter/json-templates/node.js +1 -1
- package/dist/i3s-server/bin/i3s-server.min.cjs +76 -76
- package/dist/i3s-server/bin/www.js +6 -4
- package/dist/i3s-server/controllers/slpk-controller.d.ts.map +1 -1
- package/dist/i3s-server/controllers/slpk-controller.js +3 -1
- package/dist/i3s-server/routes/index.js +11 -8
- package/dist/i3s-server/routes/slpk-router.d.ts.map +1 -1
- package/dist/i3s-server/routes/slpk-router.js +24 -18
- package/dist/i3s-server/utils/server-utils.d.ts.map +1 -1
- package/dist/i3s-server/utils/server-utils.js +8 -5
- package/dist/index.cjs +421 -211
- package/dist/index.cjs.map +3 -3
- package/dist/lib/utils/cli-utils.d.ts.map +1 -1
- package/dist/lib/utils/cli-utils.js +2 -0
- package/dist/lib/utils/conversion-dump.d.ts +9 -1
- package/dist/lib/utils/conversion-dump.d.ts.map +1 -1
- package/dist/lib/utils/conversion-dump.js +44 -21
- package/dist/lib/utils/file-utils.d.ts +1 -1
- package/dist/lib/utils/file-utils.d.ts.map +1 -1
- package/dist/lib/utils/file-utils.js +10 -12
- package/dist/lib/utils/statistic-utills.d.ts.map +1 -1
- package/dist/lib/utils/statistic-utills.js +5 -7
- package/dist/lib/utils/write-queue.d.ts.map +1 -1
- package/dist/lib/utils/write-queue.js +7 -3
- package/dist/pgm-loader.d.ts +17 -2
- package/dist/pgm-loader.d.ts.map +1 -1
- package/dist/pgm-loader.js +3 -1
- package/dist/slpk-extractor/slpk-extractor.d.ts.map +1 -1
- package/dist/slpk-extractor/slpk-extractor.js +2 -1
- package/dist/slpk-extractor-cli.d.ts.map +1 -1
- package/dist/slpk-extractor-cli.js +16 -8
- package/dist/slpk-extractor.min.cjs +36 -36
- package/package.json +23 -22
- package/src/3d-tiles-converter/3d-tiles-converter.ts +21 -10
- package/src/3d-tiles-converter/helpers/b3dm-converter.ts +1 -0
- package/src/3d-tiles-converter/helpers/load-i3s.ts +3 -27
- package/src/converter-cli.ts +4 -2
- package/src/deps-installer/deps-installer.ts +11 -0
- package/src/i3s-converter/helpers/attribute-metadata-info.ts +1 -1
- package/src/i3s-converter/helpers/batch-ids-extensions.ts +3 -1
- package/src/i3s-converter/helpers/coordinate-converter.ts +2 -2
- package/src/i3s-converter/helpers/feature-attributes.ts +5 -2
- package/src/i3s-converter/helpers/geometry-attributes.ts +6 -5
- package/src/i3s-converter/helpers/geometry-converter.ts +118 -72
- package/src/i3s-converter/helpers/gltf-attributes.ts +12 -13
- package/src/i3s-converter/helpers/node-index-document.ts +18 -10
- package/src/i3s-converter/helpers/node-pages.ts +27 -29
- package/src/i3s-converter/helpers/preprocess-3d-tiles.ts +1 -0
- package/src/i3s-converter/helpers/progress.ts +1 -0
- package/src/i3s-converter/helpers/tileset-traversal.ts +22 -13
- package/src/i3s-converter/i3s-converter.ts +173 -114
- package/src/i3s-converter/json-templates/node.ts +1 -1
- package/src/i3s-server/bin/www.ts +6 -4
- package/src/i3s-server/controllers/slpk-controller.ts +4 -2
- package/src/i3s-server/routes/index.ts +10 -7
- package/src/i3s-server/routes/slpk-router.ts +22 -16
- package/src/i3s-server/utils/server-utils.ts +6 -4
- package/src/lib/utils/cli-utils.ts +2 -0
- package/src/lib/utils/conversion-dump.ts +35 -20
- package/src/lib/utils/file-utils.ts +11 -11
- package/src/lib/utils/statistic-utills.ts +5 -6
- package/src/lib/utils/write-queue.ts +2 -2
- package/src/pgm-loader.ts +5 -2
- package/src/slpk-extractor/slpk-extractor.ts +2 -1
- package/src/slpk-extractor-cli.ts +16 -8
- package/src/lib/utils/statistic-utills.d.ts +0 -25
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/cli-utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CASpE;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"cli-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/cli-utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CASpE;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAOjE;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAWjE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAOrE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAStE"}
|
|
@@ -24,7 +24,9 @@ export function getStringValue(index, args) {
|
|
|
24
24
|
*/
|
|
25
25
|
export function getURLValue(index, args) {
|
|
26
26
|
const value = getStringValue(index, args);
|
|
27
|
+
// eslint-disable-next-line no-console
|
|
27
28
|
console.log(`Input tileset value: ${value}`);
|
|
29
|
+
// eslint-disable-next-line no-console
|
|
28
30
|
console.log(`Modified tileset value: ${value.replace(/\\/g, '/')}`);
|
|
29
31
|
return value.replace(/\\/g, '/');
|
|
30
32
|
}
|
|
@@ -39,7 +39,7 @@ export type TextureSetDefinition = {
|
|
|
39
39
|
atlas?: boolean;
|
|
40
40
|
};
|
|
41
41
|
export declare class ConversionDump {
|
|
42
|
-
/**Restored/resumed dump indicator */
|
|
42
|
+
/** Restored/resumed dump indicator */
|
|
43
43
|
restored: boolean;
|
|
44
44
|
/** Conversion options */
|
|
45
45
|
private options?;
|
|
@@ -115,6 +115,14 @@ export declare class ConversionDump {
|
|
|
115
115
|
sourceId?: string;
|
|
116
116
|
resourceType?: string;
|
|
117
117
|
}[], writeResults: PromiseSettledResult<string | null>[]): Promise<void>;
|
|
118
|
+
/**
|
|
119
|
+
* Update done status for a node
|
|
120
|
+
* @param sourceId - source resource Id
|
|
121
|
+
* @param outputId - output node/tile Id
|
|
122
|
+
* @param resourceType - type of resource
|
|
123
|
+
* @returns void
|
|
124
|
+
*/
|
|
125
|
+
private updateNodes;
|
|
118
126
|
/**
|
|
119
127
|
* Update 3d-tiles-converter dump file
|
|
120
128
|
* @param filename - source filename
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversion-dump.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/conversion-dump.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,eAAe,EAAE,qBAAqB,EAAE,2BAA2B,EAAC,MAAM,iBAAiB,CAAC;AACpG,OAAO,EAAC,2BAA2B,EAAC,+DAA4D;AAKhG,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE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MAAM,EAChB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,IAAI,CAAC;IAUhB;;;;OAIG;IACH,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAWnD;;;OAGG;IACH,uBAAuB,CAAC,mBAAmB,EAAE,qBAAqB,EAAE,GAAG,IAAI;CAG5E"}
|
|
@@ -6,9 +6,19 @@ import process from 'process';
|
|
|
6
6
|
import Ajv from 'ajv';
|
|
7
7
|
import { dumpJsonSchema } from "../json-schemas/conversion-dump-json-schema.js";
|
|
8
8
|
export class ConversionDump {
|
|
9
|
+
/** Restored/resumed dump indicator */
|
|
10
|
+
restored = false;
|
|
11
|
+
/** Conversion options */
|
|
12
|
+
options;
|
|
13
|
+
/** Tiles conversion progress status map */
|
|
14
|
+
tilesConverted;
|
|
15
|
+
/** Textures formats definitions */
|
|
16
|
+
textureSetDefinitions;
|
|
17
|
+
/** Attributes Metadata */
|
|
18
|
+
attributeMetadataInfo;
|
|
19
|
+
/** Array of materials definitions */
|
|
20
|
+
materialDefinitions;
|
|
9
21
|
constructor() {
|
|
10
|
-
/**Restored/resumed dump indicator */
|
|
11
|
-
this.restored = false;
|
|
12
22
|
this.tilesConverted = {};
|
|
13
23
|
}
|
|
14
24
|
/**
|
|
@@ -50,7 +60,8 @@ export class ConversionDump {
|
|
|
50
60
|
}
|
|
51
61
|
}
|
|
52
62
|
catch (error) {
|
|
53
|
-
|
|
63
|
+
// prettier-ignore
|
|
64
|
+
console.log('Can\'t open dump file', error); // eslint-disable-line no-console
|
|
54
65
|
}
|
|
55
66
|
}
|
|
56
67
|
await this.deleteDumpFile();
|
|
@@ -88,7 +99,8 @@ export class ConversionDump {
|
|
|
88
99
|
await renameFile(join(this.options.outputPath, this.options.tilesetName, `${this.options.tilesetName}${DUMP_FILE_SUFFIX}.${time[0]}.${time[1]}`), join(this.options.outputPath, this.options.tilesetName, `${this.options.tilesetName}${DUMP_FILE_SUFFIX}`));
|
|
89
100
|
}
|
|
90
101
|
catch (error) {
|
|
91
|
-
|
|
102
|
+
// prettier-ignore
|
|
103
|
+
console.log('Can\'t update dump file', error); // eslint-disable-line no-console
|
|
92
104
|
}
|
|
93
105
|
}
|
|
94
106
|
}
|
|
@@ -173,27 +185,38 @@ export class ConversionDump {
|
|
|
173
185
|
for (let i = 0; i < changedRecords.length; i++) {
|
|
174
186
|
if (changedRecords[i] && 'value' in writeResults[i]) {
|
|
175
187
|
const { sourceId, resourceType, outputId } = changedRecords[i];
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
188
|
+
this.updateNodes(sourceId, outputId, resourceType);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
await this.updateDumpFile();
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Update done status for a node
|
|
195
|
+
* @param sourceId - source resource Id
|
|
196
|
+
* @param outputId - output node/tile Id
|
|
197
|
+
* @param resourceType - type of resource
|
|
198
|
+
* @returns void
|
|
199
|
+
*/
|
|
200
|
+
updateNodes(sourceId, outputId, resourceType) {
|
|
201
|
+
if (!sourceId || !resourceType || !outputId) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
for (const node of this.tilesConverted[sourceId].nodes) {
|
|
205
|
+
if (node.nodeId === outputId && node.progress) {
|
|
206
|
+
node.progress[resourceType] = true;
|
|
207
|
+
let done = false;
|
|
208
|
+
for (const key in node.progress) {
|
|
209
|
+
done = node.progress[key];
|
|
210
|
+
if (!done)
|
|
191
211
|
break;
|
|
192
|
-
}
|
|
193
212
|
}
|
|
213
|
+
node.done = done;
|
|
214
|
+
if (node.done) {
|
|
215
|
+
delete node.progress;
|
|
216
|
+
}
|
|
217
|
+
break;
|
|
194
218
|
}
|
|
195
219
|
}
|
|
196
|
-
await this.updateDumpFile();
|
|
197
220
|
}
|
|
198
221
|
/**
|
|
199
222
|
* Update 3d-tiles-converter dump file
|
|
@@ -36,7 +36,7 @@ export declare function isFileExists(fileName: string): Promise<boolean>;
|
|
|
36
36
|
*
|
|
37
37
|
* @param path
|
|
38
38
|
*/
|
|
39
|
-
export declare function removeDir(path: string):
|
|
39
|
+
export declare function removeDir(path: string): any;
|
|
40
40
|
/**
|
|
41
41
|
* Remove file with path
|
|
42
42
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/file-utils.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,wBAAsB,SAAS,CAC7B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,EAC9D,QAAQ,GAAE,MAAqB,GAC9B,OAAO,CAAC,MAAM,CAAC,CAkBjB;AAED;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,EAC9D,QAAQ,GAAE,MAAqB,EAC/B,QAAQ,GAAE,OAAc,EACxB,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,GAC7B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"file-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/file-utils.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,wBAAsB,SAAS,CAC7B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,EAC9D,QAAQ,GAAE,MAAqB,GAC9B,OAAO,CAAC,MAAM,CAAC,CAkBjB;AAED;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,EAC9D,QAAQ,GAAE,MAAqB,EAC/B,QAAQ,GAAE,OAAc,EACxB,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,GAC7B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAgBxB;AAED;;;;;GAKG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,CAAC,CAoB5F;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOrE;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,OAIrC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,iBAEtC;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,UAEnD;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAOhF"}
|
|
@@ -29,7 +29,7 @@ export async function writeFile(path, data, fileName = 'index.json') {
|
|
|
29
29
|
catch (err) {
|
|
30
30
|
throw err;
|
|
31
31
|
}
|
|
32
|
-
console.log(`${pathFile} saved.`); // eslint-disable-line
|
|
32
|
+
console.log(`${pathFile} saved.`); // eslint-disable-line no-console
|
|
33
33
|
return pathFile;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
@@ -49,16 +49,12 @@ export async function writeFileForSlpk(path, data, fileName = 'index.json', comp
|
|
|
49
49
|
compressList.push(pathFile);
|
|
50
50
|
return `${pathFile}.gz`;
|
|
51
51
|
}
|
|
52
|
-
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
const pathGzFile = await compressFileWithGzip(pathFile);
|
|
58
|
-
// After compression, we don't need an uncompressed file
|
|
59
|
-
await removeFile(pathFile);
|
|
60
|
-
return pathGzFile;
|
|
52
|
+
return null;
|
|
61
53
|
}
|
|
54
|
+
const pathGzFile = await compressFileWithGzip(pathFile);
|
|
55
|
+
// After compression, we don't need an uncompressed file
|
|
56
|
+
await removeFile(pathFile);
|
|
57
|
+
return pathGzFile;
|
|
62
58
|
}
|
|
63
59
|
return pathFile;
|
|
64
60
|
}
|
|
@@ -71,7 +67,7 @@ export async function writeFileForSlpk(path, data, fileName = 'index.json', comp
|
|
|
71
67
|
export async function openJson(path, fileName) {
|
|
72
68
|
return new Promise((resolve, reject) => {
|
|
73
69
|
let count = 0;
|
|
74
|
-
console.log(`load ${path}/${fileName}.`); // eslint-disable-line
|
|
70
|
+
console.log(`load ${path}/${fileName}.`); // eslint-disable-line no-console
|
|
75
71
|
const intervalId = setInterval(() => {
|
|
76
72
|
const pathFile = join(path, fileName);
|
|
77
73
|
load(pathFile, JSONLoader)
|
|
@@ -110,6 +106,7 @@ export async function isFileExists(fileName) {
|
|
|
110
106
|
*/
|
|
111
107
|
export function removeDir(path) {
|
|
112
108
|
// (node:35607) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
|
|
109
|
+
// @ts-ignore
|
|
113
110
|
return fs.rm(path, { recursive: true });
|
|
114
111
|
}
|
|
115
112
|
/**
|
|
@@ -137,6 +134,7 @@ export async function renameFile(oldPath, newPath) {
|
|
|
137
134
|
await fs.rename(oldPath, newPath);
|
|
138
135
|
}
|
|
139
136
|
catch (err) {
|
|
140
|
-
|
|
137
|
+
// prettier-ignore
|
|
138
|
+
console.log('Can\'t rename file', err); // eslint-disable-line no-console
|
|
141
139
|
}
|
|
142
140
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statistic-utills.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/statistic-utills.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"statistic-utills.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/statistic-utills.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAarE;AA6BD,wBAAsB,kBAAkB,CAAC,MAAM,KAAA,0BAkB9C"}
|
|
@@ -14,13 +14,11 @@ export function timeConverter(time) {
|
|
|
14
14
|
const milliseconds = time - timeInSeconds * milliSecondsInSecond;
|
|
15
15
|
return timeConverterFromSecondsAndMilliseconds(timeInSeconds, milliseconds);
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return timeConverterFromSecondsAndMilliseconds(timeInSeconds, milliseconds);
|
|
23
|
-
}
|
|
17
|
+
// time - high-resolution real time in a [seconds, nanoseconds] tuple Array
|
|
18
|
+
const nanoSecondsInMillisecond = 1e6;
|
|
19
|
+
const timeInSeconds = time[0];
|
|
20
|
+
const milliseconds = time[1] / nanoSecondsInMillisecond;
|
|
21
|
+
return timeConverterFromSecondsAndMilliseconds(timeInSeconds, milliseconds);
|
|
24
22
|
}
|
|
25
23
|
function timeConverterFromSecondsAndMilliseconds(timeInSeconds, milliseconds) {
|
|
26
24
|
const hours = Math.floor(timeInSeconds / 3600);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-queue.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/write-queue.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E,MAAM,GAAG,MAAM,CAAA;KAAC,CAAM;IACtC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;gBAG9B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,GAAE,MAAa,EAChC,gBAAgB,GAAE,MAAY;IAQ1B,OAAO,CAAC,GAAG,EAAE,CAAC,EAAE,gBAAgB,GAAE,OAAe;IAgBvD,cAAc;IAId,aAAa;IAMP,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ3B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;YAKjB,OAAO;IAsBrB,OAAO,CAAC,aAAa;CAWtB"}
|
|
@@ -3,10 +3,14 @@ import process from 'process';
|
|
|
3
3
|
/** Memory limit size is based on testing */
|
|
4
4
|
const MEMORY_LIMIT = 4 * 1024 * 1024 * 1024; // 4GB
|
|
5
5
|
export default class WriteQueue extends Queue {
|
|
6
|
+
intervalId; // eslint-disable-line no-undef
|
|
7
|
+
conversionDump;
|
|
8
|
+
writePromise = null;
|
|
9
|
+
fileMap = {};
|
|
10
|
+
listeningInterval;
|
|
11
|
+
writeConcurrency;
|
|
6
12
|
constructor(conversionDump, listeningInterval = 2000, writeConcurrency = 400) {
|
|
7
13
|
super();
|
|
8
|
-
this.writePromise = null;
|
|
9
|
-
this.fileMap = {};
|
|
10
14
|
this.conversionDump = conversionDump;
|
|
11
15
|
this.listeningInterval = listeningInterval;
|
|
12
16
|
this.writeConcurrency = writeConcurrency;
|
|
@@ -28,7 +32,7 @@ export default class WriteQueue extends Queue {
|
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
34
|
startListening() {
|
|
31
|
-
this.intervalId = setInterval(this.startWrite.bind(this), this.listeningInterval);
|
|
35
|
+
this.intervalId = setInterval(() => this.startWrite.bind(this), this.listeningInterval);
|
|
32
36
|
}
|
|
33
37
|
stopListening() {
|
|
34
38
|
if (this.intervalId) {
|
package/dist/pgm-loader.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LoaderOptions } from '@loaders.gl/loader-utils';
|
|
2
2
|
import { Geoid } from '@math.gl/geoid';
|
|
3
3
|
export { Geoid };
|
|
4
4
|
export type PGMLoaderOptions = LoaderOptions & {
|
|
@@ -9,5 +9,20 @@ export type PGMLoaderOptions = LoaderOptions & {
|
|
|
9
9
|
/**
|
|
10
10
|
* Loader for PGM - Netpbm grayscale image format
|
|
11
11
|
*/
|
|
12
|
-
export declare const PGMLoader:
|
|
12
|
+
export declare const PGMLoader: {
|
|
13
|
+
readonly dataType: Geoid;
|
|
14
|
+
readonly batchType: never;
|
|
15
|
+
readonly name: "PGM - Netpbm grayscale image format";
|
|
16
|
+
readonly id: "pgm";
|
|
17
|
+
readonly module: "tile-converter";
|
|
18
|
+
readonly version: any;
|
|
19
|
+
readonly mimeTypes: ["image/x-portable-graymap"];
|
|
20
|
+
readonly parse: (arrayBuffer: ArrayBuffer, options: PGMLoaderOptions | undefined) => Promise<Geoid>;
|
|
21
|
+
readonly extensions: ["pgm"];
|
|
22
|
+
readonly options: {
|
|
23
|
+
readonly pgm: {
|
|
24
|
+
readonly cubic: false;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
13
28
|
//# sourceMappingURL=pgm-loader.d.ts.map
|
package/dist/pgm-loader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pgm-loader.d.ts","sourceRoot":"","sources":["../src/pgm-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"pgm-loader.d.ts","sourceRoot":"","sources":["../src/pgm-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAC,KAAK,EAAW,MAAM,gBAAgB,CAAC;AAM/C,OAAO,EAAC,KAAK,EAAC,CAAC;AAEf,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,GAAG,CAAC,EAAE;QACJ,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;CAgB+C,CAAC"}
|
package/dist/pgm-loader.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { Geoid, parsePGM } from '@math.gl/geoid';
|
|
2
2
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
3
3
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
4
|
-
const VERSION = typeof "4.2.0-alpha.
|
|
4
|
+
const VERSION = typeof "4.2.0-alpha.6" !== 'undefined' ? "4.2.0-alpha.6" : 'latest';
|
|
5
5
|
export { Geoid };
|
|
6
6
|
/**
|
|
7
7
|
* Loader for PGM - Netpbm grayscale image format
|
|
8
8
|
*/
|
|
9
9
|
export const PGMLoader = {
|
|
10
|
+
dataType: null,
|
|
11
|
+
batchType: null,
|
|
10
12
|
name: 'PGM - Netpbm grayscale image format',
|
|
11
13
|
id: 'pgm',
|
|
12
14
|
module: 'tile-converter',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slpk-extractor.d.ts","sourceRoot":"","sources":["../../src/slpk-extractor/slpk-extractor.ts"],"names":[],"mappings":"AAuBA;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,aAAa;IAChC;;;;;OAKG;IACU,OAAO,CAAC,OAAO,EAAE;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAC,GAAG,OAAO,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"slpk-extractor.d.ts","sourceRoot":"","sources":["../../src/slpk-extractor/slpk-extractor.ts"],"names":[],"mappings":"AAuBA;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,aAAa;IAChC;;;;;OAKG;IACU,OAAO,CAAC,OAAO,EAAE;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IA+BtF;;;OAGG;IAEH,OAAO,CAAC,iBAAiB;YAYX,MAAM;YAWN,SAAS;CASxB"}
|
|
@@ -22,6 +22,7 @@ export default class SLPKExtractor {
|
|
|
22
22
|
*/
|
|
23
23
|
async extract(options) {
|
|
24
24
|
if (isBrowser) {
|
|
25
|
+
// eslint-disable-next-line no-console
|
|
25
26
|
console.log(BROWSER_ERROR_MESSAGE);
|
|
26
27
|
return BROWSER_ERROR_MESSAGE;
|
|
27
28
|
}
|
|
@@ -46,7 +47,7 @@ export default class SLPKExtractor {
|
|
|
46
47
|
return path.join(path.dirname(fileName), 'index.json.gz');
|
|
47
48
|
}
|
|
48
49
|
// finds path with name part and extention part
|
|
49
|
-
|
|
50
|
+
const parts = /^(.*\/[^\/\.]*)(\..+)$/.exec(fileName);
|
|
50
51
|
if (!parts) {
|
|
51
52
|
return null;
|
|
52
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slpk-extractor-cli.d.ts","sourceRoot":"","sources":["../src/slpk-extractor-cli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slpk-extractor-cli.d.ts","sourceRoot":"","sources":["../src/slpk-extractor-cli.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAC;AAI/B,KAAK,qBAAqB,GAAG;IAC3B,wFAAwF;IACxF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;gCAC4B;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAGF,MAAM,MAAM,8BAA8B,GAAG,qBAAqB,GAAG;IACnE,gBAAgB;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB;gCAC4B;IAC5B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable no-console */
|
|
2
1
|
import '@loaders.gl/polyfills';
|
|
3
2
|
import SLPKExtractor from "./slpk-extractor/slpk-extractor.js";
|
|
4
3
|
import { getURLValue, validateOptionsWithEqual } from "./lib/utils/cli-utils.js";
|
|
@@ -17,26 +16,32 @@ async function main() {
|
|
|
17
16
|
await convert(validatedOptions);
|
|
18
17
|
}
|
|
19
18
|
main().catch((error) => {
|
|
20
|
-
console.log(error);
|
|
21
|
-
process.exit(1); // eslint-disable-line
|
|
19
|
+
console.log(error); // eslint-disable-line no-console
|
|
20
|
+
process.exit(1); // eslint-disable-line no-process-exit
|
|
22
21
|
});
|
|
23
22
|
/**
|
|
24
23
|
* Output for `npx slpk-extractor --help`
|
|
25
24
|
*/
|
|
26
25
|
function printHelp() {
|
|
26
|
+
// eslint-disable-next-line no-console
|
|
27
27
|
console.log('cli: converter slpk to I3S...');
|
|
28
|
+
// eslint-disable-next-line no-console
|
|
28
29
|
console.log('--output [Output folder, default: "data" folder]');
|
|
30
|
+
// eslint-disable-next-line no-console
|
|
29
31
|
console.log('--tileset [SLPK file]');
|
|
30
|
-
process.exit(0); // eslint-disable-line
|
|
32
|
+
process.exit(0); // eslint-disable-line no-process-exit
|
|
31
33
|
}
|
|
32
34
|
/**
|
|
33
35
|
* Run extraction process
|
|
34
36
|
* @param options validated slpk-extractor options
|
|
35
37
|
*/
|
|
36
38
|
async function convert(options) {
|
|
37
|
-
|
|
38
|
-
console.log(
|
|
39
|
-
|
|
39
|
+
// eslint-disable-next-line no-console
|
|
40
|
+
console.log('------------------------------------------------');
|
|
41
|
+
// eslint-disable-next-line no-console
|
|
42
|
+
console.log('Starting conversion of SLPK');
|
|
43
|
+
// eslint-disable-next-line no-console
|
|
44
|
+
console.log('------------------------------------------------');
|
|
40
45
|
const slpkExtractor = new SLPKExtractor();
|
|
41
46
|
slpkExtractor.extract({
|
|
42
47
|
inputUrl: options.tileset,
|
|
@@ -51,7 +56,9 @@ async function convert(options) {
|
|
|
51
56
|
*/
|
|
52
57
|
function validateOptions(options) {
|
|
53
58
|
const mandatoryOptionsWithExceptions = {
|
|
59
|
+
// eslint-disable-next-line no-console
|
|
54
60
|
output: () => console.log('Missed: --output [Output path name]'),
|
|
61
|
+
// eslint-disable-next-line no-console
|
|
55
62
|
tileset: () => console.log('Missed: --tileset [SLPK file]')
|
|
56
63
|
};
|
|
57
64
|
const exceptions = [];
|
|
@@ -63,7 +70,7 @@ function validateOptions(options) {
|
|
|
63
70
|
}
|
|
64
71
|
if (exceptions.length) {
|
|
65
72
|
exceptions.forEach((exeption) => exeption());
|
|
66
|
-
process.exit(1);
|
|
73
|
+
process.exit(1); // eslint-disable-line no-process-exit
|
|
67
74
|
}
|
|
68
75
|
return options;
|
|
69
76
|
}
|
|
@@ -88,6 +95,7 @@ function parseOptions(args) {
|
|
|
88
95
|
printHelp();
|
|
89
96
|
break;
|
|
90
97
|
default:
|
|
98
|
+
// eslint-disable-next-line no-console
|
|
91
99
|
console.warn(`Unknown option ${arg}`);
|
|
92
100
|
process.exit(0); // eslint-disable-line
|
|
93
101
|
}
|