@dra2020/baseclient 1.0.124 → 1.0.126
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
CHANGED
|
@@ -6349,6 +6349,12 @@ function featureCleanHoles(f) {
|
|
|
6349
6349
|
|| f.geometry.type !== 'MultiPolygon'
|
|
6350
6350
|
|| !Array.isArray(f.geometry.coordinates))
|
|
6351
6351
|
return f;
|
|
6352
|
+
// Bail out if excessive computation cost (and complex poly likely already correct, heuristically)
|
|
6353
|
+
let d = (0, poly_1.polyDescribe)(f);
|
|
6354
|
+
if (d.npoly + d.nhole > 10) {
|
|
6355
|
+
//console.log(`featureCleanHoles: bailing out on polygon with ${d.npoly} polygons and ${d.nhole} holes`);
|
|
6356
|
+
return f;
|
|
6357
|
+
}
|
|
6352
6358
|
// Normalize to flattened polygon
|
|
6353
6359
|
f.geometry.coordinates = flattenMultiPoly(f.geometry.coordinates);
|
|
6354
6360
|
let polys = f.geometry.coordinates;
|