@idm-plugin/geo 1.9.0 → 1.9.1

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.
@@ -74,8 +74,9 @@ export declare class LaneHelper {
74
74
  }[];
75
75
  /**
76
76
  * 分组坐标(如相邻两个坐标经度差超180度,需以180为界将坐标分为两组)
77
- * @param coordinates [{lng, lat}]
77
+ * @param coordinates
78
78
  * @param rhumb
79
+ * @param deduplicate
79
80
  * @example
80
81
  * coordinates: [{lng: 160,lat: 30}, {lng: 170, lat: 40},{lng: -170, lat: 40},{lng: -160, lat: 30}]
81
82
  * @return [
@@ -83,7 +84,7 @@ export declare class LaneHelper {
83
84
  * [[-170,40],[-160,30]]
84
85
  * ]
85
86
  */
86
- static divideAccordingToLng(coordinates: Array<Coordinate>, rhumb?: boolean): number[][][];
87
+ static divideAccordingToLng(coordinates: Array<Coordinate>, rhumb?: boolean, deduplicate?: boolean): number[][][];
87
88
  /**
88
89
  * 去除重复坐标
89
90
  * @param route
@@ -215,10 +216,12 @@ export declare class LaneHelper {
215
216
  static mergeCoordinateToWaypoints(coordinate: Coordinate, waypoints: Coordinate[], replace?: boolean): Coordinate[];
216
217
  /**
217
218
  * 生成航线(基于途经点生成大圆/横向航线,并根据是否跨180度分组)
218
- * @param waypoints [{lng, lat}, {lng: lat, gcToPrevious: true}]
219
219
  * @return [[[lng, lat], [lng, lat]]]
220
+ * @param waypoints
221
+ * @param rhumb
222
+ * @param deduplicate
220
223
  */
221
- static generateRouteAccordingToWaypoints(waypoints: Coordinate[]): number[][][];
224
+ static generateRouteAccordingToWaypoints(waypoints: Coordinate[], rhumb?: boolean, deduplicate?: boolean): number[][][];
222
225
  /**
223
226
  * 最近点(从route中找出距离目标点最近的点)
224
227
  * @param coordinate 目标点 {lng, lat}
@@ -332,4 +335,21 @@ export declare class LaneHelper {
332
335
  static reverseRoute(route: number[][][]): number[][][];
333
336
  static reverseCoordinates(coordinates: Coordinate[]): Coordinate[];
334
337
  static waypoints2RTZ(name: string, waypoints: Coordinate[]): string;
338
+ /**
339
+ * 路径摘要
340
+ * @param coordinates 已排序的坐标
341
+ */
342
+ static coordinatesSummary(coordinates: Coordinate[]): {
343
+ begin: string;
344
+ end: string;
345
+ distance: number;
346
+ hours: number;
347
+ avgSpeed: number;
348
+ } | {
349
+ begin: undefined;
350
+ end: undefined;
351
+ distance: number;
352
+ hours: number;
353
+ avgSpeed: number;
354
+ };
335
355
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@idm-plugin/geo",
3
3
  "private": false,
4
- "version": "1.9.0",
4
+ "version": "1.9.1",
5
5
  "description": "idm plugin for geo in browser",
6
6
  "type": "module",
7
7
  "keywords": [