@dra2020/baseclient 1.0.39 → 1.0.40
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/baseclient.js +23 -1
- package/dist/baseclient.js.map +1 -1
- package/dist/poly/poly.d.ts +1 -0
- package/lib/poly/poly.ts +25 -0
- package/package.json +1 -1
package/dist/baseclient.js
CHANGED
|
@@ -5973,7 +5973,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
5973
5973
|
return result;
|
|
5974
5974
|
};
|
|
5975
5975
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5976
|
-
exports.polyRewindRings = exports.featureRewind = exports.polyTransform = exports.npoints = exports.polyDescribe = exports.polyCompactness = exports.makeConvexHullMonotoneChain2D = exports.polyConvexHull = exports.polyToExteriorPoints = exports.polyFromCircle = exports.polyToPolsbyPopperCircle = exports.polyToCircle = exports.Circle = exports.polyPerimeter = exports.polyDiameter = exports.polyArea = exports.polyNull = exports.polyNormalize = exports.polySimpleArea = exports.DefaultOptions = exports.EARTH_RADIUS = exports.DefaultTickOptions = void 0;
|
|
5976
|
+
exports.polyBadCoordinates = exports.polyRewindRings = exports.featureRewind = exports.polyTransform = exports.npoints = exports.polyDescribe = exports.polyCompactness = exports.makeConvexHullMonotoneChain2D = exports.polyConvexHull = exports.polyToExteriorPoints = exports.polyFromCircle = exports.polyToPolsbyPopperCircle = exports.polyToCircle = exports.Circle = exports.polyPerimeter = exports.polyDiameter = exports.polyArea = exports.polyNull = exports.polyNormalize = exports.polySimpleArea = exports.DefaultOptions = exports.EARTH_RADIUS = exports.DefaultTickOptions = void 0;
|
|
5977
5977
|
const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
|
|
5978
5978
|
const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
|
|
5979
5979
|
const graham_scan_1 = __webpack_require__(/*! ./graham-scan */ "./lib/poly/graham-scan.ts");
|
|
@@ -6578,6 +6578,28 @@ exports.polyRewindRings = polyRewindRings;
|
|
|
6578
6578
|
function twoTimesArea(x2, x1, y2, y1) {
|
|
6579
6579
|
return (x2 - x1) * (y2 + y1);
|
|
6580
6580
|
}
|
|
6581
|
+
function badCoord(c) {
|
|
6582
|
+
return isNaN(c) || c > 360 || c < -360;
|
|
6583
|
+
}
|
|
6584
|
+
function polyBadCoordinates(f) {
|
|
6585
|
+
if (f.type === 'FeatureCollection' && f.features) {
|
|
6586
|
+
for (let i = 0; i < f.features.length; i++)
|
|
6587
|
+
if (polyBadCoordinates(f.features[i]))
|
|
6588
|
+
return true;
|
|
6589
|
+
return false;
|
|
6590
|
+
}
|
|
6591
|
+
let pp = polyNormalize(f);
|
|
6592
|
+
let bad = false;
|
|
6593
|
+
if (pp) {
|
|
6594
|
+
PP.polyPackEachPoint(pp, (b, iPoly, iRing, iOffset) => {
|
|
6595
|
+
if (bad)
|
|
6596
|
+
return;
|
|
6597
|
+
bad = badCoord(b[iOffset]) || badCoord(b[iOffset + 1]);
|
|
6598
|
+
});
|
|
6599
|
+
}
|
|
6600
|
+
return bad;
|
|
6601
|
+
}
|
|
6602
|
+
exports.polyBadCoordinates = polyBadCoordinates;
|
|
6581
6603
|
|
|
6582
6604
|
|
|
6583
6605
|
/***/ }),
|