@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.
Files changed (148) hide show
  1. package/README.md +2 -2
  2. package/lib/bbox.ts +41 -34
  3. package/lib/coordinate/bounds.ts +2 -2
  4. package/lib/coordinate/formats.ts +21 -33
  5. package/lib/distance.ts +56 -28
  6. package/lib/feature.ts +2 -2
  7. package/lib/geometries/point.ts +42 -35
  8. package/lib/geometries/polygon.ts +27 -135
  9. package/lib/geometries/ring-blob.ts +35 -132
  10. package/lib/google/place-id.ts +4 -2
  11. package/lib/h3/cell.ts +23 -78
  12. package/lib/h3/coverage.ts +13 -9
  13. package/lib/h3/interior-cells.ts +13 -34
  14. package/lib/h3/polygon-cells.ts +61 -167
  15. package/lib/{h3/index.ts → h3.ts} +1 -1
  16. package/lib/index.ts +6 -5
  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 +39 -20
  22. package/lib/projection/transform.ts +43 -44
  23. package/lib/{projection/index.ts → projection.ts} +1 -1
  24. package/lib/well-known-text.ts +9 -9
  25. package/out/bbox.d.ts +17 -14
  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 +2 -2
  30. package/out/coordinate/bounds.js +2 -2
  31. package/out/coordinate/formats.d.ts +17 -16
  32. package/out/coordinate/formats.d.ts.map +1 -1
  33. package/out/coordinate/formats.js +20 -32
  34. package/out/coordinate/formats.js.map +1 -1
  35. package/out/distance.d.ts +51 -26
  36. package/out/distance.d.ts.map +1 -1
  37. package/out/distance.js +53 -27
  38. package/out/distance.js.map +1 -1
  39. package/out/feature.d.ts +2 -2
  40. package/out/feature.d.ts.map +1 -1
  41. package/out/geometries/point.d.ts +30 -22
  42. package/out/geometries/point.d.ts.map +1 -1
  43. package/out/geometries/point.js +37 -30
  44. package/out/geometries/point.js.map +1 -1
  45. package/out/geometries/polygon.d.ts +27 -126
  46. package/out/geometries/polygon.d.ts.map +1 -1
  47. package/out/geometries/polygon.js +14 -42
  48. package/out/geometries/polygon.js.map +1 -1
  49. package/out/geometries/ring-blob.d.ts +24 -110
  50. package/out/geometries/ring-blob.d.ts.map +1 -1
  51. package/out/geometries/ring-blob.js +30 -116
  52. package/out/geometries/ring-blob.js.map +1 -1
  53. package/out/{geometries/index.js → geometries.d.ts} +1 -1
  54. package/out/geometries.d.ts.map +1 -0
  55. package/out/{geometries/index.d.ts → geometries.js} +1 -1
  56. package/out/geometries.js.map +1 -0
  57. package/out/google/place-id.d.ts +4 -2
  58. package/out/google/place-id.d.ts.map +1 -1
  59. package/out/google/place-id.js.map +1 -1
  60. package/out/{google/index.d.ts → google.d.ts} +1 -1
  61. package/out/google.d.ts.map +1 -0
  62. package/out/{google/index.js → google.js} +1 -1
  63. package/out/google.js.map +1 -0
  64. package/out/h3/cell.d.ts +19 -73
  65. package/out/h3/cell.d.ts.map +1 -1
  66. package/out/h3/cell.js +22 -65
  67. package/out/h3/cell.js.map +1 -1
  68. package/out/h3/coverage.d.ts +12 -8
  69. package/out/h3/coverage.d.ts.map +1 -1
  70. package/out/h3/coverage.js +12 -8
  71. package/out/h3/coverage.js.map +1 -1
  72. package/out/h3/interior-cells.d.ts +9 -28
  73. package/out/h3/interior-cells.d.ts.map +1 -1
  74. package/out/h3/interior-cells.js +13 -32
  75. package/out/h3/interior-cells.js.map +1 -1
  76. package/out/h3/polygon-cells.d.ts +28 -120
  77. package/out/h3/polygon-cells.d.ts.map +1 -1
  78. package/out/h3/polygon-cells.js +50 -148
  79. package/out/h3/polygon-cells.js.map +1 -1
  80. package/out/{h3/index.d.ts → h3.d.ts} +2 -2
  81. package/out/h3.d.ts.map +1 -0
  82. package/out/{h3/index.js → h3.js} +2 -2
  83. package/out/h3.js.map +1 -0
  84. package/out/index.d.ts +6 -5
  85. package/out/index.d.ts.map +1 -1
  86. package/out/index.js +6 -5
  87. package/out/index.js.map +1 -1
  88. package/out/objects.d.ts +6 -6
  89. package/out/open-location-code.d.ts +11 -22
  90. package/out/open-location-code.d.ts.map +1 -1
  91. package/out/open-location-code.js +9 -40
  92. package/out/open-location-code.js.map +1 -1
  93. package/out/osgb36.d.ts +21 -97
  94. package/out/osgb36.d.ts.map +1 -1
  95. package/out/osgb36.js +12 -165
  96. package/out/osgb36.js.map +1 -1
  97. package/out/polyline.d.ts +5 -3
  98. package/out/polyline.d.ts.map +1 -1
  99. package/out/polyline.js +5 -3
  100. package/out/polyline.js.map +1 -1
  101. package/out/position.d.ts +36 -20
  102. package/out/position.d.ts.map +1 -1
  103. package/out/position.js +0 -1
  104. package/out/position.js.map +1 -1
  105. package/out/projection/transform.d.ts +33 -30
  106. package/out/projection/transform.d.ts.map +1 -1
  107. package/out/projection/transform.js +15 -17
  108. package/out/projection/transform.js.map +1 -1
  109. package/out/{projection/index.d.ts → projection.d.ts} +2 -2
  110. package/out/projection.d.ts.map +1 -0
  111. package/out/{projection/index.js → projection.js} +2 -2
  112. package/out/projection.js.map +1 -0
  113. package/out/{regions/index.js → regions.d.ts} +1 -1
  114. package/out/regions.d.ts.map +1 -0
  115. package/out/{regions/index.d.ts → regions.js} +1 -1
  116. package/out/regions.js.map +1 -0
  117. package/out/tools/ogr/stream.d.ts +21 -11
  118. package/out/tools/ogr/stream.d.ts.map +1 -1
  119. package/out/tools/ogr/stream.js +17 -10
  120. package/out/tools/ogr/stream.js.map +1 -1
  121. package/out/tools/{ogr/index.d.ts → ogr.d.ts} +25 -15
  122. package/out/tools/ogr.d.ts.map +1 -0
  123. package/out/tools/{ogr/index.js → ogr.js} +25 -21
  124. package/out/tools/ogr.js.map +1 -0
  125. package/out/tools/tsconfig.tsbuildinfo +1 -0
  126. package/out/tsconfig.test.tsbuildinfo +1 -1
  127. package/out/well-known-text.d.ts +9 -9
  128. package/out/well-known-text.d.ts.map +1 -1
  129. package/out/well-known-text.js +7 -7
  130. package/out/well-known-text.js.map +1 -1
  131. package/package.json +37 -129
  132. package/{lib/tools → tools}/ogr/stream.ts +26 -15
  133. package/{lib/tools/ogr/index.ts → tools/ogr.ts} +44 -30
  134. package/out/geometries/index.d.ts.map +0 -1
  135. package/out/geometries/index.js.map +0 -1
  136. package/out/google/index.d.ts.map +0 -1
  137. package/out/google/index.js.map +0 -1
  138. package/out/h3/index.d.ts.map +0 -1
  139. package/out/h3/index.js.map +0 -1
  140. package/out/projection/index.d.ts.map +0 -1
  141. package/out/projection/index.js.map +0 -1
  142. package/out/regions/index.d.ts.map +0 -1
  143. package/out/regions/index.js.map +0 -1
  144. package/out/tools/ogr/index.d.ts.map +0 -1
  145. package/out/tools/ogr/index.js.map +0 -1
  146. /package/lib/{geometries/index.ts → geometries.ts} +0 -0
  147. /package/lib/{google/index.ts → google.ts} +0 -0
  148. /package/lib/{regions/index.ts → regions.ts} +0 -0
