@loaders.gl/tile-converter 4.1.0-alpha.9 → 4.1.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.
Files changed (60) hide show
  1. package/dist/3d-tiles-converter/3d-tiles-converter.d.ts.map +1 -1
  2. package/dist/3d-tiles-converter/3d-tiles-converter.js +4 -4
  3. package/dist/3d-tiles-converter/3d-tiles-converter.js.map +1 -1
  4. package/dist/3d-tiles-converter/helpers/b3dm-converter.d.ts.map +1 -1
  5. package/dist/3d-tiles-converter/helpers/b3dm-converter.js +8 -0
  6. package/dist/3d-tiles-converter/helpers/b3dm-converter.js.map +1 -1
  7. package/dist/3d-tiles-converter/json-templates/tileset.d.ts.map +1 -1
  8. package/dist/3d-tiles-converter/json-templates/tileset.js +3 -0
  9. package/dist/3d-tiles-converter/json-templates/tileset.js.map +1 -1
  10. package/dist/constants.d.ts +1 -0
  11. package/dist/constants.d.ts.map +1 -1
  12. package/dist/constants.js +1 -0
  13. package/dist/constants.js.map +1 -1
  14. package/dist/converter-cli.js +3 -3
  15. package/dist/converter-cli.js.map +1 -1
  16. package/dist/converter.min.cjs +131 -220
  17. package/dist/deps-installer/deps-installer.js +1 -1
  18. package/dist/deps-installer/deps-installer.js.map +1 -1
  19. package/dist/i3s-converter/helpers/progress.js +1 -1
  20. package/dist/i3s-converter/helpers/progress.js.map +1 -1
  21. package/dist/i3s-converter/i3s-converter.d.ts +14 -0
  22. package/dist/i3s-converter/i3s-converter.d.ts.map +1 -1
  23. package/dist/i3s-converter/i3s-converter.js +76 -25
  24. package/dist/i3s-converter/i3s-converter.js.map +1 -1
  25. package/dist/i3s-converter/types.d.ts +7 -0
  26. package/dist/i3s-converter/types.d.ts.map +1 -1
  27. package/dist/i3s-converter/types.js +8 -0
  28. package/dist/i3s-converter/types.js.map +1 -1
  29. package/dist/i3s-server/bin/i3s-server.min.cjs +76 -76
  30. package/dist/index.cjs +376 -104
  31. package/dist/lib/utils/compress-util.d.ts +0 -37
  32. package/dist/lib/utils/compress-util.d.ts.map +1 -1
  33. package/dist/lib/utils/compress-util.js +1 -149
  34. package/dist/lib/utils/compress-util.js.map +1 -1
  35. package/dist/lib/utils/conversion-dump.d.ts +81 -0
  36. package/dist/lib/utils/conversion-dump.d.ts.map +1 -0
  37. package/dist/lib/utils/conversion-dump.js +131 -0
  38. package/dist/lib/utils/conversion-dump.js.map +1 -0
  39. package/dist/lib/utils/statistic-utills.js +1 -1
  40. package/dist/lib/utils/statistic-utills.js.map +1 -1
  41. package/dist/lib/utils/write-queue.d.ts +6 -1
  42. package/dist/lib/utils/write-queue.d.ts.map +1 -1
  43. package/dist/lib/utils/write-queue.js +15 -3
  44. package/dist/lib/utils/write-queue.js.map +1 -1
  45. package/dist/pgm-loader.js +1 -1
  46. package/dist/pgm-loader.js.map +1 -1
  47. package/dist/slpk-extractor.min.cjs +31 -31
  48. package/package.json +16 -16
  49. package/src/3d-tiles-converter/3d-tiles-converter.ts +5 -4
  50. package/src/3d-tiles-converter/helpers/b3dm-converter.ts +19 -0
  51. package/src/3d-tiles-converter/json-templates/tileset.ts +3 -0
  52. package/src/constants.ts +1 -0
  53. package/src/converter-cli.ts +3 -3
  54. package/src/i3s-converter/helpers/progress.ts +1 -1
  55. package/src/i3s-converter/i3s-converter.ts +192 -57
  56. package/src/i3s-converter/types.ts +8 -0
  57. package/src/lib/utils/compress-util.ts +1 -264
  58. package/src/lib/utils/conversion-dump.ts +203 -0
  59. package/src/lib/utils/statistic-utills.ts +1 -1
  60. package/src/lib/utils/write-queue.ts +15 -2
