proj4 2.17.0 → 2.19.0

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 (154) hide show
  1. package/bower.json +1 -1
  2. package/component.json +1 -1
  3. package/dist/lib/Point.d.ts +24 -0
  4. package/dist/lib/Proj.d.ts +71 -0
  5. package/dist/lib/adjust_axis.d.ts +1 -0
  6. package/dist/lib/checkSanity.d.ts +1 -0
  7. package/dist/lib/common/acosh.d.ts +1 -0
  8. package/dist/lib/common/adjust_lat.d.ts +1 -0
  9. package/dist/lib/common/adjust_lon.d.ts +1 -0
  10. package/dist/lib/common/adjust_zone.d.ts +1 -0
  11. package/dist/lib/common/asinh.d.ts +1 -0
  12. package/dist/lib/common/asinhy.d.ts +1 -0
  13. package/dist/lib/common/asinz.d.ts +1 -0
  14. package/dist/lib/common/atanh.d.ts +1 -0
  15. package/dist/lib/common/clens.d.ts +1 -0
  16. package/dist/lib/common/clens_cmplx.d.ts +1 -0
  17. package/dist/lib/common/cosh.d.ts +1 -0
  18. package/dist/lib/common/e0fn.d.ts +1 -0
  19. package/dist/lib/common/e1fn.d.ts +1 -0
  20. package/dist/lib/common/e2fn.d.ts +1 -0
  21. package/dist/lib/common/e3fn.d.ts +1 -0
  22. package/dist/lib/common/fL.d.ts +1 -0
  23. package/dist/lib/common/gN.d.ts +1 -0
  24. package/dist/lib/common/gatg.d.ts +1 -0
  25. package/dist/lib/common/hypot.d.ts +1 -0
  26. package/dist/lib/common/imlfn.d.ts +1 -0
  27. package/dist/lib/common/invlatiso.d.ts +1 -0
  28. package/dist/lib/common/iqsfnz.d.ts +1 -0
  29. package/dist/lib/common/latiso.d.ts +1 -0
  30. package/dist/lib/common/log1py.d.ts +1 -0
  31. package/dist/lib/common/mlfn.d.ts +1 -0
  32. package/dist/lib/common/msfnz.d.ts +1 -0
  33. package/dist/lib/common/phi2z.d.ts +1 -0
  34. package/dist/lib/common/pj_enfn.d.ts +1 -0
  35. package/dist/lib/common/pj_inv_mlfn.d.ts +1 -0
  36. package/dist/lib/common/pj_mlfn.d.ts +1 -0
  37. package/dist/lib/common/qsfnz.d.ts +1 -0
  38. package/dist/lib/common/sign.d.ts +1 -0
  39. package/dist/lib/common/sinh.d.ts +1 -0
  40. package/dist/lib/common/srat.d.ts +1 -0
  41. package/dist/lib/common/tanh.d.ts +1 -0
  42. package/dist/lib/common/toPoint.d.ts +5 -0
  43. package/dist/lib/common/tsfnz.d.ts +1 -0
  44. package/dist/lib/common/vincenty.d.ts +35 -0
  45. package/dist/lib/constants/Datum.d.ts +1715 -0
  46. package/dist/lib/constants/Ellipsoid.d.ts +353 -0
  47. package/dist/lib/constants/PrimeMeridian.d.ts +16 -0
  48. package/dist/lib/constants/units.d.ts +63 -0
  49. package/dist/lib/constants/values.d.ts +19 -0
  50. package/dist/lib/core.d.ts +117 -0
  51. package/dist/lib/datum.d.ts +10 -0
  52. package/dist/lib/datumUtils.d.ts +28 -0
  53. package/dist/lib/datum_transform.d.ts +2 -0
  54. package/dist/lib/defs.d.ts +57 -0
  55. package/dist/lib/deriveConstants.d.ts +11 -0
  56. package/dist/lib/extend.d.ts +1 -0
  57. package/dist/lib/global.d.ts +1 -0
  58. package/dist/lib/includedProjections.d.ts +1 -0
  59. package/dist/lib/index.d.ts +24 -0
  60. package/dist/lib/match.d.ts +1 -0
  61. package/dist/lib/nadgrid.d.ts +107 -0
  62. package/dist/lib/parseCode.d.ts +6 -0
  63. package/dist/lib/projString.d.ts +5 -0
  64. package/dist/lib/projections/aea.d.ts +83 -0
  65. package/dist/lib/projections/aeqd.d.ts +32 -0
  66. package/dist/lib/projections/bonne.d.ts +27 -0
  67. package/dist/lib/projections/cass.d.ts +36 -0
  68. package/dist/lib/projections/cea.d.ts +28 -0
  69. package/dist/lib/projections/eqc.d.ts +20 -0
  70. package/dist/lib/projections/eqdc.d.ts +71 -0
  71. package/dist/lib/projections/eqearth.d.ts +15 -0
  72. package/dist/lib/projections/equi.d.ts +40 -0
  73. package/dist/lib/projections/etmerc.d.ts +45 -0
  74. package/dist/lib/projections/gauss.d.ts +38 -0
  75. package/dist/lib/projections/geocent.d.ts +22 -0
  76. package/dist/lib/projections/geos.d.ts +51 -0
  77. package/dist/lib/projections/gnom.d.ts +37 -0
  78. package/dist/lib/projections/gstmerc.d.ts +41 -0
  79. package/dist/lib/projections/krovak.d.ts +34 -0
  80. package/dist/lib/projections/laea.d.ts +70 -0
  81. package/dist/lib/projections/lcc.d.ts +36 -0
  82. package/dist/lib/projections/longlat.d.ts +11 -0
  83. package/dist/lib/projections/merc.d.ts +30 -0
  84. package/dist/lib/projections/mill.d.ts +11 -0
  85. package/dist/lib/projections/moll.d.ts +11 -0
  86. package/dist/lib/projections/nzmg.d.ts +33 -0
  87. package/dist/lib/projections/omerc.d.ts +60 -0
  88. package/dist/lib/projections/ortho.d.ts +25 -0
  89. package/dist/lib/projections/poly.d.ts +32 -0
  90. package/dist/lib/projections/qsc.d.ts +31 -0
  91. package/dist/lib/projections/robin.d.ts +24 -0
  92. package/dist/lib/projections/sinu.d.ts +37 -0
  93. package/dist/lib/projections/somerc.d.ts +35 -0
  94. package/dist/lib/projections/stere.d.ts +52 -0
  95. package/dist/lib/projections/sterea.d.ts +33 -0
  96. package/dist/lib/projections/tmerc.d.ts +38 -0
  97. package/dist/lib/projections/tpers.d.ts +45 -0
  98. package/dist/lib/projections/utm.d.ts +19 -0
  99. package/dist/lib/projections/vandg.d.ts +28 -0
  100. package/dist/lib/projections.d.ts +10 -0
  101. package/dist/lib/transform.d.ts +8 -0
  102. package/dist/proj4-src.js +847 -247
  103. package/dist/proj4.js +1 -1
  104. package/dist/projs.d.ts +1 -0
  105. package/lib/Point.js +9 -3
  106. package/lib/Proj.js +25 -1
  107. package/lib/adjust_axis.js +1 -0
  108. package/lib/common/toPoint.js +4 -0
  109. package/lib/common/vincenty.js +123 -0
  110. package/lib/constants/PrimeMeridian.js +16 -15
  111. package/lib/core.js +152 -16
  112. package/lib/defs.js +65 -5
  113. package/lib/index.js +17 -11
  114. package/lib/nadgrid.js +70 -0
  115. package/lib/parseCode.js +5 -1
  116. package/lib/projString.js +6 -0
  117. package/lib/projections/aea.js +25 -0
  118. package/lib/projections/aeqd.js +22 -26
  119. package/lib/projections/bonne.js +11 -0
  120. package/lib/projections/cass.js +11 -0
  121. package/lib/projections/cea.js +7 -1
  122. package/lib/projections/eqdc.js +29 -7
  123. package/lib/projections/equi.js +11 -2
  124. package/lib/projections/etmerc.js +12 -0
  125. package/lib/projections/gauss.js +12 -0
  126. package/lib/projections/geos.js +16 -0
  127. package/lib/projections/gnom.js +11 -2
  128. package/lib/projections/gstmerc.js +12 -0
  129. package/lib/projections/laea.js +30 -11
  130. package/lib/projections/lcc.js +10 -0
  131. package/lib/projections/merc.js +9 -0
  132. package/lib/projections/omerc.js +29 -4
  133. package/lib/projections/ortho.js +7 -0
  134. package/lib/projections/poly.js +14 -0
  135. package/lib/projections/qsc.js +11 -0
  136. package/lib/projections/sinu.js +11 -0
  137. package/lib/projections/somerc.js +10 -0
  138. package/lib/projections/stere.js +16 -2
  139. package/lib/projections/sterea.js +10 -0
  140. package/lib/projections/tmerc.js +8 -0
  141. package/lib/projections/tpers.js +24 -3
  142. package/lib/projections/utm.js +1 -0
  143. package/lib/projections/vandg.js +9 -2
  144. package/lib/transform.js +9 -0
  145. package/package.json +8 -6
  146. package/tsconfig.json +14 -0
  147. package/.github/workflows/build-and-test.yml +0 -69
  148. package/.nyc_output/6b047fc9-1bf2-4565-9e8a-9c0defc09dd7.json +0 -1
  149. package/.nyc_output/e2c5d0cc-9478-4f26-ad2f-de246d4c35de.json +0 -1
  150. package/.nyc_output/f4b0e40f-04ca-4b6d-bfeb-51d617db9841.json +0 -1
  151. package/.nyc_output/processinfo/6b047fc9-1bf2-4565-9e8a-9c0defc09dd7.json +0 -1
  152. package/.nyc_output/processinfo/e2c5d0cc-9478-4f26-ad2f-de246d4c35de.json +0 -1
  153. package/.nyc_output/processinfo/f4b0e40f-04ca-4b6d-bfeb-51d617db9841.json +0 -1
  154. package/.nyc_output/processinfo/index.json +0 -1
