Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@loaders.gl/gis

Package Overview
Dependencies
Maintainers
11
Versions
259
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loaders.gl/gis - npm Package Compare versions

Comparing version 2.2.0-alpha.2 to 2.2.0-alpha.3

322

dist/es5/lib/geojson-to-binary.js

@@ -13,2 +13,8 @@ "use strict";

function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function geojsonToBinary(features) {

@@ -42,8 +48,8 @@ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

var numericPropKeys = {};
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
var _iterator = _createForOfIteratorHelper(features),
_step;
try {
for (var _iterator = features[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var feature = _step.value;

@@ -62,8 +68,8 @@ var geometry = feature.geometry;

pointPositionsCount += geometry.coordinates.length;
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
var _iterator2 = _createForOfIteratorHelper(geometry.coordinates),
_step2;
try {
for (var _iterator2 = geometry.coordinates[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var point = _step2.value;

@@ -73,14 +79,5 @@ coordLengths.add(point.length);

} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
_iterator2.e(err);
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) {
_iterator2["return"]();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
_iterator2.f();
}

@@ -94,8 +91,8 @@

linePathsCount++;
var _iteratorNormalCompletion3 = true;
var _didIteratorError3 = false;
var _iteratorError3 = undefined;
var _iterator3 = _createForOfIteratorHelper(geometry.coordinates),
_step3;
try {
for (var _iterator3 = geometry.coordinates[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
var coord = _step3.value;

@@ -105,14 +102,5 @@ coordLengths.add(coord.length);

} catch (err) {
_didIteratorError3 = true;
_iteratorError3 = err;
_iterator3.e(err);
} finally {
try {
if (!_iteratorNormalCompletion3 && _iterator3["return"] != null) {
_iterator3["return"]();
}
} finally {
if (_didIteratorError3) {
throw _iteratorError3;
}
}
_iterator3.f();
}

@@ -124,17 +112,17 @@

lineFeaturesCount++;
var _iteratorNormalCompletion4 = true;
var _didIteratorError4 = false;
var _iteratorError4 = undefined;
var _iterator4 = _createForOfIteratorHelper(geometry.coordinates),
_step4;
try {
for (var _iterator4 = geometry.coordinates[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
var line = _step4.value;
linePositionsCount += line.length;
linePathsCount++;
var _iteratorNormalCompletion5 = true;
var _didIteratorError5 = false;
var _iteratorError5 = undefined;
var _iterator5 = _createForOfIteratorHelper(line),
_step5;
try {
for (var _iterator5 = line[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
var _coord = _step5.value;

@@ -144,29 +132,11 @@ coordLengths.add(_coord.length);

} catch (err) {
_didIteratorError5 = true;
_iteratorError5 = err;
_iterator5.e(err);
} finally {
try {
if (!_iteratorNormalCompletion5 && _iterator5["return"] != null) {
_iterator5["return"]();
}
} finally {
if (_didIteratorError5) {
throw _iteratorError5;
}
}
_iterator5.f();
}
}
} catch (err) {
_didIteratorError4 = true;
_iteratorError4 = err;
_iterator4.e(err);
} finally {
try {
if (!_iteratorNormalCompletion4 && _iterator4["return"] != null) {
_iterator4["return"]();
}
} finally {
if (_didIteratorError4) {
throw _iteratorError4;
}
}
_iterator4.f();
}

@@ -181,8 +151,8 @@

polygonPositionsCount += flatten(geometry.coordinates).length;
var _iteratorNormalCompletion6 = true;
var _didIteratorError6 = false;
var _iteratorError6 = undefined;
var _iterator6 = _createForOfIteratorHelper(flatten(geometry.coordinates)),
_step6;
try {
for (var _iterator6 = flatten(geometry.coordinates)[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
var _coord2 = _step6.value;

@@ -192,14 +162,5 @@ coordLengths.add(_coord2.length);

} catch (err) {
_didIteratorError6 = true;
_iteratorError6 = err;
_iterator6.e(err);
} finally {
try {
if (!_iteratorNormalCompletion6 && _iterator6["return"] != null) {
_iterator6["return"]();
}
} finally {
if (_didIteratorError6) {
throw _iteratorError6;
}
}
_iterator6.f();
}

@@ -211,8 +172,8 @@

polygonFeaturesCount++;
var _iteratorNormalCompletion7 = true;
var _didIteratorError7 = false;
var _iteratorError7 = undefined;
var _iterator7 = _createForOfIteratorHelper(geometry.coordinates),
_step7;
try {
for (var _iterator7 = geometry.coordinates[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) {
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
var polygon = _step7.value;

@@ -222,8 +183,8 @@ polygonObjectsCount++;

polygonPositionsCount += flatten(polygon).length;
var _iteratorNormalCompletion8 = true;
var _didIteratorError8 = false;
var _iteratorError8 = undefined;
var _iterator8 = _createForOfIteratorHelper(flatten(polygon)),
_step8;
try {
for (var _iterator8 = flatten(polygon)[Symbol.iterator](), _step8; !(_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); _iteratorNormalCompletion8 = true) {
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
var _coord3 = _step8.value;

@@ -233,29 +194,11 @@ coordLengths.add(_coord3.length);

} catch (err) {
_didIteratorError8 = true;
_iteratorError8 = err;
_iterator8.e(err);
} finally {
try {
if (!_iteratorNormalCompletion8 && _iterator8["return"] != null) {
_iterator8["return"]();
}
} finally {
if (_didIteratorError8) {
throw _iteratorError8;
}
}
_iterator8.f();
}
}
} catch (err) {
_didIteratorError7 = true;
_iteratorError7 = err;
_iterator7.e(err);
} finally {
try {
if (!_iteratorNormalCompletion7 && _iterator7["return"] != null) {
_iterator7["return"]();
}
} finally {
if (_didIteratorError7) {
throw _iteratorError7;
}
}
_iterator7.f();
}

@@ -277,14 +220,5 @@

} catch (err) {
_didIteratorError = true;
_iteratorError = err;
_iterator.e(err);
} finally {
try {
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
_iterator["return"]();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
_iterator.f();
}

@@ -353,24 +287,15 @@

var object = _arr[_i];
var _iteratorNormalCompletion10 = true;
var _didIteratorError10 = false;
var _iteratorError10 = undefined;
var _iterator9 = _createForOfIteratorHelper(numericPropKeys),
_step9;
try {
for (var _iterator10 = numericPropKeys[Symbol.iterator](), _step10; !(_iteratorNormalCompletion10 = (_step10 = _iterator10.next()).done); _iteratorNormalCompletion10 = true) {
var propName = _step10.value;
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
var propName = _step9.value;
object.numericProps[propName] = new Float32Array(object.positions.length / coordLength);
}
} catch (err) {
_didIteratorError10 = true;
_iteratorError10 = err;
_iterator9.e(err);
} finally {
try {
if (!_iteratorNormalCompletion10 && _iterator10["return"] != null) {
_iterator10["return"]();
}
} finally {
if (_didIteratorError10) {
throw _iteratorError10;
}
}
_iterator9.f();
}

@@ -394,9 +319,9 @@ }

};
var _iteratorNormalCompletion9 = true;
var _didIteratorError9 = false;
var _iteratorError9 = undefined;
var _iterator10 = _createForOfIteratorHelper(features),
_step10;
try {
for (var _iterator9 = features[Symbol.iterator](), _step9; !(_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done); _iteratorNormalCompletion9 = true) {
var feature = _step9.value;
for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
var feature = _step10.value;
var geometry = feature.geometry;

@@ -449,14 +374,5 @@ var properties = feature.properties;

} catch (err) {
_didIteratorError9 = true;
_iteratorError9 = err;
_iterator10.e(err);
} finally {
try {
if (!_iteratorNormalCompletion9 && _iterator9["return"] != null) {
_iterator9["return"]();
}
} finally {
if (_didIteratorError9) {
throw _iteratorError9;
}
}
_iterator10.f();
}

@@ -476,8 +392,7 @@

function handleMultiPoint(coords, points, indexMap, coordLength, properties) {
var _iteratorNormalCompletion11 = true;
var _didIteratorError11 = false;
var _iteratorError11 = undefined;
var _iterator11 = _createForOfIteratorHelper(coords),
_step11;
try {
for (var _iterator11 = coords[Symbol.iterator](), _step11; !(_iteratorNormalCompletion11 = (_step11 = _iterator11.next()).done); _iteratorNormalCompletion11 = true) {
for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
var point = _step11.value;

@@ -487,14 +402,5 @@ handlePoint(point, points, indexMap, coordLength, properties);

} catch (err) {
_didIteratorError11 = true;
_iteratorError11 = err;
_iterator11.e(err);
} finally {
try {
if (!_iteratorNormalCompletion11 && _iterator11["return"] != null) {
_iterator11["return"]();
}
} finally {
if (_didIteratorError11) {
throw _iteratorError11;
}
}
_iterator11.f();
}

@@ -515,8 +421,7 @@ }

function handleMultiLineString(coords, lines, indexMap, coordLength, properties) {
var _iteratorNormalCompletion12 = true;
var _didIteratorError12 = false;
var _iteratorError12 = undefined;
var _iterator12 = _createForOfIteratorHelper(coords),
_step12;
try {
for (var _iterator12 = coords[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = true) {
for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
var line = _step12.value;

@@ -526,14 +431,5 @@ handleLineString(line, lines, indexMap, coordLength, properties);

} catch (err) {
_didIteratorError12 = true;
_iteratorError12 = err;
_iterator12.e(err);
} finally {
try {
if (!_iteratorNormalCompletion12 && _iterator12["return"] != null) {
_iterator12["return"]();
}
} finally {
if (_didIteratorError12) {
throw _iteratorError12;
}
}
_iterator12.f();
}

@@ -545,8 +441,8 @@ }

indexMap.polygonObject++;
var _iteratorNormalCompletion13 = true;
var _didIteratorError13 = false;
var _iteratorError13 = undefined;
var _iterator13 = _createForOfIteratorHelper(coords),
_step13;
try {
for (var _iterator13 = coords[Symbol.iterator](), _step13; !(_iteratorNormalCompletion13 = (_step13 = _iterator13.next()).done); _iteratorNormalCompletion13 = true) {
for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
var ring = _step13.value;

@@ -563,14 +459,5 @@ polygons.primitivePolygonIndices[indexMap.polygonRing] = indexMap.polygonPosition;

} catch (err) {
_didIteratorError13 = true;
_iteratorError13 = err;
_iterator13.e(err);
} finally {
try {
if (!_iteratorNormalCompletion13 && _iterator13["return"] != null) {
_iterator13["return"]();
}
} finally {
if (_didIteratorError13) {
throw _iteratorError13;
}
}
_iterator13.f();
}

@@ -580,8 +467,7 @@ }

function handleMultiPolygon(coords, polygons, indexMap, coordLength, properties) {
var _iteratorNormalCompletion14 = true;
var _didIteratorError14 = false;
var _iteratorError14 = undefined;
var _iterator14 = _createForOfIteratorHelper(coords),
_step14;
try {
for (var _iterator14 = coords[Symbol.iterator](), _step14; !(_iteratorNormalCompletion14 = (_step14 = _iterator14.next()).done); _iteratorNormalCompletion14 = true) {
for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
var polygon = _step14.value;

@@ -591,14 +477,5 @@ handlePolygon(polygon, polygons, indexMap, coordLength, properties);

} catch (err) {
_didIteratorError14 = true;
_iteratorError14 = err;
_iterator14.e(err);
} finally {
try {
if (!_iteratorNormalCompletion14 && _iterator14["return"] != null) {
_iterator14["return"]();
}
} finally {
if (_didIteratorError14) {
throw _iteratorError14;
}
}
_iterator14.f();
}

@@ -703,8 +580,8 @@ }

var index = startVertex * coordLength;
var _iteratorNormalCompletion15 = true;
var _didIteratorError15 = false;
var _iteratorError15 = undefined;
var _iterator15 = _createForOfIteratorHelper(coords),
_step15;
try {
for (var _iterator15 = coords[Symbol.iterator](), _step15; !(_iteratorNormalCompletion15 = (_step15 = _iterator15.next()).done); _iteratorNormalCompletion15 = true) {
for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
var coord = _step15.value;

@@ -715,14 +592,5 @@ array.set(coord, index);

} catch (err) {
_didIteratorError15 = true;
_iteratorError15 = err;
_iterator15.e(err);
} finally {
try {
if (!_iteratorNormalCompletion15 && _iterator15["return"] != null) {
_iterator15["return"]();
}
} finally {
if (_didIteratorError15) {
throw _iteratorError15;
}
}
_iterator15.f();
}

@@ -729,0 +597,0 @@ }

import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
export function geojsonToBinary(features) {

@@ -28,8 +35,8 @@ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

var numericPropKeys = {};
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
var _iterator = _createForOfIteratorHelper(features),
_step;
try {
for (var _iterator = features[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var feature = _step.value;

@@ -48,8 +55,8 @@ var geometry = feature.geometry;

pointPositionsCount += geometry.coordinates.length;
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
var _iterator2 = _createForOfIteratorHelper(geometry.coordinates),
_step2;
try {
for (var _iterator2 = geometry.coordinates[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var point = _step2.value;

@@ -59,14 +66,5 @@ coordLengths.add(point.length);

} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
_iterator2.e(err);
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) {
_iterator2["return"]();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
_iterator2.f();
}

@@ -80,8 +78,8 @@

linePathsCount++;
var _iteratorNormalCompletion3 = true;
var _didIteratorError3 = false;
var _iteratorError3 = undefined;
var _iterator3 = _createForOfIteratorHelper(geometry.coordinates),
_step3;
try {
for (var _iterator3 = geometry.coordinates[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
var coord = _step3.value;

@@ -91,14 +89,5 @@ coordLengths.add(coord.length);

} catch (err) {
_didIteratorError3 = true;
_iteratorError3 = err;
_iterator3.e(err);
} finally {
try {
if (!_iteratorNormalCompletion3 && _iterator3["return"] != null) {
_iterator3["return"]();
}
} finally {
if (_didIteratorError3) {
throw _iteratorError3;
}
}
_iterator3.f();
}

@@ -110,17 +99,17 @@

lineFeaturesCount++;
var _iteratorNormalCompletion4 = true;
var _didIteratorError4 = false;
var _iteratorError4 = undefined;
var _iterator4 = _createForOfIteratorHelper(geometry.coordinates),
_step4;
try {
for (var _iterator4 = geometry.coordinates[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
var line = _step4.value;
linePositionsCount += line.length;
linePathsCount++;
var _iteratorNormalCompletion5 = true;
var _didIteratorError5 = false;
var _iteratorError5 = undefined;
var _iterator5 = _createForOfIteratorHelper(line),
_step5;
try {
for (var _iterator5 = line[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
var _coord = _step5.value;

@@ -130,29 +119,11 @@ coordLengths.add(_coord.length);

} catch (err) {
_didIteratorError5 = true;
_iteratorError5 = err;
_iterator5.e(err);
} finally {
try {
if (!_iteratorNormalCompletion5 && _iterator5["return"] != null) {
_iterator5["return"]();
}
} finally {
if (_didIteratorError5) {
throw _iteratorError5;
}
}
_iterator5.f();
}
}
} catch (err) {
_didIteratorError4 = true;
_iteratorError4 = err;
_iterator4.e(err);
} finally {
try {
if (!_iteratorNormalCompletion4 && _iterator4["return"] != null) {
_iterator4["return"]();
}
} finally {
if (_didIteratorError4) {
throw _iteratorError4;
}
}
_iterator4.f();
}

@@ -167,8 +138,8 @@

polygonPositionsCount += flatten(geometry.coordinates).length;
var _iteratorNormalCompletion6 = true;
var _didIteratorError6 = false;
var _iteratorError6 = undefined;
var _iterator6 = _createForOfIteratorHelper(flatten(geometry.coordinates)),
_step6;
try {
for (var _iterator6 = flatten(geometry.coordinates)[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
var _coord2 = _step6.value;

@@ -178,14 +149,5 @@ coordLengths.add(_coord2.length);

} catch (err) {
_didIteratorError6 = true;
_iteratorError6 = err;
_iterator6.e(err);
} finally {
try {
if (!_iteratorNormalCompletion6 && _iterator6["return"] != null) {
_iterator6["return"]();
}
} finally {
if (_didIteratorError6) {
throw _iteratorError6;
}
}
_iterator6.f();
}

@@ -197,8 +159,8 @@

polygonFeaturesCount++;
var _iteratorNormalCompletion7 = true;
var _didIteratorError7 = false;
var _iteratorError7 = undefined;
var _iterator7 = _createForOfIteratorHelper(geometry.coordinates),
_step7;
try {
for (var _iterator7 = geometry.coordinates[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) {
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
var polygon = _step7.value;

@@ -208,8 +170,8 @@ polygonObjectsCount++;

polygonPositionsCount += flatten(polygon).length;
var _iteratorNormalCompletion8 = true;
var _didIteratorError8 = false;
var _iteratorError8 = undefined;
var _iterator8 = _createForOfIteratorHelper(flatten(polygon)),
_step8;
try {
for (var _iterator8 = flatten(polygon)[Symbol.iterator](), _step8; !(_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); _iteratorNormalCompletion8 = true) {
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
var _coord3 = _step8.value;

@@ -219,29 +181,11 @@ coordLengths.add(_coord3.length);

} catch (err) {
_didIteratorError8 = true;
_iteratorError8 = err;
_iterator8.e(err);
} finally {
try {
if (!_iteratorNormalCompletion8 && _iterator8["return"] != null) {
_iterator8["return"]();
}
} finally {
if (_didIteratorError8) {
throw _iteratorError8;
}
}
_iterator8.f();
}
}
} catch (err) {
_didIteratorError7 = true;
_iteratorError7 = err;
_iterator7.e(err);
} finally {
try {
if (!_iteratorNormalCompletion7 && _iterator7["return"] != null) {
_iterator7["return"]();
}
} finally {
if (_didIteratorError7) {
throw _iteratorError7;
}
}
_iterator7.f();
}

@@ -263,14 +207,5 @@

} catch (err) {
_didIteratorError = true;
_iteratorError = err;
_iterator.e(err);
} finally {
try {
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
_iterator["return"]();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
_iterator.f();
}

@@ -339,24 +274,15 @@

var object = _arr[_i];
var _iteratorNormalCompletion10 = true;
var _didIteratorError10 = false;
var _iteratorError10 = undefined;
var _iterator9 = _createForOfIteratorHelper(numericPropKeys),
_step9;
try {
for (var _iterator10 = numericPropKeys[Symbol.iterator](), _step10; !(_iteratorNormalCompletion10 = (_step10 = _iterator10.next()).done); _iteratorNormalCompletion10 = true) {
var propName = _step10.value;
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
var propName = _step9.value;
object.numericProps[propName] = new Float32Array(object.positions.length / coordLength);
}
} catch (err) {
_didIteratorError10 = true;
_iteratorError10 = err;
_iterator9.e(err);
} finally {
try {
if (!_iteratorNormalCompletion10 && _iterator10["return"] != null) {
_iterator10["return"]();
}
} finally {
if (_didIteratorError10) {
throw _iteratorError10;
}
}
_iterator9.f();
}

@@ -380,9 +306,9 @@ }

};
var _iteratorNormalCompletion9 = true;
var _didIteratorError9 = false;
var _iteratorError9 = undefined;
var _iterator10 = _createForOfIteratorHelper(features),
_step10;
try {
for (var _iterator9 = features[Symbol.iterator](), _step9; !(_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done); _iteratorNormalCompletion9 = true) {
var feature = _step9.value;
for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
var feature = _step10.value;
var geometry = feature.geometry;

@@ -435,14 +361,5 @@ var properties = feature.properties;

} catch (err) {
_didIteratorError9 = true;
_iteratorError9 = err;
_iterator10.e(err);
} finally {
try {
if (!_iteratorNormalCompletion9 && _iterator9["return"] != null) {
_iterator9["return"]();
}
} finally {
if (_didIteratorError9) {
throw _iteratorError9;
}
}
_iterator10.f();
}

@@ -462,8 +379,7 @@

function handleMultiPoint(coords, points, indexMap, coordLength, properties) {
var _iteratorNormalCompletion11 = true;
var _didIteratorError11 = false;
var _iteratorError11 = undefined;
var _iterator11 = _createForOfIteratorHelper(coords),
_step11;
try {
for (var _iterator11 = coords[Symbol.iterator](), _step11; !(_iteratorNormalCompletion11 = (_step11 = _iterator11.next()).done); _iteratorNormalCompletion11 = true) {
for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
var point = _step11.value;

@@ -473,14 +389,5 @@ handlePoint(point, points, indexMap, coordLength, properties);

} catch (err) {
_didIteratorError11 = true;
_iteratorError11 = err;
_iterator11.e(err);
} finally {
try {
if (!_iteratorNormalCompletion11 && _iterator11["return"] != null) {
_iterator11["return"]();
}
} finally {
if (_didIteratorError11) {
throw _iteratorError11;
}
}
_iterator11.f();
}

@@ -501,8 +408,7 @@ }

function handleMultiLineString(coords, lines, indexMap, coordLength, properties) {
var _iteratorNormalCompletion12 = true;
var _didIteratorError12 = false;
var _iteratorError12 = undefined;
var _iterator12 = _createForOfIteratorHelper(coords),
_step12;
try {
for (var _iterator12 = coords[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = true) {
for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
var line = _step12.value;

@@ -512,14 +418,5 @@ handleLineString(line, lines, indexMap, coordLength, properties);

} catch (err) {
_didIteratorError12 = true;
_iteratorError12 = err;
_iterator12.e(err);
} finally {
try {
if (!_iteratorNormalCompletion12 && _iterator12["return"] != null) {
_iterator12["return"]();
}
} finally {
if (_didIteratorError12) {
throw _iteratorError12;
}
}
_iterator12.f();
}

@@ -531,8 +428,8 @@ }

indexMap.polygonObject++;
var _iteratorNormalCompletion13 = true;
var _didIteratorError13 = false;
var _iteratorError13 = undefined;
var _iterator13 = _createForOfIteratorHelper(coords),
_step13;
try {
for (var _iterator13 = coords[Symbol.iterator](), _step13; !(_iteratorNormalCompletion13 = (_step13 = _iterator13.next()).done); _iteratorNormalCompletion13 = true) {
for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
var ring = _step13.value;

@@ -549,14 +446,5 @@ polygons.primitivePolygonIndices[indexMap.polygonRing] = indexMap.polygonPosition;

} catch (err) {
_didIteratorError13 = true;
_iteratorError13 = err;
_iterator13.e(err);
} finally {
try {
if (!_iteratorNormalCompletion13 && _iterator13["return"] != null) {
_iterator13["return"]();
}
} finally {
if (_didIteratorError13) {
throw _iteratorError13;
}
}
_iterator13.f();
}

@@ -566,8 +454,7 @@ }

function handleMultiPolygon(coords, polygons, indexMap, coordLength, properties) {
var _iteratorNormalCompletion14 = true;
var _didIteratorError14 = false;
var _iteratorError14 = undefined;
var _iterator14 = _createForOfIteratorHelper(coords),
_step14;
try {
for (var _iterator14 = coords[Symbol.iterator](), _step14; !(_iteratorNormalCompletion14 = (_step14 = _iterator14.next()).done); _iteratorNormalCompletion14 = true) {
for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
var polygon = _step14.value;

@@ -577,14 +464,5 @@ handlePolygon(polygon, polygons, indexMap, coordLength, properties);

} catch (err) {
_didIteratorError14 = true;
_iteratorError14 = err;
_iterator14.e(err);
} finally {
try {
if (!_iteratorNormalCompletion14 && _iterator14["return"] != null) {
_iterator14["return"]();
}
} finally {
if (_didIteratorError14) {
throw _iteratorError14;
}
}
_iterator14.f();
}

@@ -689,8 +567,8 @@ }

var index = startVertex * coordLength;
var _iteratorNormalCompletion15 = true;
var _didIteratorError15 = false;
var _iteratorError15 = undefined;
var _iterator15 = _createForOfIteratorHelper(coords),
_step15;
try {
for (var _iterator15 = coords[Symbol.iterator](), _step15; !(_iteratorNormalCompletion15 = (_step15 = _iterator15.next()).done); _iteratorNormalCompletion15 = true) {
for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
var coord = _step15.value;

@@ -701,14 +579,5 @@ array.set(coord, index);

} catch (err) {
_didIteratorError15 = true;
_iteratorError15 = err;
_iterator15.e(err);
} finally {
try {
if (!_iteratorNormalCompletion15 && _iterator15["return"] != null) {
_iterator15["return"]();
}
} finally {
if (_didIteratorError15) {
throw _iteratorError15;
}
}
_iterator15.f();
}

@@ -715,0 +584,0 @@ }

{
"name": "@loaders.gl/gis",
"description": "Helpers for GIS category data",
"version": "2.2.0-alpha.2",
"version": "2.2.0-alpha.3",
"license": "MIT",

@@ -31,3 +31,3 @@ "publishConfig": {

},
"gitHead": "76d78ba514e077ce034cc45b73bdd1957e0788df"
"gitHead": "4a14e79ae0486151240fb18896c413edeb5b0b67"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc