@dra2020/baseclient 1.0.41 → 1.0.44
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 -4
- package/dist/baseclient.js.map +1 -1
- package/lib/poly/topo.ts +13 -4
- package/package.json +1 -1
package/dist/baseclient.js
CHANGED
|
@@ -8467,12 +8467,12 @@ function bigTimeString(ms) {
|
|
|
8467
8467
|
}
|
|
8468
8468
|
function intpt(f) {
|
|
8469
8469
|
let x = 0, y = 0;
|
|
8470
|
-
for (let p
|
|
8470
|
+
for (let p of ['INTPTLON20', 'INTPTLON10', 'INTPTLON', 'labelx'])
|
|
8471
8471
|
if (f.properties[p] && !isNaN(Number(f.properties[p]))) {
|
|
8472
8472
|
x = Number(f.properties[p]);
|
|
8473
8473
|
break;
|
|
8474
8474
|
}
|
|
8475
|
-
for (let p
|
|
8475
|
+
for (let p of ['INTPTLAT20', 'INTPTLAT10', 'INTPTLAT', 'labely'])
|
|
8476
8476
|
if (f.properties[p] && !isNaN(Number(f.properties[p]))) {
|
|
8477
8477
|
y = Number(f.properties[p]);
|
|
8478
8478
|
break;
|
|
@@ -8560,11 +8560,18 @@ 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
|
+
keepArcs(topo, oOld.arcs, keepweight);
|
|
8571
|
+
nBad++;
|
|
8572
|
+
log(`topoSimplifyCollection: ${f.properties.id}: increasing feature fidelity because of intpt problem`);
|
|
8573
|
+
}
|
|
8574
|
+
}
|
|
8568
8575
|
}
|
|
8569
8576
|
}
|
|
8570
8577
|
});
|