package/bower.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proj4",
3
- "version": "2.17.0",
3
+ "version": "2.19.0",
4
4
  "description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",
5
5
  "homepage": "https://github.com/proj4js/proj4js",
6
6
  "main": "dist/proj4.js",
package/component.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proj4",
3
- "version": "2.17.0",
3
+ "version": "2.19.0",
4
4
  "description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",
5
5
  "repo": "proj4js/proj4js",
6
6
  "keywords": [
@@ -0,0 +1,24 @@
1
+ export default Point;
2
+ /**
3
+ * @deprecated v3.0.0 - use proj4.toPoint instead
4
+ * @param {number | import('./core').TemplateCoordinates | string} x
5
+ * @param {number} [y]
6
+ * @param {number} [z]
7
+ */
8
+ declare function Point(x: number | import("./core").TemplateCoordinates | string, y?: number, z?: number): Point;
9
+ declare class Point {
10
+ /**
11
+ * @deprecated v3.0.0 - use proj4.toPoint instead
12
+ * @param {number | import('./core').TemplateCoordinates | string} x
13
+ * @param {number} [y]
14
+ * @param {number} [z]
15
+ */
16
+ constructor(x: number | import("./core").TemplateCoordinates | string, y?: number, z?: number);
17
+ x: string | number;
18
+ y: number;
19
+ z: number;
20
+ toMGRS(accuracy: any): any;
21
+ }
22
+ declare namespace Point {
23
+ function fromMGRS(mgrsStr: any): Point;
24
+ }
@@ -0,0 +1,71 @@
1
+ export default Projection;
2
+ export type DatumDefinition = {
3
+ /**
4
+ * - The type of datum.
5
+ */
6
+ datum_type: number;
7
+ /**
8
+ * - Semi-major axis of the ellipsoid.
9
+ */
10
+ a: number;
11
+ /**
12
+ * - Semi-minor axis of the ellipsoid.
13
+ */
14
+ b: number;
15
+ /**
16
+ * - Eccentricity squared of the ellipsoid.
17
+ */
18
+ es: number;
19
+ /**
20
+ * - Second eccentricity squared of the ellipsoid.
21
+ */
22
+ ep2: number;
23
+ };
24
+ /**
25
+ * @typedef {Object} DatumDefinition
26
+ * @property {number} datum_type - The type of datum.
27
+ * @property {number} a - Semi-major axis of the ellipsoid.
28
+ * @property {number} b - Semi-minor axis of the ellipsoid.
29
+ * @property {number} es - Eccentricity squared of the ellipsoid.
30
+ * @property {number} ep2 - Second eccentricity squared of the ellipsoid.
31
+ */
32
+ /**
33
+ * @param {string | import('./core').PROJJSONDefinition | import('./defs').ProjectionDefinition} srsCode
34
+ * @param {(errorMessage?: string, instance?: Projection) => void} [callback]
35
+ */
36
+ declare function Projection(srsCode: string | import("./core").PROJJSONDefinition | import("./defs").ProjectionDefinition, callback?: (errorMessage?: string, instance?: Projection) => void): Projection;
37
+ declare class Projection {
38
+ /**
39
+ * @typedef {Object} DatumDefinition
40
+ * @property {number} datum_type - The type of datum.
41
+ * @property {number} a - Semi-major axis of the ellipsoid.
42
+ * @property {number} b - Semi-minor axis of the ellipsoid.
43
+ * @property {number} es - Eccentricity squared of the ellipsoid.
44
+ * @property {number} ep2 - Second eccentricity squared of the ellipsoid.
45
+ */
46
+ /**
47
+ * @param {string | import('./core').PROJJSONDefinition | import('./defs').ProjectionDefinition} srsCode
48
+ * @param {(errorMessage?: string, instance?: Projection) => void} [callback]
49
+ */
50
+ constructor(srsCode: string | import("./core").PROJJSONDefinition | import("./defs").ProjectionDefinition, callback?: (errorMessage?: string, instance?: Projection) => void);
51
+ /** @type {<T extends import('./core').TemplateCoordinates>(coordinates: T, enforceAxis?: boolean) => T} */
52
+ forward: <T extends import("./core").TemplateCoordinates>(coordinates: T, enforceAxis?: boolean) => T;
53
+ /** @type {<T extends import('./core').TemplateCoordinates>(coordinates: T, enforceAxis?: boolean) => T} */
54
+ inverse: <T extends import("./core").TemplateCoordinates>(coordinates: T, enforceAxis?: boolean) => T;
55
+ /** @type {string} */
56
+ name: string;
57
+ /** @type {string} */
58
+ title: string;
59
+ a: any;
60
+ b: any;
61
+ rf: any;
62
+ sphere: any;
63
+ es: number;
64
+ e: number;
65
+ ep2: number;
66
+ datum: DatumDefinition;
67
+ }
68
+ declare namespace Projection {
69
+ export { projections };
70
+ }
71
+ import projections from './projections';
@@ -0,0 +1 @@
1
+ export default function _default(crs: any, denorm: any, point: any): import("./core").InterfaceCoordinates;
@@ -0,0 +1 @@
1
+ export default function _default(point: any): void;
@@ -0,0 +1 @@
1
+ export default function _default(x: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(x: any): any;
@@ -0,0 +1 @@
1
+ export default function _default(x: any): any;
@@ -0,0 +1 @@
1
+ export default function _default(zone: any, lon: any): any;
@@ -0,0 +1 @@
1
+ export default function _default(x: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(x: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(x: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(x: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(pp: any, arg_r: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(pp: any, arg_r: any, arg_i: any): number[];
@@ -0,0 +1 @@
1
+ export default function _default(x: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(x: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(x: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(x: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(x: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(x: any, L: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(a: any, e: any, sinphi: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(pp: any, B: any): any;
@@ -0,0 +1 @@
1
+ export default function _default(x: any, y: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(ml: any, e0: any, e1: any, e2: any, e3: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(eccent: any, ts: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(eccent: any, q: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(eccent: any, phi: any, sinphi: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(x: any): any;
@@ -0,0 +1 @@
1
+ export default function _default(e0: any, e1: any, e2: any, e3: any, phi: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(eccent: any, sinphi: any, cosphi: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(eccent: any, ts: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(es: any): number[];
@@ -0,0 +1 @@
1
+ export default function _default(arg: any, es: any, en: any): any;
@@ -0,0 +1 @@
1
+ export default function _default(phi: any, sphi: any, cphi: any, en: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(eccent: any, sinphi: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(x: any): 1 | -1;
@@ -0,0 +1 @@
1
+ export default function _default(x: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(esinp: any, exp: any): number;
@@ -0,0 +1 @@
1
+ export default function _default(x: any): number;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @param {Array<number>} array
3
+ * @returns {import("../core").InterfaceCoordinates}
4
+ */
5
+ export default function _default(array: Array<number>): import("../core").InterfaceCoordinates;
@@ -0,0 +1 @@
1
+ export default function _default(eccent: any, phi: any, sinphi: any): number;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Calculates the inverse geodesic problem using Vincenty's formulae.
3
+ * Computes the forward azimuth and ellipsoidal distance between two points
4
+ * specified by latitude and longitude on the surface of an ellipsoid.
5
+ *
6
+ * @param {number} lat1 Latitude of the first point in radians.
7
+ * @param {number} lon1 Longitude of the first point in radians.
8
+ * @param {number} lat2 Latitude of the second point in radians.
9
+ * @param {number} lon2 Longitude of the second point in radians.
10
+ * @param {number} a Semi-major axis of the ellipsoid (meters).
11
+ * @param {number} f Flattening of the ellipsoid.
12
+ * @returns {{ azi1: number, s12: number }} An object containing:
13
+ * - azi1: Forward azimuth from the first point to the second point (radians).
14
+ * - s12: Ellipsoidal distance between the two points (meters).
15
+ */
16
+ export function vincentyInverse(lat1: number, lon1: number, lat2: number, lon2: number, a: number, f: number): {
17
+ azi1: number;
18
+ s12: number;
19
+ };
20
+ /**
21
+ * Solves the direct geodetic problem using Vincenty's formulae.
22
+ * Given a starting point, initial azimuth, and distance, computes the destination point on the ellipsoid.
23
+ *
24
+ * @param {number} lat1 Latitude of the starting point in radians.
25
+ * @param {number} lon1 Longitude of the starting point in radians.
26
+ * @param {number} azi1 Initial azimuth (forward azimuth) in radians.
27
+ * @param {number} s12 Distance to travel from the starting point in meters.
28
+ * @param {number} a Semi-major axis of the ellipsoid in meters.
29
+ * @param {number} f Flattening of the ellipsoid.
30
+ * @returns {{lat2: number, lon2: number}} The latitude and longitude (in radians) of the destination point.
31
+ */
32
+ export function vincentyDirect(lat1: number, lon1: number, azi1: number, s12: number, a: number, f: number): {
33
+ lat2: number;
34
+ lon2: number;
35
+ };