vue-chrts 2.1.0-beta-8 → 2.1.0-beta-9

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.
Files changed (168) hide show
  1. package/dist/components/AreaChart/AreaChart.d.ts +185 -0
  2. package/dist/components/AreaChart/AreaChart.js +1 -1
  3. package/dist/components/AreaChart/AreaChart.vue.d.ts +1 -1
  4. package/dist/components/AreaChart/index.d.ts +2 -0
  5. package/dist/components/BarChart/BarChart.d.ts +192 -0
  6. package/dist/components/BarChart/BarChart.js +1 -1
  7. package/dist/components/BarChart/BarChart.vue.d.ts +1 -1
  8. package/dist/components/BarChart/index.d.ts +2 -0
  9. package/dist/components/BubbleChart/BubbleChart.d.ts +173 -0
  10. package/dist/components/BubbleChart/BubbleChart.js +1 -1
  11. package/dist/components/BubbleChart/BubbleChart.vue.d.ts +1 -1
  12. package/dist/components/BubbleChart/index.d.ts +2 -0
  13. package/dist/components/DagreGraph/DagreGraph.d.ts +254 -0
  14. package/dist/components/DagreGraph/DagreGraph.js +1 -1
  15. package/dist/components/DagreGraph/DagreGraph.vue.d.ts +1 -1
  16. package/dist/components/DagreGraph/index.d.ts +2 -0
  17. package/dist/components/DagreGraph/types.d.ts +2 -1
  18. package/dist/components/DonutChart/DonutChart.d.ts +68 -0
  19. package/dist/components/DonutChart/DonutChart.js +4 -4
  20. package/dist/components/DonutChart/DonutChart.vue.d.ts +1 -1
  21. package/dist/components/DonutChart/DonutChart2.js +2 -2
  22. package/dist/components/DonutChart/DonutChart3.js +4 -0
  23. package/dist/components/DonutChart/index.d.ts +2 -0
  24. package/dist/components/DualChart/DualChart.d.ts +195 -0
  25. package/dist/components/DualChart/DualChart.js +1 -1
  26. package/dist/components/DualChart/DualChart.vue.d.ts +1 -1
  27. package/dist/components/DualChart/index.d.ts +2 -0
  28. package/dist/components/DualChart/types.d.ts +2 -2
  29. package/dist/components/GanttChart/GanttChart.d.ts +125 -0
  30. package/dist/components/GanttChart/GanttChart.js +1 -1
  31. package/dist/components/GanttChart/GanttChart.vue.d.ts +1 -1
  32. package/dist/components/GanttChart/index.d.ts +2 -0
  33. package/dist/components/LineChart/LineChart.d.ts +2 -0
  34. package/dist/components/LineChart/LineChart.vue.d.ts +1 -1
  35. package/dist/components/LineChart/index.d.ts +2 -0
  36. package/dist/components/Maps/DottedMap/DottedMap.vue.d.ts +2 -2
  37. package/dist/components/Maps/DottedMap/core.vue.d.ts +3 -3
  38. package/dist/components/Maps/DottedMap/mapUtils.js +22 -22
  39. package/dist/components/Maps/TopoJSONMap/TopoJSONMap.js +1 -1
  40. package/dist/components/Maps/TopoJSONMap/TopoJSONMap.vue.d.ts +2 -2
  41. package/dist/components/Maps/TopoJSONMap/types.d.ts +2 -1
  42. package/dist/components/Maps/index.d.ts +5 -0
  43. package/dist/components/SankeyChart/SankeyChart.d.ts +117 -0
  44. package/dist/components/SankeyChart/SankeyChart.js +1 -1
  45. package/dist/components/SankeyChart/SankeyChart.vue.d.ts +1 -1
  46. package/dist/components/SankeyChart/index.d.ts +2 -0
  47. package/dist/components/SankeyChart/types.d.ts +2 -1
  48. package/dist/enums.d.ts +32 -0
  49. package/dist/enums.js +6 -0
  50. package/dist/index.d.ts +12 -14
  51. package/dist/index.js +31 -31
  52. package/dist/types.d.ts +57 -7
  53. package/package.json +12 -12
  54. package/dist/components/AreaChart/types.d.ts +0 -1
  55. package/dist/components/BarChart/types.d.ts +0 -1
  56. package/dist/components/BubbleChart/types.d.ts +0 -1
  57. package/dist/components/DonutChart/types.d.ts +0 -2
  58. package/dist/components/GanttChart/types.d.ts +0 -1
  59. package/dist/components/LineChart/types.d.ts +0 -1
  60. package/dist/node_modules/.pnpm/@turf_boolean-point-in-polygon@7.3.2/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +0 -28
  61. package/dist/node_modules/.pnpm/@turf_invariant@7.3.2/node_modules/@turf/invariant/dist/esm/index.js +0 -20
  62. package/dist/node_modules/.pnpm/mgrs@1.0.0/node_modules/mgrs/mgrs.js +0 -222
  63. package/dist/node_modules/.pnpm/point-in-polygon-hao@1.2.4/node_modules/point-in-polygon-hao/dist/esm/index.js +0 -25
  64. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/Point.js +0 -24
  65. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/Proj.js +0 -46
  66. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/adjust_axis.js +0 -31
  67. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/checkSanity.js +0 -15
  68. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_lat.js +0 -8
  69. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_lon.js +0 -8
  70. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_zone.js +0 -13
  71. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/asinhy.js +0 -9
  72. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/asinz.js +0 -6
  73. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/clens.js +0 -8
  74. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/clens_cmplx.js +0 -10
  75. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/cosh.js +0 -7
  76. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e0fn.js +0 -6
  77. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e1fn.js +0 -6
  78. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e2fn.js +0 -6
  79. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e3fn.js +0 -6
  80. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/gN.js +0 -7
  81. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/gatg.js +0 -8
  82. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/hypot.js +0 -8
  83. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/imlfn.js +0 -11
  84. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/iqsfnz.js +0 -13
  85. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/log1py.js +0 -7
  86. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/mlfn.js +0 -6
  87. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/msfnz.js +0 -7
  88. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/phi2z.js +0 -10
  89. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_enfn.js +0 -10
  90. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_inv_mlfn.js +0 -14
  91. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_mlfn.js +0 -6
  92. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/qsfnz.js +0 -7
  93. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/sign.js +0 -6
  94. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/sinh.js +0 -7
  95. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/srat.js +0 -6
  96. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/toPoint.js +0 -10
  97. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/tsfnz.js +0 -8
  98. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/vincenty.js +0 -33
  99. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/Datum.js +0 -1278
  100. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/Ellipsoid.js +0 -226
  101. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/PrimeMeridian.js +0 -17
  102. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/units.js +0 -25
  103. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/values.js +0 -22
  104. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/core.js +0 -65
  105. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datum.js +0 -8
  106. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datumUtils.js +0 -82
  107. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datum_transform.js +0 -94
  108. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/defs.js +0 -39
  109. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/deriveConstants.js +0 -30
  110. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/extend.js +0 -12
  111. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/global.js +0 -9
  112. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/index.js +0 -25
  113. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/match.js +0 -11
  114. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/nadgrid.js +0 -128
  115. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/parseCode.js +0 -47
  116. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projString.js +0 -119
  117. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/aea.js +0 -43
  118. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/aeqd.js +0 -36
  119. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/bonne.js +0 -55
  120. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/cass.js +0 -52
  121. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/cea.js +0 -36
  122. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqc.js +0 -27
  123. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqdc.js +0 -48
  124. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqearth.js +0 -30
  125. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/etmerc.js +0 -54
  126. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/gauss.js +0 -27
  127. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/geocent.js +0 -26
  128. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/geos.js +0 -49
  129. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/gnom.js +0 -28
  130. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/krovak.js +0 -31
  131. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/laea.js +0 -134
  132. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/lcc.js +0 -61
  133. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/longlat.js +0 -19
  134. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/merc.js +0 -49
  135. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/mill.js +0 -26
  136. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/moll.js +0 -37
  137. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/nzmg.js +0 -48
  138. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/ob_tran.js +0 -173
  139. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/omerc.js +0 -58
  140. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/ortho.js +0 -28
  141. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/poly.js +0 -68
  142. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/qsc.js +0 -67
  143. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/robin.js +0 -104
  144. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/sinu.js +0 -47
  145. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/somerc.js +0 -34
  146. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/stere.js +0 -46
  147. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/sterea.js +0 -33
  148. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/tmerc.js +0 -60
  149. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/tpers.js +0 -110
  150. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/utm.js +0 -22
  151. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/vandg.js +0 -34
  152. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections.js +0 -34
  153. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/transform.js +0 -49
  154. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/projs.js +0 -38
  155. package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/orient2d.js +0 -23
  156. package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/util.js +0 -30
  157. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilder2015.js +0 -9
  158. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilder2019.js +0 -20
  159. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilderBase.js +0 -171
  160. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/buildPROJJSON.js +0 -11
  161. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/detectWKTVersion.js +0 -7
  162. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/index.js +0 -104
  163. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/parser.js +0 -117
  164. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/process.js +0 -89
  165. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/transformPROJJSON.js +0 -73
  166. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/util.js +0 -12
  167. package/dist/packages/shared/dist/donut-chart.js +0 -7
  168. package/dist/packages/shared/dist/index.js +0 -19
