@trackunit/geo-json-utils 1.12.1 → 1.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -740,12 +740,14 @@ const mapWestOverflowPolygon = (poly) => {
740
740
  *
741
741
  * - **Center longitude:** Map inputs may be outside [-180, 180] (e.g. 540°). The center is folded once by
742
742
  * whole 360° turns into that range—same meridian on the ground; only the number used for math changes.
743
- * - **Sampling the ring:** Each vertex is `lonCenter + offset` along the loop. We do not normalize every
744
- * vertex to [-180, 180] by itself; that would turn a short step across the dateline into a long wrong chord.
745
- * Instead, the ring can use longitudes past ±180° until clipping splits it into valid pieces. The western
746
- * piece is adjusted so the ±180° edge is short, which `mergeAntimeridianFeatures` expects when merging halves.
743
+ * - **Sampling the ring:** Each vertex is `lonCenter + offset` along the loop. Vertices use **continuous**
744
+ * longitude (no per-point normalization to [-180, 180]) so the planar ring does not self-intersect at the
745
+ * dateline; each hemisphere is clipped separately. We do not normalize every vertex to [-180, 180] by
746
+ * itself; that would turn a short step across the dateline into a long wrong chord. The western overflow
747
+ * piece is repaired so the ±180° seam is a short edge, which allows consumers such as
748
+ * `mergeAntimeridianFeatures` to merge halves for rendering.
747
749
  *
748
- * - Returns **null** when the polygon crosses the antimeridian but both hemisphere
750
+ * Returns **null** when the polygon crosses the antimeridian but both hemisphere
749
751
  * intersections yield zero polygons (e.g. very small polygons near the
750
752
  * dateline). In that case, returning the original coordinates would produce
751
753
  * invalid geometry per RFC 7946 Section 3.1.9.
package/index.esm.js CHANGED
@@ -738,12 +738,14 @@ const mapWestOverflowPolygon = (poly) => {
738
738
  *
739
739
  * - **Center longitude:** Map inputs may be outside [-180, 180] (e.g. 540°). The center is folded once by
740
740
  * whole 360° turns into that range—same meridian on the ground; only the number used for math changes.
741
- * - **Sampling the ring:** Each vertex is `lonCenter + offset` along the loop. We do not normalize every
742
- * vertex to [-180, 180] by itself; that would turn a short step across the dateline into a long wrong chord.
743
- * Instead, the ring can use longitudes past ±180° until clipping splits it into valid pieces. The western
744
- * piece is adjusted so the ±180° edge is short, which `mergeAntimeridianFeatures` expects when merging halves.
741
+ * - **Sampling the ring:** Each vertex is `lonCenter + offset` along the loop. Vertices use **continuous**
742
+ * longitude (no per-point normalization to [-180, 180]) so the planar ring does not self-intersect at the
743
+ * dateline; each hemisphere is clipped separately. We do not normalize every vertex to [-180, 180] by
744
+ * itself; that would turn a short step across the dateline into a long wrong chord. The western overflow
745
+ * piece is repaired so the ±180° seam is a short edge, which allows consumers such as
746
+ * `mergeAntimeridianFeatures` to merge halves for rendering.
745
747
  *
746
- * - Returns **null** when the polygon crosses the antimeridian but both hemisphere
748
+ * Returns **null** when the polygon crosses the antimeridian but both hemisphere
747
749
  * intersections yield zero polygons (e.g. very small polygons near the
748
750
  * dateline). In that case, returning the original coordinates would produce
749
751
  * invalid geometry per RFC 7946 Section 3.1.9.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/geo-json-utils",
3
- "version": "1.12.1",
3
+ "version": "1.12.3",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -19,12 +19,14 @@ export declare const getBboxFromGeoJsonPolygon: (polygon: GeoJsonPolygon | GeoJs
19
19
  *
20
20
  * - **Center longitude:** Map inputs may be outside [-180, 180] (e.g. 540°). The center is folded once by
21
21
  * whole 360° turns into that range—same meridian on the ground; only the number used for math changes.
22
- * - **Sampling the ring:** Each vertex is `lonCenter + offset` along the loop. We do not normalize every
23
- * vertex to [-180, 180] by itself; that would turn a short step across the dateline into a long wrong chord.
24
- * Instead, the ring can use longitudes past ±180° until clipping splits it into valid pieces. The western
25
- * piece is adjusted so the ±180° edge is short, which `mergeAntimeridianFeatures` expects when merging halves.
22
+ * - **Sampling the ring:** Each vertex is `lonCenter + offset` along the loop. Vertices use **continuous**
23
+ * longitude (no per-point normalization to [-180, 180]) so the planar ring does not self-intersect at the
24
+ * dateline; each hemisphere is clipped separately. We do not normalize every vertex to [-180, 180] by
25
+ * itself; that would turn a short step across the dateline into a long wrong chord. The western overflow
26
+ * piece is repaired so the ±180° seam is a short edge, which allows consumers such as
27
+ * `mergeAntimeridianFeatures` to merge halves for rendering.
26
28
  *
27
- * - Returns **null** when the polygon crosses the antimeridian but both hemisphere
29
+ * Returns **null** when the polygon crosses the antimeridian but both hemisphere
28
30
  * intersections yield zero polygons (e.g. very small polygons near the
29
31
  * dateline). In that case, returning the original coordinates would produce
30
32
  * invalid geometry per RFC 7946 Section 3.1.9.