@ue-too/border 0.14.0 → 0.15.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/README.md CHANGED
@@ -22,11 +22,13 @@ Geodesy and map projection library for TypeScript.
22
22
  ## Installation
23
23
 
24
24
  Using Bun:
25
+
25
26
  ```bash
26
27
  bun add @ue-too/border
27
28
  ```
28
29
 
29
30
  Using npm:
31
+
30
32
  ```bash
31
33
  npm install @ue-too/border
32
34
  ```
@@ -37,12 +39,12 @@ Here's a simple example calculating distance and bearing between two cities:
37
39
 
38
40
  ```typescript
39
41
  import {
40
- greatCircleDistance,
41
- initialBearingOfGreatCircle
42
+ greatCircleDistance,
43
+ initialBearingOfGreatCircle,
42
44
  } from '@ue-too/border';
43
45
 
44
46
  // New York to London
45
- const nyc = { latitude: 40.7128, longitude: -74.0060 };
47
+ const nyc = { latitude: 40.7128, longitude: -74.006 };
46
48
  const london = { latitude: 51.5074, longitude: -0.1278 };
47
49
 
48
50
  // Calculate great circle distance (in meters)
@@ -86,17 +88,15 @@ Map projections transform spherical coordinates (latitude/longitude) to flat 2D
86
88
  Calculate the great circle distance between two points.
87
89
 
88
90
  ```typescript
89
- function greatCircleDistance(
90
- from: GeoCoord,
91
- to: GeoCoord
92
- ): number; // Returns distance in meters
91
+ function greatCircleDistance(from: GeoCoord, to: GeoCoord): number; // Returns distance in meters
93
92
  ```
94
93
 
95
94
  **Example:**
95
+
96
96
  ```typescript
97
97
  const distance = greatCircleDistance(
98
- { latitude: 51.5074, longitude: -0.1278 }, // London
99
- { latitude: 48.8566, longitude: 2.3522 } // Paris
98
+ { latitude: 51.5074, longitude: -0.1278 }, // London
99
+ { latitude: 48.8566, longitude: 2.3522 } // Paris
100
100
  );
101
101
  console.log(distance / 1000, 'km'); // ~344 km
102
102
  ```
@@ -106,17 +106,15 @@ console.log(distance / 1000, 'km'); // ~344 km
106
106
  Calculate the initial bearing (direction) for a great circle path.
107
107
 
108
108
  ```typescript
109
- function initialBearingOfGreatCircle(
110
- from: GeoCoord,
111
- to: GeoCoord
112
- ): number; // Returns bearing in degrees (0-360)
109
+ function initialBearingOfGreatCircle(from: GeoCoord, to: GeoCoord): number; // Returns bearing in degrees (0-360)
113
110
  ```
114
111
 
115
112
  **Example:**
113
+
116
114
  ```typescript
117
115
  const bearing = initialBearingOfGreatCircle(
118
- { latitude: 40.7128, longitude: -74.0060 }, // NYC
119
- { latitude: 51.5074, longitude: -0.1278 } // London
116
+ { latitude: 40.7128, longitude: -74.006 }, // NYC
117
+ { latitude: 51.5074, longitude: -0.1278 } // London
120
118
  );
121
119
  console.log(bearing, '°'); // ~51.4° (northeast)
122
120
  ```
@@ -127,13 +125,14 @@ Find the destination point given origin, bearing, and distance.
127
125
 
128
126
  ```typescript
129
127
  function destinationFromOriginOnGreatCircle(
130
- origin: GeoCoord,
131
- bearing: number, // Degrees
132
- distance: number // Meters
128
+ origin: GeoCoord,
129
+ bearing: number, // Degrees
130
+ distance: number // Meters
133
131
  ): GeoCoord;
134
132
  ```
135
133
 
136
134
  **Example:**
135
+
137
136
  ```typescript
138
137
  const start = { latitude: 51.5074, longitude: -0.1278 };
139
138
  const destination = destinationFromOriginOnGreatCircle(start, 90, 100000);
@@ -145,10 +144,7 @@ console.log('100km east:', destination);
145
144
  Find the midpoint along a great circle path.
146
145
 
147
146
  ```typescript
148
- function midpointOnGreatCircle(
149
- from: GeoCoord,
150
- to: GeoCoord
151
- ): GeoCoord;
147
+ function midpointOnGreatCircle(from: GeoCoord, to: GeoCoord): GeoCoord;
152
148
  ```
153
149
 
154
150
  #### `intermediatePointOnGreatCircle(from, to, fraction)`
@@ -157,13 +153,14 @@ Find a point at a given fraction along the great circle path.
157
153
 
158
154
  ```typescript
159
155
  function intermediatePointOnGreatCircle(
160
- from: GeoCoord,
161
- to: GeoCoord,
162
- fraction: number // 0.0 to 1.0
156
+ from: GeoCoord,
157
+ to: GeoCoord,
158
+ fraction: number // 0.0 to 1.0
163
159
  ): GeoCoord;
164
160
  ```
165
161
 
166
162
  **Example:**
163
+
167
164
  ```typescript
168
165
  // Find the point 25% of the way from NYC to London
169
166
  const point = intermediatePointOnGreatCircle(nyc, london, 0.25);
@@ -176,10 +173,7 @@ const point = intermediatePointOnGreatCircle(nyc, london, 0.25);
176
173
  Calculate the rhumb line distance (constant bearing path).
177
174
 
178
175
  ```typescript
179
- function rhumbDistance(
180
- from: GeoCoord,
181
- to: GeoCoord
182
- ): number; // Returns distance in meters
176
+ function rhumbDistance(from: GeoCoord, to: GeoCoord): number; // Returns distance in meters
183
177
  ```
184
178
 
185
179
  #### `rhumbBearing(from, to)`
@@ -187,10 +181,7 @@ function rhumbDistance(
187
181
  Calculate the constant bearing for a rhumb line.
188
182
 
189
183
  ```typescript
190
- function rhumbBearing(
191
- from: GeoCoord,
192
- to: GeoCoord
193
- ): number; // Returns bearing in degrees (0-360)
184
+ function rhumbBearing(from: GeoCoord, to: GeoCoord): number; // Returns bearing in degrees (0-360)
194
185
  ```
195
186
 
196
187
  #### `destinationFromOriginOnRhumbLine(origin, bearing, distance)`
@@ -199,9 +190,9 @@ Find the destination on a rhumb line given origin, bearing, and distance.
199
190
 
200
191
  ```typescript
201
192
  function destinationFromOriginOnRhumbLine(
202
- origin: GeoCoord,
203
- bearing: number, // Degrees
204
- distance: number // Meters
193
+ origin: GeoCoord,
194
+ bearing: number, // Degrees
195
+ distance: number // Meters
205
196
  ): GeoCoord;
206
197
  ```
207
198
 
@@ -210,10 +201,7 @@ function destinationFromOriginOnRhumbLine(
210
201
  Find the midpoint along a rhumb line.
211
202
 
212
203
  ```typescript
213
- function midpointOnRhumbLine(
214
- from: GeoCoord,
215
- to: GeoCoord
216
- ): GeoCoord;
204
+ function midpointOnRhumbLine(from: GeoCoord, to: GeoCoord): GeoCoord;
217
205
  ```
218
206
 
219
207
  ### Map Projection Functions
@@ -223,12 +211,11 @@ function midpointOnRhumbLine(
223
211
  Convert geographic coordinates to Mercator projection.
224
212
 
225
213
  ```typescript
226
- function mercatorProjection(
227
- coord: GeoCoord
228
- ): Point; // Returns {x, y} in normalized coordinates
214
+ function mercatorProjection(coord: GeoCoord): Point; // Returns {x, y} in normalized coordinates
229
215
  ```
230
216
 
231
217
  **Example:**
218
+
232
219
  ```typescript
233
220
  const point = mercatorProjection({ latitude: 51.5074, longitude: -0.1278 });
234
221
  console.log('Mercator coordinates:', point);
@@ -239,9 +226,7 @@ console.log('Mercator coordinates:', point);
239
226
  Convert Mercator coordinates back to geographic.
240
227
 
241
228
  ```typescript
242
- function inverseMercatorProjection(
243
- point: Point
244
- ): GeoCoord; // Returns {latitude, longitude}
229
+ function inverseMercatorProjection(point: Point): GeoCoord; // Returns {latitude, longitude}
245
230
  ```
246
231
 
247
232
  #### `orthoProjection(coord, origin)`
@@ -250,24 +235,25 @@ Convert geographic coordinates to orthographic projection (hemisphere view).
250
235
 
251
236
  ```typescript
252
237
  function orthoProjection(
253
- coord: GeoCoord,
254
- origin: GeoCoord // Center of projection
238
+ coord: GeoCoord,
239
+ origin: GeoCoord // Center of projection
255
240
  ): {
256
- coord: Point; // Projected point
257
- clipped: boolean; // True if coord is on the back hemisphere
241
+ coord: Point; // Projected point
242
+ clipped: boolean; // True if coord is on the back hemisphere
258
243
  };
259
244
  ```