@@ -1,33 +0,0 @@
1
- import e from "./gauss.js";
2
- import c from "../common/adjust_lon.js";
3
- import n from "../common/hypot.js";
4
- function l() {
5
- e.init.apply(this), this.rc && (this.sinc0 = Math.sin(this.phic0), this.cosc0 = Math.cos(this.phic0), this.R2 = 2 * this.rc, this.title || (this.title = "Oblique Stereographic Alternative"));
6
- }
7
- function x(t) {
8
- var i, s, h, a;
9
- return t.x = c(t.x - this.long0, this.over), e.forward.apply(this, [t]), i = Math.sin(t.y), s = Math.cos(t.y), h = Math.cos(t.x), a = this.k0 * this.R2 / (1 + this.sinc0 * i + this.cosc0 * s * h), t.x = a * s * Math.sin(t.x), t.y = a * (this.cosc0 * i - this.sinc0 * s * h), t.x = this.a * t.x + this.x0, t.y = this.a * t.y + this.y0, t;
10
- }
11
- function y(t) {
12
- var i, s, h, a, r;
13
- if (t.x = (t.x - this.x0) / this.a, t.y = (t.y - this.y0) / this.a, t.x /= this.k0, t.y /= this.k0, r = n(t.x, t.y)) {
14
- var o = 2 * Math.atan2(r, this.R2);
15
- i = Math.sin(o), s = Math.cos(o), a = Math.asin(s * this.sinc0 + t.y * i * this.cosc0 / r), h = Math.atan2(t.x * i, r * this.cosc0 * s - t.y * this.sinc0 * i);
16
- } else
17
- a = this.phic0, h = 0;
18
- return t.x = h, t.y = a, e.inverse.apply(this, [t]), t.x = c(t.x + this.long0, this.over), t;
19
- }
20
- var f = ["Stereographic_North_Pole", "Oblique_Stereographic", "sterea", "Oblique Stereographic Alternative", "Double_Stereographic"];
21
- const g = {
22
- init: l,
23
- forward: x,
24
- inverse: y,
25
- names: f
26
- };
27
- export {
28
- g as default,
29
- x as forward,
30
- l as init,
31
- y as inverse,
32
- f as names
33
- };
@@ -1,60 +0,0 @@
1
- import q from "../common/pj_enfn.js";
2
- import j from "../common/pj_mlfn.js";
3
- import F from "../common/pj_inv_mlfn.js";
4
- import _ from "../common/adjust_lon.js";
5
- import { HALF_PI as g, EPSLN as k } from "../constants/values.js";
6
- import L from "../common/sign.js";
7
- function P() {
8
- this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.es && (this.en = q(this.es), this.ml0 = j(this.lat0, Math.sin(this.lat0), Math.cos(this.lat0), this.en));
9
- }
10
- function T(s) {
11
- var r = s.x, i = s.y, e = _(r - this.long0, this.over), l, x, a, u = Math.sin(i), o = Math.cos(i);
12
- if (this.es) {
13
- var f = o * e, m = Math.pow(f, 2), n = this.ep2 * Math.pow(o, 2), y = Math.pow(n, 2), M = Math.abs(o) > k ? Math.tan(i) : 0, h = Math.pow(M, 2), t = Math.pow(h, 2);
14
- l = 1 - this.es * Math.pow(u, 2), f = f / Math.sqrt(l);
15
- var p = j(i, u, o, this.en);
16
- x = this.a * (this.k0 * f * (1 + m / 6 * (1 - h + n + m / 20 * (5 - 18 * h + t + 14 * n - 58 * h * n + m / 42 * (61 + 179 * t - t * h - 479 * h))))) + this.x0, a = this.a * (this.k0 * (p - this.ml0 + u * e * f / 2 * (1 + m / 12 * (5 - h + 9 * n + 4 * y + m / 30 * (61 + t - 58 * h + 270 * n - 330 * h * n + m / 56 * (1385 + 543 * t - t * h - 3111 * h)))))) + this.y0;
17
- } else {
18
- var v = o * Math.sin(e);
19
- if (Math.abs(Math.abs(v) - 1) < k)
20
- return 93;
21
- if (x = 0.5 * this.a * this.k0 * Math.log((1 + v) / (1 - v)) + this.x0, a = o * Math.cos(e) / Math.sqrt(1 - Math.pow(v, 2)), v = Math.abs(a), v >= 1) {
22
- if (v - 1 > k)
23
- return 93;
24
- a = 0;
25
- } else
26
- a = Math.acos(a);
27
- i < 0 && (a = -a), a = this.a * this.k0 * (a - this.lat0) + this.y0;
28
- }
29
- return s.x = x, s.y = a, s;
30
- }
31
- function c(s) {
32
- var r, i, e, l, x = (s.x - this.x0) * (1 / this.a), a = (s.y - this.y0) * (1 / this.a);
33
- if (this.es)
34
- if (r = this.ml0 + a / this.k0, i = F(r, this.es, this.en), Math.abs(i) < g) {
35
- var m = Math.sin(i), n = Math.cos(i), y = Math.abs(n) > k ? Math.tan(i) : 0, M = this.ep2 * Math.pow(n, 2), h = Math.pow(M, 2), t = Math.pow(y, 2), p = Math.pow(t, 2);
36
- r = 1 - this.es * Math.pow(m, 2);
37
- var d = x * Math.sqrt(r) / this.k0, w = Math.pow(d, 2);
38
- r = r * y, e = i - r * w / (1 - this.es) * 0.5 * (1 - w / 12 * (5 + 3 * t - 9 * M * t + M - 4 * h - w / 30 * (61 + 90 * t - 252 * M * t + 45 * p + 46 * M - w / 56 * (1385 + 3633 * t + 4095 * p + 1574 * p * t)))), l = _(this.long0 + d * (1 - w / 6 * (1 + 2 * t + M - w / 20 * (5 + 28 * t + 24 * p + 8 * M * t + 6 * M - w / 42 * (61 + 662 * t + 1320 * p + 720 * p * t)))) / n, this.over);
39
- } else
40
- e = g * L(a), l = 0;
41
- else {
42
- var u = Math.exp(x / this.k0), o = 0.5 * (u - 1 / u), v = this.lat0 + a / this.k0, f = Math.cos(v);
43
- r = Math.sqrt((1 - Math.pow(f, 2)) / (1 + Math.pow(o, 2))), e = Math.asin(r), a < 0 && (e = -e), o === 0 && f === 0 ? l = 0 : l = _(Math.atan2(o, f) + this.long0, this.over);
44
- }
45
- return s.x = l, s.y = e, s;
46
- }
47
- var A = ["Fast_Transverse_Mercator", "Fast Transverse Mercator"];
48
- const z = {
49
- init: P,
50
- forward: T,
51
- inverse: c,
52
- names: A
53
- };
54
- export {
55
- z as default,
56
- T as forward,
57
- P as init,
58
- c as inverse,
59
- A as names
60
- };
@@ -1,110 +0,0 @@
1
- import { EPSLN as y, D2R as m, HALF_PI as f } from "../constants/values.js";
2
- import d from "../common/hypot.js";
3
- var a = {
4
- N_POLE: 0,
5
- S_POLE: 1,
6
- EQUIT: 2,
7
- OBLIQ: 3
8
- }, o = {
9
- h: { def: 1e5, num: !0 },
10
- // default is Karman line, no default in PROJ.7
11
- azi: { def: 0, num: !0, degrees: !0 },
12
- // default is North
13
- tilt: { def: 0, num: !0, degrees: !0 },
14
- // default is Nadir
15
- long0: { def: 0, num: !0 },
16
- // default is Greenwich, conversion to rad is automatic
17
- lat0: { def: 0, num: !0 }
18
- // default is Equator, conversion to rad is automatic
19
- };
20
- function u() {
21
- if (Object.keys(o).forEach((function(h) {
22
- if (typeof this[h] > "u")
23
- this[h] = o[h].def;
24
- else {
25
- if (o[h].num && isNaN(this[h]))
26
- throw new Error("Invalid parameter value, must be numeric " + h + " = " + this[h]);
27
- o[h].num && (this[h] = parseFloat(this[h]));
28
- }
29
- o[h].degrees && (this[h] = this[h] * m);
30
- }).bind(this)), Math.abs(Math.abs(this.lat0) - f) < y ? this.mode = this.lat0 < 0 ? a.S_POLE : a.N_POLE : Math.abs(this.lat0) < y ? this.mode = a.EQUIT : (this.mode = a.OBLIQ, this.sinph0 = Math.sin(this.lat0), this.cosph0 = Math.cos(this.lat0)), this.pn1 = this.h / this.a, this.pn1 <= 0 || this.pn1 > 1e10)
31
- throw new Error("Invalid height");
32
- this.p = 1 + this.pn1, this.rp = 1 / this.p, this.h1 = 1 / this.pn1, this.pfact = (this.p + 1) * this.h1, this.es = 0;
33
- var t = this.tilt, i = this.azi;
34
- this.cg = Math.cos(i), this.sg = Math.sin(i), this.cw = Math.cos(t), this.sw = Math.sin(t);
35
- }
36
- function l(t) {
37
- t.x -= this.long0;
38
- var i = Math.sin(t.y), h = Math.cos(t.y), n = Math.cos(t.x), c, s;
39
- switch (this.mode) {
40
- case a.OBLIQ:
41
- s = this.sinph0 * i + this.cosph0 * h * n;
42
- break;
43
- case a.EQUIT:
44
- s = h * n;
45
- break;
46
- case a.S_POLE:
47
- s = -i;
48
- break;
49
- case a.N_POLE:
50
- s = i;
51
- break;
52
- }
53
- switch (s = this.pn1 / (this.p - s), c = s * h * Math.sin(t.x), this.mode) {
54
- case a.OBLIQ:
55
- s *= this.cosph0 * i - this.sinph0 * h * n;
56
- break;
57
- case a.EQUIT:
58
- s *= i;
59
- break;
60
- case a.N_POLE:
61
- s *= -(h * n);
62
- break;
63
- case a.S_POLE:
64
- s *= h * n;
65
- break;
66
- }
67
- var r, e;
68
- return r = s * this.cg + c * this.sg, e = 1 / (r * this.sw * this.h1 + this.cw), c = (c * this.cg - s * this.sg) * this.cw * e, s = r * e, t.x = c * this.a, t.y = s * this.a, t;
69
- }
70
- function b(t) {
71
- t.x /= this.a, t.y /= this.a;
72
- var i = { x: t.x, y: t.y }, h, n, c;
73
- c = 1 / (this.pn1 - t.y * this.sw), h = this.pn1 * t.x * c, n = this.pn1 * t.y * this.cw * c, t.x = h * this.cg + n * this.sg, t.y = n * this.cg - h * this.sg;
74
- var s = d(t.x, t.y);
75
- if (Math.abs(s) < y)
76
- i.x = 0, i.y = t.y;
77
- else {
78
- var r, e;
79
- switch (e = 1 - s * s * this.pfact, e = (this.p - Math.sqrt(e)) / (this.pn1 / s + s / this.pn1), r = Math.sqrt(1 - e * e), this.mode) {
80
- case a.OBLIQ:
81
- i.y = Math.asin(r * this.sinph0 + t.y * e * this.cosph0 / s), t.y = (r - this.sinph0 * Math.sin(i.y)) * s, t.x *= e * this.cosph0;
82
- break;
83
- case a.EQUIT:
84
- i.y = Math.asin(t.y * e / s), t.y = r * s, t.x *= e;
85
- break;
86
- case a.N_POLE:
87
- i.y = Math.asin(r), t.y = -t.y;
88
- break;
89
- case a.S_POLE:
90
- i.y = -Math.asin(r);
91
- break;
92
- }
93
- i.x = Math.atan2(t.x, t.y);
94
- }
95
- return t.x = i.x + this.long0, t.y = i.y, t;
96
- }
97
- var M = ["Tilted_Perspective", "tpers"];
98
- const x = {
99
- init: u,
100
- forward: l,
101
- inverse: b,
102
- names: M
103
- };
104
- export {
105
- x as default,
106
- l as forward,
107
- u as init,
108
- b as inverse,
109
- M as names
110
- };
@@ -1,22 +0,0 @@
1
- import n from "../common/adjust_zone.js";
2
- import t from "./etmerc.js";
3
- import { D2R as r } from "../constants/values.js";
4
- var i = "etmerc";
5
- function s() {
6
- var e = n(this.zone, this.long0);
7
- if (e === void 0)
8
- throw new Error("unknown utm zone");
9
- this.lat0 = 0, this.long0 = (6 * Math.abs(e) - 183) * r, this.x0 = 5e5, this.y0 = this.utmSouth ? 1e7 : 0, this.k0 = 0.9996, t.init.apply(this), this.forward = t.forward, this.inverse = t.inverse;
10
- }
11
- var o = ["Universal Transverse Mercator System", "utm"];
12
- const d = {
13
- init: s,
14
- names: o,
15
- dependsOn: i
16
- };
17
- export {
18
- d as default,
19
- i as dependsOn,
20
- s as init,
21
- o as names
22
- };
@@ -1,34 +0,0 @@
1
- import m from "../common/adjust_lon.js";
2
- import { EPSLN as c, HALF_PI as d } from "../constants/values.js";
3
- import b from "../common/asinz.js";
4
- function q() {
5
- this.R = this.a;
6
- }
7
- function g(r) {
8
- var I = r.x, e = r.y, s = m(I - this.long0, this.over), t, i;
9
- Math.abs(e) <= c && (t = this.x0 + this.R * s, i = this.y0);
10
- var M = b(2 * Math.abs(e / Math.PI));
11
- (Math.abs(s) <= c || Math.abs(Math.abs(e) - d) <= c) && (t = this.x0, e >= 0 ? i = this.y0 + Math.PI * this.R * Math.tan(0.5 * M) : i = this.y0 + Math.PI * this.R * -Math.tan(0.5 * M));
12
- var n = 0.5 * Math.abs(Math.PI / s - s / Math.PI), a = n * n, f = Math.sin(M), v = Math.cos(M), h = v / (f + v - 1), P = h * h, l = h * (2 / f - 1), o = l * l, y = Math.PI * this.R * (n * (h - o) + Math.sqrt(a * (h - o) * (h - o) - (o + a) * (P - o))) / (o + a);
13
- s < 0 && (y = -y), t = this.x0 + y;
14
- var x = a + h;
15
- return y = Math.PI * this.R * (l * x - n * Math.sqrt((o + a) * (a + 1) - x * x)) / (o + a), e >= 0 ? i = this.y0 + y : i = this.y0 - y, r.x = t, r.y = i, r;
16
- }
17
- function u(r) {
18
- var I, e, s, t, i, M, n, a, f, v, h, P, l;
19
- return r.x -= this.x0, r.y -= this.y0, h = Math.PI * this.R, s = r.x / h, t = r.y / h, i = s * s + t * t, M = -Math.abs(t) * (1 + i), n = M - 2 * t * t + s * s, a = -2 * M + 1 + 2 * t * t + i * i, l = t * t / a + (2 * n * n * n / a / a / a - 9 * M * n / a / a) / 27, f = (M - n * n / 3 / a) / a, v = 2 * Math.sqrt(-f / 3), h = 3 * l / f / v, Math.abs(h) > 1 && (h >= 0 ? h = 1 : h = -1), P = Math.acos(h) / 3, r.y >= 0 ? e = (-v * Math.cos(P + Math.PI / 3) - n / 3 / a) * Math.PI : e = -(-v * Math.cos(P + Math.PI / 3) - n / 3 / a) * Math.PI, Math.abs(s) < c ? I = this.long0 : I = m(this.long0 + Math.PI * (i - 1 + Math.sqrt(1 + 2 * (s * s - t * t) + i * i)) / 2 / s, this.over), r.x = I, r.y = e, r;
20
- }
21
- var R = ["Van_der_Grinten_I", "VanDerGrinten", "Van_der_Grinten", "vandg"];
22
- const w = {
23
- init: q,
24
- forward: g,
25
- inverse: u,
26
- names: R
27
- };
28
- export {
29
- w as default,
30
- g as forward,
31
- q as init,
32
- u as inverse,
33
- R as names
34
- };
@@ -1,34 +0,0 @@
1
- import i from "./projections/merc.js";
2
- import s from "./projections/longlat.js";
3
- var u = [i, s], t = {}, n = [];
4
- function a(e, r) {
5
- var o = n.length;
6
- return e.names ? (n[o] = e, e.names.forEach(function(f) {
7
- t[f.toLowerCase()] = o;
8
- }), this) : (console.log(r), !0);
9
- }
10
- function c(e) {
11
- return e.replace(/[-\(\)\s]+/g, " ").trim().replace(/ /g, "_");
12
- }
13
- function l(e) {
14
- if (!e)
15
- return !1;
16
- var r = e.toLowerCase();
17
- if (typeof t[r] < "u" && n[t[r]] || (r = c(r), r in t && n[t[r]]))
18
- return n[t[r]];
19
- }
20
- function m() {
21
- u.forEach(a);
22
- }
23
- const p = {
24
- start: m,
25
- add: a,
26
- get: l
27
- };
28
- export {
29
- a as add,
30
- p as default,
31
- l as get,
32
- c as getNormalizedProjName,
33
- m as start
34
- };
@@ -1,49 +0,0 @@
1
- import { D2R as y, R2D as _, PJD_3PARAM as u, PJD_7PARAM as x, PJD_GRIDSHIFT as z } from "./constants/values.js";
2
- import g from "./datum_transform.js";
3
- import d from "./adjust_axis.js";
4
- import h from "./Proj.js";
5
- import w from "./common/toPoint.js";
6
- import D from "./checkSanity.js";
7
- function P(a, r) {
8
- return (a.datum.datum_type === u || a.datum.datum_type === x || a.datum.datum_type === z) && r.datumCode !== "WGS84" || (r.datum.datum_type === u || r.datum.datum_type === x || r.datum.datum_type === z) && a.datumCode !== "WGS84";
9
- }
10
- function S(a, r, m, f) {
11
- var e;
12
- Array.isArray(m) ? m = w(m) : m = {
13
- x: m.x,
14
- y: m.y,
15
- z: m.z,
16
- m: m.m
17
- };
18
- var l = m.z !== void 0;
19
- if (D(m), a.datum && r.datum && P(a, r) && (e = new h("WGS84"), m = S(a, e, m, f), a = e), f && a.axis !== "enu" && (m = d(a, !1, m)), a.projName === "longlat")
20
- m = {
21
- x: m.x * y,
22
- y: m.y * y,
23
- z: m.z || 0
24
- };
25
- else if (a.to_meter && (m = {
26
- x: m.x * a.to_meter,
27
- y: m.y * a.to_meter,
28
- z: m.z || 0
29
- }), m = a.inverse(m), !m)
30
- return;
31
- if (a.from_greenwich && (m.x += a.from_greenwich), m = g(a.datum, r.datum, m), !!m)
32
- return m = /** @type {import('./core').InterfaceCoordinates} */
33
- m, r.from_greenwich && (m = {
34
- x: m.x - r.from_greenwich,
35
- y: m.y,
36
- z: m.z || 0
37
- }), r.projName === "longlat" ? m = {
38
- x: m.x * _,
39
- y: m.y * _,
40
- z: m.z || 0
41
- } : (m = r.forward(m), r.to_meter && (m = {
42
- x: m.x / r.to_meter,
43
- y: m.y / r.to_meter,
44
- z: m.z || 0
45
- })), f && r.axis !== "enu" ? d(r, !0, m) : (m && !l && delete m.z, m);
46
- }
47
- export {
48
- S as default
49
- };
@@ -1,38 +0,0 @@
1
- import r from "./lib/projections/tmerc.js";
2
- import t from "./lib/projections/etmerc.js";
3
- import m from "./lib/projections/utm.js";
4
- import d from "./lib/projections/sterea.js";
5
- import i from "./lib/projections/stere.js";
6
- import e from "./lib/projections/somerc.js";
7
- import c from "./lib/projections/omerc.js";
8
- import a from "./lib/projections/lcc.js";
9
- import n from "./lib/projections/krovak.js";
10
- import s from "./lib/projections/cass.js";
11
- import p from "./lib/projections/laea.js";
12
- import f from "./lib/projections/aea.js";
13
- import j from "./lib/projections/gnom.js";
14
- import P from "./lib/projections/cea.js";
15
- import l from "./lib/projections/eqc.js";
16
- import g from "./lib/projections/poly.js";
17
- import q from "./lib/projections/nzmg.js";
18
- import u from "./lib/projections/mill.js";
19
- import b from "./lib/projections/sinu.js";
20
- import h from "./lib/projections/moll.js";
21
- import k from "./lib/projections/eqdc.js";
22
- import v from "./lib/projections/vandg.js";
23
- import x from "./lib/projections/aeqd.js";
24
- import y from "./lib/projections/ortho.js";
25
- import z from "./lib/projections/qsc.js";
26
- import _ from "./lib/projections/robin.js";
27
- import w from "./lib/projections/geocent.js";
28
- import A from "./lib/projections/tpers.js";
29
- import B from "./lib/projections/geos.js";
30
- import C from "./lib/projections/eqearth.js";
31
- import D from "./lib/projections/bonne.js";
32
- import E from "./lib/projections/ob_tran.js";
33
- function fo(o) {
34
- o.Proj.projections.add(r), o.Proj.projections.add(t), o.Proj.projections.add(m), o.Proj.projections.add(d), o.Proj.projections.add(i), o.Proj.projections.add(e), o.Proj.projections.add(c), o.Proj.projections.add(a), o.Proj.projections.add(n), o.Proj.projections.add(s), o.Proj.projections.add(p), o.Proj.projections.add(f), o.Proj.projections.add(j), o.Proj.projections.add(P), o.Proj.projections.add(l), o.Proj.projections.add(g), o.Proj.projections.add(q), o.Proj.projections.add(u), o.Proj.projections.add(b), o.Proj.projections.add(h), o.Proj.projections.add(k), o.Proj.projections.add(v), o.Proj.projections.add(x), o.Proj.projections.add(y), o.Proj.projections.add(z), o.Proj.projections.add(_), o.Proj.projections.add(w), o.Proj.projections.add(A), o.Proj.projections.add(B), o.Proj.projections.add(C), o.Proj.projections.add(D), o.Proj.projections.add(E);
35
- }
36
- export {
37
- fo as default
38
- };
@@ -1,23 +0,0 @@
1
- import { epsilon as k, estimate as S, resulterrbound as T, splitter as f, sum as K, vec as J } from "./util.js";
2
- const U = (3 + 16 * k) * k, V = (2 + 12 * k) * k, W = (9 + 64 * k) * k * k, G = J(4), L = J(8), N = J(12), O = J(16), h = J(4);
3
- function X(q, z, E, F, j, A, H) {
4
- let p, C, m, M, t, n, e, s, r, c, o, i, u, l, a, d, w, b;
5
- const _ = q - j, v = E - j, B = z - A, D = F - A;
6
- l = _ * D, n = f * _, e = n - (n - _), s = _ - e, n = f * D, r = n - (n - D), c = D - r, a = s * c - (l - e * r - s * r - e * c), d = B * v, n = f * B, e = n - (n - B), s = B - e, n = f * v, r = n - (n - v), c = v - r, w = s * c - (d - e * r - s * r - e * c), o = a - w, t = a - o, G[0] = a - (o + t) + (t - w), i = l + o, t = i - l, u = l - (i - t) + (o - t), o = u - d, t = u - o, G[1] = u - (o + t) + (t - d), b = i + o, t = b - i, G[2] = i - (b - t) + (o - t), G[3] = b;
7
- let g = S(4, G), I = V * H;
8
- if (g >= I || -g >= I || (t = q - _, p = q - (_ + t) + (t - j), t = E - v, m = E - (v + t) + (t - j), t = z - B, C = z - (B + t) + (t - A), t = F - D, M = F - (D + t) + (t - A), p === 0 && C === 0 && m === 0 && M === 0) || (I = W * H + T * Math.abs(g), g += _ * M + D * p - (B * m + v * C), g >= I || -g >= I)) return g;
9
- l = p * D, n = f * p, e = n - (n - p), s = p - e, n = f * D, r = n - (n - D), c = D - r, a = s * c - (l - e * r - s * r - e * c), d = C * v, n = f * C, e = n - (n - C), s = C - e, n = f * v, r = n - (n - v), c = v - r, w = s * c - (d - e * r - s * r - e * c), o = a - w, t = a - o, h[0] = a - (o + t) + (t - w), i = l + o, t = i - l, u = l - (i - t) + (o - t), o = u - d, t = u - o, h[1] = u - (o + t) + (t - d), b = i + o, t = b - i, h[2] = i - (b - t) + (o - t), h[3] = b;
10
- const P = K(4, G, 4, h, L);
11
- l = _ * M, n = f * _, e = n - (n - _), s = _ - e, n = f * M, r = n - (n - M), c = M - r, a = s * c - (l - e * r - s * r - e * c), d = B * m, n = f * B, e = n - (n - B), s = B - e, n = f * m, r = n - (n - m), c = m - r, w = s * c - (d - e * r - s * r - e * c), o = a - w, t = a - o, h[0] = a - (o + t) + (t - w), i = l + o, t = i - l, u = l - (i - t) + (o - t), o = u - d, t = u - o, h[1] = u - (o + t) + (t - d), b = i + o, t = b - i, h[2] = i - (b - t) + (o - t), h[3] = b;
12
- const Q = K(P, L, 4, h, N);
13
- l = p * M, n = f * p, e = n - (n - p), s = p - e, n = f * M, r = n - (n - M), c = M - r, a = s * c - (l - e * r - s * r - e * c), d = C * m, n = f * C, e = n - (n - C), s = C - e, n = f * m, r = n - (n - m), c = m - r, w = s * c - (d - e * r - s * r - e * c), o = a - w, t = a - o, h[0] = a - (o + t) + (t - w), i = l + o, t = i - l, u = l - (i - t) + (o - t), o = u - d, t = u - o, h[1] = u - (o + t) + (t - d), b = i + o, t = b - i, h[2] = i - (b - t) + (o - t), h[3] = b;
14
- const R = K(Q, N, 4, h, O);
15
- return O[R - 1];
16
- }
17
- function Z(q, z, E, F, j, A) {
18
- const H = (z - A) * (E - j), p = (q - j) * (F - A), C = H - p, m = Math.abs(H + p);
19
- return Math.abs(C) >= U * m ? C : -X(q, z, E, F, j, A, m);
20
- }
21
- export {
22
- Z as orient2d
23
- };
@@ -1,30 +0,0 @@
1
- const a = 11102230246251565e-32, p = 134217729, Q = (3 + 8 * a) * a;
2
- function b(f, s, d, o, x) {
3
- let e, t, r, l, i = s[0], n = o[0], u = 0, c = 0;
4
- n > i == n > -i ? (e = i, i = s[++u]) : (e = n, n = o[++c]);
5
- let w = 0;
6
- if (u < f && c < d)
7
- for (n > i == n > -i ? (t = i + e, r = e - (t - i), i = s[++u]) : (t = n + e, r = e - (t - n), n = o[++c]), e = t, r !== 0 && (x[w++] = r); u < f && c < d; )
8
- n > i == n > -i ? (t = e + i, l = t - e, r = e - (t - l) + (i - l), i = s[++u]) : (t = e + n, l = t - e, r = e - (t - l) + (n - l), n = o[++c]), e = t, r !== 0 && (x[w++] = r);
9
- for (; u < f; )
10
- t = e + i, l = t - e, r = e - (t - l) + (i - l), i = s[++u], e = t, r !== 0 && (x[w++] = r);
11
- for (; c < d; )
12
- t = e + n, l = t - e, r = e - (t - l) + (n - l), n = o[++c], e = t, r !== 0 && (x[w++] = r);
13
- return (e !== 0 || w === 0) && (x[w++] = e), w;
14
- }
15
- function h(f, s) {
16
- let d = s[0];
17
- for (let o = 1; o < f; o++) d += s[o];
18
- return d;
19
- }
20
- function m(f) {
21
- return new Float64Array(f);
22
- }
23
- export {
24
- a as epsilon,
25
- h as estimate,
26
- Q as resulterrbound,
27
- p as splitter,
28
- b as sum,
29
- m as vec
30
- };
@@ -1,9 +0,0 @@
1
- import a from "./PROJJSONBuilderBase.js";
2
- class i extends a {
3
- static convert(t, e = {}) {
4
- return super.convert(t, e), e.coordinate_system && e.coordinate_system.subtype === "Cartesian" && delete e.coordinate_system, e.usage && delete e.usage, e;
5
- }
6
- }
7
- export {
8
- i as default
9
- };
@@ -1,20 +0,0 @@
1
- import f from "./PROJJSONBuilderBase.js";
2
- class c extends f {
3
- static convert(e, s = {}) {
4
- super.convert(e, s);
5
- const o = e.find((r) => Array.isArray(r) && r[0] === "CS");
6
- o && (s.coordinate_system = {
7
- subtype: o[1],
8
- axis: this.extractAxes(e)
9
- });
10
- const i = e.find((r) => Array.isArray(r) && r[0] === "USAGE");
11
- if (i) {
12
- const r = i.find((a) => Array.isArray(a) && a[0] === "SCOPE"), t = i.find((a) => Array.isArray(a) && a[0] === "AREA"), A = i.find((a) => Array.isArray(a) && a[0] === "BBOX");
13
- s.usage = {}, r && (s.usage.scope = r[1]), t && (s.usage.area = t[1]), A && (s.usage.bbox = A.slice(1));
14
- }
15
- return s;
16
- }
17
- }
18
- export {
19
- c as default
20
- };
@@ -1,171 +0,0 @@
1
- class I {
2
- static getId(i) {
3
- const a = i.find((t) => Array.isArray(t) && t[0] === "ID");
4
- return a && a.length >= 3 ? {
5
- authority: a[1],
6
- code: parseInt(a[2], 10)
7
- } : null;
8
- }
9
- static convertUnit(i, a = "unit") {
10
- if (!i || i.length < 3)
11
- return { type: a, name: "unknown", conversion_factor: null };
12
- const t = i[1], o = parseFloat(i[2]) || null, n = i.find((A) => Array.isArray(A) && A[0] === "ID"), y = n ? {
13
- authority: n[1],
14
- code: parseInt(n[2], 10)
15
- } : null;
16
- return {
17
- type: a,
18
- name: t,
19
- conversion_factor: o,
20
- id: y
21
- };
22
- }
23
- static convertAxis(i) {
24
- const a = i[1] || "Unknown";
25
- let t;
26
- const o = a.match(/^\((.)\)$/);
27
- if (o) {
28
- const e = o[1].toUpperCase();
29
- if (e === "E") t = "east";
30
- else if (e === "N") t = "north";
31
- else if (e === "U") t = "up";
32
- else throw new Error(`Unknown axis abbreviation: ${e}`);
33
- } else
34
- t = i[2] ? i[2].toLowerCase() : "unknown";
35
- const n = i.find((e) => Array.isArray(e) && e[0] === "ORDER"), y = n ? parseInt(n[1], 10) : null, A = i.find(
36
- (e) => Array.isArray(e) && (e[0] === "LENGTHUNIT" || e[0] === "ANGLEUNIT" || e[0] === "SCALEUNIT")
37
- ), c = this.convertUnit(A);
38
- return {
39
- name: a,
40
- direction: t,
41
- // Use the valid PROJJSON direction value
42
- unit: c,
43
- order: y
44
- };
45
- }
46
- static extractAxes(i) {
47
- return i.filter((a) => Array.isArray(a) && a[0] === "AXIS").map((a) => this.convertAxis(a)).sort((a, t) => (a.order || 0) - (t.order || 0));
48
- }
49
- static convert(i, a = {}) {
50
- switch (i[0]) {
51
- case "PROJCRS":
52
- a.type = "ProjectedCRS", a.name = i[1], a.base_crs = i.find((r) => Array.isArray(r) && r[0] === "BASEGEOGCRS") ? this.convert(i.find((r) => Array.isArray(r) && r[0] === "BASEGEOGCRS")) : null, a.conversion = i.find((r) => Array.isArray(r) && r[0] === "CONVERSION") ? this.convert(i.find((r) => Array.isArray(r) && r[0] === "CONVERSION")) : null;
53
- const t = i.find((r) => Array.isArray(r) && r[0] === "CS");
54
- t && (a.coordinate_system = {
55
- type: t[1],
56
- axis: this.extractAxes(i)
57
- });
58
- const o = i.find((r) => Array.isArray(r) && r[0] === "LENGTHUNIT");
59
- if (o) {
60
- const r = this.convertUnit(o);
61
- a.coordinate_system.unit = r;
62
- }
63
- a.id = this.getId(i);
64
- break;
65
- case "BASEGEOGCRS":
66
- case "GEOGCRS":
67
- a.type = "GeographicCRS", a.name = i[1];
68
- const n = i.find(
69
- (r) => Array.isArray(r) && (r[0] === "DATUM" || r[0] === "ENSEMBLE")
70
- );
71
- if (n) {
72
- const r = this.convert(n);
73
- n[0] === "ENSEMBLE" ? a.datum_ensemble = r : a.datum = r;
74
- const s = i.find((m) => Array.isArray(m) && m[0] === "PRIMEM");
75
- s && s[1] !== "Greenwich" && (r.prime_meridian = {
76
- name: s[1],
77
- longitude: parseFloat(s[2])
78
- });
79
- }
80
- a.coordinate_system = {
81
- type: "ellipsoidal",
82
- axis: this.extractAxes(i)
83
- }, a.id = this.getId(i);
84
- break;
85
- case "DATUM":
86
- a.type = "GeodeticReferenceFrame", a.name = i[1], a.ellipsoid = i.find((r) => Array.isArray(r) && r[0] === "ELLIPSOID") ? this.convert(i.find((r) => Array.isArray(r) && r[0] === "ELLIPSOID")) : null;
87
- break;
88
- case "ENSEMBLE":
89
- a.type = "DatumEnsemble", a.name = i[1], a.members = i.filter((r) => Array.isArray(r) && r[0] === "MEMBER").map((r) => ({
90
- type: "DatumEnsembleMember",
91
- name: r[1],
92
- id: this.getId(r)
93
- // Extract ID as { authority, code }
94
- }));
95
- const y = i.find((r) => Array.isArray(r) && r[0] === "ENSEMBLEACCURACY");
96
- y && (a.accuracy = parseFloat(y[1]));
97
- const A = i.find((r) => Array.isArray(r) && r[0] === "ELLIPSOID");
98
- A && (a.ellipsoid = this.convert(A)), a.id = this.getId(i);
99
- break;
100
- case "ELLIPSOID":
101
- a.type = "Ellipsoid", a.name = i[1], a.semi_major_axis = parseFloat(i[2]), a.inverse_flattening = parseFloat(i[3]), i.find((r) => Array.isArray(r) && r[0] === "LENGTHUNIT") && this.convert(i.find((r) => Array.isArray(r) && r[0] === "LENGTHUNIT"), a);
102
- break;
103
- case "CONVERSION":
104
- a.type = "Conversion", a.name = i[1], a.method = i.find((r) => Array.isArray(r) && r[0] === "METHOD") ? this.convert(i.find((r) => Array.isArray(r) && r[0] === "METHOD")) : null, a.parameters = i.filter((r) => Array.isArray(r) && r[0] === "PARAMETER").map((r) => this.convert(r));
105
- break;
106
- case "METHOD":
107
- a.type = "Method", a.name = i[1], a.id = this.getId(i);
108
- break;
109
- case "PARAMETER":
110
- a.type = "Parameter", a.name = i[1], a.value = parseFloat(i[2]), a.unit = this.convertUnit(
111
- i.find(
112
- (r) => Array.isArray(r) && (r[0] === "LENGTHUNIT" || r[0] === "ANGLEUNIT" || r[0] === "SCALEUNIT")
113
- )
114
- ), a.id = this.getId(i);
115
- break;
116
- case "BOUNDCRS":
117
- a.type = "BoundCRS";
118
- const c = i.find((r) => Array.isArray(r) && r[0] === "SOURCECRS");
119
- if (c) {
120
- const r = c.find((s) => Array.isArray(s));
121
- a.source_crs = r ? this.convert(r) : null;
122
- }
123
- const e = i.find((r) => Array.isArray(r) && r[0] === "TARGETCRS");
124
- if (e) {
125
- const r = e.find((s) => Array.isArray(s));
126
- a.target_crs = r ? this.convert(r) : null;
127
- }
128
- const E = i.find((r) => Array.isArray(r) && r[0] === "ABRIDGEDTRANSFORMATION");
129
- E ? a.transformation = this.convert(E) : a.transformation = null;
130
- break;
131
- case "ABRIDGEDTRANSFORMATION":
132
- if (a.type = "Transformation", a.name = i[1], a.method = i.find((r) => Array.isArray(r) && r[0] === "METHOD") ? this.convert(i.find((r) => Array.isArray(r) && r[0] === "METHOD")) : null, a.parameters = i.filter((r) => Array.isArray(r) && (r[0] === "PARAMETER" || r[0] === "PARAMETERFILE")).map((r) => {
133
- if (r[0] === "PARAMETER")
134
- return this.convert(r);
135
- if (r[0] === "PARAMETERFILE")
136
- return {
137
- name: r[1],
138
- value: r[2],
139
- id: {
140
- authority: "EPSG",
141
- code: 8656
142
- }
143
- };
144
- }), a.parameters.length === 7) {
145
- const r = a.parameters[6];
146
- r.name === "Scale difference" && (r.value = Math.round((r.value - 1) * 1e12) / 1e6);
147
- }
148
- a.id = this.getId(i);
149
- break;
150
- case "AXIS":
151
- a.coordinate_system || (a.coordinate_system = { type: "unspecified", axis: [] }), a.coordinate_system.axis.push(this.convertAxis(i));
152
- break;
153
- case "LENGTHUNIT":
154
- const f = this.convertUnit(i, "LinearUnit");
155
- a.coordinate_system && a.coordinate_system.axis && a.coordinate_system.axis.forEach((r) => {
156
- r.unit || (r.unit = f);
157
- }), f.conversion_factor && f.conversion_factor !== 1 && a.semi_major_axis && (a.semi_major_axis = {
158
- value: a.semi_major_axis,
159
- unit: f
160
- });
161
- break;
162
- default:
163
- a.keyword = i[0];
164
- break;
165
- }
166
- return a;
167
- }
168
- }
169
- export {
170
- I as default
171
- };
@@ -1,11 +0,0 @@
1
- import n from "./PROJJSONBuilder2015.js";
2
- import e from "./PROJJSONBuilder2019.js";
3
- function u(r) {
4
- return r.find((i) => Array.isArray(i) && i[0] === "USAGE") ? "2019" : (r.find((i) => Array.isArray(i) && i[0] === "CS") || r[0] === "BOUNDCRS" || r[0] === "PROJCRS" || r[0] === "GEOGCRS", "2015");
5
- }
6
- function S(r) {
7
- return (u(r) === "2019" ? e : n).convert(r);
8
- }
9
- export {
10
- S as buildPROJJSON
11
- };