@mailwoman/spatial 9.2.0 → 9.4.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.
- package/{bbox.ts → lib/bbox.ts} +4 -4
- package/{coordinate-bounds.ts → lib/coordinate-bounds.ts} +11 -0
- package/{coordinate-formats.ts → lib/coordinate-formats.ts} +3 -1
- package/lib/distance.ts +204 -0
- package/{feature.ts → lib/feature.ts} +1 -1
- package/{geometries → lib/geometries}/collection.ts +4 -4
- package/lib/geometries/index.ts +13 -0
- package/{geometries → lib/geometries}/line-string.ts +4 -4
- package/{geometries → lib/geometries}/point.ts +14 -13
- package/{geometries → lib/geometries}/polygon.ts +82 -158
- package/lib/geometries/ring-blob.ts +521 -0
- package/{google → lib/google}/index.ts +1 -1
- package/{h3 → lib/h3}/cell.ts +83 -1
- package/lib/h3/coverage.ts +45 -0
- package/{h3 → lib/h3}/index.ts +5 -3
- package/lib/h3/interior-cells.ts +138 -0
- package/lib/h3/polygon-cells.ts +462 -0
- package/lib/index.ts +21 -0
- package/{objects.ts → lib/objects.ts} +1 -1
- package/{open-location-code.ts → lib/open-location-code.ts} +1 -1
- package/{osgb36.ts → lib/osgb36.ts} +2 -2
- package/{polyline.ts → lib/polyline.ts} +5 -5
- package/{position.ts → lib/position.ts} +2 -2
- package/lib/projection-transform.ts +115 -0
- package/{regions → lib/regions}/codes.ts +1 -1
- package/{regions → lib/regions}/index.ts +2 -2
- package/lib/tools/ogr-stream.ts +99 -0
- package/lib/tools/ogr.ts +201 -0
- package/out/bbox.d.ts +2 -2
- package/out/bbox.d.ts.map +1 -1
- package/out/bbox.js +3 -3
- package/out/bbox.js.map +1 -1
- package/out/coordinate-bounds.d.ts +9 -0
- package/out/coordinate-bounds.d.ts.map +1 -1
- package/out/coordinate-bounds.js +9 -0
- package/out/coordinate-bounds.js.map +1 -1
- package/out/coordinate-formats.d.ts.map +1 -1
- package/out/coordinate-formats.js +2 -1
- package/out/coordinate-formats.js.map +1 -1
- package/out/distance.d.ts +64 -1
- package/out/distance.d.ts.map +1 -1
- package/out/distance.js +85 -1
- package/out/distance.js.map +1 -1
- package/out/feature.d.ts +1 -1
- package/out/feature.d.ts.map +1 -1
- package/out/feature.js.map +1 -1
- package/out/geometries/collection.d.ts +4 -4
- package/out/geometries/collection.d.ts.map +1 -1
- package/out/geometries/collection.js.map +1 -1
- package/out/geometries/index.d.ts +5 -4
- package/out/geometries/index.d.ts.map +1 -1
- package/out/geometries/index.js +5 -4
- package/out/geometries/index.js.map +1 -1
- package/out/geometries/line-string.d.ts +4 -4
- package/out/geometries/line-string.d.ts.map +1 -1
- package/out/geometries/line-string.js.map +1 -1
- package/out/geometries/point.d.ts +14 -13
- package/out/geometries/point.d.ts.map +1 -1
- package/out/geometries/point.js +11 -10
- package/out/geometries/point.js.map +1 -1
- package/out/geometries/polygon.d.ts +51 -100
- package/out/geometries/polygon.d.ts.map +1 -1
- package/out/geometries/polygon.js +60 -90
- package/out/geometries/polygon.js.map +1 -1
- package/out/geometries/ring-blob.d.ts +183 -0
- package/out/geometries/ring-blob.d.ts.map +1 -0
- package/out/geometries/ring-blob.js +376 -0
- package/out/geometries/ring-blob.js.map +1 -0
- package/out/google/index.d.ts +1 -1
- package/out/google/index.d.ts.map +1 -1
- package/out/google/index.js +1 -1
- package/out/google/index.js.map +1 -1
- package/out/google/place-id.d.ts.map +1 -1
- package/out/google/place-id.js.map +1 -1
- package/out/h3/cell.d.ts +32 -0
- package/out/h3/cell.d.ts.map +1 -1
- package/out/h3/cell.js +68 -1
- package/out/h3/cell.js.map +1 -1
- package/out/h3/coverage.d.ts +32 -0
- package/out/h3/coverage.d.ts.map +1 -0
- package/out/h3/coverage.js +27 -0
- package/out/h3/coverage.js.map +1 -0
- package/out/h3/index.d.ts +5 -3
- package/out/h3/index.d.ts.map +1 -1
- package/out/h3/index.js +5 -3
- package/out/h3/index.js.map +1 -1
- package/out/h3/interior-cells.d.ts +54 -0
- package/out/h3/interior-cells.d.ts.map +1 -0
- package/out/h3/interior-cells.js +111 -0
- package/out/h3/interior-cells.js.map +1 -0
- package/out/h3/polygon-cells.d.ts +182 -0
- package/out/h3/polygon-cells.d.ts.map +1 -0
- package/out/h3/polygon-cells.js +339 -0
- package/out/h3/polygon-cells.js.map +1 -0
- package/out/index.d.ts +15 -15
- package/out/index.d.ts.map +1 -1
- package/out/index.js +15 -15
- package/out/index.js.map +1 -1
- package/out/objects.d.ts +1 -1
- package/out/objects.d.ts.map +1 -1
- package/out/objects.js +1 -1
- package/out/objects.js.map +1 -1
- package/out/open-location-code.d.ts.map +1 -1
- package/out/open-location-code.js +1 -1
- package/out/open-location-code.js.map +1 -1
- package/out/osgb36.d.ts +2 -2
- package/out/osgb36.d.ts.map +1 -1
- package/out/osgb36.js +1 -1
- package/out/osgb36.js.map +1 -1
- package/out/polyline.d.ts +4 -4
- package/out/polyline.d.ts.map +1 -1
- package/out/polyline.js +5 -5
- package/out/polyline.js.map +1 -1
- package/out/position.d.ts +1 -1
- package/out/position.d.ts.map +1 -1
- package/out/position.js +2 -2
- package/out/position.js.map +1 -1
- package/out/projection-transform.d.ts +67 -0
- package/out/projection-transform.d.ts.map +1 -0
- package/out/projection-transform.js +48 -0
- package/out/projection-transform.js.map +1 -0
- package/out/projection.d.ts.map +1 -1
- package/out/projection.js.map +1 -1
- package/out/regions/codes.d.ts.map +1 -1
- package/out/regions/codes.js.map +1 -1
- package/out/regions/index.d.ts +2 -2
- package/out/regions/index.d.ts.map +1 -1
- package/out/regions/index.js +2 -2
- package/out/regions/index.js.map +1 -1
- package/out/regions/names.d.ts.map +1 -1
- package/out/regions/names.js.map +1 -1
- package/out/tools/ogr-stream.d.ts +34 -0
- package/out/tools/ogr-stream.d.ts.map +1 -0
- package/out/tools/ogr-stream.js +74 -0
- package/out/tools/ogr-stream.js.map +1 -0
- package/out/tools/ogr.d.ts +87 -0
- package/out/tools/ogr.d.ts.map +1 -0
- package/out/tools/ogr.js +84 -0
- package/out/tools/ogr.js.map +1 -0
- package/out/tsconfig.test.tsbuildinfo +1 -1
- package/out/well-known-text.d.ts.map +1 -0
- package/out/well-known-text.js.map +1 -0
- package/package.json +94 -25
- package/distance.ts +0 -84
- package/geometries/index.ts +0 -12
- package/index.ts +0 -21
- package/out/sdk/index.d.ts +0 -7
- package/out/sdk/index.d.ts.map +0 -1
- package/out/sdk/index.js +0 -7
- package/out/sdk/index.js.map +0 -1
- package/out/sdk/well-known-text.d.ts.map +0 -1
- package/out/sdk/well-known-text.js.map +0 -1
- package/out/tsconfig.tsbuildinfo +0 -1
- package/sdk/index.ts +0 -7
- /package/{google → lib/google}/place-id.ts +0 -0
- /package/{projection.ts → lib/projection.ts} +0 -0
- /package/{regions → lib/regions}/names.ts +0 -0
- /package/{sdk → lib}/well-known-text.ts +0 -0
- /package/out/{sdk/well-known-text.d.ts → well-known-text.d.ts} +0 -0
- /package/out/{sdk/well-known-text.js → well-known-text.js} +0 -0
package/out/distance.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @file Great-circle distance utilities. This module imports geometry directly so spatial's
|
|
6
6
|
* lowest-level math never reaches back through its public barrel.
|
|
7
7
|
*/
|
|
8
|
-
import { type GeoPointInput } from "
|
|
8
|
+
import { type GeoPointInput } from "#geometries/point";
|
|
9
9
|
/**
|
|
10
10
|
* Conversion factors for converting between degrees and radians.
|
|
11
11
|
*
|
|
@@ -21,6 +21,24 @@ export declare const ConversionFactor: {
|
|
|
21
21
|
* Available conversion units for the radius of the Earth.
|
|
22
22
|
*/
|
|
23
23
|
export type EarthRadiusUnit = "km" | "miles" | "meters";
|
|
24
|
+
export type PlanetaryBodyID = "earth" | "moon" | "mars";
|
|
25
|
+
/**
|
|
26
|
+
* Mean radii in kilometres. Earth's is the value `RADII` scales to its units; the Moon's and Mars's are the IAU mean
|
|
27
|
+
* radii the USGS planetary products reference (the Moon as a sphere; Mars's mean radius, its DEM being on the areoid).
|
|
28
|
+
* A distance on a body other than Earth is meaningless without one of these.
|
|
29
|
+
*/
|
|
30
|
+
export declare const BODY_RADII_KM: {
|
|
31
|
+
readonly earth: 6371;
|
|
32
|
+
readonly moon: 1737.4;
|
|
33
|
+
readonly mars: 3389.5;
|
|
34
|
+
};
|
|
35
|
+
export interface GreatCircleOptions {
|
|
36
|
+
unit?: EarthRadiusUnit;
|
|
37
|
+
/**
|
|
38
|
+
* Which body's mean radius scales the arc. @default "earth"
|
|
39
|
+
*/
|
|
40
|
+
body?: PlanetaryBodyID;
|
|
41
|
+
}
|
|
24
42
|
/**
|
|
25
43
|
* Calculate the distance between two points on the Earth's surface.
|
|
26
44
|
*
|
|
@@ -32,6 +50,13 @@ export type EarthRadiusUnit = "km" | "miles" | "meters";
|
|
|
32
50
|
* @returns The distance between the two points in the specified unit.
|
|
33
51
|
*/
|
|
34
52
|
export declare function haversine(point1: GeoPointInput, point2: GeoPointInput, unit?: EarthRadiusUnit): number;
|
|
53
|
+
/**
|
|
54
|
+
* Great-circle distance on the named body. {@link haversine} is this function on Earth; a caller with a body passes it
|
|
55
|
+
* here. The Null-Island sentinel of the object form applies: a `(0, 0)` input answers `NaN`.
|
|
56
|
+
*
|
|
57
|
+
* @category Position
|
|
58
|
+
*/
|
|
59
|
+
export declare function greatCircleDistance(point1: GeoPointInput, point2: GeoPointInput, options?: GreatCircleOptions): number;
|
|
35
60
|
/**
|
|
36
61
|
* Great-circle distance in kilometres between two lat/lon pairs given as raw scalars. The formula's one true home —
|
|
37
62
|
* every resolver + eval consumer of the `(aLat, aLon, bLat, bLon)` shape imports this instead of re-declaring it.
|
|
@@ -43,4 +68,42 @@ export declare function haversine(point1: GeoPointInput, point2: GeoPointInput,
|
|
|
43
68
|
* @category Position
|
|
44
69
|
*/
|
|
45
70
|
export declare function haversineKm(aLat: number, aLon: number, bLat: number, bLon: number): number;
|
|
71
|
+
/**
|
|
72
|
+
* Metres per degree of latitude — the scale {@link segmentDistanceMetres} reports in, and the constant the bounding-box
|
|
73
|
+
* estimates in `#h3/polygon-cells` are built on.
|
|
74
|
+
*/
|
|
75
|
+
export declare const METRES_PER_DEGREE = 111320;
|
|
76
|
+
/**
|
|
77
|
+
* Square metres in a square kilometre — the conversion every polygon layer's area receipt reports through.
|
|
78
|
+
*/
|
|
79
|
+
export declare const M2_PER_KM2 = 1000000;
|
|
80
|
+
/**
|
|
81
|
+
* Metres from a point to a line SEGMENT, with longitude scaled for the latitude so the two axes are comparable.
|
|
82
|
+
*
|
|
83
|
+
* MEASURE TO THE EDGE, NOT TO THE NEAREST VERTEX. A point a centimetre from a long edge can be metres from every vertex
|
|
84
|
+
* of it, so a vertex distance overstates the gap without bound — measured on the flood layer's verification, one
|
|
85
|
+
* near-miss read 1.58 m to vertices and 0.009 m to edges, a 9 mm difference overstated 175-fold. That is the difference
|
|
86
|
+
* between "two channels rendered the same edge slightly differently" and "the conversion is wrong".
|
|
87
|
+
*
|
|
88
|
+
* The longitude scaling matters at the same scale: comparing raw degrees treats a degree of longitude as a degree of
|
|
89
|
+
* latitude, which at 54°N overstates east-west distance by 70%.
|
|
90
|
+
*
|
|
91
|
+
* @category Position
|
|
92
|
+
*/
|
|
93
|
+
export declare function segmentDistanceMetres(lon: number, lat: number, from: readonly number[], to: readonly number[]): number;
|
|
94
|
+
/**
|
|
95
|
+
* Metres from a point to the nearest ring EDGE of an areal geometry — `Infinity` when the geometry bounds no area or
|
|
96
|
+
* carries no segment.
|
|
97
|
+
*
|
|
98
|
+
* To the edge, not to the nearest vertex: a point a centimetre from a long edge can be metres from every vertex of it,
|
|
99
|
+
* so a vertex distance overstates the gap without bound — measured on the flood layer's verification, one near-miss
|
|
100
|
+
* read 1.58 m to vertices and 0.009 m to edges, a 9 mm difference overstated 175-fold. Every polygon layer's two-path
|
|
101
|
+
* verification measures its boundary tolerance with this.
|
|
102
|
+
*
|
|
103
|
+
* @category Position
|
|
104
|
+
*/
|
|
105
|
+
export declare function nearestRingEdgeMetres(geometry: {
|
|
106
|
+
type: string;
|
|
107
|
+
coordinates: unknown;
|
|
108
|
+
}, longitude: number, latitude: number): number;
|
|
46
109
|
//# sourceMappingURL=distance.d.ts.map
|
package/out/distance.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distance.d.ts","sourceRoot":"","sources":["../distance.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"distance.d.ts","sourceRoot":"","sources":["../lib/distance.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAGhE;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB;;;CAGnB,CAAA;AAEV;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,OAAO,GAAG,QAAQ,CAAA;AAWvD,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;AAEvD;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;CAI0B,CAAA;AAEpD,MAAM,WAAW,kBAAkB;IAClC,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,eAAe,CAAA;CACtB;AAkBD;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,GAAE,eAAsB,GAAG,MAAM,CAO5G;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAClC,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,aAAa,EACrB,OAAO,GAAE,kBAAuB,GAC9B,MAAM,CAMR;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1F;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,SAAU,CAAA;AAExC;;GAEG;AACH,eAAO,MAAM,UAAU,UAAY,CAAA;AAEnC;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACpC,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,EAAE,EAAE,SAAS,MAAM,EAAE,GACnB,MAAM,CAYR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACpC,QAAQ,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,OAAO,CAAA;CAAE,EAChD,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GACd,MAAM,CAoBR"}
|
package/out/distance.js
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* @file Great-circle distance utilities. This module imports geometry directly so spatial's
|
|
6
6
|
* lowest-level math never reaches back through its public barrel.
|
|
7
7
|
*/
|
|
8
|
-
import { GeoPoint } from "
|
|
8
|
+
import { GeoPoint } from "#geometries/point";
|
|
9
|
+
import { arealPolygons } from "#geometries/polygon";
|
|
9
10
|
/**
|
|
10
11
|
* Conversion factors for converting between degrees and radians.
|
|
11
12
|
*
|
|
@@ -25,6 +26,16 @@ const RADII = {
|
|
|
25
26
|
miles: 3958.8,
|
|
26
27
|
meters: 6_371_000,
|
|
27
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* Mean radii in kilometres. Earth's is the value `RADII` scales to its units; the Moon's and Mars's are the IAU mean
|
|
31
|
+
* radii the USGS planetary products reference (the Moon as a sphere; Mars's mean radius, its DEM being on the areoid).
|
|
32
|
+
* A distance on a body other than Earth is meaningless without one of these.
|
|
33
|
+
*/
|
|
34
|
+
export const BODY_RADII_KM = {
|
|
35
|
+
earth: RADII.km,
|
|
36
|
+
moon: 1737.4,
|
|
37
|
+
mars: 3389.5,
|
|
38
|
+
};
|
|
28
39
|
/**
|
|
29
40
|
* Shared great-circle math with no sentinel handling. `unit` selects the Earth radius.
|
|
30
41
|
*/
|
|
@@ -54,6 +65,18 @@ export function haversine(point1, point2, unit = "km") {
|
|
|
54
65
|
return Number.NaN;
|
|
55
66
|
return greatCircle(p1.latitude, p1.longitude, p2.latitude, p2.longitude, unit);
|
|
56
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Great-circle distance on the named body. {@link haversine} is this function on Earth; a caller with a body passes it
|
|
70
|
+
* here. The Null-Island sentinel of the object form applies: a `(0, 0)` input answers `NaN`.
|
|
71
|
+
*
|
|
72
|
+
* @category Position
|
|
73
|
+
*/
|
|
74
|
+
export function greatCircleDistance(point1, point2, options = {}) {
|
|
75
|
+
const unit = options.unit ?? "km";
|
|
76
|
+
const body = options.body ?? "earth";
|
|
77
|
+
const scale = BODY_RADII_KM[body] / BODY_RADII_KM.earth;
|
|
78
|
+
return haversine(point1, point2, unit) * scale;
|
|
79
|
+
}
|
|
57
80
|
/**
|
|
58
81
|
* Great-circle distance in kilometres between two lat/lon pairs given as raw scalars. The formula's one true home —
|
|
59
82
|
* every resolver + eval consumer of the `(aLat, aLon, bLat, bLon)` shape imports this instead of re-declaring it.
|
|
@@ -67,4 +90,65 @@ export function haversine(point1, point2, unit = "km") {
|
|
|
67
90
|
export function haversineKm(aLat, aLon, bLat, bLon) {
|
|
68
91
|
return greatCircle(aLat, aLon, bLat, bLon, "km");
|
|
69
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Metres per degree of latitude — the scale {@link segmentDistanceMetres} reports in, and the constant the bounding-box
|
|
95
|
+
* estimates in `#h3/polygon-cells` are built on.
|
|
96
|
+
*/
|
|
97
|
+
export const METRES_PER_DEGREE = 111_320;
|
|
98
|
+
/**
|
|
99
|
+
* Square metres in a square kilometre — the conversion every polygon layer's area receipt reports through.
|
|
100
|
+
*/
|
|
101
|
+
export const M2_PER_KM2 = 1_000_000;
|
|
102
|
+
/**
|
|
103
|
+
* Metres from a point to a line SEGMENT, with longitude scaled for the latitude so the two axes are comparable.
|
|
104
|
+
*
|
|
105
|
+
* MEASURE TO THE EDGE, NOT TO THE NEAREST VERTEX. A point a centimetre from a long edge can be metres from every vertex
|
|
106
|
+
* of it, so a vertex distance overstates the gap without bound — measured on the flood layer's verification, one
|
|
107
|
+
* near-miss read 1.58 m to vertices and 0.009 m to edges, a 9 mm difference overstated 175-fold. That is the difference
|
|
108
|
+
* between "two channels rendered the same edge slightly differently" and "the conversion is wrong".
|
|
109
|
+
*
|
|
110
|
+
* The longitude scaling matters at the same scale: comparing raw degrees treats a degree of longitude as a degree of
|
|
111
|
+
* latitude, which at 54°N overstates east-west distance by 70%.
|
|
112
|
+
*
|
|
113
|
+
* @category Position
|
|
114
|
+
*/
|
|
115
|
+
export function segmentDistanceMetres(lon, lat, from, to) {
|
|
116
|
+
const scale = Math.cos((lat * Math.PI) / 180);
|
|
117
|
+
const px = (lon - from[0]) * scale;
|
|
118
|
+
const py = lat - from[1];
|
|
119
|
+
const vx = (to[0] - from[0]) * scale;
|
|
120
|
+
const vy = to[1] - from[1];
|
|
121
|
+
const lengthSquared = vx * vx + vy * vy;
|
|
122
|
+
// A zero-length segment is a repeated vertex; the distance to it is the distance to the point.
|
|
123
|
+
const t = lengthSquared === 0 ? 0 : Math.max(0, Math.min(1, (px * vx + py * vy) / lengthSquared));
|
|
124
|
+
return Math.hypot(px - t * vx, py - t * vy) * METRES_PER_DEGREE;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Metres from a point to the nearest ring EDGE of an areal geometry — `Infinity` when the geometry bounds no area or
|
|
128
|
+
* carries no segment.
|
|
129
|
+
*
|
|
130
|
+
* To the edge, not to the nearest vertex: a point a centimetre from a long edge can be metres from every vertex of it,
|
|
131
|
+
* so a vertex distance overstates the gap without bound — measured on the flood layer's verification, one near-miss
|
|
132
|
+
* read 1.58 m to vertices and 0.009 m to edges, a 9 mm difference overstated 175-fold. Every polygon layer's two-path
|
|
133
|
+
* verification measures its boundary tolerance with this.
|
|
134
|
+
*
|
|
135
|
+
* @category Position
|
|
136
|
+
*/
|
|
137
|
+
export function nearestRingEdgeMetres(geometry, longitude, latitude) {
|
|
138
|
+
const polygons = arealPolygons(geometry);
|
|
139
|
+
let nearest = Infinity;
|
|
140
|
+
if (!polygons)
|
|
141
|
+
return nearest;
|
|
142
|
+
for (const rings of polygons) {
|
|
143
|
+
for (const ring of rings) {
|
|
144
|
+
for (let index = 1; index < ring.length; index++) {
|
|
145
|
+
const distance = segmentDistanceMetres(longitude, latitude, ring[index - 1], ring[index]);
|
|
146
|
+
if (distance < nearest) {
|
|
147
|
+
nearest = distance;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return nearest;
|
|
153
|
+
}
|
|
70
154
|
//# sourceMappingURL=distance.js.map
|
package/out/distance.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distance.js","sourceRoot":"","sources":["../distance.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAsB,MAAM,
|
|
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;IAC/B,gBAAgB,EAAE,GAAG,GAAG,IAAI,CAAC,EAAE;CACtB,CAAA;AAOV;;GAEG;AACH,MAAM,KAAK,GAAG;IACb,EAAE,EAAE,IAAI;IACR,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,SAAS;CACkC,CAAA;AAIpD;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B,KAAK,EAAE,KAAK,CAAC,EAAE;IACf,IAAI,EA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O,GAAG,QAAQ,CAAA;gBACnB,CAAC;YACF,CAAC;QACF,CAAC;IACF,CAAC;IAED,OAAO,OAAO,CAAA;AACf,CAAC"}
|
package/out/feature.d.ts
CHANGED
package/out/feature.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../feature.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
|
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,CAAC,GAAG,eAAe,EAAE,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACpH;;OAEG;IACH,IAAI,EAAE,mBAAmB,CAAA;IAEzB;;OAEG;IACH,QAAQ,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAA;CAC5B;AAED;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,CAAC,CAAC,IACtC,CAAC,SAAS,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,GACnC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC1B,CAAC,SAAS,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,GACvC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC1B,KAAK,CAAA;AAEV;;GAEG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI,CAAC,SAAS,oBAAoB,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAE5F;;GAEG;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,UAAU,IAAI,oBAAoB,CAC/E,mBAAmB,CAAC,CAAC,CAAC,EACtB,qBAAqB,CAAC,CAAC,CAAC,CACxB,CAAA"}
|
package/out/feature.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../feature.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../lib/feature.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*
|
|
6
6
|
* GeoJSON Geometry Collection
|
|
7
7
|
*/
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
8
|
+
import type { LineStringLiteral, MultiLineStringLiteral } from "#geometries/line-string";
|
|
9
|
+
import type { MultiPointLiteral, PointLiteral } from "#geometries/point";
|
|
10
|
+
import type { MultiPolygonLiteral, PolygonLiteral } from "#geometries/polygon";
|
|
11
|
+
import type { GeoObjectLiteral } from "#objects";
|
|
12
12
|
/**
|
|
13
13
|
* Union of the GeoJSON geometry types.
|
|
14
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../geometries/collection.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../lib/geometries/collection.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AACxF,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD;;GAEG;AACH,MAAM,MAAM,eAAe,GACxB,YAAY,GACZ,iBAAiB,GACjB,iBAAiB,GACjB,sBAAsB,GACtB,cAAc,GACd,mBAAmB,CAAA;AAEtB;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IAC3D;;OAEG;IACH,IAAI,EAAE,oBAAoB,CAAA;IAC1B;;OAEG;IACH,UAAU,EAAE,eAAe,EAAE,CAAA;CAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.js","sourceRoot":"","sources":["../../geometries/collection.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
1
|
+
{"version":3,"file":"collection.js","sourceRoot":"","sources":["../../lib/geometries/collection.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* GeoJSON Geometry Entry Point
|
|
7
7
|
*/
|
|
8
|
-
export * from "
|
|
9
|
-
export * from "
|
|
10
|
-
export * from "
|
|
11
|
-
export * from "
|
|
8
|
+
export * from "#geometries/collection";
|
|
9
|
+
export * from "#geometries/line-string";
|
|
10
|
+
export * from "#geometries/point";
|
|
11
|
+
export * from "#geometries/polygon";
|
|
12
|
+
export * from "#geometries/ring-blob";
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../geometries/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,
|
|
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"}
|
package/out/geometries/index.js
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* GeoJSON Geometry Entry Point
|
|
7
7
|
*/
|
|
8
|
-
export * from "
|
|
9
|
-
export * from "
|
|
10
|
-
export * from "
|
|
11
|
-
export * from "
|
|
8
|
+
export * from "#geometries/collection";
|
|
9
|
+
export * from "#geometries/line-string";
|
|
10
|
+
export * from "#geometries/point";
|
|
11
|
+
export * from "#geometries/polygon";
|
|
12
|
+
export * from "#geometries/ring-blob";
|
|
12
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../geometries/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,
|
|
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"}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*
|
|
6
6
|
* GeoJSON Line String
|
|
7
7
|
*/
|
|
8
|
-
import type { GeoObjectLiteral } from "
|
|
9
|
-
import type { Coordinates2D, Coordinates3D } from "
|
|
8
|
+
import type { GeoObjectLiteral } from "#objects";
|
|
9
|
+
import type { Coordinates2D, Coordinates3D } from "#position";
|
|
10
10
|
/**
|
|
11
11
|
* An array of positions forming a line, such as a road or a path.
|
|
12
12
|
*/
|
|
@@ -22,7 +22,7 @@ export interface LineStringLiteral extends GeoObjectLiteral {
|
|
|
22
22
|
/**
|
|
23
23
|
* An array of positions for each point in the geometry.
|
|
24
24
|
*
|
|
25
|
-
* @see {@linkcode
|
|
25
|
+
* @see {@linkcode Coordinates2D} for more information.
|
|
26
26
|
*/
|
|
27
27
|
coordinates: LineStringPath;
|
|
28
28
|
}
|
|
@@ -37,7 +37,7 @@ export interface MultiLineStringLiteral extends GeoObjectLiteral {
|
|
|
37
37
|
/**
|
|
38
38
|
* An array for each line in the geometry.
|
|
39
39
|
*
|
|
40
|
-
* @see {@linkcode
|
|
40
|
+
* @see {@linkcode Coordinates2D} for more information.
|
|
41
41
|
*/
|
|
42
42
|
coordinates: LineStringPath[];
|
|
43
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line-string.d.ts","sourceRoot":"","sources":["../../geometries/line-string.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"line-string.d.ts","sourceRoot":"","sources":["../../lib/geometries/line-string.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAE7D;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,aAAa,GAAG,aAAa,CAAC,CAAC,CAAA;AAE9E;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IAC1D;;OAEG;IACH,IAAI,EAAE,YAAY,CAAA;IAClB;;;;OAIG;IACH,WAAW,EAAE,cAAc,CAAA;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC/D;;OAEG;IACH,IAAI,EAAE,iBAAiB,CAAA;IACvB;;;;OAIG;IACH,WAAW,EAAE,cAAc,EAAE,CAAA;CAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line-string.js","sourceRoot":"","sources":["../../geometries/line-string.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
1
|
+
{"version":3,"file":"line-string.js","sourceRoot":"","sources":["../../lib/geometries/line-string.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type google from "@googlemaps/google-maps-services-js";
|
|
7
7
|
import type { LatLng, LatLngLiteral } from "@googlemaps/google-maps-services-js";
|
|
8
|
-
import { type BBox2DLiteral, type BBox3DLiteral, GeoBoundingBox } from "
|
|
9
|
-
import { type H3Cell } from "
|
|
10
|
-
import { type GeoObjectLiteral } from "
|
|
11
|
-
import { type InternalPointCoordinates, type Coordinates2D as Point2DCoordinates, type Coordinates3D as Point3DCoordinates } from "
|
|
8
|
+
import { type BBox2DLiteral, type BBox3DLiteral, GeoBoundingBox } from "#bbox";
|
|
9
|
+
import { type H3Cell } from "#h3/cell";
|
|
10
|
+
import { type GeoObjectLiteral } from "#objects";
|
|
11
|
+
import { type InternalPointCoordinates, type Coordinates2D as Point2DCoordinates, type Coordinates3D as Point3DCoordinates } from "#position";
|
|
12
12
|
/**
|
|
13
13
|
* A JSON-serializeable single point geometry, such as a specific location, address, or longitude, latitude pair.
|
|
14
14
|
*
|
|
@@ -49,7 +49,8 @@ export interface GeolocationCoordinatesLike {
|
|
|
49
49
|
altitude: number;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
-
* Type-predicate to determine if the given input appears to be a {@linkcode
|
|
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
54
|
*/
|
|
54
55
|
export declare function isGeolocationCoordinatesLike(input: unknown): input is GeolocationCoordinatesLike;
|
|
55
56
|
export type GeoPointInput = PointLiteral | Point2DCoordinates | Point3DCoordinates | GeolocationCoordinatesLike | InternalPointCoordinates | LatLngLiteral | LatLng;
|
|
@@ -82,7 +83,7 @@ export declare class GeoPoint implements PointLiteral {
|
|
|
82
83
|
/**
|
|
83
84
|
* Assigns the pair as GeoJSON [longitude, latitude(, altitude)] — the axis order is the contract, never inferred from
|
|
84
85
|
* the magnitudes — and REJECTS a coordinate that is not on the globe. See {@link GeoPoint.from} for why both halves of
|
|
85
|
-
* that sentence are
|
|
86
|
+
* that sentence are required.
|
|
86
87
|
*
|
|
87
88
|
* @throws {RangeError} When longitude is outside [-180, 180] or latitude is outside [-90, 90].
|
|
88
89
|
*/
|
|
@@ -119,7 +120,7 @@ export declare class GeoPoint implements PointLiteral {
|
|
|
119
120
|
*/
|
|
120
121
|
constructor();
|
|
121
122
|
/**
|
|
122
|
-
* Create a new GeoPoint instance from another {@linkcode
|
|
123
|
+
* Create a new GeoPoint instance from another {@linkcode Point2DCoordinates} coordinates.
|
|
123
124
|
*/
|
|
124
125
|
constructor(geoJSONPosition: Point2DCoordinates | Point3DCoordinates, bbox?: BBox2DLiteral | BBox3DLiteral | GeoBoundingBox);
|
|
125
126
|
/**
|
|
@@ -161,9 +162,9 @@ export declare class GeoPoint implements PointLiteral {
|
|
|
161
162
|
* Dallas and left corrupted in Berlin — behaviour selected by the data, from one code path. This change is a no-op
|
|
162
163
|
* for every WELL-FORMED input: a valid `[longitude, latitude]` pair can never have an out-of-range second element,
|
|
163
164
|
* so the heuristic never fired on one.
|
|
164
|
-
* 2. **An out-of-range magnitude is rejected, not repaired.** `[999, 999]` used to produce a GeoPoint reporting latitude
|
|
165
|
-
*
|
|
166
|
-
*
|
|
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,
|
|
167
168
|
* where 190° meaning -170° is right; PARSING one is a claim about the world, where an impossible magnitude means
|
|
168
169
|
* the input was malformed and any repair invents a location.
|
|
169
170
|
*
|
|
@@ -200,14 +201,14 @@ export declare class GeoPoint implements PointLiteral {
|
|
|
200
201
|
/**
|
|
201
202
|
* Converts the GeoPoint to a H3 short cell address.
|
|
202
203
|
*/
|
|
203
|
-
toH3ShortCell(resolution?: number): import("
|
|
204
|
+
toH3ShortCell(resolution?: number): import("#h3/cell").H3CellShort;
|
|
204
205
|
toString(): string;
|
|
205
206
|
[Symbol.iterator](): Iterator<number>;
|
|
206
207
|
}
|
|
207
208
|
/**
|
|
208
209
|
* An array of positions for each point in the geometry.
|
|
209
210
|
*
|
|
210
|
-
* @see {@linkcode
|
|
211
|
+
* @see {@linkcode Point2DCoordinates} for more information.
|
|
211
212
|
*/
|
|
212
213
|
export type MultiPointPath = [...points: Array<Point2DCoordinates | Point3DCoordinates>];
|
|
213
214
|
/**
|
|
@@ -221,7 +222,7 @@ export interface MultiPointLiteral extends GeoObjectLiteral {
|
|
|
221
222
|
/**
|
|
222
223
|
* An array of positions for each point in the geometry.
|
|
223
224
|
*
|
|
224
|
-
* @see {@linkcode
|
|
225
|
+
* @see {@linkcode Point2DCoordinates} for more information.
|
|
225
226
|
*/
|
|
226
227
|
coordinates: MultiPointPath;
|
|
227
228
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../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,
|
|
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,OAAO,CAAA;AACtF,OAAO,EAAE,KAAK,MAAM,EAAiB,MAAM,UAAU,CAAA;AACrD,OAAO,EAAE,KAAK,gBAAgB,EAAgB,MAAM,UAAU,CAAA;AAC9D,OAAO,EACN,KAAK,wBAAwB,EAC7B,KAAK,aAAa,IAAI,kBAAkB,EACxC,KAAK,aAAa,IAAI,kBAAkB,EAQxC,MAAM,WAAW,CAAA;AAElB;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,YAAa,SAAQ,gBAAgB;IACrD;;OAEG;IACH,IAAI,EAAE,OAAO,CAAA;IACb;;;;OAIG;IACH,WAAW,EAAE,kBAAkB,GAAG,kBAAkB,CAAA;CACpD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,G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AG,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"}
|
package/out/geometries/point.js
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*/
|
|
6
|
-
import { tryParsingJSON } from "@mailwoman/core/
|
|
6
|
+
import { tryParsingJSON } from "@mailwoman/core/json";
|
|
7
7
|
import { convert as convertCoords } from "geo-coordinates-parser";
|
|
8
8
|
import { latLngToCell } from "h3-js";
|
|
9
|
-
import { GeoBoundingBox, isBBox } from "
|
|
10
|
-
import { shortenH3Cell } from "
|
|
11
|
-
import { GeometryType } from "
|
|
12
|
-
import { clampLatitude, isCoordPairLiteral, isGoogleMapsLatLngLiteral, isInterpolatedCoordinates, isValidLatitude, isValidLongitude, wrapLongitude, } from "
|
|
9
|
+
import { GeoBoundingBox, isBBox } from "#bbox";
|
|
10
|
+
import { shortenH3Cell } from "#h3/cell";
|
|
11
|
+
import { GeometryType } from "#objects";
|
|
12
|
+
import { clampLatitude, isCoordPairLiteral, isGoogleMapsLatLngLiteral, isInterpolatedCoordinates, isValidLatitude, isValidLongitude, wrapLongitude, } from "#position";
|
|
13
13
|
/**
|
|
14
14
|
* Type-predicate to determine if the given input is a GeoJSON Point geometry.
|
|
15
15
|
*/
|
|
@@ -25,7 +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
|
|
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.
|
|
29
30
|
*/
|
|
30
31
|
export function isGeolocationCoordinatesLike(input) {
|
|
31
32
|
if (!input || typeof input !== "object")
|
|
@@ -77,7 +78,7 @@ export class GeoPoint {
|
|
|
77
78
|
/**
|
|
78
79
|
* Assigns the pair as GeoJSON [longitude, latitude(, altitude)] — the axis order is the contract, never inferred from
|
|
79
80
|
* the magnitudes — and REJECTS a coordinate that is not on the globe. See {@link GeoPoint.from} for why both halves of
|
|
80
|
-
* that sentence are
|
|
81
|
+
* that sentence are required.
|
|
81
82
|
*
|
|
82
83
|
* @throws {RangeError} When longitude is outside [-180, 180] or latitude is outside [-90, 90].
|
|
83
84
|
*/
|
|
@@ -171,9 +172,9 @@ export class GeoPoint {
|
|
|
171
172
|
* Dallas and left corrupted in Berlin — behaviour selected by the data, from one code path. This change is a no-op
|
|
172
173
|
* for every WELL-FORMED input: a valid `[longitude, latitude]` pair can never have an out-of-range second element,
|
|
173
174
|
* so the heuristic never fired on one.
|
|
174
|
-
* 2. **An out-of-range magnitude is rejected, not repaired.** `[999, 999]` used to produce a GeoPoint reporting latitude
|
|
175
|
-
*
|
|
176
|
-
*
|
|
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,
|
|
177
178
|
* where 190° meaning -170° is right; PARSING one is a claim about the world, where an impossible magnitude means
|
|
178
179
|
* the input was malformed and any repair invents a location.
|
|
179
180
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"point.js","sourceRoot":"","sources":["../../geometries/point.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"point.js","sourceRoot":"","sources":["../../lib/geomet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