@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 +7 -5
- package/index.esm.js +7 -5
- package/package.json +1 -1
- package/src/GeoJsonUtils.d.ts +7 -5
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.
|
|
744
|
-
*
|
|
745
|
-
*
|
|
746
|
-
*
|
|
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
|
-
*
|
|
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.
|
|
742
|
-
*
|
|
743
|
-
*
|
|
744
|
-
*
|
|
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
|
-
*
|
|
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
package/src/GeoJsonUtils.d.ts
CHANGED
|
@@ -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.
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
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
|
-
*
|
|
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.
|