@idm-plugin/geo 1.6.4 → 1.6.6

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/index.js CHANGED
@@ -1694,7 +1694,7 @@ class r {
1694
1694
  const o = { lng: z[q].lng, lat: z[q].lat }, R = { lng: z[q + 1].lng, lat: z[q + 1].lat }, Y = this.calculatePointToLineDistance(M, o, R);
1695
1695
  O >= Y && (O = Y, A = q, b = this.calculateDistance(o, M, !1, 6), c = this.calculateDistance(R, M, !1, 6));
1696
1696
  }
1697
- b !== 0 && c !== 0 ? b < O || b === O && A === 0 ? z.unshift(M) : c < O || c === O && A === z.length - 2 ? z.push(M) : z.splice(A + 1, 0, M) : b === 0 ? p && z.splice(A, 1, M) : c === 0 && p && z.splice(A + 1, 1, M);
1697
+ b !== 0 && c !== 0 ? b < O || b === O && A === 0 ? z.unshift(M) : c < O || c === O && A === z.length - 2 ? z.push(M) : z.splice(A + 1, 0, M) : b === 0 ? p ? z.splice(A, 1, M) : z.splice(A + 1, 0, M) : c === 0 && (p ? z.splice(A + 1, 1, M) : z.splice(A + 1, 0, M));
1698
1698
  }
1699
1699
  return z.map((q) => (q.lng = a.convertToStdLng(q.lng), q));
1700
1700
  }
@@ -1910,7 +1910,7 @@ class r {
1910
1910
  * @param distance 三点最小距离, 小于此距离时,B点将被忽略(三点太近)
1911
1911
  * @param angle 三点夹角, 大于此角度时,B点将被忽略(近似走RL)
1912
1912
  */
1913
- static simplifyCoordinates(M, z = 10, p = 160) {
1913
+ static simplifyCoordinates(M, z = 1, p = 180) {
1914
1914
  const O = [];
1915
1915
  for (let A = 1; A < M.length; A++) {
1916
1916
  const b = M[A - 1], c = M[A], q = M[A + 1];