@@ -10,37 +10,37 @@ export function wellKnownGeometryToGeoJSON(input) {
10
10
  return wkx.Geometry.parse(input).toGeoJSON();
11
11
  }
12
12
  /**
13
- * Given a GeoJSON geometry object, convert it to an well-known binary (EWKB) buffer.
13
+ * Given a GeoJSON geometry object, convert it to an well-known binary (ewkb) buffer.
14
14
  *
15
15
  * @category Geo
16
16
  *
17
- * @returns A hex-encoded EWKB string or WKB buffer.
17
+ * @returns A hex-encoded ewkb string or WKB buffer.
18
18
  */
19
19
  export function geometryToWKB(geometry) {
20
20
  return wkx.Geometry.parseGeoJSON(geometry).toWkb();
21
21
  }
22
22
  /**
23
- * Given a GeoJSON geometry object, convert it to an extended well-known binary (EWKB) buffer.
23
+ * Given a GeoJSON geometry object, convert it to an extended well-known binary (ewkb) buffer.
24
24
  *
25
25
  * @category Geo
26
26
  *
27
- * @returns A buffer representing the EWKB.
27
+ * @returns A buffer representing the ewkb.
28
28
  */
29
29
  export function geometryToEWKB(geometry) {
30
30
  return wkx.Geometry.parseGeoJSON(geometry).toEwkb();
31
31
  }
