@kalisio/common-geospatial 0.7.0 → 0.8.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/dist/index.mjs CHANGED
@@ -1,154 +1,156 @@
1
- import { assert as u, is as i, has as A, conform as T, optional as $ } from "@kalisio/common-core";
2
- import { getLogger as Q } from "@logtape/logtape";
3
- import { Heap as fe } from "heap-js";
4
- import me from "@turf/truncate";
5
- import de from "@turf/boolean-clockwise";
6
- import pe from "@turf/kinks";
1
+ import { assert as u, is as i, has as w, conform as E, optional as p } from "@kalisio/common-core";
2
+ import { coordAll as R } from "@turf/meta";
3
+ import { convex as de } from "@turf/convex";
4
+ import { featureCollection as ve, feature as he } from "@turf/helpers";
5
+ import { Heap as pe } from "heap-js";
6
+ import Ee from "@turf/truncate";
7
+ import ye from "@turf/boolean-clockwise";
8
+ import Oe from "@turf/kinks";
7
9
  const d = {
8
10
  LATITUDE: "LAT",
9
11
  LONGITUDE: "LON",
10
12
  ALTITUDE: "ALT"
11
13
  };
12
- function ve(e) {
14
+ function Te(e) {
13
15
  return u.that(e, i.string, "axis must be a string"), Object.values(d).includes(e);
14
16
  }
15
- function M(e) {
17
+ function k(e) {
16
18
  return u.that(e, i.string, "axis must be a string"), e === d.LATITUDE;
17
19
  }
18
- function Z(e) {
20
+ function ne(e) {
19
21
  return u.that(e, i.string, "axis must be a string"), e === d.LONGITUDE;
20
22
  }
21
- function ut(e) {
23
+ function Ot(e) {
22
24
  return u.that(e, i.string, "axis must be a string"), e === d.ALTITUDE;
23
25
  }
24
- const Ee = { NORTH: { label: "Nord", symbol: "N" }, SOUTH: { label: "Sud", symbol: "S" }, EAST: { label: "Est", symbol: "E" }, WEST: { label: "Ouest", symbol: "O" } }, be = {
25
- DIRECTIONS: Ee
26
- }, he = { NORTH: { label: "North", symbol: "N" }, SOUTH: { label: "South", symbol: "S" }, EAST: { label: "East", symbol: "E" }, WEST: { label: "West", symbol: "W" } }, ye = {
27
- DIRECTIONS: he
28
- }, Oe = {
26
+ const Ie = { NORTH: { label: "Nord", symbol: "N" }, SOUTH: { label: "Sud", symbol: "S" }, EAST: { label: "Est", symbol: "E" }, WEST: { label: "Ouest", symbol: "O" } }, Le = {
27
+ DIRECTIONS: Ie
28
+ }, Se = { NORTH: { label: "North", symbol: "N" }, SOUTH: { label: "South", symbol: "S" }, EAST: { label: "East", symbol: "E" }, WEST: { label: "West", symbol: "W" } }, be = {
29
+ DIRECTIONS: Se
30
+ }, De = {
29
31
  DIRECTIONS: {
30
32
  NORTH: { label: i.string, symbol: i.char },
31
33
  SOUTH: { label: i.string, symbol: i.char },
32
34
  EAST: { label: i.string, symbol: i.char },
33
35
  WEST: { label: i.string, symbol: i.char }
34
36
  }
35
- }, h = {
36
- en: ye,
37
- fr: be
37
+ }, I = {
38
+ en: be,
39
+ fr: Le
38
40
  };
39
- let O = "en";
40
- const Y = "en";
41
- function lt() {
42
- return Object.keys(h);
41
+ let S = "en";
42
+ const z = "en";
43
+ function Tt() {
44
+ return Object.keys(I);
43
45
  }
44
- function ct(e, t) {
46
+ function It(e, t) {
45
47
  u.all([
46
48
  { value: e, validator: i.string, message: "code must be a string" },
47
- { value: e, validator: (r) => !A.key(h, r), message: "locale already registered" },
49
+ { value: e, validator: (n) => !w.key(I, n), message: "locale already registered" },
48
50
  { value: t, validator: i.plainObject, message: "content must be an object" },
49
- { value: t, validator: (r) => T.schema(r, Oe), message: "content does not conform to schema" }
50
- ]), h[e] = t;
51
+ { value: t, validator: (n) => E.schema(n, De), message: "content does not conform to schema" }
52
+ ]), I[e] = t;
51
53
  }
52
- function gt(e) {
54
+ function Lt(e) {
53
55
  u.all([
54
56
  { value: e, validator: i.string, message: "code must be a string" },
55
- { value: e, validator: (t) => A.key(h, t), message: "code is unknown" }
56
- ]), O = e;
57
+ { value: e, validator: (t) => w.key(I, t), message: "code is unknown" }
58
+ ]), S = e;
57
59
  }
58
- function Te() {
59
- return O;
60
+ function Re() {
61
+ return S;
60
62
  }
61
- function U(e) {
63
+ function B(e) {
62
64
  return u.all([
63
65
  { value: e, validator: i.string, message: "code must be a string" },
64
- { value: e, validator: (t) => A.key(h, t), message: "code is unknown" }
65
- ]), h[e];
66
+ { value: e, validator: (t) => w.key(I, t), message: "code is unknown" }
67
+ ]), I[e];
66
68
  }
67
- function J() {
68
- return O === Y ? [O] : [O, Y];
69
+ function re() {
70
+ return S === z ? [S] : [S, z];
69
71
  }
70
- function _(e) {
72
+ function H(e) {
71
73
  const t = /* @__PURE__ */ new Set();
72
- for (const r of J()) {
73
- const { DIRECTIONS: n } = U(r);
74
- for (const s of e) t.add(n[s].symbol);
74
+ for (const n of re()) {
75
+ const { DIRECTIONS: r } = B(n);
76
+ for (const a of e) t.add(r[a].symbol);
75
77
  }
76
78
  return [...t];
77
79
  }
78
- function Ie() {
79
- return _(["NORTH", "SOUTH"]);
80
+ function Ae() {
81
+ return H(["NORTH", "SOUTH"]);
80
82
  }
81
- function Le() {
82
- return _(["EAST", "WEST"]);
83
+ function Me() {
84
+ return H(["EAST", "WEST"]);
83
85
  }
84
- function F() {
85
- return _(["NORTH", "SOUTH", "EAST", "WEST"]);
86
+ function j() {
87
+ return H(["NORTH", "SOUTH", "EAST", "WEST"]);
86
88
  }
87
- function I() {
88
- return U(Te()).DIRECTIONS;
89
+ function b() {
90
+ return B(Re()).DIRECTIONS;
89
91
  }
90
- function w(e, t) {
91
- const r = t.toUpperCase();
92
- return J().some((n) => {
93
- const { label: s, symbol: o } = U(n).DIRECTIONS[e];
94
- return r === s.toUpperCase() || r === o.toUpperCase();
92
+ function _(e, t) {
93
+ const n = t.toUpperCase();
94
+ return re().some((r) => {
95
+ const { label: a, symbol: s } = B(r).DIRECTIONS[e];
96
+ return n === a.toUpperCase() || n === s.toUpperCase();
95
97
  });
96
98
  }
97
- function ft(e = null) {
98
- const t = I();
99
- return i.defined(e) ? (u.that(e, ve, "axis must be a valid axis"), M(e) ? [t.SOUTH, t.NORTH] : Z(e) ? [t.EAST, t.WEST] : []) : [t.SOUTH, t.NORTH, t.EAST, t.WEST];
99
+ function St(e = null) {
100
+ const t = b();
101
+ return i.defined(e) ? (u.that(e, Te, "axis must be a valid axis"), k(e) ? [t.SOUTH, t.NORTH] : ne(e) ? [t.EAST, t.WEST] : []) : [t.SOUTH, t.NORTH, t.EAST, t.WEST];
100
102
  }
101
- function mt() {
102
- return I().NORTH;
103
+ function bt() {
104
+ return b().NORTH;
103
105
  }
104
- function dt() {
105
- return I().SOUTH;
106
+ function Dt() {
107
+ return b().SOUTH;
106
108
  }
107
- function pt() {
108
- return I().EAST;
109
+ function Rt() {
110
+ return b().EAST;
109
111
  }
110
- function vt() {
111
- return I().WEST;
112
+ function At() {
113
+ return b().WEST;
112
114
  }
113
- function E(e) {
114
- return u.that(e, i.string, "dir must be a string"), Se(e) || ee(e) || k(e) || C(e);
115
+ function O(e) {
116
+ return u.that(e, i.string, "dir must be a string"), Ce(e) || ie(e) || V(e) || $(e);
115
117
  }
116
- function Se(e) {
117
- return u.that(e, i.string, "dir must be a string"), w("NORTH", e);
118
+ function Ce(e) {
119
+ return u.that(e, i.string, "dir must be a string"), _("NORTH", e);
118
120
  }
119
- function ee(e) {
120
- return u.that(e, i.string, "dir must be a string"), w("SOUTH", e);
121
+ function ie(e) {
122
+ return u.that(e, i.string, "dir must be a string"), _("SOUTH", e);
121
123
  }
122
- function k(e) {
123
- return u.that(e, i.string, "dir must be a string"), w("EAST", e);
124
+ function V(e) {
125
+ return u.that(e, i.string, "dir must be a string"), _("EAST", e);
124
126
  }
125
- function C(e) {
126
- return u.that(e, i.string, "dir must be a string"), w("WEST", e);
127
+ function $(e) {
128
+ return u.that(e, i.string, "dir must be a string"), _("WEST", e);
127
129
  }
128
- function Re(e) {
129
- return u.that(e, E, "dir must be a direction"), C(e) || k(e) ? d.LONGITUDE : d.LATITUDE;
130
+ function Ne(e) {
131
+ return u.that(e, O, "dir must be a direction"), $(e) || V(e) ? d.LONGITUDE : d.LATITUDE;
130
132
  }
131
- const De = {
133
+ const we = {
132
134
  degrees: i.number,
133
- direction: $(E)
134
- }, Ae = /^(-?\d{1,3}(?:\.\d+)?)°?$/;
135
- function we() {
136
- return new RegExp(`^(\\d{1,3}(?:\\.\\d+)?)°?([${F()}])$`, "i");
137
- }
138
- function L(e) {
139
- let t = null, r = null;
140
- if (i.plainObject(e) && T.schema(e, De))
141
- i.defined(e.direction) ? e.degrees >= 0 && (t = e.degrees, r = e.direction) : t = e.degrees;
135
+ direction: p(O)
136
+ }, _e = /^(-?\d{1,3}(?:\.\d+)?)°?$/;
137
+ function $e() {
138
+ return new RegExp(`^(\\d{1,3}(?:\\.\\d+)?)°?([${j()}])$`, "i");
139
+ }
140
+ function D(e) {
141
+ let t = null, n = null;
142
+ if (i.plainObject(e) && E.schema(e, we))
143
+ i.defined(e.direction) ? e.degrees >= 0 && (t = e.degrees, n = e.direction) : t = e.degrees;
142
144
  else if (i.string(e)) {
143
- const n = e.replace(/\s+/g, ""), s = n.match(Ae) ?? n.match(we());
144
- s && (t = parseFloat(s[1]), r = s[2] ?? null);
145
+ const r = e.replace(/\s+/g, ""), a = r.match(_e) ?? r.match($e());
146
+ a && (t = parseFloat(a[1]), n = a[2] ?? null);
145
147
  }
146
148
  return {
147
149
  get degrees() {
148
150
  return t;
149
151
  },
150
152
  get direction() {
151
- return r;
153
+ return n;
152
154
  },
153
155
  get format() {
154
156
  return "DD";
@@ -156,261 +158,382 @@ function L(e) {
156
158
  isValid() {
157
159
  return i.number(t);
158
160
  },
159
- toString(n) {
160
- if (u.that(n, i.positiveInteger, "decimalPlaces must be a positive integer"), !this.isValid()) return "";
161
- let s = `${t.toFixed(n)}°`;
162
- return r && (s += ` ${r}`), s;
161
+ toString(r) {
162
+ if (u.that(r, i.positiveInteger, "decimalPlaces must be a positive integer"), !this.isValid()) return "";
163
+ let a = `${t.toFixed(r)}°`;
164
+ return n && (a += ` ${n}`), a;
163
165
  },
164
166
  toDecimal() {
165
- return this.isValid() ? L({ degrees: t, direction: r }) : null;
167
+ return this.isValid() ? D({ degrees: t, direction: n }) : null;
166
168
  }
167
169
  };
168
170
  }
169
- const Ce = {
171
+ const Fe = {
170
172
  degrees: i.integer,
171
173
  minutes: (e) => i.inRangeExclusiveMax(e, 0, 60),
172
- direction: $(E)
173
- }, Ne = /^(-?\d{1,3})°(\d{1,2}(?:\.\d+)?)'?$/;
174
- function Me() {
175
- return new RegExp(`^(\\d{1,3})°(\\d{1,2}(?:\\.\\d+)?)'?([${F().join("")}])$`, "i");
174
+ direction: p(O)
175
+ }, xe = /^(-?\d{1,3})°(\d{1,2}(?:\.\d+)?)'?$/;
176
+ function Ue() {
177
+ return new RegExp(`^(\\d{1,3})°(\\d{1,2}(?:\\.\\d+)?)'?([${j().join("")}])$`, "i");
176
178
  }
177
- function te(e) {
178
- let t = null, r = null, n = null;
179
- if (i.plainObject(e) && T.schema(e, Ce))
180
- i.defined(e.direction) ? e.degrees >= 0 && (t = e.degrees, r = e.minutes, n = e.direction) : (t = e.degrees, r = e.minutes);
179
+ function ae(e) {
180
+ let t = null, n = null, r = null;
181
+ if (i.plainObject(e) && E.schema(e, Fe))
182
+ i.defined(e.direction) ? e.degrees >= 0 && (t = e.degrees, n = e.minutes, r = e.direction) : (t = e.degrees, n = e.minutes);
181
183
  else if (i.string(e)) {
182
- const s = e.replace(/\s+/g, ""), o = s.match(Ne) ?? s.match(Me());
183
- o && (t = parseFloat(o[1]), r = parseFloat(o[2]), n = o[3] ?? null);
184
+ const a = e.replace(/\s+/g, ""), s = a.match(xe) ?? a.match(Ue());
185
+ s && (t = parseFloat(s[1]), n = parseFloat(s[2]), r = s[3] ?? null);
184
186
  }
185
187
  return {
186
188
  get degrees() {
187
189
  return t;
188
190
  },
189
191
  get minutes() {
190
- return r;
192
+ return n;
191
193
  },
192
194
  get direction() {
193
- return n;
195
+ return r;
194
196
  },
195
197
  get format() {
196
198
  return "DDM";
197
199
  },
198
200
  isValid() {
199
- return i.integer(t) && i.inRangeExclusiveMax(r, 0, 60);
201
+ return i.integer(t) && i.inRangeExclusiveMax(n, 0, 60);
200
202
  },
201
- toString(s) {
202
- if (u.that(s, i.positiveInteger, "decimalPlaces must be a positive integer"), !this.isValid()) return "";
203
- let o = `${t}° ${r.toFixed(s)}'`;
204
- return n && (o += ` ${n}`), o;
203
+ toString(a) {
204
+ if (u.that(a, i.positiveInteger, "decimalPlaces must be a positive integer"), !this.isValid()) return "";
205
+ let s = `${t}° ${n.toFixed(a)}'`;
206
+ return r && (s += ` ${r}`), s;
205
207
  },
206
208
  toDecimal() {
207
- return this.isValid() ? L({ degrees: t + r / 60, direction: n }) : null;
209
+ return this.isValid() ? D({ degrees: t + n / 60, direction: r }) : null;
208
210
  }
209
211
  };
210
212
  }
211
- const xe = {
213
+ const Ge = {
212
214
  degrees: i.nonNegativeInteger,
213
215
  minutes: (e) => i.inRangeExclusiveMax(e, 0, 60),
214
- direction: E
216
+ direction: O
215
217
  };
216
- function $e() {
217
- return new RegExp(`^(\\d{2})(\\d{3})([${Ie().join("")}])$`, "i");
218
+ function ke() {
219
+ return new RegExp(`^(\\d{2})(\\d{3})([${Ae().join("")}])$`, "i");
218
220
  }
219
- function Ue() {
220
- return new RegExp(`^(\\d{3})(\\d{3})([${Le().join("")}])$`, "i");
221
+ function Pe() {
222
+ return new RegExp(`^(\\d{3})(\\d{3})([${Me().join("")}])$`, "i");
221
223
  }
222
- function ne(e) {
223
- let t = null, r = null, n = null;
224
- if (i.plainObject(e) && T.schema(e, xe))
225
- t = e.degrees, r = e.minutes, n = e.direction;
224
+ function se(e) {
225
+ let t = null, n = null, r = null;
226
+ if (i.plainObject(e) && E.schema(e, Ge))
227
+ t = e.degrees, n = e.minutes, r = e.direction;
226
228
  else if (i.string(e)) {
227
- const s = e.trim(), o = s.match($e()) ?? s.match(Ue());
228
- o && (t = parseFloat(o[1]), r = parseFloat(o[2]) / 10, n = o[3]);
229
+ const a = e.trim(), s = a.match(ke()) ?? a.match(Pe());
230
+ s && (t = parseFloat(s[1]), n = parseFloat(s[2]) / 10, r = s[3]);
229
231
  }
230
232
  return {
231
233
  get degrees() {
232
234
  return t;
233
235
  },
234
236
  get minutes() {
235
- return r;
237
+ return n;
236
238
  },
237
239
  get direction() {
238
- return n;
240
+ return r;
239
241
  },
240
242
  get format() {
241
243
  return "DDM_AERO";
242
244
  },
243
245
  isValid() {
244
- return i.nonNegativeInteger(t) && i.inRangeExclusiveMax(r, 0, 60) && E(n);
246
+ return i.nonNegativeInteger(t) && i.inRangeExclusiveMax(n, 0, 60) && O(r);
245
247
  },
246
248
  toString() {
247
249
  if (!this.isValid()) return "";
248
- const s = k(n) || C(n), o = String(t).padStart(s ? 3 : 2, "0"), l = Math.floor(r * 10).toString().padStart(3, "0");
249
- return `${o}${l}${n}`;
250
+ const a = V(r) || $(r), s = String(t).padStart(a ? 3 : 2, "0"), l = Math.floor(n * 10).toString().padStart(3, "0");
251
+ return `${s}${l}${r}`;
250
252
  },
251
253
  toDecimal() {
252
- return this.isValid() ? L({ degrees: t + r / 60, direction: n }) : null;
254
+ return this.isValid() ? D({ degrees: t + n / 60, direction: r }) : null;
253
255
  }
254
256
  };
255
257
  }
256
- const _e = {
258
+ const Be = {
257
259
  degrees: i.integer,
258
260
  minutes: (e) => i.integer(e) && i.inRange(e, 0, 59),
259
261
  seconds: (e) => i.inRangeExclusiveMax(e, 0, 60),
260
- direction: $(E)
261
- }, Fe = /^(-?\d{1,3})°(\d{1,2})'(\d{1,2}(?:\.\d+)?)"?$/;
262
- function ke() {
263
- return new RegExp(`^(\\d{1,3})°(\\d{1,2})'(\\d{1,2}(?:\\.\\d+)?)"?([${F().join("")}])$`, "i");
264
- }
265
- function re(e) {
266
- let t = null, r = null, n = null, s = null;
267
- if (i.plainObject(e) && T.schema(e, _e))
268
- i.defined(e.direction) ? e.degrees >= 0 && (t = e.degrees, r = e.minutes, n = e.seconds, s = e.direction) : (t = e.degrees, r = e.minutes, n = e.seconds);
262
+ direction: p(O)
263
+ }, He = /^(-?\d{1,3})°(\d{1,2})'(\d{1,2}(?:\.\d+)?)"?$/;
264
+ function je() {
265
+ return new RegExp(`^(\\d{1,3})°(\\d{1,2})'(\\d{1,2}(?:\\.\\d+)?)"?([${j().join("")}])$`, "i");
266
+ }
267
+ function oe(e) {
268
+ let t = null, n = null, r = null, a = null;
269
+ if (i.plainObject(e) && E.schema(e, Be))
270
+ i.defined(e.direction) ? e.degrees >= 0 && (t = e.degrees, n = e.minutes, r = e.seconds, a = e.direction) : (t = e.degrees, n = e.minutes, r = e.seconds);
269
271
  else if (i.string(e)) {
270
- const o = e.replace(/\s+/g, ""), l = o.match(Fe) ?? o.match(ke());
271
- l && (t = parseFloat(l[1]), r = parseFloat(l[2]), n = parseFloat(l[3]), s = l[4] ?? null);
272
+ const s = e.replace(/\s+/g, ""), l = s.match(He) ?? s.match(je());
273
+ l && (t = parseFloat(l[1]), n = parseFloat(l[2]), r = parseFloat(l[3]), a = l[4] ?? null);
272
274
  }
273
275
  return {
274
276
  get degrees() {
275
277
  return t;
276
278
  },
277
279
  get minutes() {
278
- return r;
280
+ return n;
279
281
  },
280
282
  get seconds() {
281
- return n;
283
+ return r;
282
284
  },
283
285
  get direction() {
284
- return s;
286
+ return a;
285
287
  },
286
288
  get format() {
287
289
  return "DMS";
288
290
  },
289
291
  isValid() {
290
- return i.integer(t) && i.integer(r) && i.inRange(r, 0, 59) && i.inRangeExclusiveMax(n, 0, 60);
292
+ return i.integer(t) && i.integer(n) && i.inRange(n, 0, 59) && i.inRangeExclusiveMax(r, 0, 60);
291
293
  },
292
- toString(o) {
293
- if (u.that(o, i.positiveInteger, "decimalPlaces must be a positive integer"), !this.isValid()) return "";
294
- let l = `${t}° ${r}' ${n.toFixed(o)}"`;
295
- return s && (l += ` ${s}`), l;
294
+ toString(s) {
295
+ if (u.that(s, i.positiveInteger, "decimalPlaces must be a positive integer"), !this.isValid()) return "";
296
+ let l = `${t}° ${n}' ${r.toFixed(s)}"`;
297
+ return a && (l += ` ${a}`), l;
296
298
  },
297
299
  toDecimal() {
298
- return this.isValid() ? L({ degrees: t + r / 60 + n / 3600, direction: s }) : null;
300
+ return this.isValid() ? D({ degrees: t + n / 60 + r / 3600, direction: a }) : null;
299
301
  }
300
302
  };
301
303
  }
302
- function W(e) {
303
- const t = Math.floor(e.degrees), r = (e.degrees - t) * 60;
304
- return { degrees: t, minutes: r, direction: e.direction };
304
+ function q(e) {
305
+ const t = Math.floor(e.degrees), n = (e.degrees - t) * 60;
306
+ return { degrees: t, minutes: n, direction: e.direction };
305
307
  }
306
- function Ge(e) {
307
- const t = Math.floor(e.degrees), r = (e.degrees - t) * 60, n = Math.floor(r), s = (r - n) * 60;
308
- return { degrees: t, minutes: n, seconds: s, direction: e.direction };
308
+ function Ve(e) {
309
+ const t = Math.floor(e.degrees), n = (e.degrees - t) * 60, r = Math.floor(n), a = (n - r) * 60;
310
+ return { degrees: t, minutes: r, seconds: a, direction: e.direction };
309
311
  }
310
- const K = {
312
+ const Q = {
311
313
  DD: (e) => (u.that(e, (t) => t.isValid(), "dd must be a valid coordinate"), e),
312
314
  DDM: (e) => {
313
- u.that(e, (s) => s.isValid(), "dd must be a valid coordinate");
314
- const { degrees: t, minutes: r, direction: n } = W(e);
315
- return te(n ? { degrees: t, minutes: r, direction: n } : { degrees: t, minutes: r });
315
+ u.that(e, (a) => a.isValid(), "dd must be a valid coordinate");
316
+ const { degrees: t, minutes: n, direction: r } = q(e);
317
+ return ae(r ? { degrees: t, minutes: n, direction: r } : { degrees: t, minutes: n });
316
318
  },
317
319
  DMS: (e) => {
318
- u.that(e, (o) => o.isValid(), "dd must be a valid coordinate");
319
- const { degrees: t, minutes: r, seconds: n, direction: s } = Ge(e);
320
- return re(s ? { degrees: t, minutes: r, seconds: n, direction: s } : { degrees: t, minutes: r, seconds: n });
320
+ u.that(e, (s) => s.isValid(), "dd must be a valid coordinate");
321
+ const { degrees: t, minutes: n, seconds: r, direction: a } = Ve(e);
322
+ return oe(a ? { degrees: t, minutes: n, seconds: r, direction: a } : { degrees: t, minutes: n, seconds: r });
321
323
  },
322
324
  DDM_AERO: (e) => {
323
- u.that(e, (s) => s.isValid(), "dd must be a valid coordinate");
324
- const { degrees: t, minutes: r, direction: n } = W(e);
325
- return ne({ degrees: t, minutes: r, direction: n });
325
+ u.that(e, (a) => a.isValid(), "dd must be a valid coordinate");
326
+ const { degrees: t, minutes: n, direction: r } = q(e);
327
+ return se({ degrees: t, minutes: n, direction: r });
326
328
  }
327
- }, x = {
329
+ }, P = {
328
330
  DD: "DD",
329
331
  DDM: "DDM",
330
332
  DDM_AERO: "DDM_AERO",
331
333
  DMS: "DMS"
332
- }, Pe = {
333
- DD: L,
334
- DDM: te,
335
- DDM_AERO: ne,
336
- DMS: re
337
- }, G = Array.from({ length: 9 }, (e, t) => 10 ** t);
338
- function X(e, t) {
334
+ }, Ye = {
335
+ DD: D,
336
+ DDM: ae,
337
+ DDM_AERO: se,
338
+ DMS: oe
339
+ }, Y = Array.from({ length: 9 }, (e, t) => 10 ** t);
340
+ function Z(e, t) {
339
341
  if (u.that(e, i.number, "coord must be a number"), i.defined(t))
340
- return u.that(t, E, "dir must be a direction"), Re(t);
342
+ return u.that(t, O, "dir must be a direction"), Ne(t);
341
343
  if (Math.abs(e) > 90) return d.LONGITUDE;
342
344
  }
343
- function z(e) {
345
+ function J(e) {
344
346
  u.that(e, i.number, "coord must be a number");
345
- const t = e.toExponential(), [r, n] = t.split("e").map(Number), s = (r.toString().split(".")[1] || "").length;
346
- return Math.max(0, s - n);
347
+ const t = e.toExponential(), [n, r] = t.split("e").map(Number), a = (n.toString().split(".")[1] || "").length;
348
+ return Math.max(0, a - r);
347
349
  }
348
- function Et(e, t = 7) {
350
+ function Mt(e, t = 7) {
349
351
  u.all([
350
352
  { value: e, validator: i.number, message: "coord must be a number" },
351
- { value: t, validator: (n) => i.inRange(n, 0, 8), message: "precision must be in range [0, 8]" }
353
+ { value: t, validator: (r) => i.inRange(r, 0, 8), message: "precision must be in range [0, 8]" }
352
354
  ]);
353
- const r = G[t];
354
- return Math.round(e * r) / r;
355
+ const n = Y[t];
356
+ return Math.round(e * n) / n;
355
357
  }
356
- function bt(e, t) {
358
+ function Ct(e, t) {
357
359
  if (u.all([
358
360
  { value: e, validator: i.number, message: "coord must be a number" },
359
- { value: t, validator: (n) => Z(n) || M(n), message: "axis must be either a longitude or latitude" }
360
- ]), M(t))
361
+ { value: t, validator: (r) => ne(r) || k(r), message: "axis must be either a longitude or latitude" }
362
+ ]), k(t))
361
363
  return Math.max(-90, Math.min(90, e));
362
- let r = ((e + 180) % 360 + 360) % 360 - 180;
363
- return r === -180 && (r = 180), Object.is(r, -0) && (r = 0), r;
364
+ let n = ((e + 180) % 360 + 360) % 360 - 180;
365
+ return n === -180 && (n = 180), Object.is(n, -0) && (n = 0), n;
364
366
  }
365
- function ht(e, t) {
367
+ function Nt(e, t) {
366
368
  u.all([
367
- { value: e, validator: (n) => i.defined(n) && n.isValid(), message: "from must be a valid coordinate" },
368
- { value: t, validator: (n) => A.key(K, n), message: `unknown format: ${t}` }
369
+ { value: e, validator: (r) => i.defined(r) && r.isValid(), message: "from must be a valid coordinate" },
370
+ { value: t, validator: (r) => w.key(Q, r), message: `unknown format: ${t}` }
369
371
  ]);
370
- const r = e.format === x.DD ? e : e.toDecimal();
371
- return r.isValid() ? t === x.DD ? r : K[t](r) : null;
372
+ const n = e.format === P.DD ? e : e.toDecimal();
373
+ return n.isValid() ? t === P.DD ? n : Q[t](n) : null;
372
374
  }
373
- function He(e) {
375
+ function We(e) {
374
376
  u.that(e, i.nonEmptyString, "pattern must be a non empty string");
375
- for (const t of Object.keys(x)) {
376
- const r = Pe[t](e);
377
- if (r.isValid()) return r;
377
+ for (const t of Object.keys(P)) {
378
+ const n = Ye[t](e);
379
+ if (n.isValid()) return n;
378
380
  }
379
381
  return null;
380
382
  }
381
- function yt(e) {
382
- u.that(e, (a) => i.nonEmptyString(a), "pattern must be a non-empty string");
383
+ function wt(e) {
384
+ u.that(e, (o) => i.nonEmptyString(o), "pattern must be a non-empty string");
383
385
  const t = e.split(/[,;|]/);
384
386
  if (t.length !== 2) return null;
385
- const [r, n] = t.map(He);
386
- if (!r || !n) return null;
387
- const s = r.toDecimal(), o = n.toDecimal(), l = X(s.degrees, s.direction), g = X(o.degrees, o.direction), c = (a) => {
388
- const { degrees: p, direction: f } = a;
389
- return f && (C(f) || ee(f)) ? -p : p;
387
+ const [n, r] = t.map(We);
388
+ if (!n || !r) return null;
389
+ const a = n.toDecimal(), s = r.toDecimal(), l = Z(a.degrees, a.direction), m = Z(s.degrees, s.direction), c = (o) => {
390
+ const { degrees: v, direction: f } = o;
391
+ return f && ($(f) || ie(f)) ? -v : v;
390
392
  };
391
- if (l === d.LONGITUDE && g === d.LATITUDE) return [c(s), c(o)];
392
- if (g === d.LONGITUDE && l === d.LATITUDE) return [c(o), c(s)];
393
- if (l === d.LONGITUDE && !g) return [c(s), o];
394
- if (l === d.LATITUDE && !g) return [c(o), c(s)];
395
- if (g === d.LONGITUDE && !l) return [c(o), c(s)];
396
- if (g === d.LATITUDE && !l) return [c(s), c(o)];
397
- if (!l && !g)
393
+ if (l === d.LONGITUDE && m === d.LATITUDE) return [c(a), c(s)];
394
+ if (m === d.LONGITUDE && l === d.LATITUDE) return [c(s), c(a)];
395
+ if (l === d.LONGITUDE && !m) return [c(a), s];
396
+ if (l === d.LATITUDE && !m) return [c(s), c(a)];
397
+ if (m === d.LONGITUDE && !l) return [c(s), c(a)];
398
+ if (m === d.LATITUDE && !l) return [c(a), c(s)];
399
+ if (!l && !m)
398
400
  return [
399
- [c(s), c(o)],
400
- [c(o), c(s)]
401
+ [c(a), c(s)],
402
+ [c(s), c(a)]
401
403
  ];
402
404
  }
403
- function Ve(e) {
404
- return !i.arrayOfLength(e, 4) && !i.arrayOfLength(e, 6) ? !1 : e.every(i.number);
405
+ function y(e) {
406
+ return !(!i.arrayOfLengthBetween(e, 2, 3) || !i.number(e[0]) || !i.number(e[1]) || !i.inRange(e[0], -180, 180) || !i.inRange(e[1], -90, 90) || e.length === 3 && !i.number(e[2]));
407
+ }
408
+ function Xe(e) {
409
+ return u.that(e, y, "position must be a valid position"), i.arrayOfLength(e, 3);
410
+ }
411
+ const Ke = {
412
+ precision: p(i.number),
413
+ consider3D: p(i.boolean)
414
+ };
415
+ function _t(e, t, n = {}) {
416
+ u.all([
417
+ {
418
+ value: e,
419
+ validator: y,
420
+ message: "position1 must be a valid position"
421
+ },
422
+ {
423
+ value: t,
424
+ validator: y,
425
+ message: "position2 must be a valid position"
426
+ },
427
+ {
428
+ value: n,
429
+ validator: (l) => E.schema(l, Ke),
430
+ message: "options must be a valid options object"
431
+ }
432
+ ]);
433
+ const { precision: r = 10, consider3D: a = !1 } = n, s = a ? Math.max(e.length, t.length) : 2;
434
+ return Array.from(
435
+ { length: s },
436
+ (l, m) => (e[m] ?? 0).toFixed(r) === (t[m] ?? 0).toFixed(r)
437
+ ).every(Boolean);
438
+ }
439
+ function $t(e, t = 7) {
440
+ u.all([
441
+ { value: e, validator: y, message: "position must be a position" },
442
+ { value: t, validator: (r) => i.inRange(r, 0, 8), message: "precision must be in range [0, 8]" }
443
+ ]);
444
+ const n = Y[t];
445
+ for (let r = 0; r < e.length; r++)
446
+ e[r] = Math.round(e[r] * n) / n;
447
+ return e;
448
+ }
449
+ function A(e) {
450
+ if (!i.arrayOfLength(e, 4) && !i.arrayOfLength(e, 6)) return !1;
451
+ const t = e.length === 4, n = t ? [e[0], e[1]] : [e[0], e[1], e[2]], r = t ? [e[2], e[3]] : [e[3], e[4], e[5]];
452
+ if (!y(n) || !y(r)) return !1;
453
+ const [, a] = n, [, s] = r;
454
+ return !(a > s || !t && e[2] > e[5]);
405
455
  }
406
- const S = {
456
+ function ee(e) {
457
+ return u.that(e, A, "bbox must be a valid bounding-box"), i.arrayOfLength(e, 6);
458
+ }
459
+ function Ft(e, t) {
460
+ return u.all([
461
+ { value: e, validator: A, message: "bbox1 must be a valid bounding-box" },
462
+ { value: t, validator: A, message: "bbox2 must be a valid bounding-box" }
463
+ ]), ee(e) && ee(t) ? [
464
+ Math.min(e[0], t[0]),
465
+ Math.min(e[1], t[1]),
466
+ Math.min(e[2], t[2]),
467
+ Math.max(e[3], t[3]),
468
+ Math.max(e[4], t[4]),
469
+ Math.max(e[5], t[5])
470
+ ] : [
471
+ Math.min(e[0], t[0]),
472
+ Math.min(e[1], t[1]),
473
+ Math.max(e[2], t[2]),
474
+ Math.max(e[3], t[3])
475
+ ];
476
+ }
477
+ const ze = {
478
+ ignore3D: p(i.boolean)
479
+ };
480
+ function x(e, t = {}) {
481
+ u.all([
482
+ {
483
+ value: e,
484
+ validator: i.nonEmptyArray,
485
+ message: "positions must be a non-empty array"
486
+ },
487
+ {
488
+ value: e,
489
+ validator: (a) => a.every(y),
490
+ message: "positions must be an array of valid positions"
491
+ },
492
+ {
493
+ value: t,
494
+ validator: (a) => E.schema(a, ze),
495
+ message: "options must be a valid options object"
496
+ }
497
+ ]);
498
+ const { ignore3D: n = !1 } = t;
499
+ return !n && e.some(Xe) ? e.reduce((a, s) => [
500
+ Math.min(a[0], s[0]),
501
+ Math.min(a[1], s[1]),
502
+ Math.min(a[2], s[2] ?? 0),
503
+ Math.max(a[3], s[0]),
504
+ Math.max(a[4], s[1]),
505
+ Math.max(a[5], s[2] ?? 0)
506
+ ], [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0]) : e.reduce((a, s) => [
507
+ Math.min(a[0], s[0]),
508
+ Math.min(a[1], s[1]),
509
+ Math.max(a[2], s[0]),
510
+ Math.max(a[3], s[1])
511
+ ], [1 / 0, 1 / 0, -1 / 0, -1 / 0]);
512
+ }
513
+ function ue(e, t = 7) {
514
+ u.all([
515
+ { value: e, validator: A, message: "bbox must be a valid bounding box" },
516
+ { value: t, validator: (r) => i.inRange(r, 0, 8), message: "precision must be in range [0, 8]" }
517
+ ]);
518
+ const n = Y[t];
519
+ for (let r = 0; r < e.length; r++)
520
+ e[r] = Math.round(e[r] * n) / n;
521
+ return e;
522
+ }
523
+ const M = {
407
524
  NAME: "name",
408
525
  LINK: "link"
409
526
  };
410
- function Ot(e) {
411
- return i.plainObject(e) ? e.type === S.NAME ? i.nonEmptyString(e.properties?.name) : e.type === S.LINK ? i.nonEmptyString(e.properties?.href) : !1 : !1;
527
+ function xt(e) {
528
+ return i.plainObject(e) ? e.type === M.NAME ? i.nonEmptyString(e.properties?.name) : e.type === M.LINK ? i.nonEmptyString(e.properties?.href) : !1 : !1;
412
529
  }
413
- const m = {
530
+ function Ut(e) {
531
+ return i.arrayOfLengthBetween(e, 2, 3) ? e.every(i.number) : !1;
532
+ }
533
+ function Gt(e) {
534
+ return !i.arrayOfLength(e, 4) && !i.arrayOfLength(e, 6) ? !1 : e.every(i.number);
535
+ }
536
+ const g = {
414
537
  POINT: "Point",
415
538
  MULTI_POINT: "MultiPoint",
416
539
  LINESTRING: "LineString",
@@ -419,132 +542,129 @@ const m = {
419
542
  MULTI_POLYGON: "MultiPolygon",
420
543
  GEOMETRY_COLLECTION: "GeometryCollection"
421
544
  };
422
- function P(e) {
423
- return !i.plainObject(e) || !i.oneOf(e.type, Object.values(m)) ? !1 : e.type === m.GEOMETRY_COLLECTION ? i.array(e.geometries) : i.array(e.coordinates);
545
+ function qe(e) {
546
+ return !i.plainObject(e) || !i.oneOf(e.type, Object.values(g)) ? !1 : e.type === g.GEOMETRY_COLLECTION ? i.array(e.geometries) : i.array(e.coordinates);
424
547
  }
425
- const v = {
548
+ const h = {
426
549
  FEATURE: "Feature",
427
550
  FEATURE_COLLECTION: "FeatureCollection"
428
551
  };
429
- function je(e) {
430
- return i.plainObject(e) ? v.FEATURE === e.type : !1;
552
+ function Qe(e) {
553
+ return i.plainObject(e) && e.type === h.FEATURE;
431
554
  }
432
- function Be(e) {
433
- return !i.plainObject(e) || e.type !== v.FEATURE_COLLECTION ? !1 : i.array(e.features);
555
+ function Ze(e) {
556
+ return i.plainObject(e) && e.type === h.FEATURE_COLLECTION && i.array(e.features);
434
557
  }
435
- function ie(e) {
436
- return i.plainObject(e) ? P(e) || je(e) ? !0 : Be(e) : !1;
558
+ function Je(e) {
559
+ return Qe(e) || Ze(e);
437
560
  }
438
- function Ye(e) {
439
- return i.arrayOfLengthBetween(e, 2, 3) ? e.every(i.number) : !1;
561
+ function F(e) {
562
+ return Je(e) || qe(e);
440
563
  }
441
- function We(e, t, r) {
564
+ const et = {
565
+ ignore3D: p(i.boolean)
566
+ };
567
+ function kt(e, t = {}) {
568
+ if (u.all([
569
+ { value: e, validator: F, message: "geoJson must be a GeoJson object" },
570
+ { value: t, validator: (n) => E.schema(n, et), message: "options must be a valid options object" }
571
+ ]), e.type === h.FEATURE)
572
+ return e.geometry ? x(R(e.geometry), t) : null;
573
+ if (e.type === h.FEATURE_COLLECTION) {
574
+ const n = R(e);
575
+ return n.length ? x(n, t) : null;
576
+ }
577
+ return x(R(e), t);
578
+ }
579
+ function tt(e) {
580
+ if (e.length === 0) return null;
581
+ if (e.length === 1) return { type: "Point", coordinates: e[0] };
582
+ if (e.length === 2) return { type: "LineString", coordinates: [e[0], e[1]] };
583
+ const t = de(ve(e.map((n) => he({ type: "Point", coordinates: n }))));
584
+ return t ? t.geometry : { type: "LineString", coordinates: [e[0], e[e.length - 1]] };
585
+ }
586
+ function nt(e) {
587
+ if (u.that(e, F, "geoJson must be a GeoJson object"), e.type === h.FEATURE)
588
+ return e.geometry ? nt(e.geometry) : null;
589
+ const t = R(e).map((n) => [n[0], n[1]]);
590
+ return tt(t);
591
+ }
592
+ function rt(e, t, n) {
442
593
  return Math.abs(
443
- (e[0] * (t[1] - r[1]) + t[0] * (r[1] - e[1]) + r[0] * (e[1] - t[1])) / 2
594
+ (e[0] * (t[1] - n[1]) + t[0] * (n[1] - e[1]) + n[0] * (e[1] - t[1])) / 2
444
595
  );
445
596
  }
446
- function N(e, { tolerance: t = 0, getWeight: r = () => 1 } = {}) {
597
+ function U(e, { tolerance: t = 0, getWeight: n = () => 1 } = {}) {
447
598
  if (e.length <= 2) return e;
448
- const n = e.map((a, p) => ({ coord: a, i: p, area: 1 / 0, removed: !1, prev: null, next: null }));
449
- for (let a = 0; a < n.length; a++)
450
- a > 0 && (n[a].prev = n[a - 1]), a < n.length - 1 && (n[a].next = n[a + 1]);
451
- const s = (a) => !a.prev || !a.next ? 1 / 0 : We(a.prev.coord, a.coord, a.next.coord) * r(a.coord, a.i), o = new fe((a, p) => a.area - p.area);
452
- for (let a = 1; a < n.length - 1; a++)
453
- n[a].area = s(n[a]), n[a]._currentArea = n[a].area, o.push(n[a]);
599
+ const r = e.map((o, v) => ({ coord: o, i: v, area: 1 / 0, removed: !1, prev: null, next: null }));
600
+ for (let o = 0; o < r.length; o++)
601
+ o > 0 && (r[o].prev = r[o - 1]), o < r.length - 1 && (r[o].next = r[o + 1]);
602
+ const a = (o) => !o.prev || !o.next ? 1 / 0 : rt(o.prev.coord, o.coord, o.next.coord) * n(o.coord, o.i), s = new pe((o, v) => o.area - v.area);
603
+ for (let o = 1; o < r.length - 1; o++)
604
+ r[o].area = a(r[o]), r[o]._currentArea = r[o].area, s.push(r[o]);
454
605
  let l = 0;
455
- for (; o.size() > 0; ) {
456
- const a = o.pop();
457
- if (!a.removed && a.area === a._currentArea) {
458
- if (a.area < l ? a.area = l : l = a.area, a.area >= t) break;
459
- a.removed = !0, a.prev && (a.prev.next = a.next), a.next && (a.next.prev = a.prev), a.prev?.prev && (a.prev.area = s(a.prev), a.prev._currentArea = a.prev.area, o.push(a.prev)), a.next?.next && (a.next.area = s(a.next), a.next._currentArea = a.next.area, o.push(a.next));
606
+ for (; s.size() > 0; ) {
607
+ const o = s.pop();
608
+ if (!o.removed && o.area === o._currentArea) {
609
+ if (o.area < l ? o.area = l : l = o.area, o.area >= t) break;
610
+ o.removed = !0, o.prev && (o.prev.next = o.next), o.next && (o.next.prev = o.prev), o.prev?.prev && (o.prev.area = a(o.prev), o.prev._currentArea = o.prev.area, s.push(o.prev)), o.next?.next && (o.next.area = a(o.next), o.next._currentArea = o.next.area, s.push(o.next));
460
611
  }
461
612
  }
462
- const g = [];
463
- let c = n[0];
613
+ const m = [];
614
+ let c = r[0];
464
615
  for (; c; )
465
- c.removed || g.push(c.coord), c = c.next;
466
- return g;
467
- }
468
- function H(e, t) {
469
- switch (u.all([
470
- { value: e, validator: P, message: "geometry must be a GeoJson geometry" }
471
- ]), e.type) {
472
- case m.LINESTRING:
473
- e.coordinates = N(e.coordinates, t);
616
+ c.removed || m.push(c.coord), c = c.next;
617
+ return m;
618
+ }
619
+ const it = {
620
+ tolerance: p(i.number),
621
+ getWeight: p(i.function)
622
+ };
623
+ function G(e, t = {}) {
624
+ if (u.all([
625
+ { value: e, validator: F, message: "geoJson must be a GeoJson object" },
626
+ { value: t, validator: (n) => E.schema(n, it), message: "options must be a valid options object" }
627
+ ]), e.type === h.FEATURE)
628
+ return e.geometry && G(e.geometry, t), e;
629
+ if (e.type === h.FEATURE_COLLECTION) {
630
+ for (const n of e.features) G(n, t);
631
+ return e;
632
+ }
633
+ switch (e.type) {
634
+ case g.LINESTRING:
635
+ e.coordinates = U(e.coordinates, t);
474
636
  break;
475
- case m.POLYGON:
476
- case m.MULTI_LINESTRING:
477
- e.coordinates = e.coordinates.map((r) => N(r, t));
637
+ case g.POLYGON:
638
+ case g.MULTI_LINESTRING:
639
+ e.coordinates = e.coordinates.map((n) => U(n, t));
478
640
  break;
479
- case m.MULTI_POLYGON:
480
- e.coordinates = e.coordinates.map((r) => r.map((n) => N(n, t)));
641
+ case g.MULTI_POLYGON:
642
+ e.coordinates = e.coordinates.map((n) => n.map((r) => U(r, t)));
481
643
  break;
482
- case m.GEOMETRY_COLLECTION:
483
- e.geometries.forEach((r) => H(r, t));
644
+ case g.GEOMETRY_COLLECTION:
645
+ e.geometries.forEach((n) => G(n, t));
484
646
  break;
485
647
  }
486
648
  return e;
487
649
  }
488
- const Ke = Q(["common-ekosystem", "simplify", "geojson"]);
489
- function se(e, t) {
490
- if (e.type === v.FEATURE)
491
- e.geometry && H(e.geometry, t);
492
- else if (e.type === v.FEATURE_COLLECTION)
493
- for (const r of e.features) se(r, t);
494
- else
495
- Ke.warn('Unknown feature type "{type}", skipping.', { type: e.type });
496
- return e;
497
- }
498
- function Tt(e, t) {
499
- return u.all([
500
- { value: e, validator: ie, message: "geoJson must be a GeoJson object" }
501
- ]), i.oneOf(e.type, Object.values(m)) ? H(e, t) : se(e, t);
502
- }
503
- function ae(e, t = 7) {
504
- u.all([
505
- { value: e, validator: Ve, message: "bbox must be bounding box" },
506
- { value: t, validator: (n) => i.inRange(n, 0, 8), message: "precision must be in range [0, 8]" }
507
- ]);
508
- const r = G[t];
509
- for (let n = 0; n < e.length; n++)
510
- e[n] = Math.round(e[n] * r) / r;
511
- return e;
650
+ function le(e, t = 7) {
651
+ const n = Ee(e, { precision: t, mutate: !0 });
652
+ return n.bbox && ue(n.bbox, t), n;
512
653
  }
513
- function oe(e, t = 7) {
514
- u.all([
515
- { value: e, validator: P, message: "geometry must be a GeoJson geometry" },
516
- { value: t, validator: (n) => i.inRange(n, 0, 8), message: "precision must be in range [0, 8]" }
517
- ]);
518
- const r = me(e, { precision: t, mutate: !0 });
519
- return r.bbox && ae(r.bbox, t), r;
520
- }
521
- const Xe = Q(["common-ekosystem", "truncate", "geojson"]);
522
- function ue(e, t) {
523
- if (e.type === v.FEATURE)
524
- e.geometry && oe(e.geometry, t);
525
- else if (e.type === v.FEATURE_COLLECTION)
526
- for (const r of e.features) ue(r, t);
654
+ function ce(e, t) {
655
+ if (e.type === h.FEATURE)
656
+ e.geometry && le(e.geometry, t);
527
657
  else
528
- Xe.warn('Unknown feature type "{type}", skipping.', { type: e.type });
529
- return e.bbox && ae(e.bbox, t), e;
658
+ for (const n of e.features) ce(n, t);
659
+ return e.bbox && ue(e.bbox, t), e;
530
660
  }
531
- function It(e, t = 7) {
661
+ function Pt(e, t = 7) {
532
662
  return u.all([
533
- { value: e, validator: ie, message: "geoJson must be a valid GeoJson" },
534
- { value: t, validator: (r) => i.inRange(r, 0, 8), message: "precision must be in range [0, 8]" }
535
- ]), i.oneOf(e.type, Object.values(m)) ? oe(e, t) : ue(e, t);
536
- }
537
- function Lt(e, t = 7) {
538
- u.all([
539
- { value: e, validator: Ye, message: "position must be a position" },
663
+ { value: e, validator: F, message: "geoJson must be a valid GeoJson" },
540
664
  { value: t, validator: (n) => i.inRange(n, 0, 8), message: "precision must be in range [0, 8]" }
541
- ]);
542
- const r = G[t];
543
- for (let n = 0; n < e.length; n++)
544
- e[n] = Math.round(e[n] * r) / r;
545
- return e;
665
+ ]), i.oneOf(e.type, Object.values(g)) ? le(e, t) : ce(e, t);
546
666
  }
547
- function R(e) {
667
+ function C(e) {
548
668
  if (!i.arrayOfLengthBetween(e, 2, 3))
549
669
  return {
550
670
  valid: !1,
@@ -575,52 +695,52 @@ function R(e) {
575
695
  errors: [{ message: "Invalid coordinates: altitude must be a number" }],
576
696
  warnings: []
577
697
  };
578
- const t = { valid: !0, errors: [], warnings: [] }, r = z(e[0]);
579
- r > 6 && t.warnings.push({ message: `longitude precision is high (${r} decimals, max recommended: 6)` });
580
- const n = z(e[1]);
581
- return n > 6 && t.warnings.push({ message: `latitude precision is high (${n} decimals, max recommended: 6)` }), t;
698
+ const t = { valid: !0, errors: [], warnings: [] }, n = J(e[0]);
699
+ n > 6 && t.warnings.push({ message: `longitude precision is high (${n} decimals, max recommended: 6)` });
700
+ const r = J(e[1]);
701
+ return r > 6 && t.warnings.push({ message: `latitude precision is high (${r} decimals, max recommended: 6)` }), t;
582
702
  }
583
- function ze(e) {
703
+ function at(e) {
584
704
  if (!i.arrayOfLength(e, 4) && !i.arrayOfLength(e, 6))
585
705
  return {
586
706
  valid: !1,
587
707
  errors: [{ message: "Invalid bbox: must be an array of 4 (2D) or 6 (3D) numbers" }],
588
708
  warnings: []
589
709
  };
590
- const t = e.length === 4, r = t ? [e[0], e[1]] : [e[0], e[1], e[2]], n = t ? [e[2], e[3]] : [e[3], e[4], e[5]], s = R(r);
591
- if (!s.valid)
710
+ const t = e.length === 4, n = t ? [e[0], e[1]] : [e[0], e[1], e[2]], r = t ? [e[2], e[3]] : [e[3], e[4], e[5]], a = C(n);
711
+ if (!a.valid)
592
712
  return {
593
713
  valid: !1,
594
- errors: s.errors.map((f) => ({ ...f, message: `Invalid bbox south-west: ${f.message}` })),
714
+ errors: a.errors.map((f) => ({ ...f, message: `Invalid bbox south-west: ${f.message}` })),
595
715
  warnings: []
596
716
  };
597
- const o = R(n);
598
- if (!o.valid)
717
+ const s = C(r);
718
+ if (!s.valid)
599
719
  return {
600
720
  valid: !1,
601
- errors: o.errors.map((f) => ({ ...f, message: `Invalid bbox north-east: ${f.message}` })),
721
+ errors: s.errors.map((f) => ({ ...f, message: `Invalid bbox north-east: ${f.message}` })),
602
722
  warnings: []
603
723
  };
604
- const [l, g] = r, [c, a] = n;
605
- if (g > a)
724
+ const [l, m] = n, [c, o] = r;
725
+ if (m > o)
606
726
  return {
607
727
  valid: !1,
608
- errors: [{ message: `Invalid bbox: south (${g}) must be <= north (${a})` }],
728
+ errors: [{ message: `Invalid bbox: south (${m}) must be <= north (${o})` }],
609
729
  warnings: []
610
730
  };
611
731
  if (!t) {
612
- const f = e[2], B = e[5];
613
- if (f > B)
732
+ const f = e[2], K = e[5];
733
+ if (f > K)
614
734
  return {
615
735
  valid: !1,
616
- errors: [{ message: `Invalid bbox: min altitude (${f}) must be <= max altitude (${B})` }],
736
+ errors: [{ message: `Invalid bbox: min altitude (${f}) must be <= max altitude (${K})` }],
617
737
  warnings: []
618
738
  };
619
739
  }
620
- const p = { valid: !0, errors: [], warnings: [] };
621
- return l > c && p.warnings.push({ message: `bbox crosses the antimeridian (west: ${l} > east: ${c})` }), p.warnings.push(...s.warnings.map((f) => ({ ...f, message: `south-west: ${f.message}` }))), p.warnings.push(...o.warnings.map((f) => ({ ...f, message: `north-east: ${f.message}` }))), p;
740
+ const v = { valid: !0, errors: [], warnings: [] };
741
+ return l > c && v.warnings.push({ message: `bbox crosses the antimeridian (west: ${l} > east: ${c})` }), v.warnings.push(...a.warnings.map((f) => ({ ...f, message: `south-west: ${f.message}` }))), v.warnings.push(...s.warnings.map((f) => ({ ...f, message: `north-east: ${f.message}` }))), v;
622
742
  }
623
- function qe(e) {
743
+ function st(e) {
624
744
  if (!i.plainObject(e))
625
745
  return {
626
746
  valid: !1,
@@ -628,13 +748,13 @@ function qe(e) {
628
748
  warnings: []
629
749
  };
630
750
  switch (e.type) {
631
- case S.NAME:
751
+ case M.NAME:
632
752
  return i.nonEmptyString(e.properties?.name) ? { valid: !0, errors: [], warnings: [] } : {
633
753
  valid: !1,
634
754
  errors: [{ message: "Invalid crs: linked crs must have a non-empty properties.name string" }],
635
755
  warnings: []
636
756
  };
637
- case S.LINK:
757
+ case M.LINK:
638
758
  return i.nonEmptyString(e.properties?.href) ? { valid: !0, errors: [], warnings: [] } : {
639
759
  valid: !1,
640
760
  errors: [{ message: "Invalid crs: linked crs must have a non-empty properties.href string" }],
@@ -648,147 +768,147 @@ function qe(e) {
648
768
  };
649
769
  }
650
770
  }
651
- function b() {
771
+ function T() {
652
772
  return { Feature: 0, FeatureCollection: 0, geometries: {} };
653
773
  }
654
- function Qe(...e) {
655
- const t = b();
656
- for (const r of e) {
657
- const n = r.statistics;
658
- if (n) {
659
- t.Feature += n.Feature ?? 0, t.FeatureCollection += n.FeatureCollection ?? 0;
660
- for (const [s, o] of Object.entries(n.geometries ?? {}))
661
- t.geometries[s] = (t.geometries[s] ?? 0) + o;
774
+ function ot(...e) {
775
+ const t = T();
776
+ for (const n of e) {
777
+ const r = n.statistics;
778
+ if (r) {
779
+ t.Feature += r.Feature ?? 0, t.FeatureCollection += r.FeatureCollection ?? 0;
780
+ for (const [a, s] of Object.entries(r.geometries ?? {}))
781
+ t.geometries[a] = (t.geometries[a] ?? 0) + s;
662
782
  }
663
783
  }
664
784
  return t;
665
785
  }
666
- function y(e, t, r = "") {
667
- const n = {
786
+ function L(e, t, n = "") {
787
+ const r = {
668
788
  valid: !0,
669
789
  errors: [],
670
790
  warnings: [],
671
- statistics: b()
791
+ statistics: T()
672
792
  };
673
- for (let s = 0; s < e.length; s++) {
674
- const o = `${r}/${s}`, l = t(e[s], o, s);
675
- if (l.statistics && (n.statistics = Qe(n, l)), !l.valid) {
676
- n.valid = !1, n.errors = n.errors.concat(l.errors.map((g) => ({ ...g, path: g.path || o, index: s })));
793
+ for (let a = 0; a < e.length; a++) {
794
+ const s = `${n}/${a}`, l = t(e[a], s, a);
795
+ if (l.statistics && (r.statistics = ot(r, l)), !l.valid) {
796
+ r.valid = !1, r.errors = r.errors.concat(l.errors.map((m) => ({ ...m, path: m.path || s, index: a })));
677
797
  continue;
678
798
  }
679
- i.empty(l.warnings) || (n.warnings = n.warnings.concat(l.warnings.map((g) => ({ ...g, path: g.path || o, index: s }))));
799
+ i.empty(l.warnings) || (r.warnings = r.warnings.concat(l.warnings.map((m) => ({ ...m, path: m.path || s, index: a }))));
680
800
  }
681
- return n;
801
+ return r;
682
802
  }
683
- function q(e, t) {
803
+ function te(e, t) {
684
804
  if (!i.defined(e.crs)) return t;
685
- const r = qe(e.crs);
686
- return r.valid || (t.valid = !1, t.errors.push(...r.errors.map((n) => ({ ...n, path: "/crs" })))), t.warnings.push(...r.warnings.map((n) => ({ ...n, path: "/crs" }))), t;
805
+ const n = st(e.crs);
806
+ return n.valid || (t.valid = !1, t.errors.push(...n.errors.map((r) => ({ ...r, path: "/crs" })))), t.warnings.push(...n.warnings.map((r) => ({ ...r, path: "/crs" }))), t;
687
807
  }
688
- function D(e, t, r = "") {
808
+ function N(e, t, n = "") {
689
809
  if (!i.defined(e.bbox)) return t;
690
- const n = ze(e.bbox);
691
- return n.valid || (t.valid = !1, t.errors.push(...n.errors.map((s) => ({ ...s, path: `${r}/bbox` })))), t.warnings.push(...n.warnings.map((s) => ({ ...s, path: `${r}/bbox` }))), t;
810
+ const r = at(e.bbox);
811
+ return r.valid || (t.valid = !1, t.errors.push(...r.errors.map((a) => ({ ...a, path: `${n}/bbox` })))), t.warnings.push(...r.warnings.map((a) => ({ ...a, path: `${n}/bbox` }))), t;
692
812
  }
693
- function V(e, t = 0, r = "") {
694
- return i.arrayOfLengthAtLeast(e, t) ? y(e, R, r) : {
813
+ function W(e, t = 0, n = "") {
814
+ return i.arrayOfLengthAtLeast(e, t) ? L(e, C, n) : {
695
815
  valid: !1,
696
- errors: [{ message: `Invalid coordinates: must have at least ${t} positions`, path: r }],
816
+ errors: [{ message: `Invalid coordinates: must have at least ${t} positions`, path: n }],
697
817
  warnings: []
698
818
  };
699
819
  }
700
- function le(e, t = "") {
701
- const r = V(e, 2, t);
702
- if (!r.valid) return r;
703
- for (let n = 0; n < e.length - 1; n++) {
704
- const s = e[n][0], o = e[n + 1][0];
705
- Math.abs(o - s) > 180 && r.warnings.push({
706
- message: `LineString crosses the antimeridian between positions ${n} and ${n + 1}, consider using MultiLineString`,
707
- path: `${t}/${n}`
820
+ function me(e, t = "") {
821
+ const n = W(e, 2, t);
822
+ if (!n.valid) return n;
823
+ for (let r = 0; r < e.length - 1; r++) {
824
+ const a = e[r][0], s = e[r + 1][0];
825
+ Math.abs(s - a) > 180 && n.warnings.push({
826
+ message: `LineString crosses the antimeridian between positions ${r} and ${r + 1}, consider using MultiLineString`,
827
+ path: `${t}/${r}`
708
828
  });
709
829
  }
710
- return r;
830
+ return n;
711
831
  }
712
- function Ze(e, t = "") {
713
- return i.nonEmptyArray(e) ? y(e, le, t) : {
832
+ function ut(e, t = "") {
833
+ return i.nonEmptyArray(e) ? L(e, me, t) : {
714
834
  valid: !1,
715
835
  errors: [{ message: "Invalid MultiLineString: coordinates must be a non empty array", path: t }],
716
836
  warnings: []
717
837
  };
718
838
  }
719
- function Je(e, t, r = "") {
720
- const n = V(e, 4, r);
721
- if (!n.valid) return n;
722
- const s = e[0], o = e[e.length - 1];
723
- if (s[0] !== o[0] || s[1] !== o[1])
724
- return n.valid = !1, n.errors.push({ message: "Invalid LinearRing: first and last position must be identical", path: r }), n;
725
- const g = de(e) ? "clockwise" : "counter-clockwise";
726
- g !== t && n.warnings.push({ message: `Ring must be ${t} but is ${g}`, path: r });
727
- const c = pe({ type: "Polygon", coordinates: [e] });
728
- return c.features.length > 0 && (n.valid = !1, n.errors.push({ message: `Invalid LinearRing: ${c.features.length} self-intersection(s) detected`, path: r })), n;
729
- }
730
- function ce(e, t = "") {
731
- return i.nonEmptyArray(e) ? y(e, (r, n, s) => Je(r, s === 0 ? "counter-clockwise" : "clockwise", n), t) : {
839
+ function lt(e, t, n = "") {
840
+ const r = W(e, 4, n);
841
+ if (!r.valid) return r;
842
+ const a = e[0], s = e[e.length - 1];
843
+ if (a[0] !== s[0] || a[1] !== s[1])
844
+ return r.valid = !1, r.errors.push({ message: "Invalid LinearRing: first and last position must be identical", path: n }), r;
845
+ const m = ye(e) ? "clockwise" : "counter-clockwise";
846
+ m !== t && r.warnings.push({ message: `Ring must be ${t} but is ${m}`, path: n });
847
+ const c = Oe({ type: "Polygon", coordinates: [e] });
848
+ return c.features.length > 0 && (r.valid = !1, r.errors.push({ message: `Invalid LinearRing: ${c.features.length} self-intersection(s) detected`, path: n })), r;
849
+ }
850
+ function fe(e, t = "") {
851
+ return i.nonEmptyArray(e) ? L(e, (n, r, a) => lt(n, a === 0 ? "counter-clockwise" : "clockwise", r), t) : {
732
852
  valid: !1,
733
853
  errors: [{ message: "Invalid Polygon: coordinates must be a non empty array", path: t }],
734
854
  warnings: []
735
855
  };
736
856
  }
737
- function et(e, t = "") {
738
- return i.nonEmptyArray(e) ? y(e, (r, n) => ce(r, n), t) : {
857
+ function ct(e, t = "") {
858
+ return i.nonEmptyArray(e) ? L(e, (n, r) => fe(n, r), t) : {
739
859
  valid: !1,
740
860
  errors: [{ message: "Invalid MultiPolygon: coordinates must be a non empty array", path: t }],
741
861
  warnings: []
742
862
  };
743
863
  }
744
- function tt(e, t = "") {
745
- return i.nonEmptyArray(e) ? y(e, (r, n) => j(r, n), t) : {
864
+ function mt(e, t = "") {
865
+ return i.nonEmptyArray(e) ? L(e, (n, r) => X(n, r), t) : {
746
866
  valid: !1,
747
867
  errors: [{ message: "Invalid geometries: geometries must be a non empty array", path: t }],
748
868
  warnings: []
749
869
  };
750
870
  }
751
- function j(e, t = "") {
871
+ function X(e, t = "") {
752
872
  if (!i.nonEmptyObject(e))
753
873
  return {
754
874
  valid: !1,
755
875
  errors: [{ message: "Invalid geometry: geometry must be a non empty object", path: t }],
756
876
  warnings: []
757
877
  };
758
- const r = `${t}/coordinates`;
759
- let n;
878
+ const n = `${t}/coordinates`;
879
+ let r;
760
880
  switch (e.type) {
761
- case m.POINT: {
762
- const s = R(e.coordinates);
763
- n = {
764
- valid: s.valid,
765
- errors: s.errors.map((o) => ({ ...o, path: r })),
766
- warnings: s.warnings.map((o) => ({ ...o, path: r }))
881
+ case g.POINT: {
882
+ const a = C(e.coordinates);
883
+ r = {
884
+ valid: a.valid,
885
+ errors: a.errors.map((s) => ({ ...s, path: n })),
886
+ warnings: a.warnings.map((s) => ({ ...s, path: n }))
767
887
  };
768
888
  break;
769
889
  }
770
- case m.MULTI_POINT: {
771
- n = V(e.coordinates, 0, r);
890
+ case g.MULTI_POINT: {
891
+ r = W(e.coordinates, 0, n);
772
892
  break;
773
893
  }
774
- case m.LINESTRING: {
775
- n = le(e.coordinates, r);
894
+ case g.LINESTRING: {
895
+ r = me(e.coordinates, n);
776
896
  break;
777
897
  }
778
- case m.MULTI_LINESTRING: {
779
- n = Ze(e.coordinates, r);
898
+ case g.MULTI_LINESTRING: {
899
+ r = ut(e.coordinates, n);
780
900
  break;
781
901
  }
782
- case m.POLYGON: {
783
- n = ce(e.coordinates, r);
902
+ case g.POLYGON: {
903
+ r = fe(e.coordinates, n);
784
904
  break;
785
905
  }
786
- case m.MULTI_POLYGON: {
787
- n = et(e.coordinates, r);
906
+ case g.MULTI_POLYGON: {
907
+ r = ct(e.coordinates, n);
788
908
  break;
789
909
  }
790
- case m.GEOMETRY_COLLECTION: {
791
- n = tt(e.geometries, `${t}/geometries`);
910
+ case g.GEOMETRY_COLLECTION: {
911
+ r = mt(e.geometries, `${t}/geometries`);
792
912
  break;
793
913
  }
794
914
  default:
@@ -798,7 +918,7 @@ function j(e, t = "") {
798
918
  warnings: []
799
919
  };
800
920
  }
801
- return n = D(e, n, t), n.statistics = { geometries: { [e.type]: 1 } }, n;
921
+ return r = N(e, r, t), r.statistics = { geometries: { [e.type]: 1 } }, r;
802
922
  }
803
923
  function ge(e, t = "") {
804
924
  if (!i.nonEmptyObject(e))
@@ -806,18 +926,18 @@ function ge(e, t = "") {
806
926
  valid: !1,
807
927
  errors: [{ message: "Invalid feature: must be a non empty object", path: t }],
808
928
  warnings: [],
809
- statistics: b()
929
+ statistics: T()
810
930
  };
811
- if (e.type === v.FEATURE) {
931
+ if (e.type === h.FEATURE) {
812
932
  if (i.nonEmptyObject(e.geometry)) {
813
- const r = j(e.geometry, `${t}/geometry`);
933
+ const n = X(e.geometry, `${t}/geometry`);
814
934
  return {
815
- ...D(e, r, t),
935
+ ...N(e, n, t),
816
936
  statistics: {
817
937
  Feature: 1,
818
938
  FeatureCollection: 0,
819
939
  // Geometry counting is owned by validateGeometry.
820
- geometries: { ...r.statistics.geometries }
940
+ geometries: { ...n.statistics.geometries }
821
941
  }
822
942
  };
823
943
  }
@@ -828,104 +948,112 @@ function ge(e, t = "") {
828
948
  statistics: { Feature: 1, FeatureCollection: 0, geometries: {} }
829
949
  };
830
950
  }
831
- if (e.type === v.FEATURE_COLLECTION) {
951
+ if (e.type === h.FEATURE_COLLECTION) {
832
952
  if (i.nonEmptyArray(e.features)) {
833
- const r = y(e.features, ge, `${t}/features`);
953
+ const n = L(e.features, ge, `${t}/features`);
834
954
  return {
835
- ...D(e, r, t),
836
- statistics: { ...r.statistics, FeatureCollection: r.statistics.FeatureCollection + 1 }
955
+ ...N(e, n, t),
956
+ statistics: { ...n.statistics, FeatureCollection: n.statistics.FeatureCollection + 1 }
837
957
  };
838
958
  }
839
959
  return {
840
960
  valid: !1,
841
961
  errors: [{ message: "Invalid FeatureCollection: features must be a non empty array", path: t }],
842
962
  warnings: [],
843
- statistics: b()
963
+ statistics: T()
844
964
  };
845
965
  }
846
966
  return {
847
967
  valid: !1,
848
968
  errors: [{ message: `Invalid feature: unknown type: ${e.type}`, path: t }],
849
969
  warnings: [],
850
- statistics: b()
970
+ statistics: T()
851
971
  };
852
972
  }
853
- function St(e) {
854
- if (u.that(e, i.nonEmptyObject, "geojson must be a non empty object"), i.oneOf(e.type, Object.values(m))) {
855
- const t = j(e, ""), r = D(e, t, "");
973
+ function Bt(e) {
974
+ if (u.that(e, i.nonEmptyObject, "geojson must be a non empty object"), i.oneOf(e.type, Object.values(g))) {
975
+ const t = X(e, ""), n = N(e, t, "");
856
976
  return {
857
- ...q(e, r),
977
+ ...te(e, n),
858
978
  // Geometry counting is owned by validateGeometry.
859
979
  statistics: { Feature: 0, FeatureCollection: 0, geometries: { ...t.statistics.geometries } }
860
980
  };
861
981
  }
862
- if (e.type === v.FEATURE || e.type === v.FEATURE_COLLECTION) {
982
+ if (e.type === h.FEATURE || e.type === h.FEATURE_COLLECTION) {
863
983
  const t = ge(e, "");
864
- return q(e, t);
984
+ return te(e, t);
865
985
  }
866
986
  return {
867
987
  valid: !1,
868
988
  errors: [{ message: "Invalid GeoJson: type must be either a Geometry, a Feature or a FeatureCollection", path: "" }],
869
989
  warnings: [],
870
- statistics: b()
990
+ statistics: T()
871
991
  };
872
992
  }
873
993
  export {
874
994
  d as AXES,
875
- x as COORDINATE_FORMATS,
876
- Pe as COORDINATE_MODELS,
877
- G as COORDINATE_TRUNCATION_FACTORS,
878
- S as CRS_TYPES,
879
- v as FEATURE_TYPES,
880
- m as GEOMETRY_TYPES,
881
- ht as convertCoordinate,
882
- J as getActiveLocales,
883
- F as getAllDirectionSymbols,
884
- z as getCoordinatePrecision,
885
- Re as getDirectionAxis,
886
- ft as getDirections,
887
- pt as getEast,
888
- Ie as getLatitudeSymbols,
889
- Te as getLocale,
890
- U as getLocaleByCode,
891
- Le as getLongitudeSymbols,
892
- mt as getNorth,
893
- dt as getSouth,
894
- vt as getWest,
895
- X as guessCoordinateAxis,
896
- ut as isAltitude,
897
- ve as isAxis,
898
- E as isDirection,
899
- k as isEast,
900
- M as isLatitude,
901
- Ve as isLikeBBox,
902
- Ot as isLikeCRS,
903
- je as isLikeFeature,
904
- Be as isLikeFeatureCollection,
905
- ie as isLikeGeoJson,
906
- P as isLikeGeometry,
907
- Ye as isLikePosition,
908
- Z as isLongitude,
909
- Se as isNorth,
910
- ee as isSouth,
911
- C as isWest,
912
- lt as listLocales,
913
- bt as normalizeCoordinate,
914
- He as parseCoordinate,
915
- yt as parsePosition,
916
- ct as registerLocale,
917
- gt as setLocale,
918
- Tt as simplifyGeoJson,
919
- H as simplifyGeometry,
920
- ae as truncateBBox,
921
- Et as truncateCoordinate,
922
- It as truncateGeoJson,
923
- oe as truncateGeometry,
924
- Lt as truncatePosition,
925
- ze as validateBBox,
926
- qe as validateCRS,
927
- St as validateGeoJson,
928
- j as validateGeometry,
929
- R as validatePosition
995
+ P as COORDINATE_FORMATS,
996
+ Ye as COORDINATE_MODELS,
997
+ Y as COORDINATE_TRUNCATION_FACTORS,
998
+ M as CRS_TYPES,
999
+ h as FEATURE_TYPES,
1000
+ g as GEOMETRY_TYPES,
1001
+ x as computeBBox,
1002
+ kt as computeGeoJsonBoundingBox,
1003
+ nt as computeGeoJsonConvexHull,
1004
+ Nt as convertCoordinate,
1005
+ re as getActiveLocales,
1006
+ j as getAllDirectionSymbols,
1007
+ J as getCoordinatePrecision,
1008
+ Ne as getDirectionAxis,
1009
+ St as getDirections,
1010
+ Rt as getEast,
1011
+ Ae as getLatitudeSymbols,
1012
+ Re as getLocale,
1013
+ B as getLocaleByCode,
1014
+ Me as getLongitudeSymbols,
1015
+ bt as getNorth,
1016
+ Dt as getSouth,
1017
+ At as getWest,
1018
+ Z as guessCoordinateAxis,
1019
+ ee as is3DBBox,
1020
+ Xe as is3DPosition,
1021
+ Ot as isAltitude,
1022
+ Te as isAxis,
1023
+ O as isDirection,
1024
+ V as isEast,
1025
+ k as isLatitude,
1026
+ Gt as isLikeBBox,
1027
+ xt as isLikeCRS,
1028
+ Qe as isLikeFeature,
1029
+ Ze as isLikeFeatureCollection,
1030
+ Je as isLikeFeatureOrFeatureCollection,
1031
+ F as isLikeGeoJson,
1032
+ qe as isLikeGeometry,
1033
+ Ut as isLikePosition,
1034
+ ne as isLongitude,
1035
+ Ce as isNorth,
1036
+ _t as isSamePosition,
1037
+ ie as isSouth,
1038
+ A as isValidBBox,
1039
+ y as isValidPosition,
1040
+ $ as isWest,
1041
+ Tt as listLocales,
1042
+ Ft as mergeBBox,
1043
+ Ct as normalizeCoordinate,
1044
+ We as parseCoordinate,
1045
+ wt as parsePosition,
1046
+ It as registerLocale,
1047
+ Lt as setLocale,
1048
+ G as simplifyGeoJson,
1049
+ ue as truncateBBox,
1050
+ Mt as truncateCoordinate,
1051
+ Pt as truncateGeoJson,
1052
+ $t as truncatePosition,
1053
+ at as validateBBox,
1054
+ st as validateCRS,
1055
+ Bt as validateGeoJson,
1056
+ X as validateGeometry,
1057
+ C as validatePosition
930
1058
  };
931
1059
  //# sourceMappingURL=index.mjs.map