@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
@@ -1 +1 @@
1
- {"version":3,"file":"distance.js","sourceRoot":"","sources":["../lib/distance.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAsB,MAAM,mBAAmB,CAAA;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC/B,gBAAgB,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG;I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iteral } from "#geometries/index";
6
+ import type { GeometryLiteral } from "#geometries";
7
7
  export interface IdentifiableGeoFeature {
8
8
  GEOID: string | number;
9
9
  }
@@ -24,7 +24,7 @@ export interface GeoFeature<G = GeometryLiteral, P extends object | null = never
24
24
  */
25
25
  geometry: G;
26
26
  /**
27
- * A unique identifier for the feature, such as a UUID, a serial number, or a name.
27
+ * A unique identifier for the feature, such as a uuid, a serial number, or a name.
28
28
  */
29
29
  id?: P extends IdentifiableGeoFeature ? P["GEOID"] : never;
30
30
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../lib/feature.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAExD,MAAM,WAAW,sBAAsB;IACtC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,eAAe,EAAE,CAAC,SAAS,MAAM,GAAG,IAAI,GAAG,KAAK;IAC/E;;OAEG;IACH,IAAI,EAAE,SAAS,CAAA;IACf;;;;OAIG;IACH,QAAQ,EAAE,CAAC,CAAA;IAEX;;OAEG;IACH,EAAE,CAAC,EAAE,CAAC,SAAS,sBAAsB,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,KAAK,CAAA;IAE1D;;OAEG;IACH,UAAU,EAAE,CAAC,CAAA;CACb;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,UAAU,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAEnF;;GAEG;AACH,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,CAAC,SAAS,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAErF;;GAEG;AACH,MAAM,WAAW,oBAAoB,CAAC,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;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,UAAU,IAAI,oBAAoB,CAC/E,mBAAmB,CAAC,CAAC,CAAC,EACtB,qBAAqB,CAAC,CAAC,CAAC,CACxB,CAAA"}
@@ -10,7 +10,8 @@ import { type H3Cell } from "#h3/cell";
10
10
  import { type GeoObjectLiteral } from "#objects";
11
11
  import { type InternalPointCoordinates, type Coordinates2D as Point2DCoordinates, type Coordinates3D as Point3DCoordinates } from "#position";
12
12
  /**
13
- * A JSON-serializeable single point geometry, such as a specific location, address, or longitude, latitude pair.
13
+ * A JSON-serializable single point geometry, such as a specific location,
14
+ * address, or longitude, latitude pair.
14
15
  *
15
16
  * ```js
16
17
  * {
@@ -49,8 +50,8 @@ export interface GeolocationCoordinatesLike {
49
50
  altitude: number;
50
51
  }
51
52
  /**
52
- * Type-predicate to determine if the given input appears to be a {@linkcode GeolocationCoordinatesLike} object — the
53
- * shape the browser's `GeolocationCoordinates` presents, without depending on the DOM type.
53
+ * Type-predicate to determine if the given input appears to be a {@linkcode GeolocationCoordinatesLike}
54
+ * object — the shape the browser's `GeolocationCoordinates` presents, without depending on the DOM type.
54
55
  */
55
56
  export declare function isGeolocationCoordinatesLike(input: unknown): input is GeolocationCoordinatesLike;
56
57
  export type GeoPointInput = PointLiteral | Point2DCoordinates | Point3DCoordinates | GeolocationCoordinatesLike | InternalPointCoordinates | LatLngLiteral | LatLng;
@@ -81,9 +82,10 @@ export declare class GeoPoint implements PointLiteral {
81
82
  set bbox(bbox: BBox2DLiteral | BBox3DLiteral | undefined);
82
83
  get coordinates(): Point2DCoordinates | Point3DCoordinates;
83
84
  /**
84
- * Assigns the pair as GeoJSON [longitude, latitude(, altitude)] — the axis order is the contract, never inferred from
85
- * the magnitudes — and REJECTS a coordinate that is not on the globe. See {@link GeoPoint.from} for why both halves of
86
- * that sentence are required.
85
+ * Assigns the pair as GeoJSON [longitude, latitude(, altitude)] — the axis order is the interface,
86
+ * never inferred from the magnitudes — and rejects a coordinate that is not on the globe.
87
+ *
88
+ * See {@link GeoPoint.from} for why both halves of that sentence are required.
87
89
  *
88
90
  * @throws {RangeError} When longitude is outside [-180, 180] or latitude is outside [-90, 90].
89
91
  */
@@ -130,7 +132,8 @@ export declare class GeoPoint implements PointLiteral {
130
132
  */
131
133
  constructor(geoLocationCoordinates: GeolocationCoordinatesLike, bbox?: BBox2DLiteral | BBox3DLiteral | GeoBoundingBox);
132
134
  /**
133
- * Creates a new GeoPoint instance from a Google Maps API {@linkcode google.LatLngLiteral | LatLngLiteral} object.
135
+ * Creates a new GeoPoint instance from a Google Maps API
136
+ * {@linkcode google.LatLngLiteral | LatLngLiteral} object.
134
137
  */
135
138
  constructor(latLngLiteral: google.LatLngLiteral, bbox?: BBox2DLiteral | BBox3DLiteral | GeoBoundingBox);
136
139
  /**
@@ -150,23 +153,28 @@ export declare class GeoPoint implements PointLiteral {
150
153
  */
151
154
  constructor(input: GeoPointInput, bbox?: BBox2DLiteral | BBox3DLiteral | GeoBoundingBox);
152
155
  /**
153
- * Attempts to create a new GeoPoint instance from the given input, returning `null` rather than throwing when the
154
- * input is not a coordinate this class will stand behind.
156
+ * Attempts to create a new GeoPoint instance from the given input, returning `null`
157
+ * rather than throwing when the input is not a coordinate this class will stand behind.
155
158
  *
156
- * Two rules, both of which this constructor got wrong until 2026-08-05 (the defect was recorded in `e9bfd139` and
157
- * routed around rather than fixed):
159
+ * Two rules, both of which this constructor got wrong until 2026-08-05
160
+ * (the defect was recorded in `e9bfd139` and routed around rather than fixed):
158
161
  *
159
- * 1. **A 2-tuple is GeoJSON [longitude, latitude]. The axis order is never inferred.** The old path ran the pair through
160
- * `inferGeoJSONCoordOrder`, whose only signal is the [-90, 90] latitude range, so it transposed a pair exactly
161
- * when |the second magnitude| > 90. A caller handing it `[latitude, longitude]` therefore got the pair repaired in
162
- * Dallas and left corrupted in Berlin — behaviour selected by the data, from one code path. This change is a no-op
163
- * for every WELL-FORMED input: a valid `[longitude, latitude]` pair can never have an out-of-range second element,
164
- * so the heuristic never fired on one.
165
- * 2. **An out-of-range magnitude is rejected, not repaired.** `[999, 999]` used to produce a GeoPoint reporting latitude 999.
166
- * It now returns `null` here and throws a `RangeError` from the constructor. Note the deliberate asymmetry with
167
- * the scalar `longitude` / `latitude` setters, which still wrap and clamp: mutating a point is a pan gesture,
168
- * where 190° meaning -170° is right; PARSING one is a claim about the world, where an impossible magnitude means
169
- * the input was malformed and any repair invents a location.
162
+ * 1. **A 2-tuple is GeoJSON [longitude, latitude].
163
+ * The axis order is never inferred.** The old path ran the pair through
164
+ * `inferGeoJSONCoordOrder`, whose only signal is the [-90, 90] latitude range,
165
+ * so it transposed a pair exactly when |the second magnitude| > 90.
166
+ * A caller handing it `[latitude, longitude]` therefore got the pair repaired in Dallas
167
+ * and left corrupted in Berlin — behavior selected by the data, from one code path.
168
+ * This change is a no-op for every well-formed input: a valid `[longitude, latitude]` pair
169
+ * can never have an out-of-range second element, so the heuristic never fired on one.
170
+ * 2. **An out-of-range magnitude is rejected rather than repaired.** `[999, 999]`
171
+ * used to produce a GeoPoint reporting latitude 999.
172
+ * It now returns `null` here and throws a `RangeError` from the constructor.
173
+ * Note the deliberate asymmetry with the scalar `longitude` / `latitude` setters.
174
+ * which still wrap and clamp: mutating a point is a pan gesture, where 190°.
175
+ * This means -170° is right.
176
+ * A parse result is a claim about the world.
177
+ * An impossible magnitude means the input was malformed and any repair invents a location.
170
178
  *
171
179
  * A 0/0 result is treated as the "missing coordinate" sentinel (Null Island) and also returns `null`.
172
180
  */
@@ -1 +1 @@
1
- {"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../lib/geometries/point.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,MAAM,qCAAqC,CAAA;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AAKhF,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,cAAc,EAAU,MAAM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,CAE3C;IAEM,eAAe,IAAI,kBAAkB,CAE3C;IAED;;OAEG;IACI,qBAAqB,IAAI,MAAM,CAAC,aAAa,CAKnD;IAED;;OAEG;IACI,KAAK,IAAI,MAAM,CAIrB;IAED;;OAEG;IACI,QAAQ,CAAC,UAAU,SAAK,UAI9B;IAED;;OAEG;IACI,aAAa,CAAC,UAAU,SAAK,kCAInC;IAEM,QAAQ,IAAI,MAAM,CAExB;IAGM,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,CAE3C;CACD;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,kBAAkB,GAAG,kBAAkB,CAAC,CAAC,CAAA;AAExF;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IAC1D;;OAEG;IACH,IAAI,EAAE,YAAY,CAAA;IAClB;;;;OAIG;IACH,WAAW,EAAE,cAAc,CAAA;CAC3B"}
@@ -3,7 +3,7 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  */
6
- import { tryParsingJSON } from "@mailwoman/core/json";
6
+ import { tryParsingJSON, stringifyJSON } from "@mailwoman/core/json";
7
7
  import { convert as convertCoords } from "geo-coordinates-parser";
8
8
  import { latLngToCell } from "h3-js";
9
9
  import { GeoBoundingBox, isBBox } from "#bbox";
@@ -25,8 +25,8 @@ export function isPointLiteral(input) {
25
25
  return isCoordPairLiteral(input.coordinates);
26
26
  }
27
27
  /**
28
- * Type-predicate to determine if the given input appears to be a {@linkcode GeolocationCoordinatesLike} object — the
29
- * shape the browser's `GeolocationCoordinates` presents, without depending on the DOM type.
28
+ * Type-predicate to determine if the given input appears to be a {@linkcode GeolocationCoordinatesLike}
29
+ * object — the shape the browser's `GeolocationCoordinates` presents, without depending on the DOM type.
30
30
  */
31
31
  export function isGeolocationCoordinatesLike(input) {
32
32
  if (!input || typeof input !== "object")
@@ -39,12 +39,12 @@ export function isGeolocationCoordinatesLike(input) {
39
39
  return false;
40
40
  return true;
41
41
  }
42
- //#region GeoPoint
42
+ // #region GeoPoint
43
43
  /**
44
44
  * A single point geometry, such as a specific location, address, or longitude, latitude pair.
45
45
  */
46
46
  export class GeoPoint {
47
- //#region Properties
47
+ // #region Properties
48
48
  /**
49
49
  * Declares the type of GeoJSON object as a `Point` geometry.
50
50
  */
@@ -76,9 +76,10 @@ export class GeoPoint {
76
76
  return [this.#longitude, this.#latitude];
77
77
  }
78
78
  /**
79
- * Assigns the pair as GeoJSON [longitude, latitude(, altitude)] — the axis order is the contract, never inferred from
80
- * the magnitudes — and REJECTS a coordinate that is not on the globe. See {@link GeoPoint.from} for why both halves of
81
- * that sentence are required.
79
+ * Assigns the pair as GeoJSON [longitude, latitude(, altitude)] — the axis order is the interface,
80
+ * never inferred from the magnitudes — and rejects a coordinate that is not on the globe.
81
+ *
82
+ * See {@link GeoPoint.from} for why both halves of that sentence are required.
82
83
  *
83
84
  * @throws {RangeError} When longitude is outside [-180, 180] or latitude is outside [-90, 90].
84
85
  */
@@ -160,23 +161,28 @@ export class GeoPoint {
160
161
  }
161
162
  }
162
163
  /**
163
- * Attempts to create a new GeoPoint instance from the given input, returning `null` rather than throwing when the
164
- * input is not a coordinate this class will stand behind.
164
+ * Attempts to create a new GeoPoint instance from the given input, returning `null`
165
+ * rather than throwing when the input is not a coordinate this class will stand behind.
165
166
  *
166
- * Two rules, both of which this constructor got wrong until 2026-08-05 (the defect was recorded in `e9bfd139` and
167
- * routed around rather than fixed):
167
+ * Two rules, both of which this constructor got wrong until 2026-08-05
168
+ * (the defect was recorded in `e9bfd139` and routed around rather than fixed):
168
169
  *
169
- * 1. **A 2-tuple is GeoJSON [longitude, latitude]. The axis order is never inferred.** The old path ran the pair through
170
- * `inferGeoJSONCoordOrder`, whose only signal is the [-90, 90] latitude range, so it transposed a pair exactly
171
- * when |the second magnitude| > 90. A caller handing it `[latitude, longitude]` therefore got the pair repaired in
172
- * Dallas and left corrupted in Berlin — behaviour selected by the data, from one code path. This change is a no-op
173
- * for every WELL-FORMED input: a valid `[longitude, latitude]` pair can never have an out-of-range second element,
174
- * so the heuristic never fired on one.
175
- * 2. **An out-of-range magnitude is rejected, not repaired.** `[999, 999]` used to produce a GeoPoint reporting latitude 999.
176
- * It now returns `null` here and throws a `RangeError` from the constructor. Note the deliberate asymmetry with
177
- * the scalar `longitude` / `latitude` setters, which still wrap and clamp: mutating a point is a pan gesture,
178
- * where 190° meaning -170° is right; PARSING one is a claim about the world, where an impossible magnitude means
179
- * the input was malformed and any repair invents a location.
170
+ * 1. **A 2-tuple is GeoJSON [longitude, latitude].
171
+ * The axis order is never inferred.** The old path ran the pair through
172
+ * `inferGeoJSONCoordOrder`, whose only signal is the [-90, 90] latitude range,
173
+ * so it transposed a pair exactly when |the second magnitude| > 90.
174
+ * A caller handing it `[latitude, longitude]` therefore got the pair repaired in Dallas
175
+ * and left corrupted in Berlin — behavior selected by the data, from one code path.
176
+ * This change is a no-op for every well-formed input: a valid `[longitude, latitude]` pair
177
+ * can never have an out-of-range second element, so the heuristic never fired on one.
178
+ * 2. **An out-of-range magnitude is rejected rather than repaired.** `[999, 999]`
179
+ * used to produce a GeoPoint reporting latitude 999.
180
+ * It now returns `null` here and throws a `RangeError` from the constructor.
181
+ * Note the deliberate asymmetry with the scalar `longitude` / `latitude` setters.
182
+ * which still wrap and clamp: mutating a point is a pan gesture, where 190°.
183
+ * This means -170° is right.
184
+ * A parse result is a claim about the world.
185
+ * An impossible magnitude means the input was malformed and any repair invents a location.
180
186
  *
181
187
  * A 0/0 result is treated as the "missing coordinate" sentinel (Null Island) and also returns `null`.
182
188
  */
@@ -201,8 +207,8 @@ export class GeoPoint {
201
207
  return null;
202
208
  }
203
209
  }
204
- //#endregion
205
- //#region Predicates
210
+ // #endregion
211
+ // #region Predicates
206
212
  /**
207
213
  * Whether the GeoPoint is 2-dimensional.
208
214
  */
@@ -221,8 +227,8 @@ export class GeoPoint {
221
227
  isNullIsland() {
222
228
  return this.#latitude === 0 && this.#longitude === 0;
223
229
  }
224
- //#endregion
225
- //#region Conversion
230
+ // #endregion
231
+ // #region Conversion
226
232
  toJSON() {
227
233
  return {
228
234
  type: this.type,
@@ -266,9 +272,9 @@ export class GeoPoint {
266
272
  return shortenH3Cell(cell);
267
273
  }
268
274
  toString() {
269
- return JSON.stringify(this.toJSON());
275
+ return stringifyJSON(this.toJSON());
270
276
  }
271
- //#endregion
277
+ // #endregion
272
278
  [Symbol.iterator]() {
273
279
  return this.coordinates[Symbol.iterator]();
274
280
  }
@@ -1 +1 @@
1
- {"version":3,"file":"point.js","sourceRoot":"","sources":["../../lib/geometries/point.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpC,OAAO,EAA0C,cAAc,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACtF,OAAO,EAAe,aAAa,EAAE,MAAM,UAAU,CAAA;AACrD,OAAO,EAAyB,YAAY,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,EAIN,aAAa,EACb,kBAAkB,EAClB,yBAAyB,EACzB,yBAAyB,EACzB,eAAe,EACf,gBAAgB,EAChB,aAAa,GACb,MAAM,WAAW,CAAA;AA4BlB;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAAgD;IAC9E,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IAErD,IAAI,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC;QAAE,OAAO,KAAK,CAAA;IAEpC,IAAI,CAAC,CAAC,aAAa,IAAI,KAAK,CAAC;QAAE,OAAO,KAAK,CAAA;IAE3C,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,CAA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An array of positions forming a closed shape, such as a country or a lake.
11
- *
12
- * @example
13
- * A polygon without holes:
14
- *
15
- * ```json
16
- * {
17
- * "type": "Polygon",
18
- * "coordinates": [
19
- * [
20
- * [100, 0],
21
- * [101, 0],
22
- * [101, 1],
23
- * [100, 1],
24
- * [100, 0]
25
- * ]
26
- * ]
27
- * }
28
- * ```
29
11
  */
30
12
  export type SolidPolygonPath = [
31
13
  /**
32
- * - A linear ring is a closed LineString with four or more positions.
33
- * - The first and last positions are equivalent (they represent equivalent points).
14
+ * A linear ring is a closed LineString with four or more positions.
34
15
  */
35
16
  exteriorRing: LineStringPath
36
17
  ];
37
18
  /**
38
- * An array of positions forming a closed shape with holes, such as a country with islands or a lake with islands.
39
- *
40
- * @example
41
- * A polygon with holes:
42
- *
43
- * ```json
44
- * {
45
- * "type": "Polygon",
46
- * "coordinates": [
47
- * [
48
- * [100.0, 0.0],
49
- * [101.0, 0.0],
50
- * [101.0, 1.0],
51
- * [100.0, 1.0],
52
- * [100.0, 0.0]
53
- * ],
54
- * [
55
- * [100.8, 0.8],
56
- * [100.8, 0.2],
57
- * [100.2, 0.2],
58
- * [100.2, 0.8],
59
- * [100.8, 0.8]
60
- * ]
61
- * ]
62
- * }
63
- * ```
19
+ * An array of positions forming a closed shape with holes, such as a country
20
+ * with islands or a lake with islands.
64
21
  */
65
22
  export type NestedPolygonPath = [
66
23
  /**
67
- * - A linear ring is a closed LineString with four or more positions.
68
- * - The first and last positions are equivalent (they represent equivalent points).
24
+ * A linear ring is a closed LineString with four or more positions.
69
25
  */
70
26
  exteriorRing: LineStringPath,
71
- /**
72
- * - The interior rings are arrays of positions forming holes in the polygon.
73
- */
74
27
  ...interiorRings: LineStringPath[]
75
28
  ];
76
29
  /**
77
30
  * A polygon geometry.
78
- *
79
- * @see {@linkcode PolygonLiteral} for applicable JSON schema.
80
- * @see {@linkcode SolidPolygonPath} for more information.
81
- * @see {@linkcode NestedPolygonPath} for more information.
82
31
  */
83
32
  export type PolygonPath = SolidPolygonPath | NestedPolygonPath;
84
33
  /**
85
34
  * An array of positions forming a closed shape, such as a country or a lake.
86
35
  */
87
36
  export interface PolygonLiteral<P extends PolygonPath = PolygonPath> extends GeoObjectLiteral {
88
- /**
89
- * Declares the type of GeoJSON object as a `Polygon` geometry.
90
- */
91
37
  type: "Polygon";
92
- /**
93
- * An array of positions for each point in the geometry.
94
- *
95
- * @see {@link https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6 | RFC 7946 Section 3.1.6}
96
- * @see {@linkcode SolidPolygonPath}
97
- * @see {@linkcode NestedPolygonPath}
98
- */
99
38
  coordinates: P;
100
39
  }
101
40
  /**
@@ -107,42 +46,31 @@ export declare function isPolygonLiteral<P extends PolygonPath = PolygonPath>(in
107
46
  */
108
47
  export declare function isSolidPolygonPath(input: PolygonLiteral<PolygonPath>): boolean;
109
48
  /**
110
- * A linear ring as the containment predicates read it: positions of `[lon, lat, …]`.
111
- *
112
- * Deliberately looser than {@link LineStringPath} — the ray cast only ever indexes `[0]` and `[1]`, and the callers
113
- * arrive with different position types (`[number, number, ...number[]]` from the resolver's GeoJSON reader, plain
114
- * `number[][]` from a `JSON.parse` of a stored geometry column). A tight tuple type here would force a cast at every
115
- * call site and buy nothing the predicate uses.
49
+ * A linear ring as the containment predicates read it, deliberately looser than
50
+ * {@link LineStringPath} because callers arrive with different position types.
116
51
  */
117
52
  export type ContainmentRing = readonly (readonly number[])[];
118
53
  /**
119
- * One polygon's rings: `[exterior, ...holes]` — a `Polygon`'s `coordinates`, read loosely (see
120
- * {@linkcode ContainmentRing}).
54
+ * One polygon's rings: `[exterior, ...holes]`.
121
55
  */
122
56
  export type PolygonRings = readonly ContainmentRing[];
123
57
  /**
124
- * A feature's polygons — `MultiPolygon` coordinates, with a bare `Polygon` lifted into the same shape by
125
- * {@linkcode arealPolygons}.
58
+ * A feature's polygons — `MultiPolygon` coordinates, with a bare `Polygon` lifted
59
+ * into the same shape by {@linkcode arealPolygons}.
126
60
  */
127
61
  export type MultiPolygonRings = readonly PolygonRings[];
128
62
  /**
129
- * Ray-cast a point against ONE linear ring — the even-odd crossing count. Shoot a ray along +lon and toggle on every
130
- * edge crossing.
131
- *
132
- * Points exactly on an edge are implementation-defined; either side is acceptable for geocoding, where admin boundaries
133
- * are Douglas-Peucker–simplified before they ever reach us.
63
+ * Ray-cast a point against one linear ring — the even-odd crossing count,
64
+ * with points exactly on an edge left implementation-defined.
134
65
  */
135
66
  export declare function pointInRing(lon: number, lat: number, ring: ContainmentRing): boolean;
136
67
  /**
137
- * Even-odd containment over a polygon's ring list (`[outer, hole₁, …]`).
138
- *
139
- * Being inside an odd number of rings means inside the polygon, which handles holes — and islands inside holes —
140
- * without depending on ring winding order. GeoJSON nominally specifies orientation, but the gazetteer sources do not
141
- * reliably honour it, so the orientation-free rule is the one that survives real data.
68
+ * Even-odd containment over a polygon's ring list (`[outer, hole₁, …]`), independent of
69
+ * ring winding order because the gazetteer sources do not honor it reliably.
142
70
  */
143
71
  export declare function pointInPolygon(lon: number, lat: number, rings: PolygonRings): boolean;
144
72
  /**
145
- * Inside ANY polygon of a multi-polygon.
73
+ * Inside any polygon of a multi-polygon.
146
74
  */
147
75
  export declare function pointInMultiPolygon(lon: number, lat: number, polygons: readonly (readonly ContainmentRing[])[]): boolean;
148
76
  /**
@@ -150,60 +78,33 @@ export declare function pointInMultiPolygon(lon: number, lat: number, polygons:
150
78
  */
151
79
  export interface MultiPolygonLiteral<P extends PolygonPath = PolygonPath> extends GeoObjectLiteral {
152
80
  type: "MultiPolygon";
153
- /**
154
- * One ring array per polygon — `coordinates[polygon][ring][position]`, matching a `Polygon`'s `coordinates` lifted by
155
- * exactly one level.
156
- *
157
- * @see {@link https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.7 | RFC 7946 Section 3.1.7}
158
- */
159
81
  coordinates: P[];
160
82
  }
161
83
  /**
162
- * A geometry as it arrives from `JSON.parse`, or a typed literal. Nothing has checked the arity of a position and
163
- * `type` is whatever the source wrote, so a reader narrows on `type` and casts `coordinates` — {@linkcode arealPolygons}
164
- * is the one place that happens for the areal types.
84
+ * A geometry as it arrives from `JSON.parse`, or a typed literal, with `type` unchecked
85
+ * and no arity validation on `coordinates`.
165
86
  */
166
87
  export type ParsedGeometry = GeometryLiteral | {
167
88
  type: string;
168
89
  coordinates?: unknown;
169
90
  };
170
91
  /**
171
- * A geometry's polygons in the `MultiPolygon` coordinate shape, whichever areal type it arrived as — `null` when the
172
- * geometry is not areal (a Point or a LineString bounds no area).
173
- *
174
- * The one place a `Polygon` is lifted to `[rings]`; a caller that must refuse a non-areal geometry does so on the
175
- * `null`, with its own message.
92
+ * A geometry's polygons in the `MultiPolygon` coordinate shape, with a bare `Polygon`
93
+ * lifted to `[rings]` and `null` for any non-areal geometry.
176
94
  */
177
95
  export declare function arealPolygons(geometry: ParsedGeometry | null | undefined): MultiPolygonRings | null;
178
96
  /**
179
- * The polygons of a geometry that MUST be areal — {@linkcode arealPolygons} with the refusal every polygon ingest was
180
- * writing for itself.
181
- *
182
- * @param subject Names the feature in the refusal, e.g. `feature 41209`.
183
- * @param context Names the calling ingest, so a build log says which layer stopped.
184
- * @throws {Error} When the geometry is neither a `Polygon` nor a `MultiPolygon`.
97
+ * The polygons of a geometry that must be areal, throwing when the geometry
98
+ * is not a `Polygon` or `MultiPolygon`.
185
99
  */
186
100
  export declare function requireArealPolygons(geometry: ParsedGeometry, subject: string, context: string): MultiPolygonRings;
187
101
  /**
188
- * Does an areal GeoJSON geometry contain the point?
189
- *
190
- * The three-valued return is the point of the function. `null` means the geometry is NOT AREAL — a Point or a
191
- * LineString cannot contain anything — and a caller must read that as "no polygon on record", the same as a missing
192
- * geometry, never as a rejection. Collapsing it to `false` is how a place with a point-only record gets excluded from a
193
- * containment pass instead of falling through to the approximate path.
194
- *
195
- * `scripts/eval/pip-containment.py` grades the same containment truth against its own ray cast and has to be matched BY
196
- * HAND if this one changes — it is the one copy no import can reach.
102
+ * Does an areal GeoJSON geometry contain the point, returning `null` for a
103
+ * non-areal geometry rather than `false`.
197
104
  */
198
105
  export declare function geometryContains(geometry: ParsedGeometry | null | undefined, lon: number, lat: number): boolean | null;
199
106
  /**
200
- * An axis-aligned rectangle as a closed ring, in GeoJSON `[lon, lat]` order and counter-clockwise — the exterior
201
- * winding.
202
- *
203
- * SHARED BECAUSE THE WINDING IS A CONVENTION AND A SECOND COPY IS A SECOND PLACE FOR IT TO DRIFT. Three layer builders
204
- * hand-build rectangles for their fixture rungs, and each pairs this with {@link reversedRing} to make a hole. A copy
205
- * whose hole is wound the same way as its exterior produces a fixture that passes every structural check and tests
206
- * nothing about hole handling — which is the exact failure the area cross-check exists to catch in production data.
107
+ * An axis-aligned rectangle as a closed ring, in GeoJSON `[lon, lat]` order and counter-clockwise.
207
108
  */
208
109
  export declare function rectangleRing(minLon: number, minLat: number, maxLon: number, maxLat: number): number[][];
209
110
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"polygon.d.ts","sourceRoot":"","sources":["../../lib/geometries/polygon.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;;OAGG;IACH,YAAY,EAAE,cAAc;CAC5B,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC/B;;;OAGG;IACH,YAAY,EAAE,cAAc;IAC5B;;OAEG;IACH,GAAG,aAAa,EAAE,cAAc,EAAE;CAClC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG,iBAAiB,CAAA;AAE9D;;GAEG;AACH,MAAM,WAAW,cAAc,CAAC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