@@ -1 +1 @@
1
- {"version":3,"file":"write-queue.js","names":["Queue","process","MEMORY_LIMIT","WriteQueue","constructor","listeningInterval","arguments","length","undefined","writeConcurrency","intervalId","writePromise","fileMap","enqueue","val","writeImmediately","archiveKey","result","memoryUsage","rss","startWrite","startListening","setInterval","bind","stopListening","clearInterval","doWrite","finalize","promises","archiveKeys","i","item","dequeue","push","promise","writeResults","Promise","allSettled","updateFileMap","value"],"sources":["../../../src/lib/utils/write-queue.ts"],"sourcesContent":["import {Queue} from './queue';\nimport process from 'process';\n\n/** Memory limit size is based on testing */\nconst MEMORY_LIMIT = 4 * 1024 * 1024 * 1024; // 4GB\n\nexport type WriteQueueItem = {\n archiveKey?: string;\n /**\n * writePromise() returns a Promise that will be awaited in Promise.allSettled(promises);\n * Arguments for this call are specified in writeQueue.enqueue call like this:\n * await writeQueue.enqueue({\n * archiveKey: `nodePages/xxx.json.gz`,\n * writePromise: () => writeFileForSlpk(slpkPath, data, `xxx.json`)\n * });\n * Note, a function like writeFileForSlpk should NOT be called when initializing the object for enqueue().\n * If he function is called, the promise will be created\n * and the function will allocate resources (file descriptors) for file writing.\n * It will be done for ALL items in the queue, which is not supposed to happen.\n * That's why the function should be passed as\n * writePromise: () => writeFileForSlpk(slpkPath, content, `xxx.json`)\n * instead of\n * writePromise: writeFileForSlpk(slpkPath, content, `xxx.json`) // INCORRECT !\n */\n writePromise: () => Promise<string | null>;\n};\n\nexport default class WriteQueue<T extends WriteQueueItem> extends Queue<T> {\n private intervalId?: NodeJS.Timeout;\n public writePromise: Promise<void> | null = null;\n public fileMap: {[key: string]: string} = {};\n public listeningInterval: number;\n public writeConcurrency: number;\n\n constructor(listeningInterval: number = 2000, writeConcurrency: number = 400) {\n super();\n this.listeningInterval = listeningInterval;\n this.writeConcurrency = writeConcurrency;\n }\n\n async enqueue(val: T, writeImmediately: boolean = false) {\n if (writeImmediately) {\n const {archiveKey, writePromise} = val as WriteQueueItem;\n const result = await writePromise();\n if (archiveKey && result) {\n this.fileMap[archiveKey] = result;\n }\n } else {\n super.enqueue(val);\n /** https://nodejs.org/docs/latest-v14.x/api/process.html#process_process_memoryusage */\n if (process.memoryUsage().rss > MEMORY_LIMIT) {\n await this.startWrite();\n }\n }\n }\n\n startListening() {\n this.intervalId = setInterval(this.startWrite.bind(this), this.listeningInterval);\n }\n\n stopListening() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n }\n\n async startWrite(): Promise<void> {\n if (!this.writePromise) {\n this.writePromise = this.doWrite();\n }\n await this.writePromise;\n this.writePromise = null;\n }\n\n async finalize(): Promise<void> {\n this.stopListening();\n await this.startWrite();\n }\n\n private async doWrite(): Promise<void> {\n while (this.length) {\n const promises: Promise<string | null>[] = [];\n const archiveKeys: (string | undefined)[] = [];\n for (let i = 0; i < this.writeConcurrency; i++) {\n const item = this.dequeue();\n if (!item) {\n break;\n }\n const {archiveKey, writePromise} = item as WriteQueueItem;\n archiveKeys.push(archiveKey);\n const promise = writePromise();\n promises.push(promise);\n }\n const writeResults = await Promise.allSettled(promises);\n this.updateFileMap(archiveKeys, writeResults);\n }\n }\n\n private updateFileMap(\n archiveKeys: (string | undefined)[],\n writeResults: PromiseSettledResult<string | null>[]\n ) {\n for (let i = 0; i < archiveKeys.length; i++) {\n const archiveKey = archiveKeys[i];\n if (archiveKey && 'value' in writeResults[i]) {\n this.fileMap[archiveKey] = (writeResults[i] as PromiseFulfilledResult<string>).value;\n }\n }\n }\n}\n"],"mappings":"SAAQA,KAAK;AACb,OAAOC,OAAO,MAAM,SAAS;AAG7B,MAAMC,YAAY,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI;AAuB3C,eAAe,MAAMC,UAAU,SAAmCH,KAAK,CAAI;EAOzEI,WAAWA,CAAA,EAAmE;IAAA,IAAlEC,iBAAyB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;IAAA,IAAEG,gBAAwB,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,GAAG;IAC1E,KAAK,CAAC,CAAC;IAAC,KAPFI,UAAU;IAAA,KACXC,YAAY,GAAyB,IAAI;IAAA,KACzCC,OAAO,GAA4B,CAAC,CAAC;IAAA,KACrCP,iBAAiB;IAAA,KACjBI,gBAAgB;IAIrB,IAAI,CAACJ,iBAAiB,GAAGA,iB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EACzB;EAEA,MAAcM,OAAOA,CAAA,EAAkB;IACrC,OAAO,IAAI,CAACnB,MAAM,EAAE;MAClB,MAAMqB,QAAkC,GAAG,EAAE;MAC7C,MAAMC,WAAmC,GAAG,EAAE;MAC9C,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,IAAI,CAACrB,gBAAgB,EAAEqB,CAAC,EAAE,EAAE;QAC9C,MAAMC,IAAI,GAAG,IAAI,CAACC,OAAO,CAAC,CAAC;QAC3B,IAAI,CAACD,IAAI,EAAE;UACT;QACF;QACA,MAAM;UAACf,UAAU;UAAEL;QAAY,CAAC,GAAGoB,IAAsB;QACzDF,WAAW,CAACI,IAAI,CAACjB,UAAU,CAAC;QAC5B,MAAMkB,OAAO,GAAGvB,YAAY,CAAC,CAAC;QAC9BiB,QAAQ,CAACK,IAAI,CAACC,OAAO,CAAC;MACxB;MACA,MAAMC,YAAY,GAAG,MAAMC,OAAO,CAACC,UAAU,CAACT,QAAQ,CAAC;MACvD,IAAI,CAACU,aAAa,CAACT,WAAW,EAAEM,YAAY,CAAC;IAC/C;EACF;EAEQG,aAAaA,CACnBT,WAAmC,EACnCM,YAAmD,EACnD;IACA,KAAK,IAAIL,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,WAAW,CAACtB,MAAM,EAAEuB,CAAC,EAAE,EAAE;MAC3C,MAAMd,UAAU,GAAGa,WAAW,CAACC,CAAC,CAAC;MACjC,IAAId,UAAU,IAAI,OAAO,IAAImB,YAAY,CAACL,CAAC,CAAC,EAAE;QAC5C,IAAI,CAAClB,OAAO,CAACI,UAAU,CAAC,GAAImB,YAAY,CAACL,CAAC,CAAC,CAAoCS,KAAK;MACtF;IACF;EACF;AACF"}
1
+ {"version":3,"file":"write-queue.js","names":["Queue","process","MEMORY_LIMIT","WriteQueue","constructor","conversionDump","listeningInterval","arguments","length","undefined","writeConcurrency","intervalId","writePromise","fileMap","enqueue","val","writeImmediately","archiveKey","result","memoryUsage","rss","startWrite","startListening","setInterval","bind","stopListening","clearInterval","doWrite","finalize","promises","archiveKeys","changedRecords","i","item","dequeue","sourceId","outputId","resourceType","push","promise","writeResults","Promise","allSettled","updateFileMap","updateConvertedTilesDump","value"],"sources":["../../../src/lib/utils/write-queue.ts"],"sourcesContent":["import {Queue} from './queue';\nimport process from 'process';\nimport {ConversionDump} from './conversion-dump';\n\n/** Memory limit size is based on testing */\nconst MEMORY_LIMIT = 4 * 1024 * 1024 * 1024; // 4GB\n\nexport type WriteQueueItem = {\n archiveKey?: string;\n sourceId?: string;\n outputId?: number;\n resourceType?: string;\n /**\n * writePromise() returns a Promise that will be awaited in Promise.allSettled(promises);\n * Arguments for this call are specified in writeQueue.enqueue call like this:\n * await writeQueue.enqueue({\n * archiveKey: `nodePages/xxx.json.gz`,\n * writePromise: () => writeFileForSlpk(slpkPath, data, `xxx.json`)\n * });\n * Note, a function like writeFileForSlpk should NOT be called when initializing the object for enqueue().\n * If he function is called, the promise will be created\n * and the function will allocate resources (file descriptors) for file writing.\n * It will be done for ALL items in the queue, which is not supposed to happen.\n * That's why the function should be passed as\n * writePromise: () => writeFileForSlpk(slpkPath, content, `xxx.json`)\n * instead of\n * writePromise: writeFileForSlpk(slpkPath, content, `xxx.json`) // INCORRECT !\n */\n writePromise: () => Promise<string | null>;\n};\n\nexport default class WriteQueue<T extends WriteQueueItem> extends Queue<T> {\n private intervalId?: NodeJS.Timeout;\n private conversionDump: ConversionDump;\n public writePromise: Promise<void> | null = null;\n public fileMap: {[key: string]: string} = {};\n public listeningInterval: number;\n public writeConcurrency: number;\n\n constructor(\n conversionDump: ConversionDump,\n listeningInterval: number = 2000,\n writeConcurrency: number = 400\n ) {\n super();\n this.conversionDump = conversionDump;\n this.listeningInterval = listeningInterval;\n this.writeConcurrency = writeConcurrency;\n }\n\n async enqueue(val: T, writeImmediately: boolean = false) {\n if (writeImmediately) {\n const {archiveKey, writePromise} = val as WriteQueueItem;\n const result = await writePromise();\n if (archiveKey && result) {\n this.fileMap[archiveKey] = result;\n }\n } else {\n super.enqueue(val);\n /** https://nodejs.org/docs/latest-v14.x/api/process.html#process_process_memoryusage */\n if (process.memoryUsage().rss > MEMORY_LIMIT) {\n await this.startWrite();\n }\n }\n }\n\n startListening() {\n this.intervalId = setInterval(this.startWrite.bind(this), this.listeningInterval);\n }\n\n stopListening() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n }\n\n async startWrite(): Promise<void> {\n if (!this.writePromise) {\n this.writePromise = this.doWrite();\n }\n await this.writePromise;\n this.writePromise = null;\n }\n\n async finalize(): Promise<void> {\n this.stopListening();\n await this.startWrite();\n }\n\n private async doWrite(): Promise<void> {\n while (this.length) {\n const promises: Promise<string | null>[] = [];\n const archiveKeys: (string | undefined)[] = [];\n const changedRecords: {outputId?: number; sourceId?: string; resourceType?: string}[] = [];\n for (let i = 0; i < this.writeConcurrency; i++) {\n const item = this.dequeue();\n if (!item) {\n break;\n }\n const {archiveKey, sourceId, outputId, resourceType, writePromise} = item as WriteQueueItem;\n archiveKeys.push(archiveKey);\n changedRecords.push({sourceId, outputId, resourceType});\n const promise = writePromise();\n promises.push(promise);\n }\n const writeResults = await Promise.allSettled(promises);\n this.updateFileMap(archiveKeys, writeResults);\n await this.conversionDump.updateConvertedTilesDump(changedRecords, writeResults);\n }\n }\n\n private updateFileMap(\n archiveKeys: (string | undefined)[],\n writeResults: PromiseSettledResult<string | null>[]\n ) {\n for (let i = 0; i < archiveKeys.length; i++) {\n const archiveKey = archiveKeys[i];\n if (archiveKey && 'value' in writeResults[i]) {\n this.fileMap[archiveKey] = (writeResults[i] as PromiseFulfilledResult<string>).value;\n }\n }\n }\n}\n"],"mappings":"SAAQA,KAAK;AACb,OAAOC,OAAO,MAAM,SAAS;AAI7B,MAAMC,YAAY,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI;AA0B3C,eAAe,MAAMC,UAAU,SAAmCH,KAAK,CAAI;EAQzEI,WAAWA,CACTC,cAA8B,EAG9B;I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MACvD,IAAI,CAACc,aAAa,CAACb,WAAW,EAAEU,YAAY,CAAC;MAC7C,MAAM,IAAI,CAACnC,cAAc,CAACuC,wBAAwB,CAACb,cAAc,EAAES,YAAY,CAAC;IAClF;EACF;EAEQG,aAAaA,CACnBb,WAAmC,EACnCU,YAAmD,EACnD;IACA,KAAK,IAAIR,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,WAAW,CAACtB,MAAM,EAAEwB,CAAC,EAAE,EAAE;MAC3C,MAAMf,UAAU,GAAGa,WAAW,CAACE,CAAC,CAAC;MACjC,IAAIf,UAAU,IAAI,OAAO,IAAIuB,YAAY,CAACR,CAAC,CAAC,EAAE;QAC5C,IAAI,CAACnB,OAAO,CAACI,UAAU,CAAC,GAAIuB,YAAY,CAACR,CAAC,CAAC,CAAoCa,KAAK;MACtF;IACF;EACF;AACF"}
@@ -1,5 +1,5 @@
1
1
  import { Geoid, parsePGM } from '@math.gl/geoid';
