@loaders.gl/flatgeobuf 4.0.0-alpha.5 → 4.0.0-alpha.6
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/bundle.js +2 -2
- package/dist/dist.min.js +123 -24
- package/dist/es5/bundle.js +6 -0
- package/dist/es5/bundle.js.map +1 -0
- package/dist/es5/flatgeobuf-loader.js +26 -0
- package/dist/es5/flatgeobuf-loader.js.map +1 -0
- package/dist/es5/index.js +47 -0
- package/dist/es5/index.js.map +1 -0
- package/dist/es5/lib/binary-geometries.js +137 -0
- package/dist/es5/lib/binary-geometries.js.map +1 -0
- package/dist/es5/lib/parse-flatgeobuf.js +189 -0
- package/dist/es5/lib/parse-flatgeobuf.js.map +1 -0
- package/dist/es5/lib/types.js +2 -0
- package/dist/es5/lib/types.js.map +1 -0
- package/dist/es5/workers/flatgeobuf-worker.js +6 -0
- package/dist/es5/workers/flatgeobuf-worker.js.map +1 -0
- package/dist/esm/bundle.js +4 -0
- package/dist/esm/bundle.js.map +1 -0
- package/dist/esm/flatgeobuf-loader.js +18 -0
- package/dist/esm/flatgeobuf-loader.js.map +1 -0
- package/dist/esm/index.js +12 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lib/binary-geometries.js +126 -0
- package/dist/esm/lib/binary-geometries.js.map +1 -0
- package/dist/esm/lib/parse-flatgeobuf.js +112 -0
- package/dist/esm/lib/parse-flatgeobuf.js.map +1 -0
- package/dist/esm/lib/types.js +2 -0
- package/dist/esm/lib/types.js.map +1 -0
- package/dist/esm/workers/flatgeobuf-worker.js +4 -0
- package/dist/esm/workers/flatgeobuf-worker.js.map +1 -0
- package/dist/flatgeobuf-loader.d.ts +3 -1
- package/dist/flatgeobuf-loader.d.ts.map +1 -1
- package/dist/flatgeobuf-loader.js +22 -15
- package/dist/flatgeobuf-worker.js +147 -37
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -10
- package/dist/lib/binary-geometries.js +108 -132
- package/dist/lib/parse-flatgeobuf.d.ts +7 -2
- package/dist/lib/parse-flatgeobuf.d.ts.map +1 -1
- package/dist/lib/parse-flatgeobuf.js +115 -97
- package/dist/lib/types.d.ts +13 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +2 -0
- package/dist/workers/flatgeobuf-worker.js +5 -4
- package/package.json +7 -7
- package/src/flatgeobuf-loader.ts +4 -1
- package/src/lib/parse-flatgeobuf.ts +35 -16
- package/src/lib/types.ts +13 -0
- package/dist/bundle.js.map +0 -1
- package/dist/flatgeobuf-loader.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/binary-geometries.js.map +0 -1
- package/dist/lib/parse-flatgeobuf.js.map +0 -1
- package/dist/workers/flatgeobuf-worker.js.map +0 -1
package/dist/bundle.js
CHANGED
package/dist/dist.min.js
CHANGED
|
@@ -44,12 +44,80 @@
|
|
|
44
44
|
mimeTypes: ["application/octet-stream"],
|
|
45
45
|
category: "geometry",
|
|
46
46
|
options: {
|
|
47
|
-
flatgeobuf: {
|
|
47
|
+
flatgeobuf: {
|
|
48
|
+
shape: "geojson"
|
|
49
|
+
}
|
|
48
50
|
}
|
|
49
51
|
};
|
|
50
52
|
}
|
|
51
53
|
});
|
|
52
54
|
|
|
55
|
+
// ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
56
|
+
function _typeof(obj) {
|
|
57
|
+
"@babel/helpers - typeof";
|
|
58
|
+
return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(obj2) {
|
|
59
|
+
return typeof obj2;
|
|
60
|
+
} : function(obj2) {
|
|
61
|
+
return obj2 && typeof Symbol == "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
62
|
+
}, _typeof(obj);
|
|
63
|
+
}
|
|
64
|
+
var init_typeof = __esm({
|
|
65
|
+
"../../node_modules/@babel/runtime/helpers/esm/typeof.js"() {
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
// ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
70
|
+
function _toPrimitive(input, hint) {
|
|
71
|
+
if (_typeof(input) !== "object" || input === null)
|
|
72
|
+
return input;
|
|
73
|
+
var prim = input[Symbol.toPrimitive];
|
|
74
|
+
if (prim !== void 0) {
|
|
75
|
+
var res = prim.call(input, hint || "default");
|
|
76
|
+
if (_typeof(res) !== "object")
|
|
77
|
+
return res;
|
|
78
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
79
|
+
}
|
|
80
|
+
return (hint === "string" ? String : Number)(input);
|
|
81
|
+
}
|
|
82
|
+
var init_toPrimitive = __esm({
|
|
83
|
+
"../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js"() {
|
|
84
|
+
init_typeof();
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
89
|
+
function _toPropertyKey(arg) {
|
|
90
|
+
var key = _toPrimitive(arg, "string");
|
|
91
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
92
|
+
}
|
|
93
|
+
var init_toPropertyKey = __esm({
|
|
94
|
+
"../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js"() {
|
|
95
|
+
init_typeof();
|
|
96
|
+
init_toPrimitive();
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
// ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
101
|
+
function _defineProperty(obj, key, value) {
|
|
102
|
+
key = _toPropertyKey(key);
|
|
103
|
+
if (key in obj) {
|
|
104
|
+
Object.defineProperty(obj, key, {
|
|
105
|
+
value,
|
|
106
|
+
enumerable: true,
|
|
107
|
+
configurable: true,
|
|
108
|
+
writable: true
|
|
109
|
+
});
|
|
110
|
+
} else {
|
|
111
|
+
obj[key] = value;
|
|
112
|
+
}
|
|
113
|
+
return obj;
|
|
114
|
+
}
|
|
115
|
+
var init_defineProperty = __esm({
|
|
116
|
+
"../../node_modules/@babel/runtime/helpers/esm/defineProperty.js"() {
|
|
117
|
+
init_toPropertyKey();
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
|
|
53
121
|
// ../../node_modules/proj4/lib/global.js
|
|
54
122
|
function global_default(defs2) {
|
|
55
123
|
defs2("EPSG:4326", "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees");
|
|
@@ -310,7 +378,7 @@
|
|
|
310
378
|
ENDED = -1;
|
|
311
379
|
whitespace = /\s/;
|
|
312
380
|
latin = /[A-Za-z]/;
|
|
313
|
-
keyword = /[A-Za-
|
|
381
|
+
keyword = /[A-Za-z84_]/;
|
|
314
382
|
endThings = /[,\]]/;
|
|
315
383
|
digets = /[\d\.E\-\+]/;
|
|
316
384
|
Parser.prototype.readCharicter = function() {
|
|
@@ -597,15 +665,14 @@
|
|
|
597
665
|
if (wkt.AXIS) {
|
|
598
666
|
var axisOrder = "";
|
|
599
667
|
for (var i = 0, ii = wkt.AXIS.length; i < ii; ++i) {
|
|
600
|
-
var axis = wkt.AXIS[i];
|
|
601
|
-
|
|
602
|
-
if (descriptor.indexOf("north") !== -1) {
|
|
668
|
+
var axis = [wkt.AXIS[i][0].toLowerCase(), wkt.AXIS[i][1].toLowerCase()];
|
|
669
|
+
if (axis[0].indexOf("north") !== -1 || (axis[0] === "y" || axis[0] === "lat") && axis[1] === "north") {
|
|
603
670
|
axisOrder += "n";
|
|
604
|
-
} else if (
|
|
671
|
+
} else if (axis[0].indexOf("south") !== -1 || (axis[0] === "y" || axis[0] === "lat") && axis[1] === "south") {
|
|
605
672
|
axisOrder += "s";
|
|
606
|
-
} else if (
|
|
673
|
+
} else if (axis[0].indexOf("east") !== -1 || (axis[0] === "x" || axis[0] === "lon") && axis[1] === "east") {
|
|
607
674
|
axisOrder += "e";
|
|
608
|
-
} else if (
|
|
675
|
+
} else if (axis[0].indexOf("west") !== -1 || (axis[0] === "x" || axis[0] === "lon") && axis[1] === "west") {
|
|
609
676
|
axisOrder += "w";
|
|
610
677
|
}
|
|
611
678
|
}
|
|
@@ -701,12 +768,22 @@
|
|
|
701
768
|
};
|
|
702
769
|
var list = [
|
|
703
770
|
["standard_parallel_1", "Standard_Parallel_1"],
|
|
771
|
+
["standard_parallel_1", "Latitude of 1st standard parallel"],
|
|
704
772
|
["standard_parallel_2", "Standard_Parallel_2"],
|
|
773
|
+
["standard_parallel_2", "Latitude of 2nd standard parallel"],
|
|
705
774
|
["false_easting", "False_Easting"],
|
|
775
|
+
["false_easting", "False easting"],
|
|
776
|
+
["false-easting", "Easting at false origin"],
|
|
706
777
|
["false_northing", "False_Northing"],
|
|
778
|
+
["false_northing", "False northing"],
|
|
779
|
+
["false_northing", "Northing at false origin"],
|
|
707
780
|
["central_meridian", "Central_Meridian"],
|
|
781
|
+
["central_meridian", "Longitude of natural origin"],
|
|
782
|
+
["central_meridian", "Longitude of false origin"],
|
|
708
783
|
["latitude_of_origin", "Latitude_Of_Origin"],
|
|
709
784
|
["latitude_of_origin", "Central_Parallel"],
|
|
785
|
+
["latitude_of_origin", "Latitude of natural origin"],
|
|
786
|
+
["latitude_of_origin", "Latitude of false origin"],
|
|
710
787
|
["scale_factor", "Scale_Factor"],
|
|
711
788
|
["k0", "scale_factor"],
|
|
712
789
|
["latitude_of_center", "Latitude_Of_Center"],
|
|
@@ -5971,10 +6048,11 @@
|
|
|
5971
6048
|
}
|
|
5972
6049
|
});
|
|
5973
6050
|
|
|
5974
|
-
// node_modules/@math.gl/proj4/dist/esm/lib/proj4-projection.js
|
|
6051
|
+
// ../../node_modules/@math.gl/proj4/dist/esm/lib/proj4-projection.js
|
|
5975
6052
|
var Proj4Projection;
|
|
5976
6053
|
var init_proj4_projection = __esm({
|
|
5977
|
-
"node_modules/@math.gl/proj4/dist/esm/lib/proj4-projection.js"() {
|
|
6054
|
+
"../../node_modules/@math.gl/proj4/dist/esm/lib/proj4-projection.js"() {
|
|
6055
|
+
init_defineProperty();
|
|
5978
6056
|
init_lib();
|
|
5979
6057
|
Proj4Projection = class {
|
|
5980
6058
|
static defineProjectionAliases(aliases) {
|
|
@@ -5988,20 +6066,27 @@
|
|
|
5988
6066
|
from = "WGS84",
|
|
5989
6067
|
to = "WGS84"
|
|
5990
6068
|
}) {
|
|
5991
|
-
|
|
5992
|
-
|
|
6069
|
+
_defineProperty(this, "_projection", void 0);
|
|
6070
|
+
this._projection = lib_default(from, to);
|
|
6071
|
+
if (!this._projection) {
|
|
5993
6072
|
throw new Error("Invalid projection");
|
|
5994
6073
|
}
|
|
5995
|
-
this.project =
|
|
5996
|
-
this.unproject =
|
|
6074
|
+
this.project = this.project.bind(this);
|
|
6075
|
+
this.unproject = this.unproject.bind(this);
|
|
6076
|
+
}
|
|
6077
|
+
project(coord) {
|
|
6078
|
+
return this._projection.forward(coord);
|
|
6079
|
+
}
|
|
6080
|
+
unproject(coord) {
|
|
6081
|
+
return this._projection.inverse(coord);
|
|
5997
6082
|
}
|
|
5998
6083
|
};
|
|
5999
6084
|
}
|
|
6000
6085
|
});
|
|
6001
6086
|
|
|
6002
|
-
// node_modules/@math.gl/proj4/dist/esm/index.js
|
|
6087
|
+
// ../../node_modules/@math.gl/proj4/dist/esm/index.js
|
|
6003
6088
|
var init_esm = __esm({
|
|
6004
|
-
"node_modules/@math.gl/proj4/dist/esm/index.js"() {
|
|
6089
|
+
"../../node_modules/@math.gl/proj4/dist/esm/index.js"() {
|
|
6005
6090
|
init_proj4_projection();
|
|
6006
6091
|
}
|
|
6007
6092
|
});
|
|
@@ -9340,19 +9425,33 @@
|
|
|
9340
9425
|
return parsedGeometry;
|
|
9341
9426
|
}
|
|
9342
9427
|
function parseFlatGeobuf(arrayBuffer, options) {
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
|
|
9428
|
+
const shape = options?.gis?.format || options?.flatgeobuf?.shape;
|
|
9429
|
+
switch (shape) {
|
|
9430
|
+
case "geojson-row-table": {
|
|
9431
|
+
const table = {
|
|
9432
|
+
shape: "geojson-row-table",
|
|
9433
|
+
data: parseFlatGeobufToGeoJSON(arrayBuffer, options)
|
|
9434
|
+
};
|
|
9435
|
+
return table;
|
|
9436
|
+
}
|
|
9437
|
+
case "columnar-table":
|
|
9438
|
+
return { shape: "columnar-table", data: parseFlatGeobufToBinary(arrayBuffer, options) };
|
|
9439
|
+
case "geojson":
|
|
9440
|
+
return parseFlatGeobufToGeoJSON(arrayBuffer, options);
|
|
9441
|
+
case "binary":
|
|
9442
|
+
return parseFlatGeobufToBinary(arrayBuffer, options);
|
|
9443
|
+
default:
|
|
9444
|
+
throw new Error(shape);
|
|
9348
9445
|
}
|
|
9349
|
-
return parseFlatGeobufToGeoJSON(arrayBuffer, options);
|
|
9350
9446
|
}
|
|
9351
9447
|
function parseFlatGeobufToBinary(arrayBuffer, options) {
|
|
9352
|
-
const
|
|
9353
|
-
return (0, import_generic.deserialize)(
|
|
9448
|
+
const array = new Uint8Array(arrayBuffer);
|
|
9449
|
+
return (0, import_generic.deserialize)(array, binaryFromFeature);
|
|
9354
9450
|
}
|
|
9355
9451
|
function parseFlatGeobufToGeoJSON(arrayBuffer, options) {
|
|
9452
|
+
if (arrayBuffer.byteLength === 0) {
|
|
9453
|
+
return [];
|
|
9454
|
+
}
|
|
9356
9455
|
const { reproject = false, _targetCrs = "WGS84" } = options && options.gis || {};
|
|
9357
9456
|
const arr = new Uint8Array(arrayBuffer);
|
|
9358
9457
|
let headerMeta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle.js","names":["moduleExports","require","globalThis","loaders","module","exports","Object","assign"],"sources":["../../src/bundle.ts"],"sourcesContent":["// @ts-nocheck\nconst moduleExports = require('./index');\nglobalThis.loaders = globalThis.loaders || {};\nmodule.exports = Object.assign(globalThis.loaders, moduleExports);\n"],"mappings":";;AACA,IAAMA,aAAa,GAAGC,OAAO,CAAC,SAAS,CAAC;AACxCC,UAAU,CAACC,OAAO,GAAGD,UAAU,CAACC,OAAO,IAAI,CAAC,CAAC;AAC7CC,MAAM,CAACC,OAAO,GAAGC,MAAM,CAACC,MAAM,CAACL,UAAU,CAACC,OAAO,EAAEH,aAAa,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports._typecheckFlatGeobufLoader = exports.FlatGeobufLoader = void 0;
|
|
7
|
+
var VERSION = typeof "4.0.0-alpha.6" !== 'undefined' ? "4.0.0-alpha.6" : 'latest';
|
|
8
|
+
var FlatGeobufLoader = {
|
|
9
|
+
id: 'flatgeobuf',
|
|
10
|
+
name: 'FlatGeobuf',
|
|
11
|
+
module: 'flatgeobuf',
|
|
12
|
+
version: VERSION,
|
|
13
|
+
worker: true,
|
|
14
|
+
extensions: ['fgb'],
|
|
15
|
+
mimeTypes: ['application/octet-stream'],
|
|
16
|
+
category: 'geometry',
|
|
17
|
+
options: {
|
|
18
|
+
flatgeobuf: {
|
|
19
|
+
shape: 'geojson'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.FlatGeobufLoader = FlatGeobufLoader;
|
|
24
|
+
var _typecheckFlatGeobufLoader = FlatGeobufLoader;
|
|
25
|
+
exports._typecheckFlatGeobufLoader = _typecheckFlatGeobufLoader;
|
|
26
|
+
//# sourceMappingURL=flatgeobuf-loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flatgeobuf-loader.js","names":["VERSION","FlatGeobufLoader","id","name","module","version","worker","extensions","mimeTypes","category","options","flatgeobuf","shape","exports","_typecheckFlatGeobufLoader"],"sources":["../../src/flatgeobuf-loader.ts"],"sourcesContent":["import type {Loader} from '@loaders.gl/loader-utils';\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 const FlatGeobufLoader = {\n id: 'flatgeobuf',\n name: 'FlatGeobuf',\n module: 'flatgeobuf',\n version: VERSION,\n worker: true,\n extensions: ['fgb'],\n mimeTypes: ['application/octet-stream'],\n category: 'geometry',\n options: {\n flatgeobuf: {\n // Set to GeoJSON for backwards compatibility\n shape: 'geojson'\n }\n }\n};\n\nexport const _typecheckFlatGeobufLoader: Loader = FlatGeobufLoader;\n"],"mappings":";;;;;;AAIA,IAAMA,OAAO,GAAG,sBAAkB,KAAK,WAAW,qBAAiB,QAAQ;AAEpE,IAAMC,gBAAgB,GAAG;EAC9BC,EAAE,EAAE,YAAY;EAChBC,IAAI,EAAE,YAAY;EAClBC,MAAM,EAAE,YAAY;EACpBC,OAAO,EAAEL,OAAO;EAChBM,MAAM,EAAE,IAAI;EACZC,UAAU,EAAE,CAAC,KAAK,CAAC;EACnBC,SAAS,EAAE,CAAC,0BAA0B,CAAC;EACvCC,QAAQ,EAAE,UAAU;EACpBC,OAAO,EAAE;IACPC,UAAU,EAAE;MAEVC,KAAK,EAAE;IACT;EACF;AACF,CAAC;AAACC,OAAA,CAAAZ,gBAAA,GAAAA,gBAAA;AAEK,IAAMa,0BAAkC,GAAGb,gBAAgB;AAACY,OAAA,CAAAC,0BAAA,GAAAA,0BAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.FlatGeobufLoader = void 0;
|
|
8
|
+
Object.defineProperty(exports, "FlatGeobufWorkerLoader", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _flatgeobufLoader.FlatGeobufLoader;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
exports._typecheckFlatGeobufLoader = void 0;
|
|
15
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
16
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
17
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
|
+
var _flatgeobufLoader = require("./flatgeobuf-loader");
|
|
19
|
+
var _parseFlatgeobuf = require("./lib/parse-flatgeobuf");
|
|
20
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
21
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
22
|
+
var FlatGeobufLoader = _objectSpread(_objectSpread({}, _flatgeobufLoader.FlatGeobufLoader), {}, {
|
|
23
|
+
parse: function () {
|
|
24
|
+
var _parse = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee(arrayBuffer, options) {
|
|
25
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
26
|
+
while (1) switch (_context.prev = _context.next) {
|
|
27
|
+
case 0:
|
|
28
|
+
return _context.abrupt("return", (0, _parseFlatgeobuf.parseFlatGeobuf)(arrayBuffer, options));
|
|
29
|
+
case 1:
|
|
30
|
+
case "end":
|
|
31
|
+
return _context.stop();
|
|
32
|
+
}
|
|
33
|
+
}, _callee);
|
|
34
|
+
}));
|
|
35
|
+
function parse(_x, _x2) {
|
|
36
|
+
return _parse.apply(this, arguments);
|
|
37
|
+
}
|
|
38
|
+
return parse;
|
|
39
|
+
}(),
|
|
40
|
+
parseSync: _parseFlatgeobuf.parseFlatGeobuf,
|
|
41
|
+
parseInBatchesFromStream: _parseFlatgeobuf.parseFlatGeobufInBatches,
|
|
42
|
+
binary: true
|
|
43
|
+
});
|
|
44
|
+
exports.FlatGeobufLoader = FlatGeobufLoader;
|
|
45
|
+
var _typecheckFlatGeobufLoader = FlatGeobufLoader;
|
|
46
|
+
exports._typecheckFlatGeobufLoader = _typecheckFlatGeobufLoader;
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_flatgeobufLoader","require","_parseFlatgeobuf","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","FlatGeobufLoader","FlatGeobufWorkerLoader","parse","_parse","_asyncToGenerator2","_regenerator","mark","_callee","arrayBuffer","options","wrap","_callee$","_context","prev","next","abrupt","parseFlatGeobuf","stop","_x","_x2","parseSync","parseInBatchesFromStream","parseFlatGeobufInBatches","binary","exports","_typecheckFlatGeobufLoader"],"sources":["../../src/index.ts"],"sourcesContent":["import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {FlatGeobufLoader as FlatGeobufWorkerLoader} from './flatgeobuf-loader';\nimport {parseFlatGeobuf, parseFlatGeobufInBatches} from './lib/parse-flatgeobuf';\n\nexport {FlatGeobufWorkerLoader};\n\nexport const FlatGeobufLoader = {\n ...FlatGeobufWorkerLoader,\n parse: async (arrayBuffer, options) => parseFlatGeobuf(arrayBuffer, options),\n parseSync: parseFlatGeobuf,\n parseInBatchesFromStream: parseFlatGeobufInBatches,\n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kCAAsB;EACzBC,KAAK;IAAA,IAAAC,MAAA,OAAAC,kBAAA,CAAAR,OAAA,EAAAS,YAAA,CAAAT,OAAA,CAAAU,IAAA,CAAE,SAAAC,QAAOC,WAAW,EAAEC,OAAO;MAAA,OAAAJ,YAAA,CAAAT,OAAA,CAAAc,IAAA,UAAAC,SAAAC,QAAA;QAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;UAAA;YAAA,OAAAF,QAAA,CAAAG,MAAA,WAAK,IAAAC,gCAAe,EAACR,WAAW,EAAEC,OAAO,CAAC;UAAA;UAAA;YAAA,OAAAG,QAAA,CAAAK,IAAA;QAAA;MAAA,GAAAV,OAAA;IAAA;IAAA,SAAAL,MAAAgB,EAAA,EAAAC,GAAA;MAAA,OAAAhB,MAAA,CAAAjB,KAAA,OAAAI,SAAA;IAAA;IAAA,OAAAY,KAAA;EAAA;EAC5EkB,SAAS,EAAEJ,gCAAe;EAC1BK,wBAAwB,EAAEC,yCAAwB;EAClDC,MAAM,EAAE;AAAI,EACb;AAACC,OAAA,CAAAxB,gBAAA,GAAAA,gBAAA;AAEK,IAAMyB,0BAA4C,GAAGzB,gBAAgB;AAACwB,OAAA,CAAAC,0BAAA,GAAAA,0BAAA"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.fromGeometry = fromGeometry;
|
|
7
|
+
var _header_generated = require("flatgeobuf/lib/cjs/header_generated");
|
|
8
|
+
function parsePoint(geometry) {
|
|
9
|
+
var xy = geometry.xyArray();
|
|
10
|
+
var z = geometry.zArray();
|
|
11
|
+
var positions = blitArrays(xy, z);
|
|
12
|
+
return {
|
|
13
|
+
positions: positions
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function parseLines(geometry) {
|
|
17
|
+
var xy = geometry.xyArray();
|
|
18
|
+
var z = geometry.zArray();
|
|
19
|
+
var positions = blitArrays(xy, z);
|
|
20
|
+
var ends = geometry.endsArray() && Array.from(geometry.endsArray()) || [xy.length / 2];
|
|
21
|
+
ends.unshift(0);
|
|
22
|
+
var pathIndices = {
|
|
23
|
+
value: new Uint16Array(ends),
|
|
24
|
+
size: 1
|
|
25
|
+
};
|
|
26
|
+
return {
|
|
27
|
+
positions: positions,
|
|
28
|
+
pathIndices: pathIndices
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function parsePolygons(geometry) {
|
|
32
|
+
var xy = geometry.xyArray();
|
|
33
|
+
var z = geometry.zArray();
|
|
34
|
+
var positions = blitArrays(xy, z);
|
|
35
|
+
var ends = geometry.endsArray() && Array.from(geometry.endsArray()) || [xy.length / 2];
|
|
36
|
+
ends.unshift(0);
|
|
37
|
+
var primitivePolygonIndices = {
|
|
38
|
+
value: new Uint16Array(ends),
|
|
39
|
+
size: 1
|
|
40
|
+
};
|
|
41
|
+
var polygonIndices = {
|
|
42
|
+
value: new Uint16Array([0, xy.length / 2]),
|
|
43
|
+
size: 1
|
|
44
|
+
};
|
|
45
|
+
return {
|
|
46
|
+
positions: positions,
|
|
47
|
+
primitivePolygonIndices: primitivePolygonIndices,
|
|
48
|
+
polygonIndices: polygonIndices
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function parseMultiPolygons(geometry) {
|
|
52
|
+
var parsedParts = [];
|
|
53
|
+
var nPositions = 0;
|
|
54
|
+
var nPrimitivePolygonIndices = 1;
|
|
55
|
+
var nPolygonIndices = 1;
|
|
56
|
+
for (var i = 0; i < geometry.partsLength(); i++) {
|
|
57
|
+
var part = geometry.parts(i);
|
|
58
|
+
var polygon = parsePolygons(part);
|
|
59
|
+
nPositions += polygon.positions.value.length;
|
|
60
|
+
nPrimitivePolygonIndices += polygon.primitivePolygonIndices.value.length - 1;
|
|
61
|
+
nPolygonIndices += polygon.polygonIndices.value.length - 1;
|
|
62
|
+
parsedParts.push(polygon);
|
|
63
|
+
}
|
|
64
|
+
var concatPositions = new Float64Array(nPositions);
|
|
65
|
+
var concatPrimitivePolygonIndices = new Uint32Array(nPrimitivePolygonIndices);
|
|
66
|
+
var concatPolygonIndices = new Uint32Array(nPolygonIndices);
|
|
67
|
+
var positionCounter = 0;
|
|
68
|
+
var primitivePolygonIndicesCounter = 1;
|
|
69
|
+
var polygonIndicesCounter = 1;
|
|
70
|
+
var positionSize = parsedParts[0].positions.size;
|
|
71
|
+
for (var _i = 0, _parsedParts = parsedParts; _i < _parsedParts.length; _i++) {
|
|
72
|
+
var parsedPart = _parsedParts[_i];
|
|
73
|
+
concatPositions.set(parsedPart.positions.value, positionCounter * positionSize);
|
|
74
|
+
concatPrimitivePolygonIndices.set(parsedPart.primitivePolygonIndices.value.subarray(1).map(function (x) {
|
|
75
|
+
return x + positionCounter;
|
|
76
|
+
}), primitivePolygonIndicesCounter);
|
|
77
|
+
concatPolygonIndices.set(parsedPart.polygonIndices.value.subarray(1).map(function (x) {
|
|
78
|
+
return x + positionCounter;
|
|
79
|
+
}), polygonIndicesCounter);
|
|
80
|
+
positionCounter += parsedPart.positions.value.length / positionSize;
|
|
81
|
+
primitivePolygonIndicesCounter += parsedPart.primitivePolygonIndices.value.length - 1;
|
|
82
|
+
polygonIndicesCounter += parsedPart.polygonIndices.value.length - 1;
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
positions: {
|
|
86
|
+
value: concatPositions,
|
|
87
|
+
size: positionSize
|
|
88
|
+
},
|
|
89
|
+
primitivePolygonIndices: {
|
|
90
|
+
value: concatPrimitivePolygonIndices,
|
|
91
|
+
size: 1
|
|
92
|
+
},
|
|
93
|
+
polygonIndices: {
|
|
94
|
+
value: concatPolygonIndices,
|
|
95
|
+
size: 1
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function blitArrays(xy, z) {
|
|
100
|
+
if (!z) {
|
|
101
|
+
return {
|
|
102
|
+
value: xy,
|
|
103
|
+
size: 2
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
if (z.length * 2 !== xy.length) {
|
|
107
|
+
throw new Error('Z array must be half XY array\'s length');
|
|
108
|
+
}
|
|
109
|
+
var totalLength = xy.length + z.length;
|
|
110
|
+
var xyz = new Float64Array(totalLength);
|
|
111
|
+
for (var i = 0; i < xy.length / 2; i++) {
|
|
112
|
+
xyz[i * 3 + 0] = xy[i * 2 + 0];
|
|
113
|
+
xyz[i * 3 + 1] = xy[i * 2 + 1];
|
|
114
|
+
xyz[i * 3 + 2] = z[i];
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
value: xyz,
|
|
118
|
+
size: 3
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
function fromGeometry(geometry, type) {
|
|
122
|
+
switch (type) {
|
|
123
|
+
case _header_generated.GeometryType.Point:
|
|
124
|
+
case _header_generated.GeometryType.MultiPoint:
|
|
125
|
+
return parsePoint(geometry);
|
|
126
|
+
case _header_generated.GeometryType.LineString:
|
|
127
|
+
case _header_generated.GeometryType.MultiLineString:
|
|
128
|
+
return parseLines(geometry);
|
|
129
|
+
case _header_generated.GeometryType.Polygon:
|
|
130
|
+
return parsePolygons(geometry);
|
|
131
|
+
case _header_generated.GeometryType.MultiPolygon:
|
|
132
|
+
return parseMultiPolygons(geometry);
|
|
133
|
+
default:
|
|
134
|
+
throw new Error("Unimplemented geometry type: ".concat(type));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=binary-geometries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary-geometries.js","names":["_header_generated","require","parsePoint","geometry","xy","xyArray","z","zArray","positions","blitArrays","parseLines","ends","endsArray","Array","from","length","unshift","pathIndices","value","Uint16Array","size","parsePolygons","primitivePolygonIndices","polygonIndices","parseMultiPolygons","parsedParts","nPositions","nPrimitivePolygonIndices","nPolygonIndices","i","partsLength","part","parts","polygon","push","concatPositions","Float64Array","concatPrimitivePolygonIndices","Uint32Array","concatPolygonIndices","positionCounter","primitivePolygonIndicesCounter","polygonIndicesCounter","positionSize","_i","_parsedParts","parsedPart","set","subarray","map","x","Error","totalLength","xyz","fromGeometry","type","GeometryType","Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","concat"],"sources":["../../../src/lib/binary-geometries.ts"],"sourcesContent":["import {GeometryType} from 'flatgeobuf/lib/cjs/header_generated';\n\n// Parse Point to flat array\nfunction parsePoint(geometry) {\n const xy = geometry.xyArray();\n const z = geometry.zArray();\n const positions = blitArrays(xy, z);\n return {positions};\n}\n\nfunction parseLines(geometry) {\n const xy = geometry.xyArray();\n const z = geometry.zArray();\n const positions = blitArrays(xy, z);\n\n // If endsArray is null, a single LineString. Otherwise, contains the end\n // indices of each part of the MultiLineString. geometry.endsArray() omits the\n // initial 0 that we have in our internal format.\n const ends = (geometry.endsArray() && Array.from(geometry.endsArray())) || [xy.length / 2];\n ends.unshift(0);\n\n const pathIndices = {value: new Uint16Array(ends), size: 1};\n\n return {\n positions,\n pathIndices\n };\n}\n\nfunction parsePolygons(geometry) {\n const xy = geometry.xyArray();\n const z = geometry.zArray();\n const positions = blitArrays(xy, z);\n\n // If endsArray is null, a simple Polygon with no inner rings. Otherwise,\n // contains the end indices of each ring of the Polygon. geometry.endsArray()\n // omits the initial 0 that we have in our internal format.\n const ends = (geometry.endsArray() && Array.from(geometry.endsArray())) || [xy.length / 2];\n ends.unshift(0);\n\n const primitivePolygonIndices = {value: new Uint16Array(ends), size: 1};\n const polygonIndices = {value: new Uint16Array([0, xy.length / 2]), size: 1};\n\n return {\n positions,\n primitivePolygonIndices,\n polygonIndices\n };\n}\n\n// eslint-disable-next-line max-statements\nfunction parseMultiPolygons(geometry) {\n // Create arrays for each geometry part, then concatenate\n const parsedParts: any[] = [];\n let nPositions = 0;\n let nPrimitivePolygonIndices = 1;\n let nPolygonIndices = 1;\n\n for (let i = 0; i < geometry.partsLength(); i++) {\n const part = geometry.parts(i);\n const polygon = parsePolygons(part);\n\n nPositions += polygon.positions.value.length;\n nPrimitivePolygonIndices += polygon.primitivePolygonIndices.value.length - 1;\n nPolygonIndices += polygon.polygonIndices.value.length - 1;\n\n parsedParts.push(polygon);\n }\n\n const concatPositions = new Float64Array(nPositions);\n const concatPrimitivePolygonIndices = new Uint32Array(nPrimitivePolygonIndices);\n const concatPolygonIndices = new Uint32Array(nPolygonIndices);\n\n let positionCounter = 0;\n let primitivePolygonIndicesCounter = 1;\n let polygonIndicesCounter = 1;\n\n // Assumes all parts of the multipolygon have the same size\n const positionSize = parsedParts[0].positions.size;\n\n for (const parsedPart of parsedParts) {\n concatPositions.set(parsedPart.positions.value, positionCounter * positionSize);\n\n // For indices, need to add positionCounter so that position indices are\n // correct in the concatenated positions\n concatPrimitivePolygonIndices.set(\n // eslint-disable-next-line\n parsedPart.primitivePolygonIndices.value.subarray(1).map((x) => x + positionCounter),\n primitivePolygonIndicesCounter\n );\n concatPolygonIndices.set(\n // eslint-disable-next-line\n parsedPart.polygonIndices.value.subarray(1).map((x) => x + positionCounter),\n polygonIndicesCounter\n );\n\n positionCounter += parsedPart.positions.value.length / positionSize;\n primitivePolygonIndicesCounter += parsedPart.primitivePolygonIndices.value.length - 1;\n polygonIndicesCounter += parsedPart.polygonIndices.value.length - 1;\n }\n\n return {\n positions: {value: concatPositions, size: positionSize},\n primitivePolygonIndices: {value: concatPrimitivePolygonIndices, size: 1},\n polygonIndices: {value: concatPolygonIndices, size: 1}\n };\n}\n\n// Combine xy and z arrays\nfunction blitArrays(xy, z) {\n if (!z) {\n return {value: xy, size: 2};\n }\n\n if (z.length * 2 !== xy.length) {\n throw new Error('Z array must be half XY array\\'s length');\n }\n const totalLength = xy.length + z.length;\n\n const xyz = new Float64Array(totalLength);\n for (let i = 0; i < xy.length / 2; i++) {\n xyz[i * 3 + 0] = xy[i * 2 + 0];\n xyz[i * 3 + 1] = xy[i * 2 + 1];\n xyz[i * 3 + 2] = z[i];\n }\n return {value: xyz, size: 3};\n}\n\nexport function fromGeometry(geometry, type) {\n switch (type) {\n case GeometryType.Point:\n case GeometryType.MultiPoint:\n return parsePoint(geometry);\n case GeometryType.LineString:\n case GeometryType.MultiLineString:\n return parseLines(geometry);\n case GeometryType.Polygon:\n return parsePolygons(geometry);\n case GeometryType.MultiPolygon:\n return parseMultiPolygons(geometry);\n default:\n throw new Error(`Unimplemented geometry type: ${type}`);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAGA,SAASC,UAAUA,CAACC,QAAQ,EAAE;EAC5B,IAAMC,EAAE,GAAGD,QAAQ,CAACE,OAAO,CAAC,CAAC;EAC7B,IAAMC,CAAC,GAAGH,QAAQ,CAACI,MAAM,CAAC,CAAC;EAC3B,IAAMC,SAAS,GAAGC,UAAU,CAACL,EAAE,EAAEE,CAAC,CAAC;EACnC,OAAO;IAACE,SAAS,EAATA;EAAS,CAAC;AACpB;AAEA,SAASE,UAAUA,CAACP,QAAQ,EAAE;EAC5B,IAAMC,EAAE,GAAGD,QAAQ,CAACE,OAAO,CAAC,CAAC;EAC7B,IAAMC,CAAC,GAAGH,QAAQ,CAACI,MAAM,CAAC,CAAC;EAC3B,IAAMC,SAAS,GAAGC,UAAU,CAACL,EAAE,EAAEE,CAAC,CAAC;EAKnC,IAAMK,IAAI,GAAIR,QAAQ,CAACS,SAAS,CAAC,CAAC,IAAIC,KAAK,CAACC,IAAI,CAACX,QAAQ,CAACS,SAAS,CAAC,CAAC,CAAC,IAAK,CAACR,EAAE,CAACW,MAAM,GAAG,CAAC,CAAC;EAC1FJ,IAAI,CAACK,OAAO,CAAC,CAAC,CAAC;EAEf,IAAMC,WAAW,GAAG;IAACC,KAAK,EAAE,IAAIC,WAAW,CAACR,IAAI,CAAC;IAAES,IAAI,EAAE;EAAC,CAAC;EAE3D,OAAO;IACLZ,SAAS,EAATA,SAAS;IACTS,WAAW,EAAXA;EACF,CAAC;AACH;AAEA,SAASI,aAAaA,CAAClB,QAA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