32
32
  /**
33
- * Given a GeoJSON geometry object, convert it to an extended well-known binary (EWKB) buffer.
33
+ * Given a GeoJSON geometry object, convert it to an extended well-known binary (ewkb) buffer.
34
34
  *
35
35
  * @category Geo
36
36
  *
37
- * @returns A hex-encoded string representing the EWKB.
37
+ * @returns A hex-encoded string representing the ewkb.
38
38
  */
39
39
  export function geometryToEWKH(geometry) {
40
40
  return geometryToEWKB(geometry).toString("hex");
41
41
  }
42
42
  /**
43
- * Given a GeoJSON geometry object, convert it to an extended well-known text (EWKT) string.
43
+ * Given a GeoJSON geometry object, convert it to an extended well-known text (ewkt) string.
44
44
  *
45
45
  * @category Geo
46
46
  */
@@ -1 +1 @@
1
- {"version":3,"file":"well-known-text.js","sourceRoot":"","sources":["../lib/well-known-text.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,GAAG,MAAM,KAAK,CAAA;AAuBrB,MAAM,UAAU,0BAA0B,CAAsB,KAAsB;IACrF,OAAO,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,SAAS,EAAO,CAAA;AAClD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,QAA8C;IAC3E,OAAO,GAAG,CAAC,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAA;AACnD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,QAA8C;IAC5E,OAAO,GAAG,CAAC,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,CAAA;AACpD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,QAA8C;IAC5E,OAAO,cAAc,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAChD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,QAA8C;IAC3E,OAAO,GAAG,CA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F,OAAO,GAAG,EAAE;QACX,IAAI,CAAC,QAAQ;YAAE,OAAO,MAAM,CAAA;QAE5B,OAAO,SAAS,CAAC,iBAAiB,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAA;IAC/D,CAAC,CAAA;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailwoman/spatial",
3
- "version": "10.0.0",
3
+ "version": "10.2.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/index.d.ts",
97
- "node": "./out/tools/ogr/index.js",
98
- "default": "./out/tools/ogr/index.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/index.d.ts",
167
- "node": "./out/tools/ogr/index.js",
168
- "default": "./out/tools/ogr/index.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,19 +93,21 @@
187
93
  }
188
94
  },
189
95
  "dependencies": {
190
- "@mailwoman/core": "10.0.0",
96
+ "@mailwoman/core": "10.2.0",
191
97
  "geo-coordinates-parser": "^1.7.4",
192
98
  "h3-js": "^4.5.0",
99
+ "path-ts": "^2.5.0",
100
+ "spliterator": "^9.2.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": "10.0.0",
198
- "type-fest": "^5.9.0"
105
+ "@mailwoman/annotations": "10.2.0",
106
+ "type-fest": "^5.10.0"
199
107
  },
200
108
  "optionalDependencies": {
201
109
  "@googlemaps/google-maps-services-js": "^3.4.2",
202
- "@types/google.maps": "^3.66.2"
110
+ "@types/google.maps": "^3.66.5"
203
111
  },
