@mailwoman/spatial 9.4.0 → 10.1.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 (156) hide show
  1. package/README.md +2 -2
  2. package/lib/bbox.ts +41 -34
  3. package/lib/{coordinate-bounds.ts → coordinate/bounds.ts} +2 -2
  4. package/lib/{coordinate-formats.ts → coordinate/formats.ts} +11 -28
  5. package/lib/distance.ts +53 -27
  6. package/lib/feature.ts +2 -2
  7. package/lib/geometries/point.ts +41 -33
  8. package/lib/geometries/polygon.ts +24 -128
  9. package/lib/geometries/ring-blob.ts +33 -130
  10. package/lib/google/place-id.ts +4 -2
  11. package/lib/h3/cell.ts +21 -76
  12. package/lib/h3/coverage.ts +11 -7
  13. package/lib/h3/interior-cells.ts +13 -34
  14. package/lib/h3/polygon-cells.ts +59 -165
  15. package/lib/{h3/index.ts → h3.ts} +1 -1
  16. package/lib/index.ts +6 -6
  17. package/lib/objects.ts +6 -6
  18. package/lib/open-location-code.ts +11 -42
  19. package/lib/osgb36.ts +28 -187
  20. package/lib/polyline.ts +5 -3
  21. package/lib/position.ts +20 -4
  22. package/lib/projection/transform.ts +114 -0
  23. package/lib/projection.ts +1 -1
  24. package/lib/well-known-text.ts +8 -8
  25. package/out/bbox.d.ts +16 -13
  26. package/out/bbox.d.ts.map +1 -1
  27. package/out/bbox.js +32 -23
  28. package/out/bbox.js.map +1 -1
  29. package/out/{coordinate-bounds.d.ts → coordinate/bounds.d.ts} +3 -3
  30. package/out/coordinate/bounds.d.ts.map +1 -0
  31. package/out/{coordinate-bounds.js → coordinate/bounds.js} +3 -3
  32. package/out/coordinate/bounds.js.map +1 -0
  33. package/out/{coordinate-formats.d.ts → coordinate/formats.d.ts} +9 -12
  34. package/out/coordinate/formats.d.ts.map +1 -0
  35. package/out/{coordinate-formats.js → coordinate/formats.js} +12 -29
  36. package/out/coordinate/formats.js.map +1 -0
  37. package/out/distance.d.ts +48 -25
  38. package/out/distance.d.ts.map +1 -1
  39. package/out/distance.js +53 -27
  40. package/out/distance.js.map +1 -1
  41. package/out/feature.d.ts +2 -2
  42. package/out/feature.d.ts.map +1 -1
  43. package/out/geometries/point.d.ts +30 -22
  44. package/out/geometries/point.d.ts.map +1 -1
  45. package/out/geometries/point.js +35 -29
  46. package/out/geometries/point.js.map +1 -1
  47. package/out/geometries/polygon.d.ts +23 -122
  48. package/out/geometries/polygon.d.ts.map +1 -1
  49. package/out/geometries/polygon.js +13 -41
  50. package/out/geometries/polygon.js.map +1 -1
  51. package/out/geometries/ring-blob.d.ts +23 -109
  52. package/out/geometries/ring-blob.d.ts.map +1 -1
  53. package/out/geometries/ring-blob.js +29 -115
  54. package/out/geometries/ring-blob.js.map +1 -1
  55. package/out/{geometries/index.js → geometries.d.ts} +1 -1
  56. package/out/geometries.d.ts.map +1 -0
  57. package/out/{geometries/index.d.ts → geometries.js} +1 -1
  58. package/out/geometries.js.map +1 -0
  59. package/out/google/place-id.d.ts +4 -2
  60. package/out/google/place-id.d.ts.map +1 -1
  61. package/out/google/place-id.js.map +1 -1
  62. package/out/{google/index.d.ts → google.d.ts} +1 -1
  63. package/out/google.d.ts.map +1 -0
  64. package/out/{google/index.js → google.js} +1 -1
  65. package/out/google.js.map +1 -0
  66. package/out/h3/cell.d.ts +19 -73
  67. package/out/h3/cell.d.ts.map +1 -1
  68. package/out/h3/cell.js +20 -63
  69. package/out/h3/cell.js.map +1 -1
  70. package/out/h3/coverage.d.ts +11 -7
  71. package/out/h3/coverage.d.ts.map +1 -1
  72. package/out/h3/coverage.js +11 -7
  73. package/out/h3/coverage.js.map +1 -1
  74. package/out/h3/interior-cells.d.ts +9 -28
  75. package/out/h3/interior-cells.d.ts.map +1 -1
  76. package/out/h3/interior-cells.js +13 -32
  77. package/out/h3/interior-cells.js.map +1 -1
  78. package/out/h3/polygon-cells.d.ts +28 -120
  79. package/out/h3/polygon-cells.d.ts.map +1 -1
  80. package/out/h3/polygon-cells.js +48 -146
  81. package/out/h3/polygon-cells.js.map +1 -1
  82. package/out/{h3/index.d.ts → h3.d.ts} +2 -2
  83. package/out/h3.d.ts.map +1 -0
  84. package/out/{h3/index.js → h3.js} +2 -2
  85. package/out/h3.js.map +1 -0
  86. package/out/index.d.ts +6 -6
  87. package/out/index.d.ts.map +1 -1
  88. package/out/index.js +6 -6
  89. package/out/index.js.map +1 -1
  90. package/out/objects.d.ts +6 -6
  91. package/out/objects.d.ts.map +1 -1
  92. package/out/open-location-code.d.ts +11 -22
  93. package/out/open-location-code.d.ts.map +1 -1
  94. package/out/open-location-code.js +9 -40
  95. package/out/open-location-code.js.map +1 -1
  96. package/out/osgb36.d.ts +21 -97
  97. package/out/osgb36.d.ts.map +1 -1
  98. package/out/osgb36.js +12 -165
  99. package/out/osgb36.js.map +1 -1
  100. package/out/polyline.d.ts +5 -3
  101. package/out/polyline.d.ts.map +1 -1
  102. package/out/polyline.js +5 -3
  103. package/out/polyline.js.map +1 -1
  104. package/out/position.d.ts +17 -3
  105. package/out/position.d.ts.map +1 -1
  106. package/out/position.js +2 -2
  107. package/out/position.js.map +1 -1
  108. package/out/projection/transform.d.ts +70 -0
  109. package/out/projection/transform.d.ts.map +1 -0
  110. package/out/{projection-transform.js → projection/transform.js} +15 -17
  111. package/out/projection/transform.js.map +1 -0
  112. package/out/projection.d.ts +1 -1
  113. package/out/projection.d.ts.map +1 -1
  114. package/out/projection.js +1 -1
  115. package/out/regions/codes.d.ts.map +1 -1
  116. package/out/{regions/index.js → regions.d.ts} +1 -1
  117. package/out/regions.d.ts.map +1 -0
  118. package/out/{regions/index.d.ts → regions.js} +1 -1
  119. package/out/regions.js.map +1 -0
  120. package/out/tools/ogr/stream.d.ts +44 -0
  121. package/out/tools/ogr/stream.d.ts.map +1 -0
  122. package/out/tools/{ogr-stream.js → ogr/stream.js} +17 -10
  123. package/out/tools/ogr/stream.js.map +1 -0
  124. package/out/tools/ogr.d.ts +13 -10
  125. package/out/tools/ogr.d.ts.map +1 -1
  126. package/out/tools/ogr.js +18 -14
  127. package/out/tools/ogr.js.map +1 -1
  128. package/out/tools/tsconfig.tsbuildinfo +1 -0
  129. package/out/tsconfig.test.tsbuildinfo +1 -1
  130. package/out/well-known-text.d.ts +8 -8
  131. package/out/well-known-text.js +7 -7
  132. package/package.json +35 -127
  133. package/{lib/tools/ogr-stream.ts → tools/ogr/stream.ts} +25 -14
  134. package/{lib/tools → tools}/ogr.ts +26 -20
  135. package/lib/projection-transform.ts +0 -115
  136. package/out/coordinate-bounds.d.ts.map +0 -1
  137. package/out/coordinate-bounds.js.map +0 -1
  138. package/out/coordinate-formats.d.ts.map +0 -1
  139. package/out/coordinate-formats.js.map +0 -1
  140. package/out/geometries/index.d.ts.map +0 -1
  141. package/out/geometries/index.js.map +0 -1
  142. package/out/google/index.d.ts.map +0 -1
  143. package/out/google/index.js.map +0 -1
  144. package/out/h3/index.d.ts.map +0 -1
  145. package/out/h3/index.js.map +0 -1
  146. package/out/projection-transform.d.ts +0 -67
  147. package/out/projection-transform.d.ts.map +0 -1
  148. package/out/projection-transform.js.map +0 -1
  149. package/out/regions/index.d.ts.map +0 -1
  150. package/out/regions/index.js.map +0 -1
  151. package/out/tools/ogr-stream.d.ts +0 -34
  152. package/out/tools/ogr-stream.d.ts.map +0 -1
  153. package/out/tools/ogr-stream.js.map +0 -1
  154. /package/lib/{geometries/index.ts → geometries.ts} +0 -0
  155. /package/lib/{google/index.ts → google.ts} +0 -0
  156. /package/lib/{regions/index.ts → regions.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailwoman/spatial",
3
- "version": "9.4.0",
3
+ "version": "10.1.0",
4
4
  "description": "Spatial analysis, geocoding, and other geo-related utilities.",
5
5
  "keywords": [
6
6
  "geo",
@@ -20,20 +20,21 @@
20
20
  },
21
21
  "files": [
22
22
  "out/",
23
- "*.ts",
24
- "*.tsx",
25
- "**/*.ts",
26
- "**/*.tsx",
27
- "!*.test.ts",
28
- "!*.test.tsx",
23
+ "lib/**/*.ts",
24
+ "lib/**/*.tsx",
25
+ "tools/**/*.ts",
29
26
  "!**/*.test.ts",
30
27
  "!**/*.test.tsx",
31
- "!__snapshots__/",
32
- "!test/**"
28
+ "!__snapshots__/"
33
29
  ],
34
30
  "type": "module",
35
31
  "sideEffects": false,
36
32
  "imports": {
33
+ "#tools/*": {
34
+ "types": "./out/tools/*.d.ts",
35
+ "node": "./out/tools/*.js",
36
+ "default": "./out/tools/*.js"
37
+ },
37
38
  "#*": {
38
39
  "types": "./out/*.d.ts",
39
40
  "node": "./out/*.js",
@@ -42,143 +43,48 @@
42
43
  },
43
44
  "exports": {
44
45
  "./package.json": "./package.json",
45
- "./coordinate-bounds": {
46
- "types": "./out/coordinate-bounds.d.ts",
47
- "node": "./out/coordinate-bounds.js",
48
- "default": "./out/coordinate-bounds.js"
49
- },
50
46
  ".": {
51
47
  "types": "./out/index.d.ts",
52
48
  "node": "./out/index.js",
53
49
  "default": "./out/index.js"
54
50
  },
55
- "./coordinate-formats": {
56
- "types": "./out/coordinate-formats.d.ts",
57
- "node": "./out/coordinate-formats.js",
58
- "default": "./out/coordinate-formats.js"
59
- },
60
- "./open-location-code": {
61
- "types": "./out/open-location-code.d.ts",
62
- "node": "./out/open-location-code.js",
63
- "default": "./out/open-location-code.js"
64
- },
65
- "./geometries/polygon": {
66
- "types": "./out/geometries/polygon.d.ts",
67
- "node": "./out/geometries/polygon.js",
68
- "default": "./out/geometries/polygon.js"
69
- },
70
- "./h3/cell": {
71
- "types": "./out/h3/cell.d.ts",
72
- "node": "./out/h3/cell.js",
73
- "default": "./out/h3/cell.js"
74
- },
75
- "./h3/polygon-cells": {
76
- "types": "./out/h3/polygon-cells.d.ts",
77
- "node": "./out/h3/polygon-cells.js",
78
- "default": "./out/h3/polygon-cells.js"
79
- },
80
- "./geometries/ring-blob": {
81
- "types": "./out/geometries/ring-blob.d.ts",
82
- "node": "./out/geometries/ring-blob.js",
83
- "default": "./out/geometries/ring-blob.js"
51
+ "./tools/*": {
52
+ "types": "./out/tools/*.d.ts",
53
+ "node": "./out/tools/*.js",
54
+ "default": "./out/tools/*.js"
84
55
  },
85
- "./projection-transform": {
86
- "types": "./out/projection-transform.d.ts",
87
- "node": "./out/projection-transform.js",
88
- "default": "./out/projection-transform.js"
89
- },
90
- "./well-known-text": {
91
- "types": "./out/well-known-text.d.ts",
92
- "node": "./out/well-known-text.js",
93
- "default": "./out/well-known-text.js"
94
- },
95
- "./tools/ogr": {
96
- "types": "./out/tools/ogr.d.ts",
97
- "node": "./out/tools/ogr.js",
98
- "default": "./out/tools/ogr.js"
99
- },
100
- "./h3/coverage": {
101
- "types": "./out/h3/coverage.d.ts",
102
- "node": "./out/h3/coverage.js",
103
- "default": "./out/h3/coverage.js"
104
- },
105
- "./tools/ogr-stream": {
106
- "types": "./out/tools/ogr-stream.d.ts",
107
- "node": "./out/tools/ogr-stream.js",
108
- "default": "./out/tools/ogr-stream.js"
56
+ "./*": {
57
+ "types": "./out/*.d.ts",
58
+ "node": "./out/*.js",
59
+ "default": "./out/*.js"
109
60
  }
110
61
  },
111
62
  "publishConfig": {
112
63
  "access": "public",
113
64
  "exports": {
114
65
  "./package.json": "./package.json",
115
- "./coordinate-bounds": {
116
- "types": "./out/coordinate-bounds.d.ts",
117
- "node": "./out/coordinate-bounds.js",
118
- "default": "./out/coordinate-bounds.js"
119
- },
120
66
  ".": {
121
67
  "types": "./out/index.d.ts",
122
68
  "node": "./out/index.js",
123
69
  "default": "./out/index.js"
124
70
  },
125
- "./coordinate-formats": {
126
- "types": "./out/coordinate-formats.d.ts",
127
- "node": "./out/coordinate-formats.js",
128
- "default": "./out/coordinate-formats.js"
129
- },
130
- "./open-location-code": {
131
- "types": "./out/open-location-code.d.ts",
132
- "node": "./out/open-location-code.js",
133
- "default": "./out/open-location-code.js"
134
- },
135
- "./geometries/polygon": {
136
- "types": "./out/geometries/polygon.d.ts",
137
- "node": "./out/geometries/polygon.js",
138
- "default": "./out/geometries/polygon.js"
139
- },
140
- "./h3/cell": {
141
- "types": "./out/h3/cell.d.ts",
142
- "node": "./out/h3/cell.js",
143
- "default": "./out/h3/cell.js"
144
- },
145
- "./h3/polygon-cells": {
146
- "types": "./out/h3/polygon-cells.d.ts",
147
- "node": "./out/h3/polygon-cells.js",
148
- "default": "./out/h3/polygon-cells.js"
149
- },
150
- "./geometries/ring-blob": {
151
- "types": "./out/geometries/ring-blob.d.ts",
152
- "node": "./out/geometries/ring-blob.js",
153
- "default": "./out/geometries/ring-blob.js"
154
- },
155
- "./projection-transform": {
156
- "types": "./out/projection-transform.d.ts",
157
- "node": "./out/projection-transform.js",
158
- "default": "./out/projection-transform.js"
71
+ "./tools/*": {
72
+ "types": "./out/tools/*.d.ts",
73
+ "node": "./out/tools/*.js",
74
+ "default": "./out/tools/*.js"
159
75
  },
160
- "./well-known-text": {
161
- "types": "./out/well-known-text.d.ts",
162
- "node": "./out/well-known-text.js",
163
- "default": "./out/well-known-text.js"
164
- },
165
- "./tools/ogr": {
166
- "types": "./out/tools/ogr.d.ts",
167
- "node": "./out/tools/ogr.js",
168
- "default": "./out/tools/ogr.js"
169
- },
170
- "./h3/coverage": {
171
- "types": "./out/h3/coverage.d.ts",
172
- "node": "./out/h3/coverage.js",
173
- "default": "./out/h3/coverage.js"
174
- },
175
- "./tools/ogr-stream": {
176
- "types": "./out/tools/ogr-stream.d.ts",
177
- "node": "./out/tools/ogr-stream.js",
178
- "default": "./out/tools/ogr-stream.js"
76
+ "./*": {
77
+ "types": "./out/*.d.ts",
78
+ "node": "./out/*.js",
79
+ "default": "./out/*.js"
179
80
  }
180
81
  },
181
82
  "imports": {
83
+ "#tools/*": {
84
+ "types": "./out/tools/*.d.ts",
85
+ "node": "./out/tools/*.js",
86
+ "default": "./out/tools/*.js"
87
+ },
182
88
  "#*": {
183
89
  "types": "./out/*.d.ts",
184
90
  "node": "./out/*.js",
@@ -187,14 +93,16 @@
187
93
  }
188
94
  },
189
95
  "dependencies": {
190
- "@mailwoman/core": "9.4.0",
96
+ "@mailwoman/core": "10.1.0",
191
97
  "geo-coordinates-parser": "^1.7.4",
192
98
  "h3-js": "^4.5.0",
99
+ "path-ts": "^2.5.0",
100
+ "spliterator": "^8.1.0",
193
101
  "wkx": "^0.5.0"
194
102
  },
195
103
  "devDependencies": {
196
104
  "@googlemaps/google-maps-services-js": "^3.4.2",
197
- "@mailwoman/annotations": "9.4.0",
105
+ "@mailwoman/annotations": "10.1.0",
198
106
  "type-fest": "^5.9.0"
199
107
  },
200
108
  "optionalDependencies": {
@@ -7,6 +7,7 @@
7
7
 
8
8
  import { tryParsingJSON } from "@mailwoman/core/json"
9
9
  import { spawnProcess } from "@mailwoman/core/process"
10
+ import type { PathBuilderLike } from "path-ts"
10
11
  import { TextSpliterator } from "spliterator"
11
12
 
12
13
  const RECORD_SEPARATOR = 0x1e
@@ -15,9 +16,12 @@ const STDERR_TAIL_CHARS = 800
15
16
  export interface OGRProcess {
16
17
  stdout: NodeJS.ReadableStream
17
18
  /**
18
- * Resolves on a clean exit; rejects with the exit code and the stderr tail otherwise. A truncated stream reads as a
19
- * short but well-formed feature list, which is exactly the partial result that must throw rather than be reported as
20
- * a smaller extract — so consume the stream fully, then await this.
19
+ * Resolves on a clean exit.
20
+ * Rejects with the exit code and the stderr tail otherwise.
21
+ *
22
+ * A truncated stream can look like a shorter, valid feature list.
23
+ * That partial result must raise an error instead of looking like a smaller extract.
24
+ * Consume the stream fully, then await this promise.
21
25
  */
22
26
  settled: Promise<void>
23
27
  /**
@@ -27,10 +31,12 @@ export interface OGRProcess {
27
31
  }
28
32
 
29
33
  /**
30
- * Spawn `ogr2ogr` with stderr accumulated for the failure message. The caller owns the stdout format (GeoJSONSeq, CSV,
31
- * …) and its parsing; {@link ogr2ogrGeoJSONSeq} is the GeoJSONSeq reading over this.
34
+ * Spawn `ogr2ogr` with stderr accumulated for the failure message.
35
+ *
36
+ * The caller owns the stdout format (GeoJSONSeq, CSV, …) and its parsing;
37
+ * {@link ogr2ogrGeoJSONSeq} is the GeoJSONSeq reading over this.
32
38
  */
33
- export function spawnOGR2OGR(args: readonly string[], context: string): OGRProcess {
39
+ export function spawnOGR2OGR(args: readonly PathBuilderLike[], context: string): OGRProcess {
34
40
  const child = spawnProcess("ogr2ogr", [...args], { stdio: ["ignore", "pipe", "pipe"] })
35
41
  let stderr = ""
36
42
 
@@ -52,9 +58,10 @@ export function spawnOGR2OGR(args: readonly string[], context: string): OGRProce
52
58
  })
53
59
  })
54
60
 
55
- // A failed spawn rejects `settled` BEFORE any consumer awaits it — the consumer is still draining the stream on a
56
- // later tick, and a consumer that abandons the stream never awaits it at all — so an unobserved rejection would trip
57
- // the process's unhandled-rejection hook. Observed at birth instead; every consumer still awaits the real verdict.
61
+ // A failed spawn can reject `settled` before a consumer awaits it.
62
+ // A consumer may still be draining stdout on a later tick or may abandon the stream.
63
+ // Attach a handler at birth to prevent an unhandled-rejection event.
64
+ // Every consumer still awaits the real verdict.
58
65
  settled.catch(() => undefined)
59
66
 
60
67
  return {
@@ -71,12 +78,16 @@ export function spawnOGR2OGR(args: readonly string[], context: string): OGRProce
71
78
  /**
72
79
  * Stream a GeoJSONSeq extraction as parsed features.
73
80
  *
74
- * Strips the RFC-8142 record separator (U+001E) GDAL MAY prefix records with — `.trim()` does not remove it (not
75
- * whitespace), so an RS-framed record would fail to parse and be silently skipped, all of them, and an empty extract
76
- * would read as a real absence. A malformed record is tolerated (skipped) rather than thrown; a non-zero exit throws
77
- * after the stream drains.
81
+ * Strips the RFC-8142 record separator (U+001E) gdal may prefix records with.
82
+ * `.trim()` leaves U+001E intact.
83
+ *
84
+ * The parser strips it first because `tryParsingJSON` would otherwise skip each RS-prefixed record.
85
+ * If the code skipped every record, an empty extract would look like a real absence.
86
+ *
87
+ * A malformed record is tolerated (skipped) rather than thrown.
88
+ * A non-zero exit throws after the stream drains.
78
89
  */
79
- export async function* ogr2ogrGeoJSONSeq<T>(args: readonly string[], context: string): AsyncGenerator<T> {
90
+ export async function* ogr2ogrGeoJSONSeq<T>(args: readonly PathBuilderLike[], context: string): AsyncGenerator<T> {
80
91
  const proc = spawnOGR2OGR(args, context)
81
92
 
82
93
  try {
@@ -6,17 +6,17 @@
6
6
  * What an OGR-readable source declares about itself, read before any feature is — the identity check every
7
7
  * polygon-layer ingest opens with.
8
8
  *
9
- * OGR IS BUILD TOOLING, NEVER A SERVE DEPENDENCY (SCOPE invariant 6). The check refuses a source whose
9
+ * OGR is build tooling, never A serve dependency (scope invariant 6). The check refuses a source whose
10
10
  * declared authority code is not the one the ingest was written for, because reading one projection's
11
11
  * coordinates as another's is silent — and it runs the datum-transformation guard even where no shift is
12
12
  * needed, because skipping it on the reasoning that a source needs no shift makes the guard fire on the day
13
13
  * a source arrives that does.
14
14
  */
15
15
 
16
- import { parseJSONStrict } from "@mailwoman/core/json"
16
+ import { parseJSONStrict, stringifyJSON } from "@mailwoman/core/json"
17
17
  import { runFile } from "@mailwoman/core/process"
18
18
 
19
- import { assertDatumTransformationAvailable } from "#projection-transform"
19
+ import { assertDatumTransformationAvailable } from "#projection/transform"
20
20
 
21
21
  /**
22
22
  * What one layer declares about itself.
@@ -41,13 +41,15 @@ export interface ReadOGRLayerIdentityOptions {
41
41
  */
42
42
  path: string
43
43
  /**
44
- * Layer inside it, asserted against what the source answers. Omitted, the source's first layer answers and only its
45
- * presence is checked.
44
+ * Layer inside it, asserted against what the source answers.
45
+ *
46
+ * Omitted, the source's first layer answers and only its presence is checked.
46
47
  */
47
48
  layer?: string
48
49
  /**
49
- * The EPSG code the source must declare. A source declaring anything else is a product change, not a variation to
50
- * absorb.
50
+ * The epsg code the source must declare.
51
+ *
52
+ * A source declaring anything else is a product change rather than a variation to absorb.
51
53
  */
52
54
  expectEPSG: number
53
55
  /**
@@ -71,11 +73,11 @@ export interface ReadOGRLayerIdentityOptions {
71
73
  */
72
74
  messages?: {
73
75
  /**
74
- * After `declares no EPSG authority code — `.
76
+ * After `declares no epsg authority code — `.
75
77
  */
76
78
  noAuthorityCode?: string
77
79
  /**
78
- * After `expected EPSG:<code> — `.
80
+ * After `expected epsg:<code> — `.
79
81
  */
80
82
  epsgMismatch?: string
81
83
  /**
@@ -86,21 +88,25 @@ export interface ReadOGRLayerIdentityOptions {
86
88
  }
87
89
 
88
90
  /**
89
- * A summary is small; the ceiling only guards against a pathological driver.
91
+ * A summary is small.
92
+ * The ceiling only guards against a pathological driver.
90
93
  */
91
94
  const OGRINFO_MAX_BUFFER = 32 * 1024 * 1024
92
95
 
93
96
  /**
94
- * Ordinates in a 2D extent: `minLon, minLat, maxLon, maxLat`. A shorter array is a 3D or degenerate extent this reader
95
- * does not understand, not a 2D one with something missing.
97
+ * Ordinates in a 2D extent: `minLon, minLat, maxLon, maxLat`.
98
+ *
99
+ * A shorter array is a 3D or degenerate extent this reader does not understand
100
+ * rather than a 2D one with something missing.
96
101
  */
97
102
  const EXTENT_ORDINATES = 4
98
103
 
99
104
  /**
100
- * Read what the source declares about itself, and refuse a projection the calling ingest was not written for.
105
+ * Read what the source declares about itself.
106
+ * Refuse a projection the calling ingest was not written for.
101
107
  *
102
- * @throws {Error} When the layer is missing, declares no EPSG authority code, declares one other than `expectEPSG`,
103
- * reports no feature count, or fails a `requireExtent`/`requireFields` condition.
108
+ * @throws {Error} When the layer is missing, declares no epsg authority code, declares one other than
109
+ * `expectEPSG`, reports no feature count, or fails a `requireExtent`/`requireFields` condition.
104
110
  */
105
111
  export async function readOGRLayerIdentity(options: ReadOGRLayerIdentityOptions): Promise<OGRLayerIdentity> {
106
112
  const { stdout } = await runFile(
@@ -127,16 +133,16 @@ export async function readOGRLayerIdentity(options: ReadOGRLayerIdentityOptions)
127
133
  throw new Error(
128
134
  options.layer === undefined
129
135
  ? `${options.context}: ${options.path} carries no readable layer`
130
- : `${options.context}: ${options.path} does not carry a layer named ${JSON.stringify(options.layer)}`
136
+ : `${options.context}: ${options.path} does not carry a layer named ${stringifyJSON(options.layer)}`
131
137
  )
132
138
  }
133
139
 
134
140
  if (options.layer !== undefined && described.name !== options.layer) {
135
- throw new Error(`${options.context}: ${options.path} does not carry a layer named ${JSON.stringify(options.layer)}`)
141
+ throw new Error(`${options.context}: ${options.path} does not carry a layer named ${stringifyJSON(options.layer)}`)
136
142
  }
137
143
 
138
- // The subject a refusal names: the layer where one was asked for, the dataset itself where the source's own first
139
- // layer answered.
144
+ // The subject a refusal names: the layer where one was asked for, the dataset itself
145
+ // where the source's own first layer answered.
140
146
  const subject = options.layer ?? options.path
141
147
 
142
148
  const geometry = described.geometryFields?.[0]
@@ -146,7 +152,7 @@ export async function readOGRLayerIdentity(options: ReadOGRLayerIdentityOptions)
146
152
  throw new TypeError(
147
153
  `${options.context}: ${subject} declares no EPSG authority code — ${
148
154
  options.messages?.noAuthorityCode ??
149
- "the projection cannot be checked, and reading its metres as degrees is silent"
155
+ "the projection cannot be checked, and reading its meters as degrees is silent"
150
156
  }`
151
157
  )
152
158
  }
@@ -1,115 +0,0 @@
1
- import { runFile } from "@mailwoman/core/process"
2
-
3
- /**
4
- * @copyright Sister Software
5
- * @license AGPL-3.0
6
- * @author Teffen Ellis, et al.
7
- *
8
- * Ask PROJ which datum transformation it would choose, and refuse a ballpark one.
9
- *
10
- * PROJ SUBSTITUTES A BALLPARK DATUM SHIFT WHEN THE ACCURATE GRID IS NOT ON DISK, AND IT DOES SO SILENTLY.
11
- * Measured on the EA flood product: with the OSGB36→WGS84 grid missing, ogr2ogr placed the first
12
- * feature's first vertex at `1.698151293, 52.648130027`; with `uk_os_OSTN15_NTv2_OSGBtoETRS.tif` present
13
- * it placed it at `1.698174628, 52.648157259` — 3.4 m apart. Both look like perfectly ordinary WGS84
14
- * coordinates, both pass a bounding-box check, and the whole layer is offset. It surfaced as eight
15
- * disagreements out of 59 against the authority's own OGC service, every one a point that fell into a
16
- * NEIGHBOURING sliver.
17
- *
18
- * `--config PROJ_NETWORK ON` does not reach PROJ through GDAL 3.8, and `PROJ_ONLY_BEST=ON` was observed
19
- * not to refuse, so neither is a usable guard. What is usable is asking PROJ what it would do: `projinfo`
20
- * names the best candidate operation and says when a grid is missing.
21
- *
22
- * IT IS RUN EVEN WHERE NO TRANSFORMATION IS NEEDED, AND THAT IS THE POINT. A source already in EPSG:4326
23
- * gets `Null geographic offset from WGS 84 to WGS 84, 0 m, World.` — trivially usable, and the check costs
24
- * one process. Skipping it on the reasoning that a source needs no shift makes the guard fire on the day
25
- * a source arrives that does, which is the day nobody is looking.
26
- *
27
- * SHARED BY EVERY VECTOR INGEST, because the failure is a property of PROJ rather than of any product. The
28
- * parse is split from the spawn so it can be pinned against captured output: the two states it
29
- * distinguishes were observed from the same command on the same machine, before and after the grid was
30
- * installed, and they are the difference between a metre-accurate layer and a 3 m-offset one.
31
- */
32
-
33
- /**
34
- * What PROJ would do, and whether it can actually do it.
35
- */
36
- export interface DatumTransformationVerdict {
37
- /**
38
- * The candidate operation line PROJ named, verbatim. Absent when it named none.
39
- */
40
- best?: string
41
- usable: boolean
42
- reason: string
43
- }
44
-
45
- /**
46
- * Read `projinfo --summary` output: which operation PROJ would choose, and whether it can actually run.
47
- */
48
- export function assessDatumTransformation(summary: string): DatumTransformationVerdict {
49
- // The first line naming a candidate operation is the one PROJ will choose. Everything before it is a header, and the
50
- // `Note:` line about `--spatial-test` is not a candidate.
51
- //
52
- // `projinfo --summary` prints a header plus one line per candidate operation: two to nine lines, bounded by PROJ's own
53
- // candidate enumeration rather than by input size. Reaching for a streaming reader would put a `spliterator` dependency
54
- // on this package for a fixed handful of lines.
55
- // oxlint-disable-next-line mailwoman/prefer-spliterator -- bounded output, see above
56
- const lines = summary.split("\n")
57
-
58
- const best = lines
59
- .map((line) => line.trim())
60
- .find((line) => line.includes(", ") && !line.startsWith("Note:") && !line.startsWith("Candidate operations"))
61
-
62
- if (!best) return { usable: false, reason: "projinfo named no candidate operation" }
63
-
64
- if (best.includes("grid missing")) return { best, usable: false, reason: "its grid is not installed" }
65
-
66
- if (best.toLowerCase().includes("ballpark")) return { best, usable: false, reason: "it is a ballpark offset" }
67
-
68
- return { best, usable: true, reason: "the best operation is available" }
69
- }
70
-
71
- /**
72
- * The target every layer ingest reprojects to — H3 takes WGS84 latitude and longitude.
73
- */
74
- export const WGS84_EPSG = 4326
75
-
76
- export interface AssertDatumTransformationOptions {
77
- /**
78
- * Names the caller in the refusal, so a build log says which ingest stopped.
79
- */
80
- context: string
81
- targetEPSG?: number
82
- /**
83
- * The area-of-use to name in the `projsync` remedy the message prints.
84
- */
85
- areaOfUse?: string
86
- }
87
-
88
- /**
89
- * Refuse an ingest whose best available datum transformation is a ballpark one, or is missing its grid.
90
- *
91
- * @throws {Error} When PROJ names no candidate, would use a ballpark offset, or would use an operation whose grid is
92
- * not installed.
93
- */
94
- export async function assertDatumTransformationAvailable(
95
- sourceEPSG: number,
96
- options: AssertDatumTransformationOptions
97
- ): Promise<DatumTransformationVerdict> {
98
- const targetEPSG = options.targetEPSG ?? WGS84_EPSG
99
-
100
- const { stdout } = await runFile("projinfo", ["-s", `EPSG:${sourceEPSG}`, "-t", `EPSG:${targetEPSG}`, "--summary"])
101
-
102
- const verdict = assessDatumTransformation(stdout)
103
-
104
- if (verdict.usable) return verdict
105
-
106
- const remedy = options.areaOfUse
107
- ? `Install the grid with \`projsync --area-of-use "${options.areaOfUse}"\` and re-run.`
108
- : "Install the grid with `projsync` for the source's area of use and re-run."
109
-
110
- throw new Error(
111
- `${options.context}: the best EPSG:${sourceEPSG} → EPSG:${targetEPSG} transformation is unusable — ${verdict.reason} ` +
112
- `(${verdict.best ?? "projinfo named no candidate"}). PROJ falls back to a ballpark datum shift, which is metres ` +
113
- `wrong and looks exactly like a correct answer. ${remedy}`
114
- )
115
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"coordinate-bounds.d.ts","sourceRoot":"","sources":["../lib/coordinate-bounds.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,eAAO,MAAM,YAAY,MAAM,CAAA;AAE/B;;GAEG;AACH,eAAO,MAAM,YAAY,KAAK,CAAA;AAE9B;;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 -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/geometries/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/google/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,kBAAkB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/google/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,kBAAkB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/h3/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,WAAW,EAAgB,MAAM,UAAU,CAAA;AAEtE,cAAc,UAAU,CAAA;AACxB,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AAEjC;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,WAAW,EAAE,UAAU,SAAK,GAAG,QAAQ,CAOlF;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAO7D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/h3/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpC,OAAO,EAAE,QAAQ,EAAqB,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAiC,YAAY,EAAE,MAAM,UAAU,CAAA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