@loaders.gl/raster 5.0.0-beta.1 → 5.0.0-beta.4
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/README.md +6 -2
- package/THIRD-PARTY-NOTICES.md +1 -1
- package/dist/geotiff/advanced.cjs +16 -11
- package/dist/geotiff/advanced.cjs.map +2 -2
- package/dist/geotiff/geotiff-loader-types.d.ts +1 -1
- package/dist/geotiff/geotiff-loader-types.js +2 -2
- package/dist/geotiff/geotiff-loader-types.js.map +1 -1
- package/dist/geotiff/geotiff-raster-loader-types.d.ts.map +1 -1
- package/dist/geotiff/geotiff-raster-loader-types.js +2 -2
- package/dist/geotiff/geotiff-raster-loader-types.js.map +1 -1
- package/dist/geotiff/geotiff-source-loader-types.js +1 -1
- package/dist/geotiff/geotiff-source-loader-types.js.map +1 -1
- package/dist/geotiff/geotiff-source-loader.js +1 -1
- package/dist/geotiff/lib/ome/load-ome-tiff.d.ts +1 -0
- package/dist/geotiff/lib/ome/load-ome-tiff.d.ts.map +1 -1
- package/dist/geotiff/lib/ome/load-ome-tiff.js +7 -1
- package/dist/geotiff/lib/ome/load-ome-tiff.js.map +1 -1
- package/dist/geotiff/lib/ome/omexml.d.ts.map +1 -1
- package/dist/geotiff/lib/ome/omexml.js +5 -4
- package/dist/geotiff/lib/ome/omexml.js.map +1 -1
- package/dist/geotiff/lib/tiff/tiff-gdal-metadata.d.ts.map +1 -1
- package/dist/geotiff/lib/tiff/tiff-gdal-metadata.js +6 -5
- package/dist/geotiff/lib/tiff/tiff-gdal-metadata.js.map +1 -1
- package/dist/geotiff/loaders.js +1 -1
- package/dist/geotiff/ometiff-source-loader-types.js +1 -1
- package/dist/geotiff/ometiff-source-loader-types.js.map +1 -1
- package/dist/geotiff/ometiff-source-loader.js +1 -1
- package/dist/geotiff-loader-types.d.ts +2 -0
- package/dist/geotiff-loader-types.d.ts.map +1 -0
- package/dist/geotiff-loader-types.js +2 -0
- package/dist/geotiff-loader-types.js.map +1 -0
- package/dist/geotiff-loader.d.ts +2 -0
- package/dist/geotiff-loader.d.ts.map +1 -0
- package/dist/geotiff-loader.js +2 -0
- package/dist/geotiff-loader.js.map +1 -0
- package/dist/geotiff-raster-loader-types.d.ts +2 -0
- package/dist/geotiff-raster-loader-types.d.ts.map +1 -0
- package/dist/geotiff-raster-loader-types.js +2 -0
- package/dist/geotiff-raster-loader-types.js.map +1 -0
- package/dist/geotiff-raster-loader.d.ts +2 -0
- package/dist/geotiff-raster-loader.d.ts.map +1 -0
- package/dist/geotiff-raster-loader.js +2 -0
- package/dist/geotiff-raster-loader.js.map +1 -0
- package/dist/geotiff-source-loader-types.d.ts +2 -0
- package/dist/geotiff-source-loader-types.d.ts.map +1 -0
- package/dist/geotiff-source-loader-types.js +2 -0
- package/dist/geotiff-source-loader-types.js.map +1 -0
- package/dist/geotiff-source-loader.d.ts +2 -0
- package/dist/geotiff-source-loader.d.ts.map +1 -0
- package/dist/geotiff-source-loader.js +2 -0
- package/dist/geotiff-source-loader.js.map +1 -0
- package/dist/index.cjs +11 -11
- package/dist/index.cjs.map +2 -2
- package/dist/lerc/lerc-loader-types.d.ts +1 -1
- package/dist/lerc/lerc-loader-types.js +2 -2
- package/dist/lerc/lerc-loader-types.js.map +1 -1
- package/dist/lerc-loader-types.d.ts +2 -0
- package/dist/lerc-loader-types.d.ts.map +1 -0
- package/dist/lerc-loader-types.js +2 -0
- package/dist/lerc-loader-types.js.map +1 -0
- package/dist/lerc-loader.d.ts +2 -0
- package/dist/lerc-loader.d.ts.map +1 -0
- package/dist/lerc-loader.js +2 -0
- package/dist/lerc-loader.js.map +1 -0
- package/dist/ometiff-source-loader-types.d.ts +2 -0
- package/dist/ometiff-source-loader-types.d.ts.map +1 -0
- package/dist/ometiff-source-loader-types.js +2 -0
- package/dist/ometiff-source-loader-types.js.map +1 -0
- package/dist/ometiff-source-loader.d.ts +2 -0
- package/dist/ometiff-source-loader.d.ts.map +1 -0
- package/dist/ometiff-source-loader.js +2 -0
- package/dist/ometiff-source-loader.js.map +1 -0
- package/dist/quantized-mesh-loader-types.d.ts +2 -0
- package/dist/quantized-mesh-loader-types.d.ts.map +1 -0
- package/dist/quantized-mesh-loader-types.js +2 -0
- package/dist/quantized-mesh-loader-types.js.map +1 -0
- package/dist/quantized-mesh-loader.d.ts +2 -0
- package/dist/quantized-mesh-loader.d.ts.map +1 -0
- package/dist/quantized-mesh-loader.js +2 -0
- package/dist/quantized-mesh-loader.js.map +1 -0
- package/dist/quantized-mesh-worker.js +600 -123
- package/dist/quantized-mesh-writer.d.ts +2 -0
- package/dist/quantized-mesh-writer.d.ts.map +1 -0
- package/dist/quantized-mesh-writer.js +2 -0
- package/dist/quantized-mesh-writer.js.map +1 -0
- package/dist/terrain/index.cjs +24 -523
- package/dist/terrain/index.cjs.map +4 -4
- package/dist/terrain/lib/parse-terrain.d.ts +2 -0
- package/dist/terrain/lib/parse-terrain.d.ts.map +1 -1
- package/dist/terrain/lib/parse-terrain.js +23 -38
- package/dist/terrain/lib/parse-terrain.js.map +1 -1
- package/dist/terrain/lib/utils/version.js +1 -1
- package/dist/terrain/quantized-mesh-loader-types.d.ts.map +1 -1
- package/dist/terrain/quantized-mesh-loader-types.js +1 -2
- package/dist/terrain/quantized-mesh-loader-types.js.map +1 -1
- package/dist/terrain/terrain-loader-types.d.ts +2 -2
- package/dist/terrain/terrain-loader-types.d.ts.map +1 -1
- package/dist/terrain/terrain-loader-types.js +1 -1
- package/dist/terrain/terrain-loader-types.js.map +1 -1
- package/dist/terrain/terrain-loader.js +3 -3
- package/dist/terrain/terrain-loader.js.map +1 -1
- package/dist/terrain-loader-types.d.ts +2 -0
- package/dist/terrain-loader-types.d.ts.map +1 -0
- package/dist/terrain-loader-types.js +2 -0
- package/dist/terrain-loader-types.js.map +1 -0
- package/dist/terrain-loader.d.ts +2 -0
- package/dist/terrain-loader.d.ts.map +1 -0
- package/dist/terrain-loader.js +2 -0
- package/dist/terrain-loader.js.map +1 -0
- package/dist/terrain-worker.js +4641 -3581
- package/package.json +80 -54
- package/src/geotiff/geotiff-loader-types.ts +1 -1
- package/src/geotiff/geotiff-raster-loader-types.ts +1 -3
- package/src/geotiff/geotiff-source-loader-types.ts +1 -1
- package/src/geotiff/lib/ome/load-ome-tiff.ts +7 -1
- package/src/geotiff/lib/ome/omexml.ts +5 -4
- package/src/geotiff/lib/tiff/tiff-gdal-metadata.ts +6 -5
- package/src/geotiff/ometiff-source-loader-types.ts +1 -1
- package/src/geotiff-loader-types.ts +1 -0
- package/src/geotiff-loader.ts +1 -0
- package/src/geotiff-raster-loader-types.ts +1 -0
- package/src/geotiff-raster-loader.ts +1 -0
- package/src/geotiff-source-loader-types.ts +1 -0
- package/src/geotiff-source-loader.ts +1 -0
- package/src/lerc/lerc-loader-types.ts +1 -1
- package/src/lerc-loader-types.ts +1 -0
- package/src/lerc-loader.ts +1 -0
- package/src/ometiff-source-loader-types.ts +1 -0
- package/src/ometiff-source-loader.ts +1 -0
- package/src/quantized-mesh-loader-types.ts +1 -0
- package/src/quantized-mesh-loader.ts +1 -0
- package/src/quantized-mesh-writer.ts +1 -0
- package/src/terrain/lib/parse-terrain.ts +36 -40
- package/src/terrain/quantized-mesh-loader-types.ts +1 -2
- package/src/terrain/terrain-loader-types.ts +3 -4
- package/src/terrain/terrain-loader.ts +3 -3
- package/src/terrain-loader-types.ts +1 -0
- package/src/terrain-loader.ts +1 -0
- package/dist/terrain/libs/README.md +0 -10
- package/dist/terrain/libs/martini-LICENSE +0 -15
- package/dist/terrain/libs/martini.d.mts +0 -19
- package/dist/terrain/libs/martini.mjs +0 -164
- package/src/terrain/libs/README.md +0 -10
- package/src/terrain/libs/martini-LICENSE +0 -15
- package/src/terrain/libs/martini.d.mts +0 -19
- package/src/terrain/libs/martini.mjs +0 -164
|
@@ -16,7 +16,7 @@ export type GeoTIFFLoaderOptions = LoaderOptions & {
|
|
|
16
16
|
};
|
|
17
17
|
/** Preloads the parser-bearing GeoTIFF loader implementation. */
|
|
18
18
|
declare function preload(): Promise<{
|
|
19
|
-
readonly parse: (data: ArrayBuffer, options?: import("@loaders.gl/raster/geotiff
|
|
19
|
+
readonly parse: (data: ArrayBuffer, options?: import("@loaders.gl/raster/geotiff-loader").GeoTIFFLoaderOptions) => Promise<{
|
|
20
20
|
crs?: CRSIdentifier;
|
|
21
21
|
bounds: number[];
|
|
22
22
|
metadata: Record<string, unknown>;
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
import { GeoTIFFFormat } from "./geotiff-format.js";
|
|
5
5
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
6
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof "5.0.0-beta.
|
|
7
|
+
const VERSION = typeof "5.0.0-beta.4" !== 'undefined' ? "5.0.0-beta.4" : 'latest';
|
|
8
8
|
/** Preloads the parser-bearing GeoTIFF loader implementation. */
|
|
9
9
|
async function preload() {
|
|
10
|
-
const { GeoTIFFLoaderWithParser } = await import('@loaders.gl/raster/geotiff
|
|
10
|
+
const { GeoTIFFLoaderWithParser } = await import('@loaders.gl/raster/geotiff-loader');
|
|
11
11
|
return GeoTIFFLoaderWithParser;
|
|
12
12
|
}
|
|
13
13
|
/** Metadata-only GeoTIFF loader. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geotiff-loader-types.js","sourceRoot":"","sources":["../../src/geotiff/geotiff-loader-types.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAIpC,OAAO,EAAC,aAAa,EAAC,4BAAyB;AAE/C,yDAAyD;AACzD,qDAAqD;AACrD,MAAM,OAAO,GAAG,qBAAkB,KAAK,WAAW,CAAC,CAAC,gBAAa,CAAC,CAAC,QAAQ,CAAC;AAoB5E,iEAAiE;AACjE,KAAK,UAAU,OAAO;IACpB,MAAM,EAAC,uBAAuB,EAAC,GAAG,MAAM,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"geotiff-loader-types.js","sourceRoot":"","sources":["../../src/geotiff/geotiff-loader-types.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAIpC,OAAO,EAAC,aAAa,EAAC,4BAAyB;AAE/C,yDAAyD;AACzD,qDAAqD;AACrD,MAAM,OAAO,GAAG,qBAAkB,KAAK,WAAW,CAAC,CAAC,gBAAa,CAAC,CAAC,QAAQ,CAAC;AAoB5E,iEAAiE;AACjE,KAAK,UAAU,OAAO;IACpB,MAAM,EAAC,uBAAuB,EAAC,GAAG,MAAM,MAAM,CAAC,mCAAmC,CAAC,CAAC;IACpF,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAED,oCAAoC;AACpC,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,QAAQ,EAAE,IAA8B;IACxC,SAAS,EAAE,IAAa;IAExB,GAAG,aAAa;IAChB,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE;QACP,OAAO,EAAE;YACP,WAAW,EAAE,IAAI;SAClB;KACF;IACD,OAAO;CAC4D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geotiff-raster-loader-types.d.ts","sourceRoot":"","sources":["../../src/geotiff/geotiff-raster-loader-types.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,iBAAiB,EAAE,0BAA0B,EAAC,kCAA+B;AAM1F,uFAAuF;AACvF,iBAAe,OAAO;;;;;
|
|
1
|
+
{"version":3,"file":"geotiff-raster-loader-types.d.ts","sourceRoot":"","sources":["../../src/geotiff/geotiff-raster-loader-types.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,iBAAiB,EAAE,0BAA0B,EAAC,kCAA+B;AAM1F,uFAAuF;AACvF,iBAAe,OAAO;;;;;uBAWS,iBAAiB;wBAC3B,KAAK;;;;;;;;;GATzB;AAED,oFAAoF;AACpF,eAAO,MAAM,mBAAmB;;;;uBAKD,iBAAiB;wBAC3B,KAAK;;;;;;;;;;CAGuD,CAAC"}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
import { GeoTIFFFormat } from "./geotiff-format.js";
|
|
5
5
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
6
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof "5.0.0-beta.
|
|
7
|
+
const VERSION = typeof "5.0.0-beta.4" !== 'undefined' ? "5.0.0-beta.4" : 'latest';
|
|
8
8
|
/** Loads the optional numeric TIFF parser on first use by an asynchronous core API. */
|
|
9
9
|
async function preload() {
|
|
10
|
-
const { GeoTIFFRasterLoaderWithParser } = await import('@loaders.gl/raster/geotiff
|
|
10
|
+
const { GeoTIFFRasterLoaderWithParser } = await import('@loaders.gl/raster/geotiff-raster-loader');
|
|
11
11
|
return GeoTIFFRasterLoaderWithParser;
|
|
12
12
|
}
|
|
13
13
|
/** Metadata-only loader for original numeric TIFF bands and geospatial metadata. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geotiff-raster-loader-types.js","sourceRoot":"","sources":["../../src/geotiff/geotiff-raster-loader-types.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAC,aAAa,EAAC,4BAAyB;AAG/C,yDAAyD;AACzD,qDAAqD;AACrD,MAAM,OAAO,GAAG,qBAAkB,KAAK,WAAW,CAAC,CAAC,gBAAa,CAAC,CAAC,QAAQ,CAAC;AAE5E,uFAAuF;AACvF,KAAK,UAAU,OAAO;IACpB,MAAM,EAAC,6BAA6B,EAAC,GAAG,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"geotiff-raster-loader-types.js","sourceRoot":"","sources":["../../src/geotiff/geotiff-raster-loader-types.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAC,aAAa,EAAC,4BAAyB;AAG/C,yDAAyD;AACzD,qDAAqD;AACrD,MAAM,OAAO,GAAG,qBAAkB,KAAK,WAAW,CAAC,CAAC,gBAAa,CAAC,CAAC,QAAQ,CAAC;AAE5E,uFAAuF;AACvF,KAAK,UAAU,OAAO;IACpB,MAAM,EAAC,6BAA6B,EAAC,GAAG,MAAM,MAAM,CAAC,0CAA0C,CAAC,CAAC;IACjG,OAAO,6BAA6B,CAAC;AACvC,CAAC;AAED,oFAAoF;AACpF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,aAAa;IAChB,EAAE,EAAE,gBAAgB;IACpB,IAAI,EAAE,gBAAgB;IACtB,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,IAAoC;IAC9C,SAAS,EAAE,IAAa;IACxB,OAAO,EAAE,EAAC,OAAO,EAAE,EAAE,EAAC;IACtB,OAAO;CACwE,CAAC"}
|
|
@@ -34,7 +34,7 @@ export const GeoTIFFSourceLoader = {
|
|
|
34
34
|
return /\.(?:geotiff?|tiff?)(?:$|[?#])/i.test(url);
|
|
35
35
|
},
|
|
36
36
|
/** Loads the implementation for asynchronous source construction. */
|
|
37
|
-
preload: async () => (await import('@loaders.gl/raster/geotiff
|
|
37
|
+
preload: async () => (await import('@loaders.gl/raster/geotiff-source-loader')).GeoTIFFSourceLoader,
|
|
38
38
|
/** Synchronous construction requires the source implementation subpath. */
|
|
39
39
|
createDataSource(_data, _options) {
|
|
40
40
|
throw new Error('GeoTIFFSourceLoader requires async load() or its source implementation subpath');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geotiff-source-loader-types.js","sourceRoot":"","sources":["../../src/geotiff/geotiff-source-loader-types.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAIpC,OAAO,EAAC,aAAa,EAAC,4BAAyB;AAC/C,OAAO,EAAC,aAAa,EAAC,kCAA+B;AAErD,2CAA2C;AAC3C,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,QAAQ,EAAE,IAAsC;IAChD,SAAS,EAAE,IAAa;IACxB,GAAG,aAAa;IAChB,IAAI,EAAE,qBAAqB;IAC3B,OAAO,EAAE,aAAa,CAAC,OAAO;IAC9B,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;IAEd,OAAO,EAAE;QACP,OAAO,EAAE;YACP,OAAO,EAAE,SAAU;YACnB,WAAW,EAAE,KAAK;YAClB,cAAc,EAAE,SAAS;SAC1B;KACF;IAED,cAAc,EAAE;QACd,OAAO,EAAE;YACP,OAAO,EAAE,SAAU;YACnB,WAAW,EAAE,KAAK;YAClB,cAAc,EAAE,SAAS;SAC1B;KACF;IAED,OAAO,EAAE,CAAC,GAAW,EAAW,EAAE;QAChC,IAAI,yBAAyB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YACxC,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,iCAAiC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrD,CAAC;IACD,qEAAqE;IACrE,OAAO,EAAE,KAAK,IAAI,EAAE,CAClB,CAAC,MAAM,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"geotiff-source-loader-types.js","sourceRoot":"","sources":["../../src/geotiff/geotiff-source-loader-types.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAIpC,OAAO,EAAC,aAAa,EAAC,4BAAyB;AAC/C,OAAO,EAAC,aAAa,EAAC,kCAA+B;AAErD,2CAA2C;AAC3C,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,QAAQ,EAAE,IAAsC;IAChD,SAAS,EAAE,IAAa;IACxB,GAAG,aAAa;IAChB,IAAI,EAAE,qBAAqB;IAC3B,OAAO,EAAE,aAAa,CAAC,OAAO;IAC9B,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;IAEd,OAAO,EAAE;QACP,OAAO,EAAE;YACP,OAAO,EAAE,SAAU;YACnB,WAAW,EAAE,KAAK;YAClB,cAAc,EAAE,SAAS;SAC1B;KACF;IAED,cAAc,EAAE;QACd,OAAO,EAAE;YACP,OAAO,EAAE,SAAU;YACnB,WAAW,EAAE,KAAK;YAClB,cAAc,EAAE,SAAS;SAC1B;KACF;IAED,OAAO,EAAE,CAAC,GAAW,EAAW,EAAE;QAChC,IAAI,yBAAyB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YACxC,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,iCAAiC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrD,CAAC;IACD,qEAAqE;IACrE,OAAO,EAAE,KAAK,IAAI,EAAE,CAClB,CAAC,MAAM,MAAM,CAAC,0CAA0C,CAAC,CAAC,CAAC,mBAAmB;IAChF,2EAA2E;IAC3E,gBAAgB,CACd,KAAoB,EACpB,QAAoC;QAEpC,MAAM,IAAI,KAAK,CACb,gFAAgF,CACjF,CAAC;IACJ,CAAC;CACmD,CAAC"}
|
|
@@ -6,7 +6,7 @@ import { createTileGrid, createTileGridMatrix, DataSource, getRasterViewportBoun
|
|
|
6
6
|
import { GeoTIFFFormat } from "./geotiff-format.js";
|
|
7
7
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
8
8
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
9
|
-
const VERSION = typeof "5.0.0-beta.
|
|
9
|
+
const VERSION = typeof "5.0.0-beta.4" !== 'undefined' ? "5.0.0-beta.4" : 'latest';
|
|
10
10
|
/** Common raster-query capabilities of GeoTIFF and COG sources. */
|
|
11
11
|
export const GEOTIFF_RASTER_QUERY_CAPABILITIES = Object.freeze({
|
|
12
12
|
bounds: 'pushdown',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { GeoTIFF, GeoTIFFImage } from 'geotiff';
|
|
2
2
|
import { TiffPixelSource } from "../tiff-pixel-source.js";
|
|
3
3
|
export declare const isOmeTiff: (img: GeoTIFFImage) => any;
|
|
4
|
+
/** Builds OME pixel sources after removing the TIFF ASCII tag terminator. */
|
|
4
5
|
export declare function loadOmeTiff(tiff: GeoTIFF, firstImage: GeoTIFFImage): Promise<{
|
|
5
6
|
data: TiffPixelSource<["t", "c", "z"] | ["c", "t", "z"] | ["z", "t", "c"] | ["t", "z", "c"] | ["z", "c", "t"] | ["c", "z", "t"]>[];
|
|
6
7
|
metadata: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-ome-tiff.d.ts","sourceRoot":"","sources":["../../../../src/geotiff/lib/ome/load-ome-tiff.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,OAAO,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;AAEnD,OAAO,EAAC,eAAe,EAAC,gCAA6B;AAMrD,eAAO,MAAM,SAAS,GAAI,KAAK,YAAY,QAAwD,CAAC;AAEpG,wBAAsB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"load-ome-tiff.d.ts","sourceRoot":"","sources":["../../../../src/geotiff/lib/ome/load-ome-tiff.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,OAAO,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;AAEnD,OAAO,EAAC,eAAe,EAAC,gCAA6B;AAMrD,eAAO,MAAM,SAAS,GAAI,KAAK,YAAY,QAAwD,CAAC;AAEpG,6EAA6E;AAC7E,wBAAsB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CxE"}
|
|
@@ -6,10 +6,16 @@ import { getOmeLegacyIndexer, getOmeSubIFDIndexer } from "./ome-indexers.js";
|
|
|
6
6
|
import { getOmePixelSourceMeta } from "./ome-utils.js";
|
|
7
7
|
import { fromString } from "./omexml.js";
|
|
8
8
|
export const isOmeTiff = (img) => img.fileDirectory.ImageDescription.includes('<OME');
|
|
9
|
+
/** Builds OME pixel sources after removing the TIFF ASCII tag terminator. */
|
|
9
10
|
export async function loadOmeTiff(tiff, firstImage) {
|
|
10
11
|
// Get first image from tiff and inspect OME-XML metadata
|
|
11
12
|
const { ImageDescription, SubIFDs, PhotometricInterpretation: photometricInterpretation } = firstImage.fileDirectory;
|
|
12
|
-
|
|
13
|
+
// TIFF ASCII counts include a terminal NUL; it is not part of the XML document.
|
|
14
|
+
let descriptionLength = ImageDescription.length;
|
|
15
|
+
while (descriptionLength > 0 && ImageDescription.charCodeAt(descriptionLength - 1) === 0) {
|
|
16
|
+
descriptionLength--;
|
|
17
|
+
}
|
|
18
|
+
const omexml = fromString(ImageDescription.slice(0, descriptionLength));
|
|
13
19
|
/*
|
|
14
20
|
* Image pyramids are stored differently between versions of Bioformats.
|
|
15
21
|
* Thus we need a different indexer depending on which format we have.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-ome-tiff.js","sourceRoot":"","sources":["../../../../src/geotiff/lib/ome/load-ome-tiff.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAIpC,OAAO,EAAC,eAAe,EAAC,gCAA6B;AACrD,OAAO,EAAC,mBAAmB,EAAE,mBAAmB,EAAiB,0BAAuB;AACxF,OAAO,EAAC,qBAAqB,EAAC,uBAAoB;AAClD,OAAO,EAAC,UAAU,EAAC,oBAAiB;AAGpC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAiB,EAAE,EAAE,CAAC,GAAG,CAAC,aAAa,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAEpG,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAa,EAAE,UAAwB;IACvE,yDAAyD;IACzD,MAAM,EACJ,gBAAgB,EAChB,OAAO,EACP,yBAAyB,EAAE,yBAAyB,EACrD,GAAG,UAAU,CAAC,aAAa,CAAC;I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I,EAAE,MAAM,CAAC,CAAC;IACrD,CAAC;SAAM,CAAC;QACN,qEAAqE;QACrE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QACvB,cAAc,GAAG,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACrD,CAAC;IAED,6EAA6E;IAC7E,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC1B,MAAM,EAAC,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAC,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAChF,MAAM,QAAQ,GAAG,UAAU,CAAC,YAAY,EAAE,CAAC;IAC3C,MAAM,IAAI,GAAG,EAAC,yBAAyB,EAAE,aAAa,EAAC,CAAC;IAExD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,MAAM,EAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE;QAC9D,MAAM,KAAK,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;QACnC,MAAM,OAAO,GAAG,CAAC,GAAqB,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;QAC3E,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QAClF,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAC,CAAC;AACnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"omexml.d.ts","sourceRoot":"","sources":["../../../../src/geotiff/lib/ome/omexml.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"omexml.d.ts","sourceRoot":"","sources":["../../../../src/geotiff/lib/ome/omexml.ts"],"names":[],"mappings":"AAwBA,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM;;;;;;;;;;;;;;gBAuJ5B,MAAM;6BACO,MAAM;mBAChB,MAAM;;gBAPT,MAAM;6BACO,MAAM;mBAChB,MAAM;;;;;;;;;;;;;;;;YAjBX,MAAM;wBACM,cAAc;cACxB,SAAS;;;;IAvFlB;AAED,MAAM,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AACnD,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAuBvF,KAAK,SAAS,GACV,MAAM,GACN,OAAO,GACP,OAAO,GACP,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,KAAK,GACL,QAAQ,GACR,SAAS,GACT,gBAAgB,CAAC;AAErB,MAAM,MAAM,WAAW,GACnB,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,GAAG,GACH,MAAM,GACN,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,OAAO,GACP,iBAAiB,CAAC"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
// loaders.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
|
-
import {
|
|
4
|
+
import { parseXMLSync } from '@loaders.gl/documents/xml-parser';
|
|
5
5
|
import { ensureArray, intToRgba } from "../utils/tiff-utils.js";
|
|
6
6
|
// WARNING: Changes to the parser options _will_ effect the types in types/omexml.d.ts.
|
|
7
|
-
const
|
|
7
|
+
const OME_XML_OPTIONS = {
|
|
8
8
|
// Nests attributes withtout prefix under 'attr' key for each node
|
|
9
9
|
attributeNamePrefix: '',
|
|
10
10
|
attributesGroupName: 'attr',
|
|
11
|
+
textNodeName: '#text',
|
|
11
12
|
// Parses numbers for both attributes and nodes
|
|
12
13
|
parseTagValue: true,
|
|
13
14
|
parseAttributeValue: true,
|
|
14
15
|
// Forces attributes to be parsed
|
|
15
16
|
ignoreAttributes: false
|
|
16
|
-
}
|
|
17
|
-
const parse = (str) =>
|
|
17
|
+
};
|
|
18
|
+
const parse = (str) => parseXMLSync(str, OME_XML_OPTIONS);
|
|
18
19
|
export function fromString(str) {
|
|
19
20
|
const res = parse(str);
|
|
20
21
|
if (!res.OME) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"omexml.js","sourceRoot":"","sources":["../../../../src/geotiff/lib/ome/omexml.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"omexml.js","sourceRoot":"","sources":["../../../../src/geotiff/lib/ome/omexml.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAC,WAAW,EAAE,SAAS,EAAC,+BAA4B;AAE3D,uFAAuF;AACvF,MAAM,eAAe,GAAG;IACtB,kEAAkE;IAClE,mBAAmB,EAAE,EAAE;IACvB,mBAAmB,EAAE,MAAM;IAC3B,YAAY,EAAE,OAAO;IAErB,+CAA+C;IAC/C,aAAa,EAAE,IAAI;IACnB,mBAAmB,EAAE,IAAI;IAEzB,iCAAiC;IACjC,gBAAgB,EAAE,KAAK;CACxB,CAAC;AAEF,MAAM,KAAK,GAAG,CAAC,GAAW,EAAQ,EAAE,CAAC,YAAY,CAAC,GAAG,EAAE,eAAe,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,MAAe,CAAC,CAAC;oBACxD,OAAO,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;gBAChD,CAAC,CAAC;qBACD,IAAI,CAAC,KAAK,CAAC,CAAC;gBAEf,OAAO;oBACL,kBAAkB,EAAE,KAAK,CAAC,cAAc;oBACxC,iBAAiB,EAAE,GAAG,MAAM,CAAC,KAAK,MAAM,MAAM,CAAC,KAAK,EAAE;oBACtD,aAAa,EAAE,MAAM,CAAC,IAAI;oBAC1B,mBAAmB,EAAE,KAAK;oBAC1B,uBAAuB,EAAE,GAAG,MAAM,CAAC,KAAK,MAAM,MAAM,CAAC,KAAK,EAAE;oBAC5D,QAAQ,EAAE,MAAM,CAAC,KAAK;iBACvB,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tiff-gdal-metadata.d.ts","sourceRoot":"","sources":["../../../../src/geotiff/lib/tiff/tiff-gdal-metadata.ts"],"names":[],"mappings":"AAOA,6FAA6F;AAC7F,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,SAAS,EAAE,MAAM,GAChB;IACD,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACzC,oEAAoE;IACpE,YAAY,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;CAClD,
|
|
1
|
+
{"version":3,"file":"tiff-gdal-metadata.d.ts","sourceRoot":"","sources":["../../../../src/geotiff/lib/tiff/tiff-gdal-metadata.ts"],"names":[],"mappings":"AAOA,6FAA6F;AAC7F,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,SAAS,EAAE,MAAM,GAChB;IACD,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACzC,oEAAoE;IACpE,YAAY,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;CAClD,CA2CA"}
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
// loaders.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
-
import {
|
|
4
|
+
import { parseXMLSync, validateXML } from '@loaders.gl/documents/xml-parser';
|
|
5
5
|
import { UnsupportedTiffEncodingError } from "./decode-tiff-samples.js";
|
|
6
6
|
/** Parses small, already-budgeted GDAL XML into explicit image and original-band records. */
|
|
7
7
|
export function parseTiffGDALMetadata(xml, bandCount) {
|
|
8
8
|
const metadata = {};
|
|
9
9
|
const bandMetadata = Array.from({ length: bandCount }, () => ({}));
|
|
10
10
|
if (xml !== undefined) {
|
|
11
|
-
if (
|
|
11
|
+
if (validateXML(xml) !== true)
|
|
12
12
|
throw new Error('Invalid TIFF GDAL XML');
|
|
13
13
|
if (/<!DOCTYPE/i.test(xml))
|
|
14
14
|
throw new UnsupportedTiffEncodingError('TIFF GDAL XML document type');
|
|
15
|
-
const parsed =
|
|
15
|
+
const parsed = parseXMLSync(xml, {
|
|
16
16
|
ignoreAttributes: false,
|
|
17
17
|
attributeNamePrefix: '',
|
|
18
18
|
parseTagValue: false,
|
|
19
19
|
parseAttributeValue: false,
|
|
20
20
|
trimValues: false,
|
|
21
|
-
processEntities: false
|
|
22
|
-
|
|
21
|
+
processEntities: false,
|
|
22
|
+
textNodeName: '#text'
|
|
23
|
+
});
|
|
23
24
|
if (!Object.hasOwn(parsed, 'GDALMetadata') ||
|
|
24
25
|
(parsed.GDALMetadata !== '' && typeof parsed.GDALMetadata !== 'object'))
|
|
25
26
|
throw new Error('Invalid TIFF GDAL metadata root');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tiff-gdal-metadata.js","sourceRoot":"","sources":["../../../../src/geotiff/lib/tiff/tiff-gdal-metadata.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,4DAA4D;AAE5D,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"tiff-gdal-metadata.js","sourceRoot":"","sources":["../../../../src/geotiff/lib/tiff/tiff-gdal-metadata.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,4DAA4D;AAE5D,OAAO,EAAC,YAAY,EAAE,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAC,4BAA4B,EAAC,iCAA8B;AAEnE,6FAA6F;AAC7F,MAAM,UAAU,qBAAqB,CACnC,GAAuB,EACvB,SAAiB;IAOjB,MAAM,QAAQ,GAA4B,EAAE,CAAC;IAC7C,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,SAAS,EAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAA4B,CAAC,CAAC;IAC5F,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,IAAI,WAAW,CAAC,GAAG,CAAC,KAAK,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QACxE,IAAI,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC;YACxB,MAAM,IAAI,4BAA4B,CAAC,6BAA6B,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,EAAE;YAC/B,gBAAgB,EAAE,KAAK;YACvB,mBAAmB,EAAE,EAAE;YACvB,aAAa,EAAE,KAAK;YACpB,mBAAmB,EAAE,KAAK;YAC1B,UAAU,EAAE,KAAK;YACjB,eAAe,EAAE,KAAK;YACtB,YAAY,EAAE,OAAO;SACtB,CAAC,CAAC;QACH,IACE,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,E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I,EAAE,CAAC;gBAClC,UAAU,EAAE,IAAI;gBAChB,YAAY,EAAE,IAAI;gBAClB,QAAQ,EAAE,IAAI;aACf,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO;QACL,QAAQ,EAAE,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ;QAC7C,YAAY,EAAE,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;KAC9E,CAAC;AACJ,CAAC"}
|
package/dist/geotiff/loaders.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { fromArrayBuffer } from 'geotiff';
|
|
5
5
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
6
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof "5.0.0-beta.
|
|
7
|
+
const VERSION = typeof "5.0.0-beta.4" !== 'undefined' ? "5.0.0-beta.4" : 'latest';
|
|
8
8
|
/**
|
|
9
9
|
* Loads a GeoTIFF file containing a RGB image.
|
|
10
10
|
*/
|
|
@@ -29,7 +29,7 @@ export const OMETiffSourceLoader = {
|
|
|
29
29
|
},
|
|
30
30
|
testURL: (url) => /\.ome\.tiff?(?:$|[?#])/i.test(url),
|
|
31
31
|
/** Loads the implementation for asynchronous source construction. */
|
|
32
|
-
preload: async () => (await import('@loaders.gl/raster/
|
|
32
|
+
preload: async () => (await import('@loaders.gl/raster/ometiff-source-loader')).OMETiffSourceLoader,
|
|
33
33
|
/** Synchronous construction requires the source implementation subpath. */
|
|
34
34
|
createDataSource(_data, _options) {
|
|
35
35
|
throw new Error('OMETiffSourceLoader requires async load() or its source implementation subpath');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ometiff-source-loader-types.js","sourceRoot":"","sources":["../../src/geotiff/ometiff-source-loader-types.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAIpC,OAAO,EAAC,aAAa,EAAC,4BAAyB;AAC/C,OAAO,EAAC,aAAa,EAAC,kCAA+B;AAErD,2CAA2C;AAC3C,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,QAAQ,EAAE,IAAqC;IAC/C,SAAS,EAAE,IAAa;IACxB,GAAG,aAAa;IAChB,IAAI,EAAE,qBAAqB;IAC3B,OAAO,EAAE,aAAa,CAAC,OAAO;IAC9B,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;IAEd,OAAO,EAAE;QACP,OAAO,EAAE;YACP,OAAO,EAAE,SAAU;YACnB,WAAW,EAAE,KAAK;YAClB,eAAe,EAAE,SAAU;SAC5B;KACF;IAED,cAAc,EAAE;QACd,OAAO,EAAE;YACP,OAAO,EAAE,SAAU;YACnB,WAAW,EAAE,KAAK;YAClB,eAAe,EAAE,SAAU;SAC5B;KACF;IAED,OAAO,EAAE,CAAC,GAAW,EAAW,EAAE,CAAC,yBAAyB,CAAC,IAAI,CAAC,GAAG,CAAC;IACtE,qEAAqE;IACrE,OAAO,EAAE,KAAK,IAAI,EAAE,CAClB,CAAC,MAAM,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"ometiff-source-loader-types.js","sourceRoot":"","sources":["../../src/geotiff/ometiff-source-loader-types.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAIpC,OAAO,EAAC,aAAa,EAAC,4BAAyB;AAC/C,OAAO,EAAC,aAAa,EAAC,kCAA+B;AAErD,2CAA2C;AAC3C,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,QAAQ,EAAE,IAAqC;IAC/C,SAAS,EAAE,IAAa;IACxB,GAAG,aAAa;IAChB,IAAI,EAAE,qBAAqB;IAC3B,OAAO,EAAE,aAAa,CAAC,OAAO;IAC9B,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;IAEd,OAAO,EAAE;QACP,OAAO,EAAE;YACP,OAAO,EAAE,SAAU;YACnB,WAAW,EAAE,KAAK;YAClB,eAAe,EAAE,SAAU;SAC5B;KACF;IAED,cAAc,EAAE;QACd,OAAO,EAAE;YACP,OAAO,EAAE,SAAU;YACnB,WAAW,EAAE,KAAK;YAClB,eAAe,EAAE,SAAU;SAC5B;KACF;IAED,OAAO,EAAE,CAAC,GAAW,EAAW,EAAE,CAAC,yBAAyB,CAAC,IAAI,CAAC,GAAG,CAAC;IACtE,qEAAqE;IACrE,OAAO,EAAE,KAAK,IAAI,EAAE,CAClB,CAAC,MAAM,MAAM,CAAC,0CAA0C,CAAC,CAAC,CAAC,mBAAmB;IAChF,2EAA2E;IAC3E,gBAAgB,CAAC,KAAoB,EAAE,QAAoC;QACzE,MAAM,IAAI,KAAK,CACb,gFAAgF,CACjF,CAAC;IACJ,CAAC;CACkD,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { ensureArray, getImageSize, intToRgba } from "./lib/utils/tiff-utils.js"
|
|
|
8
8
|
import { OMETiffFormat } from "./geotiff-format.js";
|
|
9
9
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
10
10
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
11
|
-
const VERSION = typeof "5.0.0-beta.
|
|
11
|
+
const VERSION = typeof "5.0.0-beta.4" !== 'undefined' ? "5.0.0-beta.4" : 'latest';
|
|
12
12
|
/**
|
|
13
13
|
* Source factory for non-geospatial OME-TIFF plane data.
|
|
14
14
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geotiff-loader-types.d.ts","sourceRoot":"","sources":["../src/geotiff-loader-types.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geotiff-loader-types.js","sourceRoot":"","sources":["../src/geotiff-loader-types.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geotiff-loader.d.ts","sourceRoot":"","sources":["../src/geotiff-loader.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geotiff-loader.js","sourceRoot":"","sources":["../src/geotiff-loader.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geotiff-raster-loader-types.d.ts","sourceRoot":"","sources":["../src/geotiff-raster-loader-types.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geotiff-raster-loader-types.js","sourceRoot":"","sources":["../src/geotiff-raster-loader-types.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geotiff-raster-loader.d.ts","sourceRoot":"","sources":["../src/geotiff-raster-loader.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geotiff-raster-loader.js","sourceRoot":"","sources":["../src/geotiff-raster-loader.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geotiff-source-loader-types.d.ts","sourceRoot":"","sources":["../src/geotiff-source-loader-types.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geotiff-source-loader-types.js","sourceRoot":"","sources":["../src/geotiff-source-loader-types.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geotiff-source-loader.d.ts","sourceRoot":"","sources":["../src/geotiff-source-loader.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geotiff-source-loader.js","sourceRoot":"","sources":["../src/geotiff-source-loader.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -68,9 +68,9 @@ var OMETiffFormat = {
|
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
// dist/geotiff/geotiff-loader-types.js
|
|
71
|
-
var VERSION = true ? "5.0.0-beta.
|
|
71
|
+
var VERSION = true ? "5.0.0-beta.4" : "latest";
|
|
72
72
|
async function preload() {
|
|
73
|
-
const { GeoTIFFLoaderWithParser } = await import("@loaders.gl/raster/geotiff
|
|
73
|
+
const { GeoTIFFLoaderWithParser } = await import("@loaders.gl/raster/geotiff-loader");
|
|
74
74
|
return GeoTIFFLoaderWithParser;
|
|
75
75
|
}
|
|
76
76
|
var GeoTIFFLoader = {
|
|
@@ -87,9 +87,9 @@ var GeoTIFFLoader = {
|
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
// dist/geotiff/geotiff-raster-loader-types.js
|
|
90
|
-
var VERSION2 = true ? "5.0.0-beta.
|
|
90
|
+
var VERSION2 = true ? "5.0.0-beta.4" : "latest";
|
|
91
91
|
async function preload2() {
|
|
92
|
-
const { GeoTIFFRasterLoaderWithParser } = await import("@loaders.gl/raster/geotiff
|
|
92
|
+
const { GeoTIFFRasterLoaderWithParser } = await import("@loaders.gl/raster/geotiff-raster-loader");
|
|
93
93
|
return GeoTIFFRasterLoaderWithParser;
|
|
94
94
|
}
|
|
95
95
|
var GeoTIFFRasterLoader = {
|
|
@@ -116,9 +116,9 @@ var LERCFormat = {
|
|
|
116
116
|
};
|
|
117
117
|
|
|
118
118
|
// dist/lerc/lerc-loader-types.js
|
|
119
|
-
var VERSION3 = true ? "5.0.0-beta.
|
|
119
|
+
var VERSION3 = true ? "5.0.0-beta.4" : "latest";
|
|
120
120
|
async function preload3() {
|
|
121
|
-
const { LERCLoaderWithParser } = await import("@loaders.gl/raster/lerc
|
|
121
|
+
const { LERCLoaderWithParser } = await import("@loaders.gl/raster/lerc-loader");
|
|
122
122
|
return LERCLoaderWithParser;
|
|
123
123
|
}
|
|
124
124
|
var LERCLoader = {
|
|
@@ -140,7 +140,7 @@ var LERCLoader = {
|
|
|
140
140
|
};
|
|
141
141
|
|
|
142
142
|
// dist/terrain/lib/utils/version.js
|
|
143
|
-
var VERSION4 = true ? "5.0.0-beta.
|
|
143
|
+
var VERSION4 = true ? "5.0.0-beta.4" : "latest";
|
|
144
144
|
|
|
145
145
|
// dist/terrain/terrain-format.js
|
|
146
146
|
var TerrainFormat = {
|
|
@@ -171,7 +171,7 @@ var TerrainLoader = {
|
|
|
171
171
|
version: VERSION4,
|
|
172
172
|
worker: true,
|
|
173
173
|
/** Loads the parser-bearing terrain loader implementation. */
|
|
174
|
-
preload: async () => (await import("@loaders.gl/raster/terrain
|
|
174
|
+
preload: async () => (await import("@loaders.gl/raster/terrain-loader")).TerrainLoaderWithParser,
|
|
175
175
|
options: {
|
|
176
176
|
terrain: {
|
|
177
177
|
tesselator: "auto",
|
|
@@ -197,7 +197,7 @@ var QuantizedMeshLoader = {
|
|
|
197
197
|
version: VERSION4,
|
|
198
198
|
worker: true,
|
|
199
199
|
/** Loads the parser-bearing quantized mesh loader implementation. */
|
|
200
|
-
preload: async () => (await import("@loaders.gl/raster/
|
|
200
|
+
preload: async () => (await import("@loaders.gl/raster/quantized-mesh-loader")).QuantizedMeshLoaderWithParser,
|
|
201
201
|
options: {
|
|
202
202
|
"quantized-mesh": {
|
|
203
203
|
shape: "arrow-table",
|
|
@@ -463,7 +463,7 @@ var GeoTIFFSourceLoader = {
|
|
|
463
463
|
return /\.(?:geotiff?|tiff?)(?:$|[?#])/i.test(url);
|
|
464
464
|
},
|
|
465
465
|
/** Loads the implementation for asynchronous source construction. */
|
|
466
|
-
preload: async () => (await import("@loaders.gl/raster/geotiff
|
|
466
|
+
preload: async () => (await import("@loaders.gl/raster/geotiff-source-loader")).GeoTIFFSourceLoader,
|
|
467
467
|
/** Synchronous construction requires the source implementation subpath. */
|
|
468
468
|
createDataSource(_data, _options) {
|
|
469
469
|
throw new Error("GeoTIFFSourceLoader requires async load() or its source implementation subpath");
|
|
@@ -496,7 +496,7 @@ var OMETiffSourceLoader = {
|
|
|
496
496
|
},
|
|
497
497
|
testURL: (url) => /\.ome\.tiff?(?:$|[?#])/i.test(url),
|
|
498
498
|
/** Loads the implementation for asynchronous source construction. */
|
|
499
|
-
preload: async () => (await import("@loaders.gl/raster/
|
|
499
|
+
preload: async () => (await import("@loaders.gl/raster/ometiff-source-loader")).OMETiffSourceLoader,
|
|
500
500
|
/** Synchronous construction requires the source implementation subpath. */
|
|
501
501
|
createDataSource(_data, _options) {
|
|
502
502
|
throw new Error("OMETiffSourceLoader requires async load() or its source implementation subpath");
|