@idm-plugin/geo 2.0.7 → 2.0.9

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.
@@ -19,6 +19,15 @@ export interface Coordinate {
19
19
  pilot?: boolean;
20
20
  positionTime?: number;
21
21
  utc?: string;
22
+ name?: string;
23
+ description?: string;
24
+ port?: number;
25
+ stbd?: number;
26
+ arrRad?: number;
27
+ rot?: number;
28
+ turnRad?: number;
29
+ timeZone?: string;
30
+ timeZoneDir?: string;
22
31
  }
23
32
  export declare class LaneHelper {
24
33
  /**
@@ -42,7 +51,7 @@ export declare class LaneHelper {
42
51
  static calculateDistance(from: Coordinate, to: Coordinate, rhumb?: boolean, precision?: number, units?: string): number;
43
52
  /**
44
53
  * 计算航线距离
45
- * @param route [[[lng, lat],[lng, lat]]]
54
+ * @param route
46
55
  * @param precision
47
56
  * @param units
48
57
  */
@@ -333,13 +342,37 @@ export declare class LaneHelper {
333
342
  * @param route
334
343
  */
335
344
  static reverseRoute(route: number[][][]): number[][][];
345
+ /**
346
+ * 翻转坐标
347
+ * @param coordinates
348
+ */
336
349
  static reverseCoordinates(coordinates: Coordinate[]): Coordinate[];
350
+ /**
351
+ * XML转义
352
+ * @param s
353
+ */
354
+ static xmlEscape(s: any): string;
337
355
  /**
338
356
  * 路径转RTZ
339
357
  * @param name 路径名称
340
358
  * @param waypoints 途径点
359
+ * @see https://cirm.org/rtz-xml-schemas
360
+ * @see https://cirm.org/api/documents/download/64?documents/October2022/bWjrTyyfNGseK9ch3TKf.xsd
361
+ *
341
362
  */
342
363
  static waypoints2RTZ(name: string, waypoints: Coordinate[]): string;
364
+ /**
365
+ * 路径转CSV (JRC ECDIS ROUTE SHEET格式)
366
+ * @param name 路径名称
367
+ * @param waypoints 途径点
368
+ */
369
+ static waypoints2CSV(name: string, waypoints: Coordinate[], format?: string): string;
370
+ /**
371
+ * 路径转XLSX (Excel 2003 SpreadsheetML格式,可直接被Excel打开)
372
+ * @param name 路径名称
373
+ * @param waypoints 途径点
374
+ */
375
+ static waypoints2XLSX(name: string, waypoints: Coordinate[], format?: string): string;
343
376
  /**
344
377
  * 路径摘要
345
378
  * @param coordinates 已排序的坐标
@@ -4,6 +4,9 @@ export interface LngLatPretty {
4
4
  minute: number;
5
5
  second: number;
6
6
  pretty: string;
7
+ S?: string;
8
+ M?: string;
9
+ H?: string;
7
10
  }
8
11
  export declare class LngLatHelper {
9
12
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@idm-plugin/geo",
3
3
  "private": false,
4
- "version": "2.0.7",
4
+ "version": "2.0.9",
5
5
  "description": "idm plugin for geo in browser",
6
6
  "type": "module",
7
7
  "keywords": [