260
245
 
261
246
  **Example:**
247
+
262
248
  ```typescript
263
249
  // Project London as seen from the North Pole
264
250
  const result = orthoProjection(
265
- { latitude: 51.5074, longitude: -0.1278 },
266
- { latitude: 90, longitude: 0 }
251
+ { latitude: 51.5074, longitude: -0.1278 },
252
+ { latitude: 90, longitude: 0 }
267
253
  );
268
254
 
269
255
  if (!result.clipped) {
270
- console.log('Visible at:', result.coord);
256
+ console.log('Visible at:', result.coord);
271
257
  }
272
258
  ```
273
259
 
@@ -275,13 +261,13 @@ if (!result.clipped) {
275
261
 
276
262
  ```typescript
277
263
  type GeoCoord = {
278
- latitude: number; // Degrees, -90 to 90
279
- longitude: number; // Degrees, -180 to 180
264
+ latitude: number; // Degrees, -90 to 90
265
+ longitude: number; // Degrees, -180 to 180
280
266
  };
281
267
 
282
268
  type Point = {
283
- x: number;
284
- y: number;
269
+ x: number;
270
+ y: number;
285
271
  };
286
272
  ```
287
273
 
@@ -291,13 +277,13 @@ type Point = {
291
277
 
292
278
  ```typescript
293
279
  import {
294
- greatCircleDistance,
295
- initialBearingOfGreatCircle,
296
- intermediatePointOnGreatCircle
280
+ greatCircleDistance,
281
+ initialBearingOfGreatCircle,
282
+ intermediatePointOnGreatCircle,
297
283
  } from '@ue-too/border';
298
284
 
299
285
  const departure = { latitude: 40.6413, longitude: -73.7781 }; // JFK
300
- const arrival = { latitude: 51.4700, longitude: -0.4543 }; // LHR
286
+ const arrival = { latitude: 51.47, longitude: -0.4543 }; // LHR
301
287
 
302
288
  // Total distance
303
289
  const distance = greatCircleDistance(departure, arrival);
@@ -318,30 +304,27 @@ console.log('Midpoint:', midpoint);
318
304
  import { mercatorProjection } from '@ue-too/border';
319
305
 
320
306
  const cities = [
321
- { name: 'New York', latitude: 40.7128, longitude: -74.0060 },
322
- { name: 'London', latitude: 51.5074, longitude: -0.1278 },
323
- { name: 'Tokyo', latitude: 35.6762, longitude: 139.6503 }
307
+ { name: 'New York', latitude: 40.7128, longitude: -74.006 },
308
+ { name: 'London', latitude: 51.5074, longitude: -0.1278 },
309
+ { name: 'Tokyo', latitude: 35.6762, longitude: 139.6503 },
324
310
  ];
325
311
 
326
312
  // Project to screen coordinates
327
313
  cities.forEach(city => {
328
- const point = mercatorProjection(city);
314
+ const point = mercatorProjection(city);
329
315
 
330
- // Scale to canvas (assuming 1000x600 canvas)
331
- const x = (point.x + 180) / 360 * 1000;
332
- const y = (1 - (point.y + 90) / 180) * 600;
316
+ // Scale to canvas (assuming 1000x600 canvas)
317
+ const x = ((point.x + 180) / 360) * 1000;
318
+ const y = (1 - (point.y + 90) / 180) * 600;
333
319
 
334
- drawCity(x, y, city.name);
320
+ drawCity(x, y, city.name);
335
321
  });
336
322
  ```
337
323
 
338
324
  ### Navigate with Constant Bearing
339
325
 
340
326
  ```typescript
341
- import {
342
- rhumbBearing,
343
- destinationFromOriginOnRhumbLine
344
- } from '@ue-too/border';
327
+ import { destinationFromOriginOnRhumbLine, rhumbBearing } from '@ue-too/border';
345
328
 
346
329
  const start = { latitude: 50.0, longitude: -5.0 };
347
330
  const target = { latitude: 58.0, longitude: 3.0 };
@@ -355,12 +338,12 @@ const nauticalMileInMeters = 1852;
355
338
  let currentPos = start;
356
339
 
357
340
  for (let i = 1; i <= 10; i++) {
358
- currentPos = destinationFromOriginOnRhumbLine(
359
- currentPos,
360
- bearing,
361
- 50 * nauticalMileInMeters
362
- );
363
- console.log(`Waypoint ${i}:`, currentPos);
341
+ currentPos = destinationFromOriginOnRhumbLine(
342
+ currentPos,
343
+ bearing,
344
+ 50 * nauticalMileInMeters
345
+ );
346
+ console.log(`Waypoint ${i}:`, currentPos);
364
347
  }
365
348
  ```
366
349
 
@@ -372,20 +355,25 @@ import { greatCircleDistance } from '@ue-too/border';
372
355
  const userLocation = { latitude: 48.8566, longitude: 2.3522 }; // Paris
373
356
 
374
357
  const cities = [
375
- { name: 'London', coord: { latitude: 51.5074, longitude: -0.1278 } },
376
- { name: 'Berlin', coord: { latitude: 52.5200, longitude: 13.4050 } },
377
- { name: 'Madrid', coord: { latitude: 40.4168, longitude: -3.7038 } },
378
- { name: 'Rome', coord: { latitude: 41.9028, longitude: 12.4964 } }
358
+ { name: 'London', coord: { latitude: 51.5074, longitude: -0.1278 } },
359
+ { name: 'Berlin', coord: { latitude: 52.52, longitude: 13.405 } },
360
+ { name: 'Madrid', coord: { latitude: 40.4168, longitude: -3.7038 } },
361
+ { name: 'Rome', coord: { latitude: 41.9028, longitude: 12.4964 } },
379
362
  ];
380
363
 
381
364
  const distances = cities.map(city => ({
382
- ...city,
383
- distance: greatCircleDistance(userLocation, city.coord)
365
+ ...city,
366
+ distance: greatCircleDistance(userLocation, city.coord),
384
367
  }));
385
368
 
386
369
  distances.sort((a, b) => a.distance - b.distance);
387
- console.log('Nearest city:', distances[0].name,
388
- '- ', (distances[0].distance / 1000).toFixed(0), 'km');
370
+ console.log(
371
+ 'Nearest city:',
372
+ distances[0].name,
373
+ '- ',
374
+ (distances[0].distance / 1000).toFixed(0),
375
+ 'km'
376
+ );
389
377
  ```
390
378
 
391
379
  ### Globe Visualization with Orthographic Projection
@@ -397,21 +385,21 @@ import { orthoProjection } from '@ue-too/border';
397
385
  const viewCenter = { latitude: 50, longitude: 10 };
398
386
 
399
387
  const cities = [
400
- { name: 'London', coord: { latitude: 51.5074, longitude: -0.1278 } },
401
- { name: 'Paris', coord: { latitude: 48.8566, longitude: 2.3522 } },
402
- { name: 'Berlin', coord: { latitude: 52.5200, longitude: 13.4050 } }
388
+ { name: 'London', coord: { latitude: 51.5074, longitude: -0.1278 } },
389
+ { name: 'Paris', coord: { latitude: 48.8566, longitude: 2.3522 } },
390
+ { name: 'Berlin', coord: { latitude: 52.52, longitude: 13.405 } },
403
391
  ];
404
392
 
405
393
  cities.forEach(city => {
406
- const result = orthoProjection(city.coord, viewCenter);
394
+ const result = orthoProjection(city.coord, viewCenter);
407
395
 
408
- if (!result.clipped) {
409
- // City is visible on this hemisphere
410
- const screenX = result.coord.x * 400 + 400; // Scale to canvas
411
- const screenY = result.coord.y * 400 + 400;
396
+ if (!result.clipped) {
397
+ // City is visible on this hemisphere
398
+ const screenX = result.coord.x * 400 + 400; // Scale to canvas
399
+ const screenY = result.coord.y * 400 + 400;
412
400
 
413
- drawCityOnGlobe(screenX, screenY, city.name);
414
- }
401
+ drawCityOnGlobe(screenX, screenY, city.name);
402
+ }
415
403
  });
416
404
  ```
417
405
 
@@ -453,6 +441,7 @@ This library follows these principles:
453
441
  - **Intermediate points**: O(1) - no iteration required
454
442
 
455
443
  **Performance Tips:**
444
+
456
445
  - Cache distance and bearing calculations if coordinates don't change
457
446
  - For many points, batch projection calculations
458
447
  - Use appropriate projection for your use case (Mercator for general mapping, orthographic for globes)
package/greateCircle.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { GeoCoord } from "./projection";
1
+ import { GeoCoord } from './projection';
2
2
  /**
3
3
  * Calculates an intermediate point along a great circle path.
4
4
  *
package/index.d.ts CHANGED
@@ -115,6 +115,6 @@
115
115
  * @see {@link greateCircle} for great circle navigation
116
116
  * @see {@link rhumbLine} for rhumb line navigation
117
117
  */
118
- export * from "./projection";
119
- export * from "./greateCircle";
120
- export * from "./rhumbLine";
118
+ export * from './projection';
119
+ export * from './greateCircle';
120
+ export * from './rhumbLine';
package/index.js.map CHANGED
@@ -6,11 +6,11 @@
6
6
  "rhumbLine.ts"
7
7
  ],
8
8
  "sourcesContent": [
9
- "import { Point } from \"@ue-too/math\";\n\n/**\n * Geographic coordinate representing a location on Earth's surface.\n *\n * @remarks\n * Coordinates use the WGS84 standard:\n * - Latitude: -90 to 90 degrees (negative = south, positive = north)\n * - Longitude: -180 to 180 degrees (negative = west, positive = east)\n *\n * @category Types\n */\nexport type GeoCoord = {\n /** Longitude in degrees (-180 to 180) */\n longitude: number;\n /** Latitude in degrees (-90 to 90) */\n latitude: number;\n}\n\n/**\n * Projects a geographic coordinate to Mercator projection.\n *\n * @remarks\n * The Mercator projection is a cylindrical map projection that preserves angles\n * and shapes locally. It's widely used for navigation because straight lines on\n * the map represent constant bearings (rhumb lines).\n *\n * The projection uses Earth's mean radius of 6,371,000 meters.\n *\n * Note: The Mercator projection becomes increasingly distorted near the poles.\n *\n * @param interestPoint - The geographic coordinate to project\n * @param centerLongitude - The central meridian in degrees (default: 0)\n * @returns The projected point in meters from the central meridian\n *\n * @example\n * ```typescript\n * const coord = { latitude: 51.5074, longitude: -0.1278 }; // London\n * const point = mercatorProjection(coord);\n * console.log(point); // { x: -14232.4, y: 6711665.7 }\n *\n * // With custom center longitude\n * const pointCentered = mercatorProjection(coord, -0.1278);\n * console.log(pointCentered.x); // Close to 0\n * ```\n *\n * @category Projections\n */\nexport function mercatorProjection(interestPoint: GeoCoord, centerLongitude: number = 0): Point{\n const r = 6371000;\n const latitude = interestPoint.latitude * Math.PI / 180;\n const longitude = interestPoint.longitude * Math.PI / 180;\n let x = r * normalizeAngleMinusPiToPi(longitude - centerLongitude * Math.PI / 180);\n let y = r * Math.log(Math.tan(Math.PI / 4 + latitude / 2));\n return {x: x, y: y};\n}\n\n/**\n * Converts a Mercator projection point back to geographic coordinates.\n *\n * @remarks\n * This is the inverse of {@link mercatorProjection}. Given a point in Mercator\n * projection space (in meters), it returns the corresponding latitude/longitude.\n *\n * @param point - The point in Mercator projection (in meters)\n * @param centerLongitude - The central meridian in degrees (must match the forward projection)\n * @returns The geographic coordinate\n *\n * @example\n * ```typescript\n * const point = { x: -14232.4, y: 6711665.7 };\n * const coord = inverseMercatorProjection(point);\n * console.log(coord); // { latitude: ~51.5, longitude: ~-0.13 }\n * ```\n *\n * @category Projections\n */\nexport function inverseMercatorProjection(point: Point, centerLongitude: number = 0): GeoCoord{\n const r = 6371000;\n const longitude = point.x / r + centerLongitude;\n const latitude = 2 * Math.atan(Math.exp(point.y / r)) - Math.PI / 2;\n return {latitude: latitude * 180 / Math.PI, longitude: longitude * 180 / Math.PI};\n}\n\n/**\n * Projects a geographic coordinate to orthographic projection.\n *\n * @remarks\n * The orthographic projection shows Earth as it would appear from space,\n * displaying one hemisphere at a time. It's useful for globe-like visualizations.\n *\n * Points on the back hemisphere (not visible from the origin viewpoint) are\n * marked as clipped.\n *\n * The projection uses Earth's mean radius of 6,371,000 meters.\n *\n * @param interestPoint - The geographic coordinate to project\n * @param origin - The center point of the hemisphere to view\n * @returns Object with clipped flag and projected coordinate\n *\n * @example\n * ```typescript\n * const origin = { latitude: 45.0, longitude: 0.0 }; // View centered on France\n * const coord = { latitude: 51.5, longitude: -0.1 }; // London\n *\n * const result = orthoProjection(coord, origin);\n * if (!result.clipped) {\n * console.log('London is visible at:', result.coord);\n * } else {\n * console.log('London is on the back of the globe');\n * }\n * ```\n *\n * @category Projections\n */\nexport function orthoProjection(interestPoint: GeoCoord, origin: GeoCoord): {clipped: boolean, coord: Point}{\n const r = 6371000;\n const latitude = interestPoint.latitude * Math.PI / 180;\n const longitude = interestPoint.longitude * Math.PI / 180;\n const x = r * Math.cos(latitude) * Math.sin(longitude - origin.longitude * Math.PI / 180);\n const y = r * (Math.cos(origin.latitude * Math.PI / 180) * Math.sin(latitude) - Math.sin(origin.latitude * Math.PI / 180) * Math.cos(latitude) * Math.cos(longitude - origin.longitude * Math.PI / 180));\n const clipped = Math.sin(origin.latitude * Math.PI / 180) * Math.sin(latitude) + Math.cos(origin.latitude * Math.PI / 180) * Math.cos(latitude) * Math.cos(longitude - origin.longitude * Math.PI / 180);\n\n return {clipped: clipped < 0, coord: {x: x, y: y}};\n}\n\n/**\n * Converts an orthographic projection point back to geographic coordinates.\n *\n * @remarks\n * This is the inverse of {@link orthoProjection}. Given a point in orthographic\n * projection space (in meters), it returns the corresponding latitude/longitude.\n *\n * @param interestPoint - The point in orthographic projection (in meters)\n * @param origin - The center point of the hemisphere (must match the forward projection)\n * @returns The geographic coordinate\n *\n * @example\n * ```typescript\n * const origin = { latitude: 45.0, longitude: 0.0 };\n * const point = { x: 100000, y: 200000 }; // Some point in projection space\n * const coord = inverseOrthoProjection(point, origin);\n * console.log(coord); // { latitude: ..., longitude: ... }\n * ```\n *\n * @category Projections\n */\nexport function inverseOrthoProjection(interestPoint: Point, origin: GeoCoord): GeoCoord {\n const r = 6371000;\n const rho = Math.sqrt(interestPoint.x * interestPoint.x + interestPoint.y * interestPoint.y);\n const c = Math.asin(rho / r);\n const latitude = Math.asin(Math.cos(c) * Math.sin(origin.latitude * Math.PI / 180) + (interestPoint.y * Math.sin(c) * Math.cos(origin.latitude * Math.PI / 180)) / rho) * 180 / Math.PI;\n const longitude = origin.longitude + Math.atan2(interestPoint.x * Math.sin(c), rho * Math.cos(c)*Math.cos(origin.latitude * Math.PI / 180) - interestPoint.y * Math.sin(c) * Math.sin(origin.latitude * Math.PI / 180)) * 180 / Math.PI;\n return {latitude: latitude, longitude: longitude};\n}\n\nfunction normalizeAngleMinusPiToPi(angle: number): number {\n // Reduce the angle\n angle = angle % (Math.PI * 2);\n\n // Force it to be in the range -π to π\n angle = (angle + 3 * Math.PI) % (2 * Math.PI) - Math.PI;\n\n return angle;\n}\n",
10
- "import { GeoCoord } from \"./projection\";\n\n/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\n/* Geodesy representation conversion functions (c) Chris Veness 2002-2022 */\n/* MIT Licence */\n/* www.movable-type.co.uk/scripts/latlong.html */\n/* www.movable-type.co.uk/scripts/js/geodesy/geodesy-library.html#dms */\n/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\n\n\n/**\n * Calculates an intermediate point along a great circle path.\n *\n * @remarks\n * Given two points on Earth's surface, this finds a point at a specified\n * fraction along the great circle (shortest) path between them.\n *\n * Uses the spherical interpolation formula for accurate results on a sphere.\n *\n * @param startCoord - The starting geographic coordinate\n * @param endCoord - The ending geographic coordinate\n * @param fraction - The fraction along the path (0 = start, 1 = end, 0.5 = midpoint)\n * @returns The intermediate point at the specified fraction\n *\n * @example\n * ```typescript\n * const nyc = { latitude: 40.7128, longitude: -74.0060 };\n * const london = { latitude: 51.5074, longitude: -0.1278 };\n *\n * // Find point 25% of the way from NYC to London\n * const quarter = intermediatePointOnGreatCircle(nyc, london, 0.25);\n *\n * // Find point 75% of the way\n * const threeQuarters = intermediatePointOnGreatCircle(nyc, london, 0.75);\n * ```\n *\n * @category Great Circle\n */\nexport function intermediatePointOnGreatCircle(startCoord: GeoCoord, endCoord: GeoCoord, fraction: number): GeoCoord{\n const Δφ = (endCoord.latitude - startCoord.latitude) * Math.PI / 180;\n const Δλ = (endCoord.longitude - startCoord.longitude) * Math.PI / 180;\n const φ1 = startCoord.latitude * Math.PI / 180;\n const λ1 = startCoord.longitude * Math.PI / 180;\n const φ2 = endCoord.latitude * Math.PI / 180;\n const λ2 = endCoord.longitude * Math.PI / 180;\n const angularDistA = Math.sin(Δφ / 2) * Math.sin(Δφ / 2) +\n Math.cos(φ1) * Math.cos(φ2) *\n Math.sin(Δλ / 2) * Math.sin(Δλ / 2);\n const c = 2 * Math.atan2(Math.sqrt(angularDistA), Math.sqrt(1 - angularDistA));\n \n const a = Math.sin((1 - fraction) * c) / Math.sin(c);\n const b = Math.sin(fraction * c) / Math.sin(c);\n const x = a * Math.cos(φ1) * Math.cos(λ1) + b * Math.cos(φ2) * Math.cos(λ2);\n const y = a * Math.cos(φ1) * Math.sin(λ1) + b * Math.cos(φ2) * Math.sin(λ2);\n const z = a * Math.sin(φ1) * b * Math.sin(φ2);\n const φi = Math.atan2(z, Math.sqrt(x * x + y * y));\n const λi = Math.atan2(y, x);\n return {latitude: φi, longitude: λi};\n}\n\n/**\n * Calculates the midpoint along a great circle path.\n *\n * @remarks\n * This is a specialized, optimized version of {@link intermediatePointOnGreatCircle}\n * for finding the exact midpoint (fraction = 0.5).\n *\n * @param startCoord - The starting geographic coordinate\n * @param endCoord - The ending geographic coordinate\n * @returns The midpoint on the great circle path\n *\n * @example\n * ```typescript\n * const start = { latitude: 50.0, longitude: -5.0 };\n * const end = { latitude: 58.0, longitude: 3.0 };\n * const mid = midPointOnGreatCircle(start, end);\n * console.log('Midpoint:', mid);\n * ```\n *\n * @category Great Circle\n */\nexport function midPointOnGreatCircle(startCoord: GeoCoord, endCoord: GeoCoord): GeoCoord{\n const φ1 = startCoord.latitude * Math.PI / 180;\n const φ2 = endCoord.latitude * Math.PI / 180;\n const λ1 = startCoord.longitude * Math.PI / 180;\n const λ2 = endCoord.longitude * Math.PI / 180;\n const Bx = Math.cos(φ2) * Math.cos(λ2 - λ1);\n const By = Math.cos(φ2) * Math.sin(λ2 - λ1);\n const φ3 = Math.atan2(Math.sin(φ1) + Math.sin(φ2),\n Math.sqrt( (Math.cos(φ1) + Bx) * (Math.cos(φ1) + Bx) + By * By ) );\n const λ3 = λ1 + Math.atan2(By, Math.cos(φ1) + Bx);\n return {latitude: φ3, longitude: λ3};\n}\n\n/**\n * Calculate the initial bearing between two points on the Earth's surface. \n * (traveling along the great circle would result in different bearing from the start point to the end point)\n * \n * @param startCoord - The starting point in GeoCoord format.\n * @param endCoord - The ending point in GeoCoord format.\n * @returns The bearing in degrees.\n */\nexport function initialBearingOfGreatCircle(startCoord: GeoCoord, endCoord: GeoCoord): number{\n const φ1 = startCoord.latitude * Math.PI / 180;\n const φ2 = endCoord.latitude * Math.PI / 180;\n const λ1 = startCoord.longitude * Math.PI / 180;\n const λ2 = endCoord.longitude * Math.PI / 180;\n const y = Math.sin(λ21) * Math.cos(φ2);\n const x = Math.cos(φ1) * Math.sin(φ2) -\n Math.sin(φ1) * Math.cos(φ2)*Math.cos(λ2 - λ1);\n const θ = Math.atan2(y, x);\n const brng = (θ * 180 / Math.PI + 360) % 360; // in degrees\n return brng;\n}\n\n/**\n * Calculates the great circle distance between two points on Earth.\n *\n * @remarks\n * Uses the haversine formula to calculate the shortest distance over Earth's\n * surface between two geographic coordinates. This is the \"as-the-crow-flies\"\n * distance.\n *\n * The calculation assumes Earth's mean radius of 6,371,000 meters and treats\n * Earth as a perfect sphere.\n *\n * @param startCoord - The starting geographic coordinate\n * @param endCoord - The ending geographic coordinate\n * @returns The distance in meters\n *\n * @example\n * ```typescript\n * const nyc = { latitude: 40.7128, longitude: -74.0060 };\n * const london = { latitude: 51.5074, longitude: -0.1278 };\n *\n * const distance = greatCircleDistance(nyc, london);\n * console.log('Distance:', distance / 1000, 'km'); // ~5570 km\n * ```\n *\n * @category Great Circle\n */\nexport function greatCircleDistance(startCoord: GeoCoord, endCoord: GeoCoord): number{\n const R = 6371e3; // metres\n const φ1 = startCoord.latitude * Math.PI / 180; // φ, λ in radians\n const φ2 = endCoord.latitude * Math.PI / 180;\n const Δφ = (endCoord.latitude - startCoord.latitude) * Math.PI / 180;\n const Δλ = (endCoord.longitude - startCoord.longitude) * Math.PI / 180;\n\n const a = Math.sin(Δφ / 2) * Math.sin(Δφ / 2) +\n Math.cos(φ1) * Math.cos(φ2) *\n Math.sin(Δλ / 2) * Math.sin(Δλ / 2);\n const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\n const d = R * c; // in metres\n return d;\n} \n\n/**\n * Calculates the destination point given a start point, bearing, and distance on a great circle.\n *\n * @remarks\n * Starting from a given point and traveling along a great circle at a specific\n * initial bearing for a given distance, this calculates where you'll end up.\n *\n * Note: The bearing will change along the path (except when traveling due north/south\n * or along the equator) because great circles are not straight lines on most map projections.\n *\n * @param startCoord - The starting geographic coordinate\n * @param bearing - The initial bearing in degrees (0 = north, 90 = east, etc.)\n * @param distance - The distance to travel in meters\n * @returns The destination coordinate\n *\n * @example\n * ```typescript\n * const start = { latitude: 40.7128, longitude: -74.0060 }; // NYC\n *\n * // Travel 1000km northeast from NYC\n * const destination = destinationFromOriginOnGreatCircle(start, 45, 1000000);\n * console.log('Destination:', destination);\n * ```\n *\n * @category Great Circle\n */\nexport function destinationFromOriginOnGreatCircle(startCoord: GeoCoord, bearing: number, distance: number): GeoCoord{\n const R = 6371e3; // metres\n const φ1 = startCoord.latitude * Math.PI / 180; // φ, λ in radians\n const λ1 = startCoord.longitude * Math.PI / 180;\n const θ = bearing * Math.PI / 180;\n const d = distance / R; // angular distance in radians\n const φ2 = Math.asin(Math.sin(φ1) * Math.cos(d) +\n Math.cos(φ1) * Math.sin(d) * Math.cos(θ) );\n const λ2 = λ1 + Math.atan2(Math.sin(θ) * Math.sin(d) * Math.cos(φ1),\n Math.cos(d) - Math.sin(φ1) * Math.sin(φ2));\n return {latitude: φ2, longitude: λ2};\n}\n",
11
- "import { GeoCoord } from \"./projection\";\n\n/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\n/* Geodesy representation conversion functions (c) Chris Veness 2002-2022 */\n/* MIT Licence */\n/* www.movable-type.co.uk/scripts/latlong.html */\n/* www.movable-type.co.uk/scripts/js/geodesy/geodesy-library.html#dms */\n/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\n\n/**\n * Calculates the distance along a rhumb line between two points.\n *\n * @remarks\n * A rhumb line (also called loxodrome) is a path of constant bearing. Unlike great\n * circles, rhumb lines appear as straight lines on Mercator projections, making them\n * easier for navigation.\n *\n * Rhumb lines are generally slightly longer than great circle routes, except when\n * traveling due east/west along the equator or due north/south.\n *\n * Uses Earth's mean radius of 6,371,000 meters.\n *\n * @param startCoord - The starting geographic coordinate\n * @param endCoord - The ending geographic coordinate\n * @returns The distance in meters along the rhumb line\n *\n * @example\n * ```typescript\n * const start = { latitude: 50.0, longitude: -5.0 };\n * const end = { latitude: 58.0, longitude: 3.0 };\n *\n * const distance = rhumbDistance(start, end);\n * console.log('Rhumb distance:', distance / 1000, 'km');\n *\n * // Compare with great circle distance\n * const gcDistance = greatCircleDistance(start, end);\n * console.log('Great circle is', (distance - gcDistance) / 1000, 'km shorter');\n * ```\n *\n * @category Rhumb Line\n */\nexport function rhumbDistance(startCoord: GeoCoord, endCoord: GeoCoord): number{\n const R = 6371e3; // metres\n const φ1 = startCoord.latitude * Math.PI/180; // φ, λ in radians\n const φ2 = endCoord.latitude * Math.PI/180;\n const Δφ = (endCoord.latitude - startCoord.latitude) * Math.PI/180;\n let Δλ = (endCoord.longitude - startCoord.longitude) * Math.PI/180;\n const Δψ = Math.log(Math.tan(Math.PI / 4 + φ2 / 2)/Math.tan(Math.PI / 4 + φ1 / 2));\n const q = Math.abs(Δψ) > 10e-12 ? Δφ / Δψ : Math.cos(φ1); // E-W course becomes ill-conditioned with 0/0\n\n // if dLon over 180° take shorter rhumb line across the anti-meridian:\n if (Math.abs(Δλ) > Math.PI) Δλ = Δλ > 0 ? - (2 * Math.PI - Δλ) : (2 * Math.PI + Δλ);\n\n const dist = Math.sqrt(Δφ * Δφ + q * q * Δλ * Δλ) * R;\n return dist;\n}\n\n/**\n * Calculates the constant bearing along a rhumb line.\n *\n * @remarks\n * Unlike great circles where the bearing changes along the path, rhumb lines\n * maintain a constant bearing. This makes them simpler for navigation - you can\n * follow a single compass direction.\n *\n * @param startCoord - The starting geographic coordinate\n * @param endCoord - The ending geographic coordinate\n * @returns The constant bearing in degrees (0-360)\n *\n * @example\n * ```typescript\n * const start = { latitude: 50.0, longitude: -5.0 };\n * const end = { latitude: 58.0, longitude: 3.0 };\n *\n * const bearing = rhumbBearing(start, end);\n * console.log('Constant bearing:', bearing, 'degrees');\n *\n * // This bearing stays constant along the entire path\n * ```\n *\n * @category Rhumb Line\n */\nexport function rhumbBearing(startCoord: GeoCoord, endCoord: GeoCoord): number{\n const φ1 = startCoord.latitude * Math.PI / 180; // φ, λ in radians\n const φ2 = endCoord.latitude * Math.PI / 180;\n let Δλ = (endCoord.longitude - startCoord.longitude) * Math.PI / 180;\n const Δψ = Math.log(Math.tan(Math.PI / 4 + φ2 / 2) / Math.tan(Math.PI / 4 + φ1 / 2));\n\n // if dLon over 180° take shorter rhumb line across the anti-meridian:\n if (Math.abs(Δλ) > Math.PI) Δλ = Δλ > 0 ? -(2 * Math.PI-Δλ) : (2 * Math.PI + Δλ);\n\n const brng = Math.atan2(Δλ, Δψ) * 180 / Math.PI;\n return brng;\n}\n\n/**\n * Calculates the destination point given a start point, constant bearing, and distance on a rhumb line.\n *\n * @remarks\n * Starting from a given point and traveling at a constant bearing for a given\n * distance, this calculates where you'll end up. The bearing remains constant\n * throughout the journey.\n *\n * This is the rhumb line equivalent of {@link destinationFromOriginOnGreatCircle}.\n *\n * @param startCoord - The starting geographic coordinate\n * @param bearing - The constant bearing in degrees (0 = north, 90 = east, etc.)\n * @param distance - The distance to travel in meters\n * @returns The destination coordinate\n *\n * @example\n * ```typescript\n * const start = { latitude: 40.0, longitude: -74.0 };\n *\n * // Travel 500km on constant bearing of 45 degrees (northeast)\n * const destination = destinationFromOriginOnRhumbLine(start, 45, 500000);\n * console.log('Destination:', destination);\n * ```\n *\n * @category Rhumb Line\n */\nexport function destinationFromOriginOnRhumbLine(startCoord: GeoCoord, bearing: number, distance: number): GeoCoord{\n const R = 6371e3; // metres\n const φ1 = startCoord.latitude * Math.PI / 180; // φ, λ in radians\n const λ1 = startCoord.longitude * Math.PI / 180;\n const θ = bearing * Math.PI / 180;\n const d = distance;\n const δ = d / R;\n const Δφ = δ * Math.cos(θ);\n let φ2 = φ1 + Δφ;\n\n const Δψ = Math.log(Math.tan(φ2 / 2 + Math.PI / 4) / Math.tan(φ1 / 2 + Math.PI / 4));\n const q = Math.abs(Δψ) > 10e-12 ? Δφ / Δψ : Math.cos(φ1); // E-W course becomes ill-conditioned with 0/0\n\n const Δλ = δ * Math.sin(θ) / q;\n const λ2 = λ1 + Δλ;\n\n // check for some daft bugger going past the pole, normalise latitude if so\n if (Math.abs(φ2) > Math.PI / 2) φ2 = φ2 > 0 ? Math.PI - φ2 : -Math.PI - φ2;\n return {latitude: φ2, longitude: λ2};\n}\n\n/**\n * Calculates the midpoint along a rhumb line.\n *\n * @remarks\n * Finds the point exactly halfway along a rhumb line path between two points.\n *\n * @param startCoord - The starting geographic coordinate\n * @param endCoord - The ending geographic coordinate\n * @returns The midpoint on the rhumb line path\n *\n * @example\n * ```typescript\n * const start = { latitude: 50.0, longitude: -5.0 };\n * const end = { latitude: 58.0, longitude: 3.0 };\n *\n * const mid = midPointOnRhumbLine(start, end);\n * console.log('Midpoint:', mid);\n * ```\n *\n * @category Rhumb Line\n */\nexport function midPointOnRhumbLine(startCoord: GeoCoord, endCoord: GeoCoord): GeoCoord{\n let λ1 = startCoord.longitude * Math.PI / 180; \n const λ2 = endCoord.longitude * Math.PI / 180;\n const φ1 = startCoord.latitude * Math.PI / 180;\n const φ2 = endCoord.latitude * Math.PI / 180; \n if (Math.abs(λ2 - λ1) > Math.PI) λ1 += 2 * Math.PI; // crossing anti-meridian\n\n const φ3 = (φ1 + φ2) / 2;\n const f1 = Math.tan(Math.PI / 4 + φ1 / 2);\n const f2 = Math.tan(Math.PI / 4 + φ2 / 2);\n const f3 = Math.tan(Math.PI / 4 + φ3 / 2);\n let λ3 = ( (λ2 - λ1) * Math.log(f3) + λ1 * Math.log(f2) - λ2 * Math.log(f1) ) / Math.log(f2 / f1);\n\n if (!isFinite(λ3)) λ3 = (λ1 + λ2) / 2; // parallel of latitude\n return {latitude: φ3, longitude: λ3};\n}\n"
9
+ "import { Point } from '@ue-too/math';\n\n/**\n * Geographic coordinate representing a location on Earth's surface.\n *\n * @remarks\n * Coordinates use the WGS84 standard:\n * - Latitude: -90 to 90 degrees (negative = south, positive = north)\n * - Longitude: -180 to 180 degrees (negative = west, positive = east)\n *\n * @category Types\n */\nexport type GeoCoord = {\n /** Longitude in degrees (-180 to 180) */\n longitude: number;\n /** Latitude in degrees (-90 to 90) */\n latitude: number;\n};\n\n/**\n * Projects a geographic coordinate to Mercator projection.\n *\n * @remarks\n * The Mercator projection is a cylindrical map projection that preserves angles\n * and shapes locally. It's widely used for navigation because straight lines on\n * the map represent constant bearings (rhumb lines).\n *\n * The projection uses Earth's mean radius of 6,371,000 meters.\n *\n * Note: The Mercator projection becomes increasingly distorted near the poles.\n *\n * @param interestPoint - The geographic coordinate to project\n * @param centerLongitude - The central meridian in degrees (default: 0)\n * @returns The projected point in meters from the central meridian\n *\n * @example\n * ```typescript\n * const coord = { latitude: 51.5074, longitude: -0.1278 }; // London\n * const point = mercatorProjection(coord);\n * console.log(point); // { x: -14232.4, y: 6711665.7 }\n *\n * // With custom center longitude\n * const pointCentered = mercatorProjection(coord, -0.1278);\n * console.log(pointCentered.x); // Close to 0\n * ```\n *\n * @category Projections\n */\nexport function mercatorProjection(\n interestPoint: GeoCoord,\n centerLongitude: number = 0\n): Point {\n const r = 6371000;\n const latitude = (interestPoint.latitude * Math.PI) / 180;\n const longitude = (interestPoint.longitude * Math.PI) / 180;\n let x =\n r *\n normalizeAngleMinusPiToPi(\n longitude - (centerLongitude * Math.PI) / 180\n );\n let y = r * Math.log(Math.tan(Math.PI / 4 + latitude / 2));\n return { x: x, y: y };\n}\n\n/**\n * Converts a Mercator projection point back to geographic coordinates.\n *\n * @remarks\n * This is the inverse of {@link mercatorProjection}. Given a point in Mercator\n * projection space (in meters), it returns the corresponding latitude/longitude.\n *\n * @param point - The point in Mercator projection (in meters)\n * @param centerLongitude - The central meridian in degrees (must match the forward projection)\n * @returns The geographic coordinate\n *\n * @example\n * ```typescript\n * const point = { x: -14232.4, y: 6711665.7 };\n * const coord = inverseMercatorProjection(point);\n * console.log(coord); // { latitude: ~51.5, longitude: ~-0.13 }\n * ```\n *\n * @category Projections\n */\nexport function inverseMercatorProjection(\n point: Point,\n centerLongitude: number = 0\n): GeoCoord {\n const r = 6371000;\n const longitude = point.x / r + centerLongitude;\n const latitude = 2 * Math.atan(Math.exp(point.y / r)) - Math.PI / 2;\n return {\n latitude: (latitude * 180) / Math.PI,\n longitude: (longitude * 180) / Math.PI,\n };\n}\n\n/**\n * Projects a geographic coordinate to orthographic projection.\n *\n * @remarks\n * The orthographic projection shows Earth as it would appear from space,\n * displaying one hemisphere at a time. It's useful for globe-like visualizations.\n *\n * Points on the back hemisphere (not visible from the origin viewpoint) are\n * marked as clipped.\n *\n * The projection uses Earth's mean radius of 6,371,000 meters.\n *\n * @param interestPoint - The geographic coordinate to project\n * @param origin - The center point of the hemisphere to view\n * @returns Object with clipped flag and projected coordinate\n *\n * @example\n * ```typescript\n * const origin = { latitude: 45.0, longitude: 0.0 }; // View centered on France\n * const coord = { latitude: 51.5, longitude: -0.1 }; // London\n *\n * const result = orthoProjection(coord, origin);\n * if (!result.clipped) {\n * console.log('London is visible at:', result.coord);\n * } else {\n * console.log('London is on the back of the globe');\n * }\n * ```\n *\n * @category Projections\n */\nexport function orthoProjection(\n interestPoint: GeoCoord,\n origin: GeoCoord\n): { clipped: boolean; coord: Point } {\n const r = 6371000;\n const latitude = (interestPoint.latitude * Math.PI) / 180;\n const longitude = (interestPoint.longitude * Math.PI) / 180;\n const x =\n r *\n Math.cos(latitude) *\n Math.sin(longitude - (origin.longitude * Math.PI) / 180);\n const y =\n r *\n (Math.cos((origin.latitude * Math.PI) / 180) * Math.sin(latitude) -\n Math.sin((origin.latitude * Math.PI) / 180) *\n Math.cos(latitude) *\n Math.cos(longitude - (origin.longitude * Math.PI) / 180));\n const clipped =\n Math.sin((origin.latitude * Math.PI) / 180) * Math.sin(latitude) +\n Math.cos((origin.latitude * Math.PI) / 180) *\n Math.cos(latitude) *\n Math.cos(longitude - (origin.longitude * Math.PI) / 180);\n\n return { clipped: clipped < 0, coord: { x: x, y: y } };\n}\n\n/**\n * Converts an orthographic projection point back to geographic coordinates.\n *\n * @remarks\n * This is the inverse of {@link orthoProjection}. Given a point in orthographic\n * projection space (in meters), it returns the corresponding latitude/longitude.\n *\n * @param interestPoint - The point in orthographic projection (in meters)\n * @param origin - The center point of the hemisphere (must match the forward projection)\n * @returns The geographic coordinate\n *\n * @example\n * ```typescript\n * const origin = { latitude: 45.0, longitude: 0.0 };\n * const point = { x: 100000, y: 200000 }; // Some point in projection space\n * const coord = inverseOrthoProjection(point, origin);\n * console.log(coord); // { latitude: ..., longitude: ... }\n * ```\n *\n * @category Projections\n */\nexport function inverseOrthoProjection(\n interestPoint: Point,\n origin: GeoCoord\n): GeoCoord {\n const r = 6371000;\n const rho = Math.sqrt(\n interestPoint.x * interestPoint.x + interestPoint.y * interestPoint.y\n );\n const c = Math.asin(rho / r);\n const latitude =\n (Math.asin(\n Math.cos(c) * Math.sin((origin.latitude * Math.PI) / 180) +\n (interestPoint.y *\n Math.sin(c) *\n Math.cos((origin.latitude * Math.PI) / 180)) /\n rho\n ) *\n 180) /\n Math.PI;\n const longitude =\n origin.longitude +\n (Math.atan2(\n interestPoint.x * Math.sin(c),\n rho * Math.cos(c) * Math.cos((origin.latitude * Math.PI) / 180) -\n interestPoint.y *\n Math.sin(c) *\n Math.sin((origin.latitude * Math.PI) / 180)\n ) *\n 180) /\n Math.PI;\n return { latitude: latitude, longitude: longitude };\n}\n\nfunction normalizeAngleMinusPiToPi(angle: number): number {\n // Reduce the angle\n angle = angle % (Math.PI * 2);\n\n // Force it to be in the range -π to π\n angle = ((angle + 3 * Math.PI) % (2 * Math.PI)) - Math.PI;\n\n return angle;\n}\n",
10
+ "import { GeoCoord } from './projection';\n\n/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\n/* Geodesy representation conversion functions (c) Chris Veness 2002-2022 */\n/* MIT Licence */\n/* www.movable-type.co.uk/scripts/latlong.html */\n/* www.movable-type.co.uk/scripts/js/geodesy/geodesy-library.html#dms */\n/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\n\n/**\n * Calculates an intermediate point along a great circle path.\n *\n * @remarks\n * Given two points on Earth's surface, this finds a point at a specified\n * fraction along the great circle (shortest) path between them.\n *\n * Uses the spherical interpolation formula for accurate results on a sphere.\n *\n * @param startCoord - The starting geographic coordinate\n * @param endCoord - The ending geographic coordinate\n * @param fraction - The fraction along the path (0 = start, 1 = end, 0.5 = midpoint)\n * @returns The intermediate point at the specified fraction\n *\n * @example\n * ```typescript\n * const nyc = { latitude: 40.7128, longitude: -74.0060 };\n * const london = { latitude: 51.5074, longitude: -0.1278 };\n *\n * // Find point 25% of the way from NYC to London\n * const quarter = intermediatePointOnGreatCircle(nyc, london, 0.25);\n *\n * // Find point 75% of the way\n * const threeQuarters = intermediatePointOnGreatCircle(nyc, london, 0.75);\n * ```\n *\n * @category Great Circle\n */\nexport function intermediatePointOnGreatCircle(\n startCoord: GeoCoord,\n endCoord: GeoCoord,\n fraction: number\n): GeoCoord {\n const Δφ = ((endCoord.latitude - startCoord.latitude) * Math.PI) / 180;\n const Δλ = ((endCoord.longitude - startCoord.longitude) * Math.PI) / 180;\n const φ1 = (startCoord.latitude * Math.PI) / 180;\n const λ1 = (startCoord.longitude * Math.PI) / 180;\n const φ2 = (endCoord.latitude * Math.PI) / 180;\n const λ2 = (endCoord.longitude * Math.PI) / 180;\n const angularDistA =\n Math.sin(Δφ / 2) * Math.sin(Δφ / 2) +\n Math.cos(φ1) * Math.cos(φ2) * Math.sin(Δλ / 2) * Math.sin(Δλ / 2);\n const c =\n 2 * Math.atan2(Math.sqrt(angularDistA), Math.sqrt(1 - angularDistA));\n\n const a = Math.sin((1 - fraction) * c) / Math.sin(c);\n const b = Math.sin(fraction * c) / Math.sin(c);\n const x = a * Math.cos(φ1) * Math.cos(λ1) + b * Math.cos(φ2) * Math.cos(λ2);\n const y = a * Math.cos(φ1) * Math.sin(λ1) + b * Math.cos(φ2) * Math.sin(λ2);\n const z = a * Math.sin(φ1) * b * Math.sin(φ2);\n const φi = Math.atan2(z, Math.sqrt(x * x + y * y));\n const λi = Math.atan2(y, x);\n return { latitude: φi, longitude: λi };\n}\n\n/**\n * Calculates the midpoint along a great circle path.\n *\n * @remarks\n * This is a specialized, optimized version of {@link intermediatePointOnGreatCircle}\n * for finding the exact midpoint (fraction = 0.5).\n *\n * @param startCoord - The starting geographic coordinate\n * @param endCoord - The ending geographic coordinate\n * @returns The midpoint on the great circle path\n *\n * @example\n * ```typescript\n * const start = { latitude: 50.0, longitude: -5.0 };\n * const end = { latitude: 58.0, longitude: 3.0 };\n * const mid = midPointOnGreatCircle(start, end);\n * console.log('Midpoint:', mid);\n * ```\n *\n * @category Great Circle\n */\nexport function midPointOnGreatCircle(\n startCoord: GeoCoord,\n endCoord: GeoCoord\n): GeoCoord {\n const φ1 = (startCoord.latitude * Math.PI) / 180;\n const φ2 = (endCoord.latitude * Math.PI) / 180;\n const λ1 = (startCoord.longitude * Math.PI) / 180;\n const λ2 = (endCoord.longitude * Math.PI) / 180;\n const Bx = Math.cos(φ2) * Math.cos(λ2 - λ1);\n const By = Math.cos(φ2) * Math.sin(λ2 - λ1);\n const φ3 = Math.atan2(\n Math.sin(φ1) + Math.sin(φ2),\n Math.sqrt((Math.cos(φ1) + Bx) * (Math.cos(φ1) + Bx) + By * By)\n );\n const λ3 = λ1 + Math.atan2(By, Math.cos(φ1) + Bx);\n return { latitude: φ3, longitude: λ3 };\n}\n\n/**\n * Calculate the initial bearing between two points on the Earth's surface.\n * (traveling along the great circle would result in different bearing from the start point to the end point)\n *\n * @param startCoord - The starting point in GeoCoord format.\n * @param endCoord - The ending point in GeoCoord format.\n * @returns The bearing in degrees.\n */\nexport function initialBearingOfGreatCircle(\n startCoord: GeoCoord,\n endCoord: GeoCoord\n): number {\n const φ1 = (startCoord.latitude * Math.PI) / 180;\n const φ2 = (endCoord.latitude * Math.PI) / 180;\n const λ1 = (startCoord.longitude * Math.PI) / 180;\n const λ2 = (endCoord.longitude * Math.PI) / 180;\n const y = Math.sin(λ2 - λ1) * Math.cos(φ2);\n const x =\n Math.cos(φ1) * Math.sin(φ2) -\n Math.sin(φ1) * Math.cos(φ2) * Math.cos(λ2 - λ1);\n const θ = Math.atan2(y, x);\n const brng = ((θ * 180) / Math.PI + 360) % 360; // in degrees\n return brng;\n}\n\n/**\n * Calculates the great circle distance between two points on Earth.\n *\n * @remarks\n * Uses the haversine formula to calculate the shortest distance over Earth's\n * surface between two geographic coordinates. This is the \"as-the-crow-flies\"\n * distance.\n *\n * The calculation assumes Earth's mean radius of 6,371,000 meters and treats\n * Earth as a perfect sphere.\n *\n * @param startCoord - The starting geographic coordinate\n * @param endCoord - The ending geographic coordinate\n * @returns The distance in meters\n *\n * @example\n * ```typescript\n * const nyc = { latitude: 40.7128, longitude: -74.0060 };\n * const london = { latitude: 51.5074, longitude: -0.1278 };\n *\n * const distance = greatCircleDistance(nyc, london);\n * console.log('Distance:', distance / 1000, 'km'); // ~5570 km\n * ```\n *\n * @category Great Circle\n */\nexport function greatCircleDistance(\n startCoord: GeoCoord,\n endCoord: GeoCoord\n): number {\n const R = 6371e3; // metres\n const φ1 = (startCoord.latitude * Math.PI) / 180; // φ, λ in radians\n const φ2 = (endCoord.latitude * Math.PI) / 180;\n const Δφ = ((endCoord.latitude - startCoord.latitude) * Math.PI) / 180;\n const Δλ = ((endCoord.longitude - startCoord.longitude) * Math.PI) / 180;\n\n const a =\n Math.sin(Δφ / 2) * Math.sin(Δφ / 2) +\n Math.cos(φ1) * Math.cos(φ2) * Math.sin(Δλ / 2) * Math.sin(Δλ / 2);\n const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\n const d = R * c; // in metres\n return d;\n}\n\n/**\n * Calculates the destination point given a start point, bearing, and distance on a great circle.\n *\n * @remarks\n * Starting from a given point and traveling along a great circle at a specific\n * initial bearing for a given distance, this calculates where you'll end up.\n *\n * Note: The bearing will change along the path (except when traveling due north/south\n * or along the equator) because great circles are not straight lines on most map projections.\n *\n * @param startCoord - The starting geographic coordinate\n * @param bearing - The initial bearing in degrees (0 = north, 90 = east, etc.)\n * @param distance - The distance to travel in meters\n * @returns The destination coordinate\n *\n * @example\n * ```typescript\n * const start = { latitude: 40.7128, longitude: -74.0060 }; // NYC\n *\n * // Travel 1000km northeast from NYC\n * const destination = destinationFromOriginOnGreatCircle(start, 45, 1000000);\n * console.log('Destination:', destination);\n * ```\n *\n * @category Great Circle\n */\nexport function destinationFromOriginOnGreatCircle(\n startCoord: GeoCoord,\n bearing: number,\n distance: number\n): GeoCoord {\n const R = 6371e3; // metres\n const φ1 = (startCoord.latitude * Math.PI) / 180; // φ, λ in radians\n const λ1 = (startCoord.longitude * Math.PI) / 180;\n const θ = (bearing * Math.PI) / 180;\n const d = distance / R; // angular distance in radians\n const φ2 = Math.asin(\n Math.sin(φ1) * Math.cos(d) + Math.cos(φ1) * Math.sin(d) * Math.cos(θ)\n );\n const λ2 =\n λ1 +\n Math.atan2(\n Math.sin(θ) * Math.sin(d) * Math.cos(φ1),\n Math.cos(d) - Math.sin(φ1) * Math.sin(φ2)\n );\n return { latitude: φ2, longitude: λ2 };\n}\n",
11
+ "import { GeoCoord } from './projection';\n\n/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\n/* Geodesy representation conversion functions (c) Chris Veness 2002-2022 */\n/* MIT Licence */\n/* www.movable-type.co.uk/scripts/latlong.html */\n/* www.movable-type.co.uk/scripts/js/geodesy/geodesy-library.html#dms */\n/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\n\n/**\n * Calculates the distance along a rhumb line between two points.\n *\n * @remarks\n * A rhumb line (also called loxodrome) is a path of constant bearing. Unlike great\n * circles, rhumb lines appear as straight lines on Mercator projections, making them\n * easier for navigation.\n *\n * Rhumb lines are generally slightly longer than great circle routes, except when\n * traveling due east/west along the equator or due north/south.\n *\n * Uses Earth's mean radius of 6,371,000 meters.\n *\n * @param startCoord - The starting geographic coordinate\n * @param endCoord - The ending geographic coordinate\n * @returns The distance in meters along the rhumb line\n *\n * @example\n * ```typescript\n * const start = { latitude: 50.0, longitude: -5.0 };\n * const end = { latitude: 58.0, longitude: 3.0 };\n *\n * const distance = rhumbDistance(start, end);\n * console.log('Rhumb distance:', distance / 1000, 'km');\n *\n * // Compare with great circle distance\n * const gcDistance = greatCircleDistance(start, end);\n * console.log('Great circle is', (distance - gcDistance) / 1000, 'km shorter');\n * ```\n *\n * @category Rhumb Line\n */\nexport function rhumbDistance(\n startCoord: GeoCoord,\n endCoord: GeoCoord\n): number {\n const R = 6371e3; // metres\n const φ1 = (startCoord.latitude * Math.PI) / 180; // φ, λ in radians\n const φ2 = (endCoord.latitude * Math.PI) / 180;\n const Δφ = ((endCoord.latitude - startCoord.latitude) * Math.PI) / 180;\n let Δλ = ((endCoord.longitude - startCoord.longitude) * Math.PI) / 180;\n const Δψ = Math.log(\n Math.tan(Math.PI / 4 + φ2 / 2) / Math.tan(Math.PI / 4 + φ1 / 2)\n );\n const q = Math.abs(Δψ) > 10e-12 ? Δφ / Δψ : Math.cos(φ1); // E-W course becomes ill-conditioned with 0/0\n\n // if dLon over 180° take shorter rhumb line across the anti-meridian:\n if (Math.abs(Δλ) > Math.PI)\n Δλ = Δλ > 0 ? -(2 * Math.PI - Δλ) : 2 * Math.PI + Δλ;\n\n const dist = Math.sqrt(Δφ * Δφ + q * q * Δλ * Δλ) * R;\n return dist;\n}\n\n/**\n * Calculates the constant bearing along a rhumb line.\n *\n * @remarks\n * Unlike great circles where the bearing changes along the path, rhumb lines\n * maintain a constant bearing. This makes them simpler for navigation - you can\n * follow a single compass direction.\n *\n * @param startCoord - The starting geographic coordinate\n * @param endCoord - The ending geographic coordinate\n * @returns The constant bearing in degrees (0-360)\n *\n * @example\n * ```typescript\n * const start = { latitude: 50.0, longitude: -5.0 };\n * const end = { latitude: 58.0, longitude: 3.0 };\n *\n * const bearing = rhumbBearing(start, end);\n * console.log('Constant bearing:', bearing, 'degrees');\n *\n * // This bearing stays constant along the entire path\n * ```\n *\n * @category Rhumb Line\n */\nexport function rhumbBearing(startCoord: GeoCoord, endCoord: GeoCoord): number {\n const φ1 = (startCoord.latitude * Math.PI) / 180; // φ, λ in radians\n const φ2 = (endCoord.latitude * Math.PI) / 180;\n let Δλ = ((endCoord.longitude - startCoord.longitude) * Math.PI) / 180;\n const Δψ = Math.log(\n Math.tan(Math.PI / 4 + φ2 / 2) / Math.tan(Math.PI / 4 + φ1 / 2)\n );\n\n // if dLon over 180° take shorter rhumb line across the anti-meridian:\n if (Math.abs(Δλ) > Math.PI)\n Δλ = Δλ > 0 ? -(2 * Math.PI - Δλ) : 2 * Math.PI + Δλ;\n\n const brng = (Math.atan2(Δλ, Δψ) * 180) / Math.PI;\n return brng;\n}\n\n/**\n * Calculates the destination point given a start point, constant bearing, and distance on a rhumb line.\n *\n * @remarks\n * Starting from a given point and traveling at a constant bearing for a given\n * distance, this calculates where you'll end up. The bearing remains constant\n * throughout the journey.\n *\n * This is the rhumb line equivalent of {@link destinationFromOriginOnGreatCircle}.\n *\n * @param startCoord - The starting geographic coordinate\n * @param bearing - The constant bearing in degrees (0 = north, 90 = east, etc.)\n * @param distance - The distance to travel in meters\n * @returns The destination coordinate\n *\n * @example\n * ```typescript\n * const start = { latitude: 40.0, longitude: -74.0 };\n *\n * // Travel 500km on constant bearing of 45 degrees (northeast)\n * const destination = destinationFromOriginOnRhumbLine(start, 45, 500000);\n * console.log('Destination:', destination);\n * ```\n *\n * @category Rhumb Line\n */\nexport function destinationFromOriginOnRhumbLine(\n startCoord: GeoCoord,\n bearing: number,\n distance: number\n): GeoCoord {\n const R = 6371e3; // metres\n const φ1 = (startCoord.latitude * Math.PI) / 180; // φ, λ in radians\n const λ1 = (startCoord.longitude * Math.PI) / 180;\n const θ = (bearing * Math.PI) / 180;\n const d = distance;\n const δ = d / R;\n const Δφ = δ * Math.cos(θ);\n let φ2 = φ1 + Δφ;\n\n const Δψ = Math.log(\n Math.tan(φ2 / 2 + Math.PI / 4) / Math.tan(φ1 / 2 + Math.PI / 4)\n );\n const q = Math.abs(Δψ) > 10e-12 ? Δφ / Δψ : Math.cos(φ1); // E-W course becomes ill-conditioned with 0/0\n\n const Δλ = (δ * Math.sin(θ)) / q;\n const λ2 = λ1 + Δλ;\n\n // check for some daft bugger going past the pole, normalise latitude if so\n if (Math.abs(φ2) > Math.PI / 2) φ2 = φ2 > 0 ? Math.PI - φ2 : -Math.PI - φ2;\n return { latitude: φ2, longitude: λ2 };\n}\n\n/**\n * Calculates the midpoint along a rhumb line.\n *\n * @remarks\n * Finds the point exactly halfway along a rhumb line path between two points.\n *\n * @param startCoord - The starting geographic coordinate\n * @param endCoord - The ending geographic coordinate\n * @returns The midpoint on the rhumb line path\n *\n * @example\n * ```typescript\n * const start = { latitude: 50.0, longitude: -5.0 };\n * const end = { latitude: 58.0, longitude: 3.0 };\n *\n * const mid = midPointOnRhumbLine(start, end);\n * console.log('Midpoint:', mid);\n * ```\n *\n * @category Rhumb Line\n */\nexport function midPointOnRhumbLine(\n startCoord: GeoCoord,\n endCoord: GeoCoord\n): GeoCoord {\n let λ1 = (startCoord.longitude * Math.PI) / 180;\n const λ2 = (endCoord.longitude * Math.PI) / 180;\n const φ1 = (startCoord.latitude * Math.PI) / 180;\n const φ2 = (endCoord.latitude * Math.PI) / 180;\n if (Math.abs(λ2 - λ1) > Math.PI) λ1 += 2 * Math.PI; // crossing anti-meridian\n\n const φ3 = (φ1 + φ2) / 2;\n const f1 = Math.tan(Math.PI / 4 + φ1 / 2);\n const f2 = Math.tan(Math.PI / 4 + φ2 / 2);\n const f3 = Math.tan(Math.PI / 4 + φ3 / 2);\n let λ3 =\n ((λ2 - λ1) * Math.log(f3) + λ1 * Math.log(f2) - λ2 * Math.log(f1)) /\n Math.log(f2 / f1);\n\n if (!isFinite(λ3)) λ3 = (λ1 + λ2) / 2; // parallel of latitude\n return { latitude: φ3, longitude: λ3 };\n}\n"
12
12
  ],
13
- "mappings": "AAgDO,SAAS,CAAkB,CAAC,EAAyB,EAA0B,EAAS,CAE3F,IAAM,EAAW,EAAc,SAAW,KAAK,GAAK,IAC9C,EAAY,EAAc,UAAY,KAAK,GAAK,IAClD,EAHM,QAGE,EAA0B,EAAY,EAAkB,KAAK,GAAK,GAAG,EAC7E,EAJM,QAIE,KAAK,IAAI,KAAK,IAAI,KAAK,GAAK,EAAI,EAAW,CAAC,CAAC,EACzD,MAAO,CAAC,EAAG,EAAG,EAAG,CAAC,EAuBf,SAAS,CAAyB,CAAC,EAAc,EAA0B,EAAY,CAE1F,IAAM,EAAY,EAAM,EADd,QACsB,EAEhC,MAAO,CAAC,UADS,EAAI,KAAK,KAAK,KAAK,IAAI,EAAM,EAFpC,OAEyC,CAAC,EAAI,KAAK,GAAK,GACrC,IAAM,KAAK,GAAI,UAAW,EAAY,IAAM,KAAK,EAAE,EAkC7E,SAAS,CAAe,CAAC,EAAyB,EAAmD,CAExG,IAAM,EAAW,EAAc,SAAW,KAAK,GAAK,IAC9C,EAAY,EAAc,UAAY,KAAK,GAAK,IAChD,EAHI,QAGI,KAAK,IAAI,CAAQ,EAAI,KAAK,IAAI,EAAY,EAAO,UAAY,KAAK,GAAK,GAAG,EAClF,EAJI,SAIK,KAAK,IAAI,EAAO,SAAW,KAAK,GAAK,GAAG,EAAI,KAAK,IAAI,CAAQ,EAAI,KAAK,IAAI,EAAO,SAAW,KAAK,GAAK,GAAG,EAAI,KA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CAAG,EAwBjC,SAAS,CAAmB,CAC/B,EACA,EACQ,CACR,IAAI,EAAK,EAAW,UAAY,KAAK,GAAM,IACrC,EAAK,EAAS,UAAY,KAAK,GAAM,IACrC,EAAK,EAAW,SAAW,KAAK,GAAM,IACtC,EAAK,EAAS,SAAW,KAAK,GAAM,IAC1C,GAAI,KAAK,IAAI,EAAI,CAAE,EAAI,KAAK,GAAI,GAAM,EAAI,KAAK,GAE/C,IAAM,GAAK,EAAK,GAAM,EAChB,EAAK,KAAK,IAAI,KAAK,GAAK,EAAI,EAAI,CAAC,EACjC,EAAK,KAAK,IAAI,KAAK,GAAK,EAAI,EAAI,CAAC,EACjC,EAAK,KAAK,IAAI,KAAK,GAAK,EAAI,EAAI,CAAC,EACnC,IACE,EAAI,GAAM,KAAK,IAAI,CAAE,EAAI,EAAK,KAAK,IAAI,CAAE,EAAI,EAAK,KAAK,IAAI,CAAE,GAC/D,KAAK,IAAI,EAAK,CAAE,EAEpB,GAAI,CAAC,SAAS,CAAC,EAAG,GAAM,EAAK,GAAM,EACnC,MAAO,CAAE,SAAU,EAAG,UAAW,CAAG",
14
14
  "debugId": "ADDDACDC1E32424A64756E2164756E21",
15
15
  "names": []
16
16
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ue-too/border",
3
3
  "type": "module",
4
- "version": "0.14.0",
4
+ "version": "0.15.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/ue-too/ue-too.git"
@@ -20,7 +20,7 @@
20
20
  "./package.json": "./package.json"
21
21
  },
22
22
  "dependencies": {
23
- "@ue-too/math": "^0.14.0"
23
+ "@ue-too/math": "^0.15.0"
24
24
  },
25
25
  "main": "./index.js",
26
26
  "types": "./index.d.ts",
package/projection.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Point } from "@ue-too/math";
1
+ import { Point } from '@ue-too/math';
2
2
  /**
3
3
  * Geographic coordinate representing a location on Earth's surface.
4
4
  *
package/rhumbLine.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { GeoCoord } from "./projection";
1
+ import { GeoCoord } from './projection';
2
2
  /**
3
3
  * Calculates the distance along a rhumb line between two points.
4
4
  *