204
112
  "engines": {
205
113
  "node": ">=24.18.0"
@@ -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,16 +58,17 @@ 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 {
61
68
  stdout: child.stdout,
62
69
  settled,
63
70
  kill: () => {
64
- if (child.exitCode === null && child.signalCode === null) {
71
+ if (child.exitCode === null && !child.signalCode) {
65
72
  child.kill()
66
73
  }
67
74
  },
@@ -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,33 +6,41 @@
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
19
  import { assertDatumTransformationAvailable } from "#projection/transform"
20
20
 
21
21
  /**
22
- * What one layer declares about itself.
22
+ * A layer's EPSG code, feature count, name and attribute field names, read before any feature.
23
23
  */
24
- export interface OGRLayerIdentity {
24
+ export interface OGRLayerSchema {
25
25
  epsg: number
26
26
  featureCount: number
27
27
  layer: string
28
28
  /**
29
29
  * The layer's own attribute field names — empty when the source reports none.
30
+ *
31
+ * ogr2ogr rejects a `select` that asks for a missing column, so query builders read this set.
30
32
  */
31
33
  fields: ReadonlySet<string>
34
+ }
35
+
36
+ /**
37
+ * What one layer declares about itself.
38
+ */
39
+ export interface OGRLayerIdentity extends OGRLayerSchema {
32
40
  /**
33
41
  * The layer's own declared extent, `[minLon, minLat, maxLon, maxLat]`, where the source declares one.
34
42
  */
35
- extent?: readonly [number, number, number, number]
43
+ extent: readonly [number, number, number, number] | null
36
44
  }
37
45
 
38
46
  export interface ReadOGRLayerIdentityOptions {
@@ -41,13 +49,15 @@ export interface ReadOGRLayerIdentityOptions {
41
49
  */
42
50
  path: string
43
51
  /**
44
- * Layer inside it, asserted against what the source answers. Omitted, the source's first layer answers and only its
45
- * presence is checked.
52
+ * Layer inside it, asserted against what the source answers.
53
+ *
54
+ * Omitted, the source's first layer answers and only its presence is checked.
46
55
  */
47
56
  layer?: string
48
57
  /**
49
- * The EPSG code the source must declare. A source declaring anything else is a product change, not a variation to
50
- * absorb.
58
+ * The epsg code the source must declare.
59
+ *
60
+ * A source declaring anything else is a product change rather than a variation to absorb.
51
61
  */
52
62
  expectEPSG: number
53
63
  /**
@@ -57,7 +67,7 @@ export interface ReadOGRLayerIdentityOptions {
57
67
  /**
58
68
  * Forwarded to the datum-transformation guard.
59
69
  */
60
- areaOfUse?: string
70
+ areaOfUse?: string | null
61
71
  /**
62
72
  * Refuse a layer that declares no extent.
63
73
  */
@@ -71,11 +81,11 @@ export interface ReadOGRLayerIdentityOptions {
71
81
  */
72
82
  messages?: {
73
83
  /**
74
- * After `declares no EPSG authority code — `.
84
+ * After `declares no epsg authority code — `.
75
85
  */
76
86
  noAuthorityCode?: string
77
87
  /**
78
- * After `expected EPSG:<code> — `.
88
+ * After `expected epsg:<code> — `.
79
89
  */
80
90
  epsgMismatch?: string
81
91
  /**
@@ -86,26 +96,30 @@ export interface ReadOGRLayerIdentityOptions {
86
96
  }
87
97
 
88
98
  /**
89
- * A summary is small; the ceiling only guards against a pathological driver.
99
+ * A summary is small.
100
+ * The ceiling only guards against a pathological driver.
90
101
  */
91
102
  const OGRINFO_MAX_BUFFER = 32 * 1024 * 1024
92
103
 
93
104
  /**
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.
105
+ * Ordinates in a 2D extent: `minLon, minLat, maxLon, maxLat`.
106
+ *
107
+ * A shorter array is a 3D or degenerate extent this reader does not understand
108
+ * rather than a 2D one with something missing.
96
109
  */
97
110
  const EXTENT_ORDINATES = 4
98
111
 
99
112
  /**
100
- * Read what the source declares about itself, and refuse a projection the calling ingest was not written for.
113
+ * Read what the source declares about itself.
114
+ * Refuse a projection the calling ingest was not written for.
101
115
  *
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.
116
+ * @throws {Error} When the layer is missing, declares no epsg authority code, declares one other than
117
+ * `expectEPSG`, reports no feature count, or fails a `requireExtent`/`requireFields` condition.
104
118
  */
105
119
  export async function readOGRLayerIdentity(options: ReadOGRLayerIdentityOptions): Promise<OGRLayerIdentity> {
106
120
  const { stdout } = await runFile(
107
121
  "ogrinfo",
108
- ["-json", "-so", options.path, ...(options.layer === undefined ? [] : [options.layer])],
122
+ ["-json", "-so", options.path, ...(options.layer ? [options.layer] : [])],
109
123
  { maxBuffer: OGRINFO_MAX_BUFFER }
110
124
  )
111
125
 
@@ -125,18 +139,18 @@ export async function readOGRLayerIdentity(options: ReadOGRLayerIdentityOptions)
125
139
 
126
140
  if (!described?.name) {
127
141
  throw new Error(
128
- options.layer === undefined
129
- ? `${options.context}: ${options.path} carries no readable layer`
130
- : `${options.context}: ${options.path} does not carry a layer named ${JSON.stringify(options.layer)}`
142
+ options.layer
143
+ ? `${options.context}: ${options.path} does not carry a layer named ${stringifyJSON(options.layer)}`
144
+ : `${options.context}: ${options.path} carries no readable layer`
131
145
  )
132
146
  }
133
147
 
134
- 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)}`)
148
+ if (options.layer && described.name !== options.layer) {
149
+ throw new Error(`${options.context}: ${options.path} does not carry a layer named ${stringifyJSON(options.layer)}`)
136
150
  }
137
151
 
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.
152
+ // The subject a refusal names: the layer where one was asked for, the dataset itself
153
+ // where the source's own first layer answered.
140
154
  const subject = options.layer ?? options.path
141
155
 
142
156
  const geometry = described.geometryFields?.[0]
@@ -146,7 +160,7 @@ export async function readOGRLayerIdentity(options: ReadOGRLayerIdentityOptions)
146
160
  throw new TypeError(
147
161
  `${options.context}: ${subject} declares no EPSG authority code — ${
148
162
  options.messages?.noAuthorityCode ??
149
- "the projection cannot be checked, and reading its metres as degrees is silent"
163
+ "the projection cannot be checked, and reading its meters as degrees is silent"
150
164
  }`
151
165
  )
152
166
  }
@@ -164,7 +178,7 @@ export async function readOGRLayerIdentity(options: ReadOGRLayerIdentityOptions)
164
178
  throw new TypeError(`${options.context}: ${subject} reports no feature count`)
165
179
  }
166
180
 
167
- let extent: readonly [number, number, number, number] | undefined
181
+ let extent: readonly [number, number, number, number] | null = null
168
182
 
169
183
  if (geometry?.extent && geometry.extent.length >= EXTENT_ORDINATES) {
170
184
  extent = [geometry.extent[0]!, geometry.extent[1]!, geometry.extent[2]!, geometry.extent[3]!]
@@ -178,7 +192,7 @@ export async function readOGRLayerIdentity(options: ReadOGRLayerIdentityOptions)
178
192
 
179
193
  await assertDatumTransformationAvailable(code, {
180
194
  context: options.context,
181
- ...(options.areaOfUse === undefined ? {} : { areaOfUse: options.areaOfUse }),
195
+ areaOfUse: options.areaOfUse ?? null,
182
196
  })
183
197
 
184
198
  const fields = new Set((described.fields ?? []).map((field) => field.name).filter((name) => name !== undefined))
@@ -196,6 +210,6 @@ export async function readOGRLayerIdentity(options: ReadOGRLayerIdentityOptions)
196
210
  featureCount: described.featureCount,
197
211
  layer: described.name,
198
212
  fields,
199
- ...(extent === undefined ? {} : { extent }),
213
+ extent,
200
214
  }
201
215
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","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.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;AAEtE,cAAc,UAAU,CAAA;AACxB,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AAEjC;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,SAAsB,EAAE,UAAU,GAAG,EAAE;IACvE,MAAM,IAAI,GAAG,YAAY,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;IAEhD,2DAA2D;IAC3D,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,CAAA;IAEhD,OAAO,IAAI,QAAQ,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAA;AAC3C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC9C,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,CAAA;IAEhD,OAAO;QACN,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;KAClC,CAAA;AACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/projection/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;IAChC;;;;OAIG;aACH,KAAK,EAAE,MAAM;IACb;;OAEG;aACH,KAAK,EAAE,MAAM;CACJ,CAAA;AAEV,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/projection/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC;;;;OAIG;IACH,KAAK,EAAE,MAAM;IACb;;OAEG;IACH,KAAK,EAAE,MAAM;CACJ,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/regions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/regions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/tools/ogr/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,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