@loaders.gl/i3s 4.0.0-alpha.22 → 4.0.0-alpha.24
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/dist.min.js +57 -55
- package/dist/es5/arcgis-webscene-loader.js +4 -4
- package/dist/es5/arcgis-webscene-loader.js.map +1 -1
- package/dist/es5/i3s-attribute-loader.js +1 -1
- package/dist/es5/i3s-attribute-loader.js.map +1 -1
- package/dist/es5/i3s-building-scene-layer-loader.js +1 -1
- package/dist/es5/i3s-building-scene-layer-loader.js.map +1 -1
- package/dist/es5/i3s-content-loader.js +1 -1
- package/dist/es5/i3s-content-loader.js.map +1 -1
- package/dist/es5/i3s-loader.js +1 -1
- package/dist/es5/i3s-loader.js.map +1 -1
- package/dist/es5/i3s-node-page-loader.js +14 -12
- package/dist/es5/i3s-node-page-loader.js.map +1 -1
- package/dist/es5/i3s-slpk-loader.js +3 -3
- package/dist/es5/i3s-slpk-loader.js.map +1 -1
- package/dist/es5/index.js +2 -2
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/lib/parsers/parse-arcgis-webscene.js.map +1 -1
- package/dist/es5/lib/parsers/parse-i3s-tile-content.js.map +1 -1
- package/dist/es5/lib/parsers/parse-i3s.js.map +1 -1
- package/dist/es5/lib/parsers/parse-slpk/parse-slpk.js.map +1 -1
- package/dist/es5/lib/parsers/parse-slpk/slpk-archieve.js.map +1 -1
- package/dist/es5/types.js.map +1 -1
- package/dist/esm/arcgis-webscene-loader.js +2 -2
- package/dist/esm/arcgis-webscene-loader.js.map +1 -1
- package/dist/esm/i3s-attribute-loader.js +1 -1
- package/dist/esm/i3s-attribute-loader.js.map +1 -1
- package/dist/esm/i3s-building-scene-layer-loader.js +1 -1
- package/dist/esm/i3s-building-scene-layer-loader.js.map +1 -1
- package/dist/esm/i3s-content-loader.js +1 -1
- package/dist/esm/i3s-content-loader.js.map +1 -1
- package/dist/esm/i3s-loader.js +1 -1
- package/dist/esm/i3s-loader.js.map +1 -1
- package/dist/esm/i3s-node-page-loader.js +7 -5
- package/dist/esm/i3s-node-page-loader.js.map +1 -1
- package/dist/esm/i3s-slpk-loader.js +2 -2
- package/dist/esm/i3s-slpk-loader.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/parsers/parse-arcgis-webscene.js.map +1 -1
- package/dist/esm/lib/parsers/parse-i3s-tile-content.js.map +1 -1
- package/dist/esm/lib/parsers/parse-i3s.js.map +1 -1
- package/dist/esm/lib/parsers/parse-slpk/parse-slpk.js.map +1 -1
- package/dist/esm/lib/parsers/parse-slpk/slpk-archieve.js.map +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/i3s-content-worker-node.js +41 -41
- package/dist/i3s-content-worker-node.js.map +2 -2
- package/dist/i3s-content-worker.js +17 -17
- package/dist/src/arcgis-webscene-loader.d.ts +9 -0
- package/dist/src/arcgis-webscene-loader.d.ts.map +1 -0
- package/dist/src/bundle.d.ts.map +1 -0
- package/dist/{i3s-attribute-loader.d.ts → src/i3s-attribute-loader.d.ts} +3 -2
- package/dist/src/i3s-attribute-loader.d.ts.map +1 -0
- package/dist/src/i3s-building-scene-layer-loader.d.ts +8 -0
- package/dist/src/i3s-building-scene-layer-loader.d.ts.map +1 -0
- package/dist/src/i3s-content-loader.d.ts +8 -0
- package/dist/src/i3s-content-loader.d.ts.map +1 -0
- package/dist/{i3s-loader.d.ts → src/i3s-loader.d.ts} +2 -1
- package/dist/src/i3s-loader.d.ts.map +1 -0
- package/dist/src/i3s-node-page-loader.d.ts +8 -0
- package/dist/src/i3s-node-page-loader.d.ts.map +1 -0
- package/dist/{i3s-slpk-loader.d.ts → src/i3s-slpk-loader.d.ts} +2 -3
- package/dist/src/i3s-slpk-loader.d.ts.map +1 -0
- package/dist/{index.d.ts → src/index.d.ts} +1 -1
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/lib/helpers/i3s-nodepages-tiles.d.ts.map +1 -0
- package/dist/src/lib/parsers/constants.d.ts.map +1 -0
- package/dist/src/lib/parsers/parse-arcgis-webscene.d.ts +7 -0
- package/dist/src/lib/parsers/parse-arcgis-webscene.d.ts.map +1 -0
- package/dist/src/lib/parsers/parse-i3s-attribute.d.ts.map +1 -0
- package/dist/src/lib/parsers/parse-i3s-building-scene-layer.d.ts.map +1 -0
- package/dist/src/lib/parsers/parse-i3s-tile-content.d.ts.map +1 -0
- package/dist/{lib → src/lib}/parsers/parse-i3s.d.ts +1 -1
- package/dist/src/lib/parsers/parse-i3s.d.ts.map +1 -0
- package/dist/{lib → src/lib}/parsers/parse-slpk/parse-slpk.d.ts +1 -1
- package/dist/src/lib/parsers/parse-slpk/parse-slpk.d.ts.map +1 -0
- package/dist/{lib → src/lib}/parsers/parse-slpk/slpk-archieve.d.ts +2 -1
- package/dist/src/lib/parsers/parse-slpk/slpk-archieve.d.ts.map +1 -0
- package/dist/src/lib/utils/convert-i3s-obb-to-mbs.d.ts.map +1 -0
- package/dist/src/lib/utils/customize-/321/201olors.d.ts.map +1 -0
- package/dist/src/lib/utils/url-utils.d.ts.map +1 -0
- package/dist/{types.d.ts → src/types.d.ts} +16 -16
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/workers/i3s-content-worker-node.d.ts.map +1 -0
- package/dist/src/workers/i3s-content-worker.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +9 -9
- package/src/arcgis-webscene-loader.ts +12 -6
- package/src/i3s-attribute-loader.ts +2 -1
- package/src/i3s-building-scene-layer-loader.ts +6 -1
- package/src/i3s-content-loader.ts +3 -2
- package/src/i3s-loader.ts +3 -2
- package/src/i3s-node-page-loader.ts +9 -6
- package/src/i3s-slpk-loader.ts +3 -3
- package/src/index.ts +1 -1
- package/src/lib/parsers/parse-arcgis-webscene.ts +2 -2
- package/src/lib/parsers/parse-i3s-tile-content.ts +1 -5
- package/src/lib/parsers/parse-i3s.ts +3 -2
- package/src/lib/parsers/parse-slpk/parse-slpk.ts +1 -1
- package/src/lib/parsers/parse-slpk/slpk-archieve.ts +2 -1
- package/src/types.ts +16 -16
- package/dist/arcgis-webscene-loader.d.ts +0 -7
- package/dist/arcgis-webscene-loader.d.ts.map +0 -1
- package/dist/arcgis-webscene-loader.js +0 -28
- package/dist/bundle.d.ts.map +0 -1
- package/dist/bundle.js +0 -5
- package/dist/i3s-attribute-loader.d.ts.map +0 -1
- package/dist/i3s-attribute-loader.js +0 -175
- package/dist/i3s-building-scene-layer-loader.d.ts +0 -6
- package/dist/i3s-building-scene-layer-loader.d.ts.map +0 -1
- package/dist/i3s-building-scene-layer-loader.js +0 -26
- package/dist/i3s-content-loader.d.ts +0 -6
- package/dist/i3s-content-loader.d.ts.map +0 -1
- package/dist/i3s-content-loader.js +0 -32
- package/dist/i3s-loader.d.ts.map +0 -1
- package/dist/i3s-loader.js +0 -100
- package/dist/i3s-node-page-loader.d.ts +0 -7
- package/dist/i3s-node-page-loader.d.ts.map +0 -1
- package/dist/i3s-node-page-loader.js +0 -22
- package/dist/i3s-slpk-loader.d.ts.map +0 -1
- package/dist/i3s-slpk-loader.js +0 -30
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -23
- package/dist/lib/helpers/i3s-nodepages-tiles.d.ts.map +0 -1
- package/dist/lib/helpers/i3s-nodepages-tiles.js +0 -244
- package/dist/lib/parsers/constants.d.ts.map +0 -1
- package/dist/lib/parsers/constants.js +0 -88
- package/dist/lib/parsers/parse-arcgis-webscene.d.ts +0 -7
- package/dist/lib/parsers/parse-arcgis-webscene.d.ts.map +0 -1
- package/dist/lib/parsers/parse-arcgis-webscene.js +0 -88
- package/dist/lib/parsers/parse-i3s-attribute.d.ts.map +0 -1
- package/dist/lib/parsers/parse-i3s-attribute.js +0 -99
- package/dist/lib/parsers/parse-i3s-building-scene-layer.d.ts.map +0 -1
- package/dist/lib/parsers/parse-i3s-building-scene-layer.js +0 -46
- package/dist/lib/parsers/parse-i3s-tile-content.d.ts.map +0 -1
- package/dist/lib/parsers/parse-i3s-tile-content.js +0 -502
- package/dist/lib/parsers/parse-i3s.d.ts.map +0 -1
- package/dist/lib/parsers/parse-i3s.js +0 -105
- package/dist/lib/parsers/parse-slpk/parse-slpk.d.ts.map +0 -1
- package/dist/lib/parsers/parse-slpk/parse-slpk.js +0 -33
- package/dist/lib/parsers/parse-slpk/slpk-archieve.d.ts.map +0 -1
- package/dist/lib/parsers/parse-slpk/slpk-archieve.js +0 -131
- package/dist/lib/utils/convert-i3s-obb-to-mbs.d.ts.map +0 -1
- package/dist/lib/utils/convert-i3s-obb-to-mbs.js +0 -20
- package/dist/lib/utils/customize-/321/201olors.d.ts.map +0 -1
- package/dist/lib/utils/customize-/321/201olors.js +0 -104
- package/dist/lib/utils/url-utils.d.ts.map +0 -1
- package/dist/lib/utils/url-utils.js +0 -45
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -8
- package/dist/workers/i3s-content-worker-node.d.ts.map +0 -1
- package/dist/workers/i3s-content-worker-node.js +0 -7
- package/dist/workers/i3s-content-worker.d.ts.map +0 -1
- package/dist/workers/i3s-content-worker.js +0 -5
- /package/dist/{bundle.d.ts → src/bundle.d.ts} +0 -0
- /package/dist/{lib → src/lib}/helpers/i3s-nodepages-tiles.d.ts +0 -0
- /package/dist/{lib → src/lib}/parsers/constants.d.ts +0 -0
- /package/dist/{lib → src/lib}/parsers/parse-i3s-attribute.d.ts +0 -0
- /package/dist/{lib → src/lib}/parsers/parse-i3s-building-scene-layer.d.ts +0 -0
- /package/dist/{lib → src/lib}/parsers/parse-i3s-tile-content.d.ts +0 -0
- /package/dist/{lib → src/lib}/utils/convert-i3s-obb-to-mbs.d.ts +0 -0
- /package/dist/{lib → src/lib}/utils/customize-/321/201olors.d.ts" +0 -0
- /package/dist/{lib → src/lib}/utils/url-utils.d.ts +0 -0
- /package/dist/{workers → src/workers}/i3s-content-worker-node.d.ts +0 -0
- /package/dist/{workers → src/workers}/i3s-content-worker.d.ts +0 -0
package/src/types.ts
CHANGED
|
@@ -883,16 +883,16 @@ export type FieldInfo = {
|
|
|
883
883
|
label: string;
|
|
884
884
|
};
|
|
885
885
|
|
|
886
|
-
export type
|
|
887
|
-
header:
|
|
886
|
+
export type ArcGISWebSceneData = {
|
|
887
|
+
header: ArcGISWebScene;
|
|
888
888
|
layers: OperationalLayer[];
|
|
889
889
|
unsupportedLayers: OperationalLayer[];
|
|
890
890
|
};
|
|
891
891
|
|
|
892
892
|
/**
|
|
893
|
-
*
|
|
893
|
+
* ArcGIS WebScene spec - https://developers.arcgis.com/web-scene-specification/objects/webscene/
|
|
894
894
|
*/
|
|
895
|
-
export type
|
|
895
|
+
export type ArcGISWebScene = {
|
|
896
896
|
/**
|
|
897
897
|
* @todo add type.
|
|
898
898
|
* Spec - https://developers.arcgis.com/web-scene-specification/objects/applicationProperties/
|
|
@@ -933,7 +933,7 @@ export type ArcGisWebScene = {
|
|
|
933
933
|
* Spec - https://developers.arcgis.com/web-scene-specification/objects/presentation/
|
|
934
934
|
* @todo Add presentation type.
|
|
935
935
|
*/
|
|
936
|
-
presentation:
|
|
936
|
+
presentation: ArcGISPresentation;
|
|
937
937
|
/**
|
|
938
938
|
* An object that provides information about the initial environment settings and viewpoint of the web scene.
|
|
939
939
|
*/
|
|
@@ -983,7 +983,7 @@ export type ArcGisWebScene = {
|
|
|
983
983
|
/**
|
|
984
984
|
* Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Presentation.html
|
|
985
985
|
*/
|
|
986
|
-
type
|
|
986
|
+
type ArcGISPresentation = {
|
|
987
987
|
slides: Slide[];
|
|
988
988
|
};
|
|
989
989
|
|
|
@@ -1006,26 +1006,26 @@ type Slide = {
|
|
|
1006
1006
|
ground: {
|
|
1007
1007
|
transparency: number;
|
|
1008
1008
|
};
|
|
1009
|
-
baseMap:
|
|
1010
|
-
visibleLayers:
|
|
1011
|
-
viewpoint:
|
|
1009
|
+
baseMap: ArcGISBaseMap;
|
|
1010
|
+
visibleLayers: ArcGISVisibleLayer[];
|
|
1011
|
+
viewpoint: ArcGISViewPoint;
|
|
1012
1012
|
};
|
|
1013
1013
|
|
|
1014
1014
|
/**
|
|
1015
1015
|
* The basemap of the scene. Only the base and reference layers of the basemap are stored in a slide.
|
|
1016
1016
|
* Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html
|
|
1017
1017
|
*/
|
|
1018
|
-
type
|
|
1018
|
+
type ArcGISBaseMap = {
|
|
1019
1019
|
id: string;
|
|
1020
1020
|
title: string;
|
|
1021
|
-
baseMapLayers:
|
|
1021
|
+
baseMapLayers: ArcGISBaseMapLayer[];
|
|
1022
1022
|
};
|
|
1023
1023
|
|
|
1024
1024
|
/**
|
|
1025
1025
|
* The visible layers of the scene.
|
|
1026
1026
|
* Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html#visibleLayers
|
|
1027
1027
|
*/
|
|
1028
|
-
type
|
|
1028
|
+
type ArcGISVisibleLayer = {
|
|
1029
1029
|
id: string;
|
|
1030
1030
|
sublayerIds: number[];
|
|
1031
1031
|
};
|
|
@@ -1033,7 +1033,7 @@ type ArcGisVisibleLayer = {
|
|
|
1033
1033
|
* The basemap of the scene.
|
|
1034
1034
|
* Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html
|
|
1035
1035
|
*/
|
|
1036
|
-
type
|
|
1036
|
+
type ArcGISBaseMapLayer = {
|
|
1037
1037
|
id: string;
|
|
1038
1038
|
title: string;
|
|
1039
1039
|
url: string;
|
|
@@ -1045,14 +1045,14 @@ type ArcGisBaseMapLayer = {
|
|
|
1045
1045
|
* The viewpoint of the slide. This acts like a bookmark, saving a predefined location or point of view from which to view the scene.
|
|
1046
1046
|
* Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html
|
|
1047
1047
|
*/
|
|
1048
|
-
type
|
|
1048
|
+
type ArcGISViewPoint = {
|
|
1049
1049
|
scale: number;
|
|
1050
1050
|
rotation?: number;
|
|
1051
1051
|
/**
|
|
1052
1052
|
* Spec - https://developers.arcgis.com/web-scene-specification/objects/viewpoint/
|
|
1053
1053
|
*/
|
|
1054
1054
|
targetGeometry: any;
|
|
1055
|
-
camera:
|
|
1055
|
+
camera: ArcGISCamera;
|
|
1056
1056
|
};
|
|
1057
1057
|
|
|
1058
1058
|
/**
|
|
@@ -1060,7 +1060,7 @@ type ArcGisViewPoint = {
|
|
|
1060
1060
|
* It is not associated with device hardware. This class only applies to 3D SceneViews.
|
|
1061
1061
|
* Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html
|
|
1062
1062
|
*/
|
|
1063
|
-
export type
|
|
1063
|
+
export type ArcGISCamera = {
|
|
1064
1064
|
position: {
|
|
1065
1065
|
x: number;
|
|
1066
1066
|
y: number;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { LoaderWithParser } from '@loaders.gl/loader-utils';
|
|
2
|
-
/**
|
|
3
|
-
* Loader for ArcGis WebScene
|
|
4
|
-
* Spec - https://developers.arcgis.com/web-scene-specification/objects/webscene/
|
|
5
|
-
*/
|
|
6
|
-
export declare const ArcGisWebSceneLoader: LoaderWithParser;
|
|
7
|
-
//# sourceMappingURL=arcgis-webscene-loader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"arcgis-webscene-loader.d.ts","sourceRoot":"","sources":["../src/arcgis-webscene-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAS/D;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,gBASlC,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ArcGisWebSceneLoader = void 0;
|
|
4
|
-
const parse_arcgis_webscene_1 = require("./lib/parsers/parse-arcgis-webscene");
|
|
5
|
-
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
|
-
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'beta';
|
|
8
|
-
/**
|
|
9
|
-
* Loader for ArcGis WebScene
|
|
10
|
-
* Spec - https://developers.arcgis.com/web-scene-specification/objects/webscene/
|
|
11
|
-
*/
|
|
12
|
-
exports.ArcGisWebSceneLoader = {
|
|
13
|
-
name: 'ArcGIS Web Scene Loader',
|
|
14
|
-
id: 'arcgis-web-scene',
|
|
15
|
-
module: 'i3s',
|
|
16
|
-
version: VERSION,
|
|
17
|
-
mimeTypes: ['application/json'],
|
|
18
|
-
parse,
|
|
19
|
-
extensions: ['json'],
|
|
20
|
-
options: {}
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Parse ArcGis webscene
|
|
24
|
-
* @param data
|
|
25
|
-
*/
|
|
26
|
-
async function parse(data) {
|
|
27
|
-
return (0, parse_arcgis_webscene_1.parseWebscene)(data);
|
|
28
|
-
}
|
package/dist/bundle.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,aAAa,KAAqB,CAAC"}
|
package/dist/bundle.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"i3s-attribute-loader.d.ts","sourceRoot":"","sources":["../src/i3s-attribute-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAE,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAE9E,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,mCAAmC,CAAC;AAUzE;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,gBAAgB,CAAC,iBAAiB,EAAE,KAAK,EAAE,aAAa,CAUxF,CAAC;AAKF;;;;;;GAMG;AAEH,wBAAsB,qBAAqB,CAAC,IAAI,KAAA,EAAE,SAAS,KAAA,EAAE,OAAO,KAAK,sBA+BxE;AAeD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,KAAA,OAO9C"}
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAttributeValueType = exports.loadFeatureAttributes = exports.I3SAttributeLoader = void 0;
|
|
4
|
-
const core_1 = require("@loaders.gl/core");
|
|
5
|
-
const parse_i3s_attribute_1 = require("./lib/parsers/parse-i3s-attribute");
|
|
6
|
-
const url_utils_1 = require("./lib/utils/url-utils");
|
|
7
|
-
// __VERSION__ is injected by babel-plugin-version-inline
|
|
8
|
-
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
9
|
-
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
|
|
10
|
-
const EMPTY_VALUE = '';
|
|
11
|
-
const REJECTED_STATUS = 'rejected';
|
|
12
|
-
/**
|
|
13
|
-
* Loader for I3S attributes
|
|
14
|
-
*/
|
|
15
|
-
exports.I3SAttributeLoader = {
|
|
16
|
-
name: 'I3S Attribute',
|
|
17
|
-
id: 'i3s-attribute',
|
|
18
|
-
module: 'i3s',
|
|
19
|
-
version: VERSION,
|
|
20
|
-
mimeTypes: ['application/binary'],
|
|
21
|
-
parse: async (arrayBuffer, options) => (0, parse_i3s_attribute_1.parseI3STileAttribute)(arrayBuffer, options),
|
|
22
|
-
extensions: ['bin'],
|
|
23
|
-
options: {},
|
|
24
|
-
binary: true
|
|
25
|
-
};
|
|
26
|
-
// TODO - these seem to use the loader rather than being part of the loader. Move to different file...
|
|
27
|
-
/**
|
|
28
|
-
* Load attributes based on feature id
|
|
29
|
-
* @param {Object} tile
|
|
30
|
-
* @param {number} featureId
|
|
31
|
-
* @param {Object} options
|
|
32
|
-
* @returns {Promise}
|
|
33
|
-
*/
|
|
34
|
-
// eslint-disable-next-line complexity
|
|
35
|
-
async function loadFeatureAttributes(tile, featureId, options = {}) {
|
|
36
|
-
const { attributeStorageInfo, attributeUrls, tilesetFields } = getAttributesData(tile);
|
|
37
|
-
if (!attributeStorageInfo || !attributeUrls || featureId < 0) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
let attributes = [];
|
|
41
|
-
const attributeLoadPromises = [];
|
|
42
|
-
for (let index = 0; index < attributeStorageInfo.length; index++) {
|
|
43
|
-
// @ts-ignore
|
|
44
|
-
const url = (0, url_utils_1.getUrlWithToken)(attributeUrls[index], options.i3s?.token);
|
|
45
|
-
const attributeName = attributeStorageInfo[index].name;
|
|
46
|
-
const attributeType = getAttributeValueType(attributeStorageInfo[index]);
|
|
47
|
-
const loadOptions = { ...options, attributeName, attributeType };
|
|
48
|
-
const promise = (0, core_1.load)(url, exports.I3SAttributeLoader, loadOptions);
|
|
49
|
-
attributeLoadPromises.push(promise);
|
|
50
|
-
}
|
|
51
|
-
try {
|
|
52
|
-
attributes = await Promise.allSettled(attributeLoadPromises);
|
|
53
|
-
}
|
|
54
|
-
catch (error) {
|
|
55
|
-
// do nothing
|
|
56
|
-
}
|
|
57
|
-
if (!attributes.length) {
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
return generateAttributesByFeatureId(attributes, attributeStorageInfo, featureId, tilesetFields);
|
|
61
|
-
}
|
|
62
|
-
exports.loadFeatureAttributes = loadFeatureAttributes;
|
|
63
|
-
/**
|
|
64
|
-
* Gets attributes data from tile.
|
|
65
|
-
* @param tile
|
|
66
|
-
* @returns
|
|
67
|
-
*/
|
|
68
|
-
function getAttributesData(tile) {
|
|
69
|
-
const attributeStorageInfo = tile.tileset?.tileset?.attributeStorageInfo;
|
|
70
|
-
const attributeUrls = tile.header?.attributeUrls;
|
|
71
|
-
const tilesetFields = tile.tileset?.tileset?.fields || [];
|
|
72
|
-
return { attributeStorageInfo, attributeUrls, tilesetFields };
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Get attribute value type based on property names
|
|
76
|
-
* @param {Object} attribute
|
|
77
|
-
* @returns {String}
|
|
78
|
-
*/
|
|
79
|
-
function getAttributeValueType(attribute) {
|
|
80
|
-
if (attribute.hasOwnProperty('objectIds')) {
|
|
81
|
-
return 'Oid32';
|
|
82
|
-
}
|
|
83
|
-
else if (attribute.hasOwnProperty('attributeValues')) {
|
|
84
|
-
return attribute.attributeValues.valueType;
|
|
85
|
-
}
|
|
86
|
-
return '';
|
|
87
|
-
}
|
|
88
|
-
exports.getAttributeValueType = getAttributeValueType;
|
|
89
|
-
/**
|
|
90
|
-
* Find in attributeStorageInfo attribute name responsible for feature ids list.
|
|
91
|
-
* @param attributeStorageInfo
|
|
92
|
-
* @returns Feature ids attribute name
|
|
93
|
-
*/
|
|
94
|
-
function getFeatureIdsAttributeName(attributeStorageInfo) {
|
|
95
|
-
const objectIdsAttribute = attributeStorageInfo.find(attribute => attribute.name.includes('OBJECTID'));
|
|
96
|
-
return objectIdsAttribute?.name;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Generates mapping featureId to feature attributes
|
|
100
|
-
* @param {Array} attributes
|
|
101
|
-
* @param {Object} attributeStorageInfo
|
|
102
|
-
* @param {number} featureId
|
|
103
|
-
* @returns {Object}
|
|
104
|
-
*/
|
|
105
|
-
function generateAttributesByFeatureId(attributes, attributeStorageInfo, featureId, tilesetFields) {
|
|
106
|
-
const objectIdsAttributeName = getFeatureIdsAttributeName(attributeStorageInfo);
|
|
107
|
-
const objectIds = attributes.find((attribute) => attribute.value[objectIdsAttributeName]);
|
|
108
|
-
if (!objectIds) {
|
|
109
|
-
return null;
|
|
110
|
-
}
|
|
111
|
-
const attributeIndex = objectIds.value[objectIdsAttributeName].indexOf(featureId);
|
|
112
|
-
if (attributeIndex < 0) {
|
|
113
|
-
return null;
|
|
114
|
-
}
|
|
115
|
-
return getFeatureAttributesByIndex(attributes, attributeIndex, attributeStorageInfo, tilesetFields);
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Generates attribute object for feature mapping by feature id
|
|
119
|
-
* @param {Array} attributes
|
|
120
|
-
* @param {Number} featureIdIndex
|
|
121
|
-
* @param {Object} attributeStorageInfo
|
|
122
|
-
* @returns {Object}
|
|
123
|
-
*/
|
|
124
|
-
function getFeatureAttributesByIndex(attributes, featureIdIndex, attributeStorageInfo, tilesetFields) {
|
|
125
|
-
const attributesObject = {};
|
|
126
|
-
for (let index = 0; index < attributeStorageInfo.length; index++) {
|
|
127
|
-
const attributeName = attributeStorageInfo[index].name;
|
|
128
|
-
const codedValues = getAttributeCodedValues(attributeName, tilesetFields);
|
|
129
|
-
const attribute = getAttributeByIndexAndAttributeName(attributes, index, attributeName);
|
|
130
|
-
attributesObject[attributeName] = formatAttributeValue(attribute, featureIdIndex, codedValues);
|
|
131
|
-
}
|
|
132
|
-
return attributesObject;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Get coded values list from tileset.
|
|
136
|
-
* @param attributeName
|
|
137
|
-
* @param tilesetFields
|
|
138
|
-
*/
|
|
139
|
-
function getAttributeCodedValues(attributeName, tilesetFields) {
|
|
140
|
-
const attributeField = tilesetFields
|
|
141
|
-
.find(field => field.name === attributeName || field.alias === attributeName);
|
|
142
|
-
return attributeField?.domain?.codedValues || [];
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Return attribute value if it presents in atrributes list
|
|
146
|
-
* @param {array} attributes
|
|
147
|
-
* @param {number} index
|
|
148
|
-
* @param {string} attributesName
|
|
149
|
-
*/
|
|
150
|
-
function getAttributeByIndexAndAttributeName(attributes, index, attributesName) {
|
|
151
|
-
const attributeObject = attributes[index];
|
|
152
|
-
if (attributeObject.status === REJECTED_STATUS) {
|
|
153
|
-
return null;
|
|
154
|
-
}
|
|
155
|
-
return attributeObject.value[attributesName];
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Do formatting of attribute values or return empty string.
|
|
159
|
-
* @param {Array} attribute
|
|
160
|
-
* @param {Number} featureIdIndex
|
|
161
|
-
* @returns {String}
|
|
162
|
-
*/
|
|
163
|
-
function formatAttributeValue(attribute, featureIdIndex, codedValues) {
|
|
164
|
-
let value = EMPTY_VALUE;
|
|
165
|
-
if (attribute && (featureIdIndex in attribute)) {
|
|
166
|
-
// eslint-disable-next-line no-control-regex
|
|
167
|
-
value = String(attribute[featureIdIndex]).replace(/\u0000|NaN/g, '').trim();
|
|
168
|
-
}
|
|
169
|
-
// Check if coded values are existed. If so we use them.
|
|
170
|
-
if (codedValues.length) {
|
|
171
|
-
const codeValue = codedValues.find(codedValue => codedValue.code === Number(value));
|
|
172
|
-
value = codeValue?.name || EMPTY_VALUE;
|
|
173
|
-
}
|
|
174
|
-
return value;
|
|
175
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"i3s-building-scene-layer-loader.d.ts","sourceRoot":"","sources":["../src/i3s-building-scene-layer-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,gBAAgB,EAA+B,MAAM,0BAA0B,CAAC;AAS7F;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,gBASzC,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.I3SBuildingSceneLayerLoader = void 0;
|
|
4
|
-
const parse_i3s_building_scene_layer_1 = require("./lib/parsers/parse-i3s-building-scene-layer");
|
|
5
|
-
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
|
-
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'beta';
|
|
8
|
-
/**
|
|
9
|
-
* Loader for I3S - Building Scene Layer
|
|
10
|
-
*/
|
|
11
|
-
exports.I3SBuildingSceneLayerLoader = {
|
|
12
|
-
name: 'I3S Building Scene Layer',
|
|
13
|
-
id: 'i3s-building-scene-layer',
|
|
14
|
-
module: 'i3s',
|
|
15
|
-
version: VERSION,
|
|
16
|
-
mimeTypes: ['application/json'],
|
|
17
|
-
parse,
|
|
18
|
-
extensions: ['json'],
|
|
19
|
-
options: {}
|
|
20
|
-
};
|
|
21
|
-
async function parse(data, options, context) {
|
|
22
|
-
if (!context?.url) {
|
|
23
|
-
throw new Error('Url is not provided');
|
|
24
|
-
}
|
|
25
|
-
return (0, parse_i3s_building_scene_layer_1.parseBuildingSceneLayer)(data, context.url);
|
|
26
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"i3s-content-loader.d.ts","sourceRoot":"","sources":["../src/i3s-content-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,gBAAgB,EAAgB,MAAM,0BAA0B,CAAC;AAS9E;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAY9B,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.I3SContentLoader = void 0;
|
|
4
|
-
const parse_i3s_tile_content_1 = require("./lib/parsers/parse-i3s-tile-content");
|
|
5
|
-
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
|
-
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'beta';
|
|
8
|
-
/**
|
|
9
|
-
* Loader for I3S - Indexed 3D Scene Layer
|
|
10
|
-
*/
|
|
11
|
-
exports.I3SContentLoader = {
|
|
12
|
-
name: 'I3S Content (Indexed Scene Layers)',
|
|
13
|
-
id: 'i3s-content',
|
|
14
|
-
module: 'i3s',
|
|
15
|
-
worker: true,
|
|
16
|
-
version: VERSION,
|
|
17
|
-
mimeTypes: ['application/octet-stream'],
|
|
18
|
-
parse,
|
|
19
|
-
extensions: ['bin'],
|
|
20
|
-
options: {
|
|
21
|
-
'i3s-content': {}
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
async function parse(data, options, context) {
|
|
25
|
-
const { tile, _tileOptions, tileset, _tilesetOptions } = options?.i3s || {};
|
|
26
|
-
const tileOptions = _tileOptions || tile;
|
|
27
|
-
const tilesetOptions = _tilesetOptions || tileset;
|
|
28
|
-
if (!tileOptions || !tilesetOptions) {
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
return await (0, parse_i3s_tile_content_1.parseI3STileContent)(data, tileOptions, tilesetOptions, options, context);
|
|
32
|
-
}
|
package/dist/i3s-loader.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"i3s-loader.d.ts","sourceRoot":"","sources":["../src/i3s-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,gBAAgB,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAK9E,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAWxC,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,GAAG,CAAC,EAAE,eAAe,CAAC;CACvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,gBAwBvB,CAAC"}
|
package/dist/i3s-loader.js
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.I3SLoader = void 0;
|
|
4
|
-
const core_1 = require("@loaders.gl/core");
|
|
5
|
-
const i3s_content_loader_1 = require("./i3s-content-loader");
|
|
6
|
-
const parse_i3s_1 = require("./lib/parsers/parse-i3s");
|
|
7
|
-
const constants_1 = require("./lib/parsers/constants");
|
|
8
|
-
// __VERSION__ is injected by babel-plugin-version-inline
|
|
9
|
-
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
10
|
-
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
|
|
11
|
-
const TILESET_REGEX = /layers\/[0-9]+$/;
|
|
12
|
-
const TILE_HEADER_REGEX = /nodes\/([0-9-]+|root)$/;
|
|
13
|
-
const SLPK_HEX = '504b0304';
|
|
14
|
-
const POINT_CLOUD = 'PointCloud';
|
|
15
|
-
/**
|
|
16
|
-
* Loader for I3S - Indexed 3D Scene Layer
|
|
17
|
-
*/
|
|
18
|
-
exports.I3SLoader = {
|
|
19
|
-
name: 'I3S (Indexed Scene Layers)',
|
|
20
|
-
id: 'i3s',
|
|
21
|
-
module: 'i3s',
|
|
22
|
-
version: VERSION,
|
|
23
|
-
mimeTypes: ['application/octet-stream'],
|
|
24
|
-
parse: parseI3S,
|
|
25
|
-
extensions: ['bin'],
|
|
26
|
-
options: {
|
|
27
|
-
i3s: {
|
|
28
|
-
token: null,
|
|
29
|
-
isTileset: 'auto',
|
|
30
|
-
isTileHeader: 'auto',
|
|
31
|
-
tile: null,
|
|
32
|
-
tileset: null,
|
|
33
|
-
_tileOptions: null,
|
|
34
|
-
_tilesetOptions: null,
|
|
35
|
-
useDracoGeometry: true,
|
|
36
|
-
useCompressedTextures: true,
|
|
37
|
-
decodeTextures: true,
|
|
38
|
-
coordinateSystem: constants_1.COORDINATE_SYSTEM.METER_OFFSETS,
|
|
39
|
-
colorsByAttribute: null
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
async function parseI3S(data, options = {}, context) {
|
|
44
|
-
const url = context.url;
|
|
45
|
-
options.i3s = options.i3s || {};
|
|
46
|
-
const magicNumber = getMagicNumber(data);
|
|
47
|
-
// check if file is slpk
|
|
48
|
-
if (magicNumber === SLPK_HEX) {
|
|
49
|
-
throw new Error('Files with .slpk extention currently are not supported by I3SLoader');
|
|
50
|
-
}
|
|
51
|
-
// auto detect file type based on url
|
|
52
|
-
let isTileset;
|
|
53
|
-
if (options.i3s.isTileset === 'auto') {
|
|
54
|
-
isTileset = TILESET_REGEX.test(url);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
isTileset = options.i3s.isTileset;
|
|
58
|
-
}
|
|
59
|
-
let isTileHeader;
|
|
60
|
-
if (options.isTileHeader === 'auto') {
|
|
61
|
-
isTileHeader = TILE_HEADER_REGEX.test(url);
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
isTileHeader = options.i3s.isTileHeader;
|
|
65
|
-
}
|
|
66
|
-
if (isTileset) {
|
|
67
|
-
data = await parseTileset(data, options, context);
|
|
68
|
-
}
|
|
69
|
-
else if (isTileHeader) {
|
|
70
|
-
data = await parseTile(data, context);
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
data = await parseTileContent(data, options);
|
|
74
|
-
}
|
|
75
|
-
return data;
|
|
76
|
-
}
|
|
77
|
-
async function parseTileContent(arrayBuffer, options) {
|
|
78
|
-
return await (0, core_1.parse)(arrayBuffer, i3s_content_loader_1.I3SContentLoader, options);
|
|
79
|
-
}
|
|
80
|
-
async function parseTileset(data, options, context) {
|
|
81
|
-
const tilesetJson = JSON.parse(new TextDecoder().decode(data));
|
|
82
|
-
if (tilesetJson?.layerType === POINT_CLOUD) {
|
|
83
|
-
throw new Error('Point Cloud layers currently are not supported by I3SLoader');
|
|
84
|
-
}
|
|
85
|
-
const tilesetPostprocessed = await (0, parse_i3s_1.normalizeTilesetData)(tilesetJson, options, context);
|
|
86
|
-
return tilesetPostprocessed;
|
|
87
|
-
}
|
|
88
|
-
async function parseTile(data, context) {
|
|
89
|
-
data = JSON.parse(new TextDecoder().decode(data));
|
|
90
|
-
return (0, parse_i3s_1.normalizeTileData)(data, context);
|
|
91
|
-
}
|
|
92
|
-
function getMagicNumber(data) {
|
|
93
|
-
if (data instanceof ArrayBuffer) {
|
|
94
|
-
// slice binary data (4 bytes from the beginning) and transform it to hexadecimal numeral system
|
|
95
|
-
return [...new Uint8Array(data, 0, 4)]
|
|
96
|
-
.map((value) => value.toString(16).padStart(2, '0'))
|
|
97
|
-
.join('');
|
|
98
|
-
}
|
|
99
|
-
return null;
|
|
100
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { LoaderOptions, LoaderWithParser } from '@loaders.gl/loader-utils';
|
|
2
|
-
import type { NodePage } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Loader for I3S node pages
|
|
5
|
-
*/
|
|
6
|
-
export declare const I3SNodePageLoader: LoaderWithParser<NodePage, never, LoaderOptions>;
|
|
7
|
-
//# sourceMappingURL=i3s-node-page-loader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"i3s-node-page-loader.d.ts","sourceRoot":"","sources":["../src/i3s-node-page-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAE,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC9E,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAUtC;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,gBAAgB,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAS9E,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.I3SNodePageLoader = void 0;
|
|
4
|
-
// __VERSION__ is injected by babel-plugin-version-inline
|
|
5
|
-
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
6
|
-
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
|
|
7
|
-
async function parseNodePage(data, options) {
|
|
8
|
-
return JSON.parse(new TextDecoder().decode(data));
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Loader for I3S node pages
|
|
12
|
-
*/
|
|
13
|
-
exports.I3SNodePageLoader = {
|
|
14
|
-
name: 'I3S Node Page',
|
|
15
|
-
id: 'i3s-node-page',
|
|
16
|
-
module: 'i3s',
|
|
17
|
-
version: VERSION,
|
|
18
|
-
mimeTypes: ['application/json'],
|
|
19
|
-
parse: parseNodePage,
|
|
20
|
-
extensions: ['json'],
|
|
21
|
-
options: {}
|
|
22
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"i3s-slpk-loader.d.ts","sourceRoot":"","sources":["../src/i3s-slpk-loader.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,aAAa,EAAE,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAQzE,qCAAqC;AACrC,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG;IAC9C,IAAI,CAAC,EAAE;QACL,mCAAmC;QACnC,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,uBAAuB;QACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;KAC3B,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,gBAAgB,CAAC,MAAM,EAAE,KAAK,EAAE,iBAAiB,CASzE,CAAC"}
|
package/dist/i3s-slpk-loader.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SLPKLoader = void 0;
|
|
4
|
-
const zip_1 = require("@loaders.gl/zip");
|
|
5
|
-
const parse_slpk_1 = require("./lib/parsers/parse-slpk/parse-slpk");
|
|
6
|
-
// __VERSION__ is injected by babel-plugin-version-inline
|
|
7
|
-
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
8
|
-
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
|
|
9
|
-
/**
|
|
10
|
-
* Loader for SLPK - Scene Layer Package
|
|
11
|
-
*/
|
|
12
|
-
exports.SLPKLoader = {
|
|
13
|
-
name: 'I3S SLPK (Scene Layer Package)',
|
|
14
|
-
id: 'slpk',
|
|
15
|
-
module: 'i3s',
|
|
16
|
-
version: VERSION,
|
|
17
|
-
mimeTypes: ['application/octet-stream'],
|
|
18
|
-
parse: parseSLPK,
|
|
19
|
-
extensions: ['slpk'],
|
|
20
|
-
options: {}
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* returns a single file from the slpk archive
|
|
24
|
-
* @param data slpk archive data
|
|
25
|
-
* @param options options
|
|
26
|
-
* @returns requested file
|
|
27
|
-
*/
|
|
28
|
-
async function parseSLPK(data, options = {}) {
|
|
29
|
-
return (await (0, parse_slpk_1.parseSLPK)(new zip_1.DataViewFile(new DataView(data)))).getFile(options.slpk?.path ?? '', options.slpk?.pathMode);
|
|
30
|
-
}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,YAAY,EACV,eAAe,EACf,GAAG,EACH,GAAG,EACH,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,oBAAoB,EACpB,UAAU,EACV,eAAe,EACf,SAAS,EACT,MAAM,EACN,gBAAgB,EAChB,SAAS,EACT,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,UAAU,EACV,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,gBAAgB,EAChB,2BAA2B,EAC5B,MAAM,SAAS,CAAC;AACjB,YAAY,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAC,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AACvC,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAC,kBAAkB,EAAE,qBAAqB,EAAC,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAC,2BAA2B,EAAC,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAC,oBAAoB,EAAC,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,qCAAqC,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// loaders.gl, MIT license
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.parseSLPK = exports.ArcGisWebSceneLoader = exports.I3SNodePageLoader = exports.I3SBuildingSceneLayerLoader = exports.loadFeatureAttributes = exports.I3SAttributeLoader = exports.I3SContentLoader = exports.SLPKLoader = exports.I3SLoader = exports.COORDINATE_SYSTEM = void 0;
|
|
5
|
-
var constants_1 = require("./lib/parsers/constants");
|
|
6
|
-
Object.defineProperty(exports, "COORDINATE_SYSTEM", { enumerable: true, get: function () { return constants_1.COORDINATE_SYSTEM; } });
|
|
7
|
-
var i3s_loader_1 = require("./i3s-loader");
|
|
8
|
-
Object.defineProperty(exports, "I3SLoader", { enumerable: true, get: function () { return i3s_loader_1.I3SLoader; } });
|
|
9
|
-
var i3s_slpk_loader_1 = require("./i3s-slpk-loader");
|
|
10
|
-
Object.defineProperty(exports, "SLPKLoader", { enumerable: true, get: function () { return i3s_slpk_loader_1.SLPKLoader; } });
|
|
11
|
-
var i3s_content_loader_1 = require("./i3s-content-loader");
|
|
12
|
-
Object.defineProperty(exports, "I3SContentLoader", { enumerable: true, get: function () { return i3s_content_loader_1.I3SContentLoader; } });
|
|
13
|
-
var i3s_attribute_loader_1 = require("./i3s-attribute-loader");
|
|
14
|
-
Object.defineProperty(exports, "I3SAttributeLoader", { enumerable: true, get: function () { return i3s_attribute_loader_1.I3SAttributeLoader; } });
|
|
15
|
-
Object.defineProperty(exports, "loadFeatureAttributes", { enumerable: true, get: function () { return i3s_attribute_loader_1.loadFeatureAttributes; } });
|
|
16
|
-
var i3s_building_scene_layer_loader_1 = require("./i3s-building-scene-layer-loader");
|
|
17
|
-
Object.defineProperty(exports, "I3SBuildingSceneLayerLoader", { enumerable: true, get: function () { return i3s_building_scene_layer_loader_1.I3SBuildingSceneLayerLoader; } });
|
|
18
|
-
var i3s_node_page_loader_1 = require("./i3s-node-page-loader");
|
|
19
|
-
Object.defineProperty(exports, "I3SNodePageLoader", { enumerable: true, get: function () { return i3s_node_page_loader_1.I3SNodePageLoader; } });
|
|
20
|
-
var arcgis_webscene_loader_1 = require("./arcgis-webscene-loader");
|
|
21
|
-
Object.defineProperty(exports, "ArcGisWebSceneLoader", { enumerable: true, get: function () { return arcgis_webscene_loader_1.ArcGisWebSceneLoader; } });
|
|
22
|
-
var parse_slpk_1 = require("./lib/parsers/parse-slpk/parse-slpk");
|
|
23
|
-
Object.defineProperty(exports, "parseSLPK", { enumerable: true, get: function () { return parse_slpk_1.parseSLPK; } });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"i3s-nodepages-tiles.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/i3s-nodepages-tiles.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAEL,QAAQ,EACR,UAAU,EAIV,gBAAgB,EAEhB,aAAa,EACb,YAAY,EACb,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAiB;IACpC,OAAO,EAAE,YAAY,CAAC;IACtB,SAAS,EAAE,QAAQ,EAAE,CAAM;IAC3B,gBAAgB,EAAE;QAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;QAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAA;KAAC,EAAE,CAAM;IAClF,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,aAAa,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iCAAiC,EAAE,CAAC;QAAC,MAAM,EAAE,gBAAgB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,GAAG,IAAI,CAAC,EAAE,CAAM;IAC5F,gBAAgB,EAAE,MAAM,CAAC;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,oBAAoB,CAA4B;IAExD;;;;;;OAMG;gBACS,OAAO,EAAE,YAAY,EAAE,GAAG,oBAAa,EAAE,OAAO,EAAE,aAAa;IAW3E;;;OAGG;IACG,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAuBlD;;;OAGG;IAEG,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAgE/D;;;;;;OAMG;IACH,OAAO,CAAC,aAAa;IA8BrB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAiBvB;;;;;;;OAOG;IACH,OAAO,CAAC,0BAA0B;IAuBlC;;;;OAIG;IACH,OAAO,CAAC,wCAAwC;IA2BhD;;;OAGG;IACH,OAAO,CAAC,0BAA0B;CAwBnC"}
|