2
- const VERSION = typeof "4.1.0-alpha.9" !== 'undefined' ? "4.1.0-alpha.9" : 'latest';
2
+ const VERSION = typeof "4.1.1" !== 'undefined' ? "4.1.1" : 'latest';
3
3
  export { Geoid };
4
4
  export const PGMLoader = {
5
5
  name: 'PGM - Netpbm grayscale image format',
@@ -1 +1 @@
1
- {"version":3,"file":"pgm-loader.js","names":["Geoid","parsePGM","VERSION","PGMLoader","name","id","module","version","mimeTypes","parse","arrayBuffer","options","Uint8Array","pgm","extensions","cubic"],"sources":["../src/pgm-loader.ts"],"sourcesContent":["import type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport {Geoid, parsePGM} from '@math.gl/geoid';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport {Geoid};\n\nexport type PGMLoaderOptions = LoaderOptions & {\n pgm?: {\n cubic?: boolean;\n };\n};\n\n/**\n * Loader for PGM - Netpbm grayscale image format\n */\nexport const PGMLoader: LoaderWithParser<Geoid, never, PGMLoaderOptions> = {\n name: 'PGM - Netpbm grayscale image format',\n id: 'pgm',\n module: 'tile-converter',\n version: VERSION,\n mimeTypes: ['image/x-portable-graymap'],\n parse: async (arrayBuffer, options) => parsePGM(new Uint8Array(arrayBuffer), options?.pgm || {}),\n extensions: ['pgm'],\n options: {\n pgm: {\n cubic: false\n }\n }\n};\n"],"mappings":"AACA,SAAQA,KAAK,EAAEC,QAAQ,QAAO,gBAAgB;AAI9C,MAAMC,OAAO,GAAG,sBAAkB,KAAK,WAAW,qBAAiB,QAAQ;AAE3E,SAAQF,KAAK;AAWb,OAAO,MAAMG,SAA2D,GAAG;EACzEC,IAAI,EAAE,qCAAqC;EAC3CC,EAAE,EAAE,KAAK;EACTC,MAAM,EAAE,gBAAgB;EACxBC,OAAO,EAAEL,OAAO;EAChBM,SAAS,EAAE,CAAC,0BAA0B,CAAC;EACvCC,KAAK,EAAE,MAAAA,CAAOC,WAAW,EAAEC,OAAO,KAAKV,QAAQ,CAAC,IAAIW,UAAU,CAACF,WAAW,CAAC,EAAE,CAAAC,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,GAAG,KAAI,CAAC,CAAC,CAAC;EAChGC,UAAU,EAAE,CAAC,KAAK,CAAC;EACnBH,OAAO,EAAE;IACPE,GAAG,EAAE;MACHE,KAAK,EAAE;IACT;EACF;AACF,CAAC"}
1
+ {"version":3,"file":"pgm-loader.js","names":["Geoid","parsePGM","VERSION","PGMLoader","name","id","module","version","mimeTypes","parse","arrayBuffer","options","Uint8Array","pgm","extensions","cubic"],"sources":["../src/pgm-loader.ts"],"sourcesContent":["import type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport {Geoid, parsePGM} from '@math.gl/geoid';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport {Geoid};\n\nexport type PGMLoaderOptions = LoaderOptions & {\n pgm?: {\n cubic?: boolean;\n };\n};\n\n/**\n * Loader for PGM - Netpbm grayscale image format\n */\nexport const PGMLoader: LoaderWithParser<Geoid, never, PGMLoaderOptions> = {\n name: 'PGM - Netpbm grayscale image format',\n id: 'pgm',\n module: 'tile-converter',\n version: VERSION,\n mimeTypes: ['image/x-portable-graymap'],\n parse: async (arrayBuffer, options) => parsePGM(new Uint8Array(arrayBuffer), options?.pgm || {}),\n extensions: ['pgm'],\n options: {\n pgm: {\n cubic: false\n }\n }\n};\n"],"mappings":"AACA,SAAQA,KAAK,EAAEC,QAAQ,QAAO,gBAAgB;AAI9C,MAAMC,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ;AAE3E,SAAQF,KAAK;AAWb,OAAO,MAAMG,SAA2D,GAAG;EACzEC,IAAI,EAAE,qCAAqC;EAC3CC,EAAE,EAAE,KAAK;EACTC,MAAM,EAAE,gBAAgB;EACxBC,OAAO,EAAEL,OAAO;EAChBM,SAAS,EAAE,CAAC,0BAA0B,CAAC;EACvCC,KAAK,EAAE,MAAAA,CAAOC,WAAW,EAAEC,OAAO,KAAKV,QAAQ,CAAC,IAAIW,UAAU,CAACF,WAAW,CAAC,EAAE,CAAAC,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,GAAG,KAAI,CAAC,CAAC,CAAC;EAChGC,UAAU,EAAE,CAAC,KAAK,CAAC;EACnBH,OAAO,EAAE;IACPE,GAAG,EAAE;MACHE,KAAK,EAAE;IACT;EACF;AACF,CAAC"}