@mailwoman/spatial 10.0.0 → 10.2.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.
- package/README.md +2 -2
- package/lib/bbox.ts +41 -34
- package/lib/coordinate/bounds.ts +2 -2
- package/lib/coordinate/formats.ts +21 -33
- package/lib/distance.ts +56 -28
- package/lib/feature.ts +2 -2
- package/lib/geometries/point.ts +42 -35
- package/lib/geometries/polygon.ts +27 -135
- package/lib/geometries/ring-blob.ts +35 -132
- package/lib/google/place-id.ts +4 -2
- package/lib/h3/cell.ts +23 -78
- package/lib/h3/coverage.ts +13 -9
- package/lib/h3/interior-cells.ts +13 -34
- package/lib/h3/polygon-cells.ts +61 -167
- package/lib/{h3/index.ts → h3.ts} +1 -1
- package/lib/index.ts +6 -5
- package/lib/objects.ts +6 -6
- package/lib/open-location-code.ts +11 -42
- package/lib/osgb36.ts +28 -187
- package/lib/polyline.ts +5 -3
- package/lib/position.ts +39 -20
- package/lib/projection/transform.ts +43 -44
- package/lib/{projection/index.ts → projection.ts} +1 -1
- package/lib/well-known-text.ts +9 -9
- package/out/bbox.d.ts +17 -14
- package/out/bbox.d.ts.map +1 -1
- package/out/bbox.js +32 -23
- package/out/bbox.js.map +1 -1
- package/out/coordinate/bounds.d.ts +2 -2
- package/out/coordinate/bounds.js +2 -2
- package/out/coordinate/formats.d.ts +17 -16
- package/out/coordinate/formats.d.ts.map +1 -1
- package/out/coordinate/formats.js +20 -32
- package/out/coordinate/formats.js.map +1 -1
- package/out/distance.d.ts +51 -26
- package/out/distance.d.ts.map +1 -1
- package/out/distance.js +53 -27
- package/out/distance.js.map +1 -1
- package/out/feature.d.ts +2 -2
- package/out/feature.d.ts.map +1 -1
- package/out/geometries/point.d.ts +30 -22
- package/out/geometries/point.d.ts.map +1 -1
- package/out/geometries/point.js +37 -30
- package/out/geometries/point.js.map +1 -1
- package/out/geometries/polygon.d.ts +27 -126
- package/out/geometries/polygon.d.ts.map +1 -1
- package/out/geometries/polygon.js +14 -42
- package/out/geometries/polygon.js.map +1 -1
- package/out/geometries/ring-blob.d.ts +24 -110
- package/out/geometries/ring-blob.d.ts.map +1 -1
- package/out/geometries/ring-blob.js +30 -116
- package/out/geometries/ring-blob.js.map +1 -1
- package/out/{geometries/index.js → geometries.d.ts} +1 -1
- package/out/geometries.d.ts.map +1 -0
- package/out/{geometries/index.d.ts → geometries.js} +1 -1
- package/out/geometries.js.map +1 -0
- package/out/google/place-id.d.ts +4 -2
- package/out/google/place-id.d.ts.map +1 -1
- package/out/google/place-id.js.map +1 -1
- package/out/{google/index.d.ts → google.d.ts} +1 -1
- package/out/google.d.ts.map +1 -0
- package/out/{google/index.js → google.js} +1 -1
- package/out/google.js.map +1 -0
- package/out/h3/cell.d.ts +19 -73
- package/out/h3/cell.d.ts.map +1 -1
- package/out/h3/cell.js +22 -65
- package/out/h3/cell.js.map +1 -1
- package/out/h3/coverage.d.ts +12 -8
- package/out/h3/coverage.d.ts.map +1 -1
- package/out/h3/coverage.js +12 -8
- package/out/h3/coverage.js.map +1 -1
- package/out/h3/interior-cells.d.ts +9 -28
- package/out/h3/interior-cells.d.ts.map +1 -1
- package/out/h3/interior-cells.js +13 -32
- package/out/h3/interior-cells.js.map +1 -1
- package/out/h3/polygon-cells.d.ts +28 -120
- package/out/h3/polygon-cells.d.ts.map +1 -1
- package/out/h3/polygon-cells.js +50 -148
- package/out/h3/polygon-cells.js.map +1 -1
- package/out/{h3/index.d.ts → h3.d.ts} +2 -2
- package/out/h3.d.ts.map +1 -0
- package/out/{h3/index.js → h3.js} +2 -2
- package/out/h3.js.map +1 -0
- package/out/index.d.ts +6 -5
- package/out/index.d.ts.map +1 -1
- package/out/index.js +6 -5
- package/out/index.js.map +1 -1
- package/out/objects.d.ts +6 -6
- package/out/open-location-code.d.ts +11 -22
- package/out/open-location-code.d.ts.map +1 -1
- package/out/open-location-code.js +9 -40
- package/out/open-location-code.js.map +1 -1
- package/out/osgb36.d.ts +21 -97
- package/out/osgb36.d.ts.map +1 -1
- package/out/osgb36.js +12 -165
- package/out/osgb36.js.map +1 -1
- package/out/polyline.d.ts +5 -3
- package/out/polyline.d.ts.map +1 -1
- package/out/polyline.js +5 -3
- package/out/polyline.js.map +1 -1
- package/out/position.d.ts +36 -20
- package/out/position.d.ts.map +1 -1
- package/out/position.js +0 -1
- package/out/position.js.map +1 -1
- package/out/projection/transform.d.ts +33 -30
- package/out/projection/transform.d.ts.map +1 -1
- package/out/projection/transform.js +15 -17
- package/out/projection/transform.js.map +1 -1
- package/out/{projection/index.d.ts → projection.d.ts} +2 -2
- package/out/projection.d.ts.map +1 -0
- package/out/{projection/index.js → projection.js} +2 -2
- package/out/projection.js.map +1 -0
- package/out/{regions/index.js → regions.d.ts} +1 -1
- package/out/regions.d.ts.map +1 -0
- package/out/{regions/index.d.ts → regions.js} +1 -1
- package/out/regions.js.map +1 -0
- package/out/tools/ogr/stream.d.ts +21 -11
- package/out/tools/ogr/stream.d.ts.map +1 -1
- package/out/tools/ogr/stream.js +17 -10
- package/out/tools/ogr/stream.js.map +1 -1
- package/out/tools/{ogr/index.d.ts → ogr.d.ts} +25 -15
- package/out/tools/ogr.d.ts.map +1 -0
- package/out/tools/{ogr/index.js → ogr.js} +25 -21
- package/out/tools/ogr.js.map +1 -0
- package/out/tools/tsconfig.tsbuildinfo +1 -0
- package/out/tsconfig.test.tsbuildinfo +1 -1
- package/out/well-known-text.d.ts +9 -9
- package/out/well-known-text.d.ts.map +1 -1
- package/out/well-known-text.js +7 -7
- package/out/well-known-text.js.map +1 -1
- package/package.json +37 -129
- package/{lib/tools → tools}/ogr/stream.ts +26 -15
- package/{lib/tools/ogr/index.ts → tools/ogr.ts} +44 -30
- package/out/geometries/index.d.ts.map +0 -1
- package/out/geometries/index.js.map +0 -1
- package/out/google/index.d.ts.map +0 -1
- package/out/google/index.js.map +0 -1
- package/out/h3/index.d.ts.map +0 -1
- package/out/h3/index.js.map +0 -1
- package/out/projection/index.d.ts.map +0 -1
- package/out/projection/index.js.map +0 -1
- package/out/regions/index.d.ts.map +0 -1
- package/out/regions/index.js.map +0 -1
- package/out/tools/ogr/index.d.ts.map +0 -1
- package/out/tools/ogr/index.js.map +0 -1
- /package/lib/{geometries/index.ts → geometries.ts} +0 -0
- /package/lib/{google/index.ts → google.ts} +0 -0
- /package/lib/{regions/index.ts → regions.ts} +0 -0
package/out/osgb36.js
CHANGED
|
@@ -2,175 +2,34 @@
|
|
|
2
2
|
* @copyright Sister Software.
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* OSGB36 / British National Grid (EPSG:27700) → WGS84 (EPSG:4326).
|
|
7
|
-
*
|
|
8
|
-
* Ordnance Survey ships its open products in eastings/northings on the National Grid, not in
|
|
9
|
-
* degrees — Code-Point Open, OS Open UPRN, OS Open Names all do. Nothing else in the repo speaks
|
|
10
|
-
* that coordinate system, so this module is the one place that converts it, and it lives in
|
|
11
|
-
* `@mailwoman/spatial` because that is the math home (`projection.ts` names the datums; this file
|
|
12
|
-
* moves between two of them).
|
|
13
|
-
*
|
|
14
|
-
* Two steps, both from OS's own "A Guide to Coordinate Systems in Great Britain":
|
|
15
|
-
*
|
|
16
|
-
* 1. **Inverse transverse Mercator (Redfearn's series)** — National Grid E/N → OSGB36 geodetic
|
|
17
|
-
* lat/lon on the Airy 1830 ellipsoid. This step is EXACT to well below a millimetre; it is
|
|
18
|
-
* plain map-projection algebra with no empirical content, and {@link osgb36GridToAiryLatLon}
|
|
19
|
-
* reproduces the guide's Annexe C.2 worked example to **1.3e-5 arc-seconds (~0.4 mm)**, which
|
|
20
|
-
* is that example's own published rounding rather than our error.
|
|
21
|
-
* 2. **Seven-parameter Helmert** — Airy-1830 geodetic → geocentric cartesian → rotate/scale/shift
|
|
22
|
-
* → WGS84 (GRS80) geodetic. This step is APPROXIMATE, and that is the whole accuracy story
|
|
23
|
-
* below. Against the guide's own Annexe D Helmert worked example — which uses this same
|
|
24
|
-
* transform, so it tests the implementation and not the approximation — the round trip lands
|
|
25
|
-
* **8.4 mm** out, i.e. the published DMS rounding plus the ignored ellipsoidal height.
|
|
26
|
-
*
|
|
27
|
-
* ## Accuracy: ±5 m, measured, and why we accept it
|
|
28
|
-
*
|
|
29
|
-
* OSGB36 is a 1936 theodolite triangulation, not a geocentric datum. Its distortions relative to
|
|
30
|
-
* WGS84 are irregular across GB — a couple of metres of local warp that no rigid-body transform can
|
|
31
|
-
* absorb. OS's exact answer is **OSTN15**, a published ~1.5 MB grid of per-cell E/N shifts; the
|
|
32
|
-
* seven-parameter Helmert implemented here is OS's own documented approximation to it, which the
|
|
33
|
-
* guide rates at "up to 3.5 m (95%)".
|
|
34
|
-
*
|
|
35
|
-
* MEASURED against OS's official 40-point OSTN15/OSGM15 test set (`OSTN15_OSGM15_TestInput_*`, the
|
|
36
|
-
* developer-pack vectors, joining each point's published OSGB36 E/N to its published ETRS89 lat/lon):
|
|
37
|
-
*
|
|
38
|
-
* | p50 | p90 | p95 | max | mean |
|
|
39
|
-
* | ------ | ------ | ------ | ------ | ------ |
|
|
40
|
-
* | 1.74 m | 3.23 m | 4.18 m | 4.91 m | 1.94 m |
|
|
41
|
-
*
|
|
42
|
-
* All 40 land under 5 m. The worst are exactly where OS warns the datum thins out — TP31 St Kilda
|
|
43
|
-
* (4.91 m), TP01 Scilly (4.72 m), TP32 Outer Hebrides (4.18 m); the mainland points sit near 1–2 m.
|
|
44
|
-
* p95 runs a little above the guide's 3.5 m because we discard ellipsoidal height (see
|
|
45
|
-
* {@link osgb36AiryToWGS84}), and because two of the three worst points are offshore rocks where
|
|
46
|
-
* "OSGB36 does not exist" in OS's own words.
|
|
47
|
-
*
|
|
48
|
-
* We take that error deliberately, because of what the coordinates are FOR. A Code-Point Open
|
|
49
|
-
* centroid is the mean position of a postcode unit's delivery points snapped to the nearest real
|
|
50
|
-
* address — the unit itself spans tens to hundreds of metres, and the resolver uses the centroid to
|
|
51
|
-
* pick a locality and rank candidates within a few hundred metres. A 2 m datum error is one to two
|
|
52
|
-
* orders of magnitude below the quantity being represented. Nothing downstream reads a postcode
|
|
53
|
-
* centroid at metre precision.
|
|
54
|
-
*
|
|
55
|
-
* **Do not use this module for anything that does.** Surveying, cadastral work, or any consumer
|
|
56
|
-
* comparing our coordinates against another OSGB36-derived dataset at sub-10 m tolerance needs
|
|
57
|
-
* OSTN15, which means shipping the shift grid. If that day comes, the swap point is
|
|
58
|
-
* {@link osgb36AiryToWGS84} — swap the Helmert for a grid interpolation and the projection step
|
|
59
|
-
* above it is unchanged.
|
|
60
|
-
*
|
|
61
|
-
* @see https://www.ordnancesurvey.co.uk/documents/resources/guide-coordinate-systems-great-britain.pdf
|
|
62
|
-
*/
|
|
63
|
-
/**
|
|
64
|
-
* Semi-major axis of the Airy 1830 ellipsoid, in metres — the figure of the Earth OSGB36 is referenced to.
|
|
65
5
|
*/
|
|
66
6
|
const AIRY_1830_A = 6_377_563.396;
|
|
67
|
-
/**
|
|
68
|
-
* Semi-minor axis of the Airy 1830 ellipsoid, in metres.
|
|
69
|
-
*/
|
|
70
7
|
const AIRY_1830_B = 6_356_256.909;
|
|
71
|
-
/**
|
|
72
|
-
* Semi-major axis of the GRS80 ellipsoid, in metres. WGS84's own semi-major axis is identical; the two ellipsoids
|
|
73
|
-
* differ only in the flattening's last digits (~0.1 mm at the pole), far below this module's error budget.
|
|
74
|
-
*/
|
|
75
8
|
const GRS80_A = 6_378_137;
|
|
76
|
-
/**
|
|
77
|
-
* Semi-minor axis of the GRS80 ellipsoid, in metres.
|
|
78
|
-
*/
|
|
79
9
|
const GRS80_B = 6_356_752.3141;
|
|
80
|
-
/**
|
|
81
|
-
* Scale factor on the National Grid's central meridian.
|
|
82
|
-
*/
|
|
83
10
|
const NATIONAL_GRID_F0 = 0.9996012717;
|
|
84
|
-
/**
|
|
85
|
-
* Latitude of the National Grid's true origin, 49° N, in radians.
|
|
86
|
-
*/
|
|
87
11
|
const NATIONAL_GRID_LAT0 = (49 * Math.PI) / 180;
|
|
88
|
-
/**
|
|
89
|
-
* Longitude of the National Grid's true origin, 2° W, in radians.
|
|
90
|
-
*/
|
|
91
12
|
const NATIONAL_GRID_LON0 = (-2 * Math.PI) / 180;
|
|
92
|
-
/**
|
|
93
|
-
* Easting of the National Grid's true origin (the "false easting"), in metres.
|
|
94
|
-
*/
|
|
95
13
|
const NATIONAL_GRID_E0 = 400_000;
|
|
96
|
-
/**
|
|
97
|
-
* Northing of the National Grid's true origin (the "false northing"), in metres. Negative because the true origin sits
|
|
98
|
-
* south-west of the grid's own zero.
|
|
99
|
-
*/
|
|
100
14
|
const NATIONAL_GRID_N0 = -100_000;
|
|
101
|
-
/**
|
|
102
|
-
* Arc-seconds → radians. The Helmert rotations are published in arc-seconds.
|
|
103
|
-
*/
|
|
104
15
|
const ARCSEC_TO_RAD = Math.PI / (180 * 3600);
|
|
105
|
-
/**
|
|
106
|
-
* Parts-per-million → unitless scale. The Helmert scale factor is published in ppm.
|
|
107
|
-
*/
|
|
108
16
|
const PPM = 1e-6;
|
|
109
|
-
/**
|
|
110
|
-
* Convergence threshold for the meridional-arc iteration in {@link osgb36GridToAiryLatLon}, in METRES of northing. OS's
|
|
111
|
-
* guide specifies 0.01 mm; this is that figure. It bounds the northing residual, not the latitude, which is why it is
|
|
112
|
-
* expressed in metres and compared against `northing - N0 - M`.
|
|
113
|
-
*/
|
|
114
17
|
const MERIDIONAL_ARC_TOLERANCE_M = 1e-5;
|
|
115
|
-
/**
|
|
116
|
-
* Convergence threshold for the cartesian→geodetic latitude iteration in {@link osgb36AiryToWGS84}, in RADIANS. 1e-13
|
|
117
|
-
* rad is ~0.6 µm on the ground — far below anything this module claims, and reached in four or five passes at GB
|
|
118
|
-
* latitudes.
|
|
119
|
-
*/
|
|
120
18
|
const GEODETIC_LATITUDE_TOLERANCE_RAD = 1e-13;
|
|
121
|
-
/**
|
|
122
|
-
* The seven-parameter Helmert transformation taking OSGB36 (Airy 1830) geocentric cartesian coordinates to WGS84.
|
|
123
|
-
*
|
|
124
|
-
* OS publishes this transform in the ETRS89/WGS84 → OSGB36 direction (guide table 4), as `tx = -446.448, ty = +125.157,
|
|
125
|
-
* tz = -542.060, s = +20.4894 ppm, rx = -0.1502", ry = -0.2470", rz = -0.8421"`. We need the OTHER direction, so every
|
|
126
|
-
* parameter is negated — valid to well inside the transform's own metre-scale error because the rotations are
|
|
127
|
-
* microradian-scale and the second-order terms of a proper inversion are sub-millimetre.
|
|
128
|
-
*
|
|
129
|
-
* The rotation convention is **Position Vector** (EPSG method 1033), NOT Coordinate Frame Rotation (EPSG 1032). The two
|
|
130
|
-
* differ only in the sign of the three rotations, which is why citing the method code matters more than it looks: paste
|
|
131
|
-
* these numbers into a library expecting 1032 and every result moves by roughly 20 m with no error raised.
|
|
132
|
-
*
|
|
133
|
-
* Getting a sign wrong here does not produce a subtly worse answer; it produces a coordinate tens to hundreds of metres
|
|
134
|
-
* out, in a consistent direction — which reads as a plausible coordinate. That is what the Annexe D test is for.
|
|
135
|
-
*/
|
|
136
19
|
const OSGB36_TO_WGS84_HELMERT = {
|
|
137
|
-
/**
|
|
138
|
-
* X translation, metres.
|
|
139
|
-
*/
|
|
140
20
|
tx: 446.448,
|
|
141
|
-
/**
|
|
142
|
-
* Y translation, metres.
|
|
143
|
-
*/
|
|
144
21
|
ty: -125.157,
|
|
145
|
-
/**
|
|
146
|
-
* Z translation, metres.
|
|
147
|
-
*/
|
|
148
22
|
tz: 542.06,
|
|
149
|
-
/**
|
|
150
|
-
* Scale correction, parts per million.
|
|
151
|
-
*/
|
|
152
23
|
scalePPM: -20.4894,
|
|
153
|
-
/**
|
|
154
|
-
* Rotation about the X axis, arc-seconds.
|
|
155
|
-
*/
|
|
156
24
|
rx: 0.1502,
|
|
157
|
-
/**
|
|
158
|
-
* Rotation about the Y axis, arc-seconds.
|
|
159
|
-
*/
|
|
160
25
|
ry: 0.247,
|
|
161
|
-
/**
|
|
162
|
-
* Rotation about the Z axis, arc-seconds.
|
|
163
|
-
*/
|
|
164
26
|
rz: 0.8421,
|
|
165
27
|
};
|
|
166
28
|
/**
|
|
167
|
-
*
|
|
168
|
-
*
|
|
29
|
+
* Converts a National Grid easting and northing to OSGB36 latitude and longitude
|
|
30
|
+
* on the Airy 1830 ellipsoid, without a datum shift.
|
|
169
31
|
*
|
|
170
|
-
*
|
|
171
|
-
* so it is NOT a WGS84 coordinate and must not be handed to anything expecting one; feed it to
|
|
172
|
-
* {@link osgb36AiryToWGS84}. Exported separately so the projection can be tested against OS's worked example
|
|
173
|
-
* independently of the Helmert, which is the only way to tell a projection bug from a datum-shift bug.
|
|
32
|
+
* Pass the result to {@link osgb36AiryToWGS84} to get WGS84 coordinates.
|
|
174
33
|
*/
|
|
175
34
|
export function osgb36GridToAiryLatLon({ easting, northing }) {
|
|
176
35
|
const a = AIRY_1830_A;
|
|
@@ -180,13 +39,10 @@ export function osgb36GridToAiryLatLon({ easting, northing }) {
|
|
|
180
39
|
const lon0 = NATIONAL_GRID_LON0;
|
|
181
40
|
const e0 = NATIONAL_GRID_E0;
|
|
182
41
|
const n0 = NATIONAL_GRID_N0;
|
|
183
|
-
// Eccentricity squared of the Airy ellipsoid, and the `n` series parameter.
|
|
184
42
|
const e2 = (a * a - b * b) / (a * a);
|
|
185
43
|
const n = (a - b) / (a + b);
|
|
186
44
|
const n2 = n * n;
|
|
187
45
|
const n3 = n2 * n;
|
|
188
|
-
// Iterate latitude until the meridional arc `M` matches the northing. OS's guide specifies a 0.01 mm
|
|
189
|
-
// threshold; it converges in three or four passes anywhere in GB.
|
|
190
46
|
let lat = lat0;
|
|
191
47
|
let m = 0;
|
|
192
48
|
do {
|
|
@@ -207,7 +63,6 @@ export function osgb36GridToAiryLatLon({ easting, northing }) {
|
|
|
207
63
|
const tan2 = tanLat * tanLat;
|
|
208
64
|
const tan4 = tan2 * tan2;
|
|
209
65
|
const tan6 = tan4 * tan2;
|
|
210
|
-
// `nu` = transverse radius of curvature; `rho` = meridional radius; `eta2` = their ratio less one.
|
|
211
66
|
const nu = a * f0 * (1 - e2 * sinLat * sinLat) ** -0.5;
|
|
212
67
|
const rho = a * f0 * (1 - e2) * (1 - e2 * sinLat * sinLat) ** -1.5;
|
|
213
68
|
const eta2 = nu / rho - 1;
|
|
@@ -234,16 +89,13 @@ export function osgb36GridToAiryLatLon({ easting, northing }) {
|
|
|
234
89
|
};
|
|
235
90
|
}
|
|
236
91
|
/**
|
|
237
|
-
*
|
|
92
|
+
* Converts OSGB36 latitude and longitude on Airy 1830 to WGS84 with the seven-parameter
|
|
93
|
+
* Helmert transform, accurate to about 5 m.
|
|
238
94
|
*
|
|
239
|
-
*
|
|
240
|
-
* Heights are not modelled: the input is treated as sitting on the Airy ellipsoid and the output's ellipsoidal height
|
|
241
|
-
* is discarded. For a horizontal postcode centroid that costs well under a metre; for anything vertical it is wrong by
|
|
242
|
-
* the ~50 m geoid–ellipsoid separation over GB, so this function does not pretend to return a height.
|
|
95
|
+
* The transform ignores height, so use the result for horizontal positions only.
|
|
243
96
|
*/
|
|
244
97
|
export function osgb36AiryToWGS84({ latitude, longitude }) {
|
|
245
98
|
const { tx, ty, tz, scalePPM, rx, ry, rz } = OSGB36_TO_WGS84_HELMERT;
|
|
246
|
-
// Convert Airy 1830 geodetic coordinates to geocentric Cartesian coordinates.
|
|
247
99
|
const phi = (latitude * Math.PI) / 180;
|
|
248
100
|
const lambda = (longitude * Math.PI) / 180;
|
|
249
101
|
const sinPhi = Math.sin(phi);
|
|
@@ -253,7 +105,6 @@ export function osgb36AiryToWGS84({ latitude, longitude }) {
|
|
|
253
105
|
const x1 = nuAiry * cosPhi * Math.cos(lambda);
|
|
254
106
|
const y1 = nuAiry * cosPhi * Math.sin(lambda);
|
|
255
107
|
const z1 = (1 - e2Airy) * nuAiry * sinPhi;
|
|
256
|
-
// Apply Helmert rotation, scale, and translation.
|
|
257
108
|
const s = 1 + scalePPM * PPM;
|
|
258
109
|
const rxRad = rx * ARCSEC_TO_RAD;
|
|
259
110
|
const ryRad = ry * ARCSEC_TO_RAD;
|
|
@@ -261,12 +112,10 @@ export function osgb36AiryToWGS84({ latitude, longitude }) {
|
|
|
261
112
|
const x2 = tx + s * x1 - rzRad * y1 + ryRad * z1;
|
|
262
113
|
const y2 = ty + rzRad * x1 + s * y1 - rxRad * z1;
|
|
263
114
|
const z2 = tz - ryRad * x1 + rxRad * y1 + s * z1;
|
|
264
|
-
// Convert GRS80 geocentric Cartesian coordinates to geodetic coordinates by latitude iteration.
|
|
265
115
|
const e2GRS = (GRS80_A * GRS80_A - GRS80_B * GRS80_B) / (GRS80_A * GRS80_A);
|
|
266
116
|
const p = Math.sqrt(x2 * x2 + y2 * y2);
|
|
267
117
|
let phi2 = Math.atan2(z2, p * (1 - e2GRS));
|
|
268
118
|
let phiPrev = 2 * Math.PI;
|
|
269
|
-
// Converges in a handful of passes at GB latitudes; the guard bounds it regardless.
|
|
270
119
|
for (let i = 0; i < 100 && Math.abs(phi2 - phiPrev) > GEODETIC_LATITUDE_TOLERANCE_RAD; i++) {
|
|
271
120
|
phiPrev = phi2;
|
|
272
121
|
const nuGRS = GRS80_A / Math.sqrt(1 - e2GRS * Math.sin(phi2) * Math.sin(phi2));
|
|
@@ -279,20 +128,18 @@ export function osgb36AiryToWGS84({ latitude, longitude }) {
|
|
|
279
128
|
};
|
|
280
129
|
}
|
|
281
130
|
/**
|
|
282
|
-
*
|
|
283
|
-
*
|
|
131
|
+
* Converts a British National Grid (EPSG:27700) easting and northing to WGS84
|
|
132
|
+
* (EPSG:4326) latitude and longitude, accurate to about 5 m across GB.
|
|
284
133
|
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
* Open uses exactly that to mean "no coordinate available" (its 865 positional-quality-90 rows). Callers must filter
|
|
288
|
-
* those rows themselves — a zero here is a legitimate coordinate, so this module cannot tell the difference.
|
|
134
|
+
* It converts `{ easting: 0, northing: 0 }` like any other point, so callers must
|
|
135
|
+
* filter out Code-Point Open's zero placeholder rows.
|
|
289
136
|
*/
|
|
290
137
|
export function osgb36ToWGS84(point) {
|
|
291
138
|
return osgb36AiryToWGS84(osgb36GridToAiryLatLon(point));
|
|
292
139
|
}
|
|
293
140
|
/**
|
|
294
|
-
*
|
|
295
|
-
*
|
|
141
|
+
* Converts a National Grid point to WGS84 in GeoJSON `[longitude, latitude]` order,
|
|
142
|
+
* matching {@link Coordinates2D}.
|
|
296
143
|
*/
|
|
297
144
|
export function osgb36ToCoordinates2D(point) {
|
|
298
145
|
const { latitude, longitude } = osgb36ToWGS84(point);
|
package/out/osgb36.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"osgb36.js","sourceRoot":"","sources":["../lib/osgb36.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"osgb36.js","sourceRoot":"","sources":["../lib/osgb36.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,WAAW,GAAG,aAAa,CAAA;AAEjC,MAAM,WAAW,GAAG,aAAa,CAAA;AAEjC,MAAM,OAAO,GAAG,SAAS,CAAA;AAEzB,MAAM,OAAO,GAAG,cAAc,CAAA;AAE9B,MAAM,gBAAgB,GAAG,YAAY,CAAA;AAErC,MAAM,kBAAkB,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAA;AAE/C,MAAM,kBAAkB,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAA;AAE/C,MAAM,gBAAgB,GAAG,OAAO,CAAA;AAEhC,MAAM,gBAAgB,GAAG,CAAC,OAAO,CAAA;AAEjC,MAAM,aAAa,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,CAAA;AAE5C,MAAM,GAAG,GAAG,IAAI,CAAA;AAEhB,MAAM,0BAA0B,GAAG,IAAI,CAAA;AAEvC,MAAM,+BAA+B,GAAG,KAAK,CAAA;AAE7C,MAAM,uBAAuB,GAAG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AED;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,KAAwB;IACrD,OAAO,iBAAiB,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAA;AACxD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAwB;IAC7D,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC,CAAA;IAEpD,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;AAC7B,CAAC"}
|
package/out/polyline.d.ts
CHANGED
|
@@ -14,14 +14,16 @@
|
|
|
14
14
|
/**
|
|
15
15
|
* Clamp a fraction into `[0, 1]`.
|
|
16
16
|
*
|
|
17
|
-
* NaN passes through
|
|
18
|
-
*
|
|
17
|
+
* NaN passes through deliberately.
|
|
18
|
+
* An interpolation whose inputs were not numbers should produce NaN coordinates a
|
|
19
|
+
* caller can detect rather than silently snap to a segment's start.
|
|
19
20
|
*/
|
|
20
21
|
export declare function clampFraction(t: number): number;
|
|
21
22
|
/**
|
|
22
23
|
* The point at fraction `t` of a polyline's total arc length (haversine), plus that total in km.
|
|
23
24
|
*
|
|
24
|
-
* `t` is assumed clamped to `[0, 1]`.
|
|
25
|
+
* `t` is assumed clamped to `[0, 1]`.
|
|
26
|
+
* A zero-length polyline yields its first vertex and a length of 0, so a degenerate
|
|
25
27
|
* segment still produces a usable coordinate rather than NaN.
|
|
26
28
|
*/
|
|
27
29
|
export declare function pointAlong(polyline: readonly [number, number][], t: number): [lon: number, lat: number, lengthKm: number];
|
package/out/polyline.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polyline.d.ts","sourceRoot":"","sources":["../lib/polyline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH
|
|
1
|
+
{"version":3,"file":"polyline.d.ts","sourceRoot":"","sources":["../lib/polyline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACzB,QAAQ,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,EACrC,CAAC,EAAE,MAAM,GACP,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAqC9C"}
|
package/out/polyline.js
CHANGED
|
@@ -15,8 +15,9 @@ import { haversineKm } from "#distance";
|
|
|
15
15
|
/**
|
|
16
16
|
* Clamp a fraction into `[0, 1]`.
|
|
17
17
|
*
|
|
18
|
-
* NaN passes through
|
|
19
|
-
*
|
|
18
|
+
* NaN passes through deliberately.
|
|
19
|
+
* An interpolation whose inputs were not numbers should produce NaN coordinates a
|
|
20
|
+
* caller can detect rather than silently snap to a segment's start.
|
|
20
21
|
*/
|
|
21
22
|
export function clampFraction(t) {
|
|
22
23
|
return t < 0 ? 0 : Math.min(1, t);
|
|
@@ -24,7 +25,8 @@ export function clampFraction(t) {
|
|
|
24
25
|
/**
|
|
25
26
|
* The point at fraction `t` of a polyline's total arc length (haversine), plus that total in km.
|
|
26
27
|
*
|
|
27
|
-
* `t` is assumed clamped to `[0, 1]`.
|
|
28
|
+
* `t` is assumed clamped to `[0, 1]`.
|
|
29
|
+
* A zero-length polyline yields its first vertex and a length of 0, so a degenerate
|
|
28
30
|
* segment still produces a usable coordinate rather than NaN.
|
|
29
31
|
*/
|
|
30
32
|
export function pointAlong(polyline, t) {
|
package/out/polyline.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polyline.js","sourceRoot":"","sources":["../lib/polyline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC
|
|
1
|
+
{"version":3,"file":"polyline.js","sourceRoot":"","sources":["../lib/pol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AM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAE,CAAA;QAEpB,IAAI,SAAS,IAAI,GAAG,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/C,MAAM,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,SAAS,GAAG,GAAG,CAAC,CAAA;YACxD,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAE,CAAA;YACjC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAE,CAAA;YAErC,OAAO,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAA;QACnE,CAAC;QAED,SAAS,IAAI,GAAG,CAAA;IACjB,CAAC;IAED,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,CAAA;IAEnC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,CAAA;AACzB,CAAC"}
|
package/out/position.d.ts
CHANGED
|
@@ -6,12 +6,42 @@
|
|
|
6
6
|
* This file contains types and utilities for working with geographic positions.
|
|
7
7
|
*/
|
|
8
8
|
import type { LatLngLiteral } from "@googlemaps/google-maps-services-js";
|
|
9
|
-
|
|
9
|
+
import type { PlanarPoint } from "@mailwoman/annotations";
|
|
10
|
+
/**
|
|
11
|
+
* A point in decimal degrees under the `latitude` and `longitude` keys.
|
|
12
|
+
*/
|
|
13
|
+
export interface GeoCoordinate {
|
|
14
|
+
latitude: number;
|
|
15
|
+
longitude: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A point in decimal degrees under the `lat` and `lon` keys.
|
|
19
|
+
*/
|
|
20
|
+
export interface LatLon {
|
|
21
|
+
lat: number;
|
|
22
|
+
lon: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A place's display name and its point in decimal degrees under the `lat` and `lon` keys.
|
|
26
|
+
*/
|
|
27
|
+
export interface NamedLatLon {
|
|
28
|
+
name: string;
|
|
29
|
+
lat: number;
|
|
30
|
+
lon: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A geocoder's answer under the `lat` and `lon` keys.
|
|
34
|
+
* Both are `null` when the geocoder returned no point.
|
|
35
|
+
*/
|
|
36
|
+
export interface NullableLatLon {
|
|
37
|
+
lat: number | null;
|
|
38
|
+
lon: number | null;
|
|
39
|
+
}
|
|
10
40
|
/**
|
|
11
41
|
* An ordered pair of coordinates in the form of [longitude, latitude].
|
|
12
42
|
*
|
|
13
|
-
* Note that unlike the typical order, GeoJSON coordinates are in the order of
|
|
14
|
-
* of [x, y] in Cartesian coordinates.
|
|
43
|
+
* Note that unlike the typical order, GeoJSON coordinates are in the order of
|
|
44
|
+
* [longitude, latitude] to match the order of [x, y] in Cartesian coordinates.
|
|
15
45
|
*
|
|
16
46
|
* @category Position
|
|
17
47
|
* @category GeoJSON
|
|
@@ -86,24 +116,10 @@ export type Coordinates3D = [
|
|
|
86
116
|
altitude: number
|
|
87
117
|
];
|
|
88
118
|
/**
|
|
89
|
-
* A record of internal coordinates, typically used by the US Census
|
|
119
|
+
* A record of internal coordinates, typically used by the US Census: `x` is the
|
|
120
|
+
* longitude in [-180, 180] and `y` the latitude in [-90, 90].
|
|
90
121
|
*/
|
|
91
|
-
export
|
|
92
|
-
/**
|
|
93
|
-
* Internal Longitude (X) Coordinates
|
|
94
|
-
*
|
|
95
|
-
* @minimum -180
|
|
96
|
-
* @maximum 180
|
|
97
|
-
*/
|
|
98
|
-
x: number;
|
|
99
|
-
/**
|
|
100
|
-
* Internal Latitude (Y) Coordinates
|
|
101
|
-
*
|
|
102
|
-
* @minimum -90
|
|
103
|
-
* @maximum 90
|
|
104
|
-
*/
|
|
105
|
-
y: number;
|
|
106
|
-
}
|
|
122
|
+
export type InternalPointCoordinates = PlanarPoint;
|
|
107
123
|
/**
|
|
108
124
|
* Type-predicate to determine if the given input is a GeoJSON Point geometry.
|
|
109
125
|
*
|
package/out/position.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../lib/position.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;
|
|
1
|
+
{"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../lib/position.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAIzD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACtB,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;CACX;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;CACX;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC9B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAClB;AAYD;;;;;;;;;GASG;AACH,MAAM,MAAM,aAAa,GAAG;IAC3B;;;;;OAKG;IACH,SAAS,EAAE,MAAM;IACjB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM;CAChB,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,aAAa,CAE9F;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAE9F;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,aAAa,CAiBxF;AAED;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG;IAC3B;;;;;OAKG;IACH,SAAS,EAAE,MAAM;IACjB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM;IAChB;;OAEG;IACH,QAAQ,EAAE,MAAM;CAChB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAA;AAElD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAMvG;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAMhF;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,wBAAwB,CAQ3F;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnD"}
|
package/out/position.js
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* This file contains types and utilities for working with geographic positions.
|
|
7
7
|
*/
|
|
8
8
|
import { isValidLatitude, isValidLongitude } from "#coordinate/bounds";
|
|
9
|
-
export { isValidLatitude, isValidLongitude } from "#coordinate/bounds";
|
|
10
9
|
/**
|
|
11
10
|
* Arity of a `[lon, lat]` coordinate tuple.
|
|
12
11
|
*/
|
package/out/position.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"position.js","sourceRoot":"","sources":["../lib/position.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"position.js","sourceRoot":"","sources":["../lib/position.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAoCtE;;GAEG;AACH,MAAM,iBAAiB,GAAG,CAAC,CAAA;AAE3B;;GAEG;AACH,MAAM,mBAAmB,GAAG,CAAC,CAAA;AA6B7B;;;;;;;GAOG;AACH,MAAM,UAAU,uBAAuB,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAmB;IAC9E,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;AAC7B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,uBAAuB,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAgB;IAC3E,OAAO,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAA;AAC7B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,CAAC,MAAM,EAAE,MAAM,CAAmB;IACxE,MAAM,cAAc,GAAG,gBAAgB,CAAC,MAAM,CAAC,IAAI,eAAe,CAAC,MAAM,CAAC,CAAA;IAC1E,MAAM,aAAa,GAAG,eAAe,CAAC,MAAM,CAAC,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAA;IAEzE,IAAI,cAAc,IAAI,CAAC,aAAa,EAAE,CAAC;QACtC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACxB,CAAC;IAED,IAAI,aAAa,IAAI,CAAC,cAAc,EA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KAAK,CAAA;IAEjC,OAAO,OAAO,KAAK,CAAC,CAAC,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,CAAC,KAAK,QAAQ,CAAA;AAClE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,SAAiB;IAC9C,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAA;AACvD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,KAAa;IAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAA;AAC1C,CAAC"}
|
|
@@ -3,65 +3,68 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* Ask PROJ which datum transformation it would choose
|
|
6
|
+
* Ask PROJ which datum transformation it would choose. Refuse a ballpark operation.
|
|
7
7
|
*
|
|
8
|
-
* PROJ
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* NEIGHBOURING sliver.
|
|
8
|
+
* PROJ silently substitutes a ballpark datum shift when the accurate grid is absent. On the EA flood product,
|
|
9
|
+
* `ogr2ogr` placed the first feature's first vertex at `1.698151293, 52.648130027` without the OSGB36→WGS84 grid.
|
|
10
|
+
* With `uk_os_OSTN15_NTv2_OSGBtoETRS.tif` present, it placed the vertex at `1.698174628, 52.648157259`, a distance
|
|
11
|
+
* of 3.4 m. Both coordinates look like ordinary WGS84 values and pass a bounding-box check. The layer is offset.
|
|
12
|
+
* The check found eight disagreements among 59 points against the authority's OGC service. Each point fell into a
|
|
13
|
+
* neighboring sliver.
|
|
15
14
|
*
|
|
16
|
-
* `--config PROJ_NETWORK
|
|
17
|
-
* not
|
|
18
|
-
*
|
|
15
|
+
* GDAL 3.8 does not pass `--config PROJ_NETWORK on` through to PROJ. Tests also showed that `PROJ_ONLY_BEST=on`
|
|
16
|
+
* does not refuse a ballpark shift. `projinfo` provides the usable check. Its output identifies the best candidate
|
|
17
|
+
* operation and reports a missing grid.
|
|
19
18
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* a source arrives that does, which is the day nobody is looking.
|
|
19
|
+
* The check runs even when a source needs no transformation. A source already in EPSG:4326 returns
|
|
20
|
+
* `Null geographic offset from WGS 84 to WGS 84, 0 m, World.` This operation is usable. The check costs one process.
|
|
21
|
+
* A skipped case would leave a later source's required grid unchecked.
|
|
24
22
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
23
|
+
* Every vector ingest shares this check because the failure comes from PROJ rather than from a particular product.
|
|
24
|
+
* Output parsing is separate from process execution so tests can use captured output. The two output states came from the
|
|
25
|
+
* same command on the same machine before and after grid installation. One produced a meter-accurate layer. The
|
|
26
|
+
* other produced a 3 m offset.
|
|
29
27
|
*/
|
|
30
28
|
/**
|
|
31
|
-
*
|
|
29
|
+
* Reports the operation PROJ would choose and whether it can run it.
|
|
32
30
|
*/
|
|
33
31
|
export interface DatumTransformationVerdict {
|
|
34
32
|
/**
|
|
35
|
-
* The candidate operation
|
|
33
|
+
* The candidate operation string returned by PROJ, verbatim.
|
|
34
|
+
*
|
|
35
|
+
* Null when PROJ returned no candidate operation.
|
|
36
36
|
*/
|
|
37
|
-
best
|
|
37
|
+
best: string | null;
|
|
38
38
|
usable: boolean;
|
|
39
39
|
reason: string;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Reads `projinfo --summary` output.
|
|
43
|
+
*
|
|
44
|
+
* It reports which operation PROJ would choose and whether it can run it.
|
|
43
45
|
*/
|
|
44
46
|
export declare function assessDatumTransformation(summary: string): DatumTransformationVerdict;
|
|
45
47
|
/**
|
|
46
|
-
* The target every layer ingest reprojects to
|
|
48
|
+
* The target every layer ingest reprojects to.
|
|
49
|
+
* H3 takes WGS84 latitude and longitude.
|
|
47
50
|
*/
|
|
48
51
|
export declare const WGS84_EPSG = 4326;
|
|
49
52
|
export interface AssertDatumTransformationOptions {
|
|
50
53
|
/**
|
|
51
|
-
*
|
|
54
|
+
* Identifies the caller in the refusal, so a build log reports which ingest stopped.
|
|
52
55
|
*/
|
|
53
56
|
context: string;
|
|
54
|
-
targetEPSG?: number;
|
|
57
|
+
targetEPSG?: number | null;
|
|
55
58
|
/**
|
|
56
|
-
* The area-of-use to name in the `projsync`
|
|
59
|
+
* The area-of-use to name in the `projsync` action the message prints.
|
|
57
60
|
*/
|
|
58
|
-
areaOfUse?: string;
|
|
61
|
+
areaOfUse?: string | null;
|
|
59
62
|
}
|
|
60
63
|
/**
|
|
61
64
|
* Refuse an ingest whose best available datum transformation is a ballpark one, or is missing its grid.
|
|
62
65
|
*
|
|
63
|
-
* @throws {Error} When
|
|
64
|
-
*
|
|
66
|
+
* @throws {Error} When proj names no candidate, would use a ballpark offset,
|
|
67
|
+
* or would use an operation whose grid is not installed.
|
|
65
68
|
*/
|
|
66
69
|
export declare function assertDatumTransformationAvailable(sourceEPSG: number, options: AssertDatumTransformationOptions): Promise<DatumTransformationVerdict>;
|
|
67
70
|
//# sourceMappingURL=transform.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../lib/projection/transform.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../lib/projection/transform.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;;;OAIG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACd;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,0BAA0B,CAgBrF;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,OAAO,CAAA;AAE9B,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAED;;;;;GAKG;AACH,wBAAsB,kCAAkC,CACvD,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,gCAAgC,GACvC,OAAO,CAAC,0BAA0B,CAAC,CAkBrC"}
|