@dra2020/baseclient 1.0.47 → 1.0.48
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 +5 -3
- package/dist/baseclient.js.map +1 -1
- package/lib/poly/topo.ts +4 -2
- package/package.json +1 -1
package/lib/poly/topo.ts
CHANGED
|
@@ -313,6 +313,7 @@ export function topoSimplifyCollection(col: any, options?: SimplifyOptions): any
|
|
|
313
313
|
if (! bDecided)
|
|
314
314
|
{
|
|
315
315
|
let pp = PP.polyPackTopoArcs(testtopo, arcs);
|
|
316
|
+
P.polyRewindRings(pp);
|
|
316
317
|
if (selfIntersectFast(pp))
|
|
317
318
|
{
|
|
318
319
|
keepArcs(topo, oOld.arcs, keepweight);
|
|
@@ -321,12 +322,13 @@ export function topoSimplifyCollection(col: any, options?: SimplifyOptions): any
|
|
|
321
322
|
else
|
|
322
323
|
{
|
|
323
324
|
let {x,y} = intpt(f);
|
|
324
|
-
|
|
325
|
+
let d = PL.polyDistance(pp, x, y);
|
|
326
|
+
if (d < 0.00001) // d is negative if outside the polygon, so that qualifies here
|
|
325
327
|
{
|
|
326
328
|
keepTiny.set(f, f);
|
|
327
329
|
keepArcs(topo, oOld.arcs, 0); // keeps all points to avoid reprocessing these tiny shapes
|
|
328
330
|
nBad++, nTiny++;
|
|
329
|
-
log(`topoSimplifyCollection: ${f.properties.id}: increasing feature fidelity because
|
|
331
|
+
log(`topoSimplifyCollection: ${f.properties.id}: increasing feature fidelity because intpt dist is ${d}`);
|
|
330
332
|
}
|
|
331
333
|
}
|
|
332
334
|
}
|