@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/lib/poly/topo.ts
CHANGED
|
@@ -221,7 +221,7 @@ const DefaultSimplifyOptions: SimplifyOptions = { minArea: 500 };
|
|
|
221
221
|
|
|
222
222
|
function log(s: string): void
|
|
223
223
|
{
|
|
224
|
-
|
|
224
|
+
console.log(s);
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
//
|
|
@@ -313,12 +313,22 @@ export function topoSimplifyCollection(col: any, options?: SimplifyOptions): any
|
|
|
313
313
|
if (! bDecided)
|
|
314
314
|
{
|
|
315
315
|
let pp = PP.polyPackTopoArcs(testtopo, arcs);
|
|
316
|
-
|
|
317
|
-
if (selfIntersectFast(pp) || (x && y && !polyContainsPoint(pp, x, y)))
|
|
316
|
+
if (selfIntersectFast(pp))
|
|
318
317
|
{
|
|
319
318
|
keepArcs(topo, oOld.arcs, keepweight);
|
|
320
319
|
nBad++;
|
|
321
320
|
}
|
|
321
|
+
else
|
|
322
|
+
{
|
|
323
|
+
let {x,y} = intpt(f);
|
|
324
|
+
if (x && y && !polyContainsPoint(pp, x, y))
|
|
325
|
+
{
|
|
326
|
+
keepTiny.set(f, f);
|
|
327
|
+
keepArcs(topo, oOld.arcs, 0); // keeps all points to avoid reprocessing these tiny shapes
|
|
328
|
+
nBad++, nTiny++;
|
|
329
|
+
log(`topoSimplifyCollection: ${f.properties.id}: preserving full feature because of intpt problem`);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
322
332
|
}
|
|
323
333
|
}
|
|
324
334
|
});
|