@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.
@@ -8350,7 +8350,6 @@ const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
8350
8350
  const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
8351
8351
  const PL = __importStar(__webpack_require__(/*! ./polylabel */ "./lib/poly/polylabel.ts"));
8352
8352
  const shamos_1 = __webpack_require__(/*! ./shamos */ "./lib/poly/shamos.ts");
8353
- const pointinpoly_1 = __webpack_require__(/*! ./pointinpoly */ "./lib/poly/pointinpoly.ts");
8354
8353
  function getGEOID(f) {
8355
8354
  if (f.features && f.features.length)
8356
8355
  f = f.features[0];
@@ -8601,17 +8600,20 @@ function topoSimplifyCollection(col, options) {
8601
8600
  }
8602
8601
  if (!bDecided) {
8603
8602
  let pp = PP.polyPackTopoArcs(testtopo, arcs);
8603
+ P.polyRewindRings(pp);
8604
8604
  if (shamos_1.selfIntersectFast(pp)) {
8605
8605
  keepArcs(topo, oOld.arcs, keepweight);
8606
8606
  nBad++;
8607
8607
  }
8608
8608
  else {
8609
8609
  let { x, y } = intpt(f);
8610
- if (x && y && !pointinpoly_1.polyContainsPoint(pp, x, y)) {
8610
+ let d = PL.polyDistance(pp, x, y);
8611
+ if (d < 0.00001) // d is negative if outside the polygon, so that qualifies here
8612
+ {
8611
8613
  keepTiny.set(f, f);
8612
8614
  keepArcs(topo, oOld.arcs, 0); // keeps all points to avoid reprocessing these tiny shapes
8613
8615
  nBad++, nTiny++;
8614
- log(`topoSimplifyCollection: ${f.properties.id}: increasing feature fidelity because of intpt problem`);
8616
+ log(`topoSimplifyCollection: ${f.properties.id}: increasing feature fidelity because intpt dist is ${d}`);
8615
8617
  }
8616
8618
  }
8617
8619
  }