@dra2020/baseclient 1.0.42 → 1.0.43
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 +11 -3
- package/dist/baseclient.js.map +1 -1
- package/lib/poly/topo.ts +13 -3
- package/package.json +1 -1
package/dist/baseclient.js
CHANGED
|
@@ -8481,7 +8481,7 @@ function intpt(f) {
|
|
|
8481
8481
|
}
|
|
8482
8482
|
const DefaultSimplifyOptions = { minArea: 500 };
|
|
8483
8483
|
function log(s) {
|
|
8484
|
-
|
|
8484
|
+
console.log(s);
|
|
8485
8485
|
}
|
|
8486
8486
|
//
|
|
8487
8487
|
// topoSimplifyCollection:
|
|
@@ -8560,11 +8560,19 @@ function topoSimplifyCollection(col, options) {
|
|
|
8560
8560
|
}
|
|
8561
8561
|
if (!bDecided) {
|
|
8562
8562
|
let pp = PP.polyPackTopoArcs(testtopo, arcs);
|
|
8563
|
-
|
|
8564
|
-
if (shamos_1.selfIntersectFast(pp) || (x && y && !pointinpoly_1.polyContainsPoint(pp, x, y))) {
|
|
8563
|
+
if (shamos_1.selfIntersectFast(pp)) {
|
|
8565
8564
|
keepArcs(topo, oOld.arcs, keepweight);
|
|
8566
8565
|
nBad++;
|
|
8567
8566
|
}
|
|
8567
|
+
else {
|
|
8568
|
+
let { x, y } = intpt(f);
|
|
8569
|
+
if (x && y && !pointinpoly_1.polyContainsPoint(pp, x, y)) {
|
|
8570
|
+
keepTiny.set(f, f);
|
|
8571
|
+
keepArcs(topo, oOld.arcs, 0); // keeps all points to avoid reprocessing these tiny shapes
|
|
8572
|
+
nBad++, nTiny++;
|
|
8573
|
+
log(`topoSimplifyCollection: ${f.properties.id}: preserving full feature because of intpt problem`);
|
|
8574
|
+
}
|
|
8575
|
+
}
|
|
8568
8576
|
}
|
|
8569
8577
|
}
|
|
8570
8578
|
});
|