@dra2020/baseclient 1.0.156 → 1.0.158

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/lib/geo/geo.ts CHANGED
@@ -536,6 +536,8 @@ export class GeoMultiCollection
536
536
  let e = this.nthEntry(0);
537
537
  if (n == 1)
538
538
  {
539
+ // Note that this is potentially invalid shortcut when some features are hidden from base geometry.
540
+ // Could test overall count of objects vs. this count to check.
539
541
  this.all.topo = this._topo(e);
540
542
  this.all.col = this.all.col || e.col;
541
543
  this.all.map = this.all.map || e.map;
package/lib/poly/union.ts CHANGED
@@ -49,9 +49,16 @@ export function polyIntersects(p1: any, p2: any): boolean
49
49
  if (iRing2 == 0)
50
50
  {
51
51
  let c2 = unpackCoords(buffer2, iOffset2, nPoints2);
52
- let result = _intersection(c1, c2);
53
- if (result && result.length > 0)
54
- bIntersects = true;
52
+ try
53
+ {
54
+ let result = _intersection(c1, c2);
55
+ if (result && result.length > 0)
56
+ bIntersects = true;
57
+ }
58
+ catch (err)
59
+ {
60
+ // Ignore, treat badly formed as non-intersecting
61
+ }
55
62
  }
56
63
  });
57
64
  }
@@ -69,9 +76,15 @@ export function polyIntersectArea(p1: any, p2: any): number
69
76
  let c1 = unpackCoords(buffer1, iOffset1, nPoints1);
70
77
  PP.polyPackEachRing(pp2, (buffer2: Float64Array, iPoly2: number, iRing2: number, iOffset2: number, nPoints2: number) => {
71
78
  let c2 = unpackCoords(buffer2, iOffset2, nPoints2);
72
- let result = _intersection(c1, c2);
73
- if (result && result.length > 0)
74
- area += Poly.polyArea(result) * ((!iRing1 == !iRing2) ? 1 : -1);
79
+ try
80
+ {
81
+ let result = _intersection(c1, c2);
82
+ if (result && result.length > 0)
83
+ area += Poly.polyArea(result) * ((!iRing1 == !iRing2) ? 1 : -1);
84
+ }
85
+ catch (err)
86
+ {
87
+ }
75
88
  });
76
89
  });
77
90
  return area;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dra2020/baseclient",
3
- "version": "1.0.156",
3
+ "version": "1.0.158",
4
4
  "description": "Utility functions for Javascript projects.",
5
5
  "main": "dist/baseclient.js",
6
6
  "types": "./dist/all/all.d.ts",
@@ -32,17 +32,17 @@
32
32
  "@types/geojson": "^7946.0.8",
33
33
  "@types/node": "20.11.30",
34
34
  "@types/object-hash": "^3.0.6",
35
+ "elliptic": "^6.6.1",
36
+ "pbkdf2": "^3.1.3",
35
37
  "source-map-loader": "^5.0.0",
36
38
  "ts-loader": "^9.5.2",
37
39
  "tsify": "^5.0.4",
38
- "pbkdf2":"^3.1.3",
39
- "elliptic": "^6.6.1",
40
40
  "typescript": "^5.8.3",
41
41
  "webpack": "^5.99.5",
42
42
  "webpack-cli": "^5.1.4"
43
43
  },
44
44
  "dependencies": {
45
- "@dra2020/topojson-client": "^3.2.15",
45
+ "@dra2020/topojson-client": "^3.2.16",
46
46
  "@dra2020/topojson-server": "^3.0.103",
47
47
  "@dra2020/topojson-simplify": "^3.0.102",
48
48
  "diff-match-patch": "^1.0.5",