@idm-plugin/geo 2.1.5 → 2.1.6
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.js +357 -289
- package/dist/index.umd.cjs +6 -6
- package/dist/json/src/index.d.ts +19 -5
- package/package.json +1 -1
package/dist/json/src/index.d.ts
CHANGED
|
@@ -31,13 +31,12 @@ export declare class GeoJsonHelper {
|
|
|
31
31
|
static drawRect(start: number[], end: number[], options?: GeoJsonOptions): turf.Feature<turf.Polygon>;
|
|
32
32
|
/**
|
|
33
33
|
* 基于turf画线,返回GeoJSON Feature<LineString>
|
|
34
|
-
*
|
|
35
|
-
* @param
|
|
36
|
-
* @param end
|
|
34
|
+
* 支持2个或以上的点,需要注意跨180度的情况
|
|
35
|
+
* @param coordinates 坐标点数组,每个元素为 [lng, lat],至少2个点
|
|
37
36
|
* @param options
|
|
38
37
|
* @returns
|
|
39
38
|
*/
|
|
40
|
-
static drawLine(
|
|
39
|
+
static drawLine(coordinates: number[][], options?: GeoJsonOptions): turf.Feature<turf.LineString>;
|
|
41
40
|
/**
|
|
42
41
|
* 基于turf画多边形,返回GeoJSON Feature<Polygon>
|
|
43
42
|
* @param coordinates
|
|
@@ -45,6 +44,14 @@ export declare class GeoJsonHelper {
|
|
|
45
44
|
* @returns
|
|
46
45
|
*/
|
|
47
46
|
static drawPolygon(coordinates: number[][], options?: GeoJsonOptions): turf.Feature<turf.Polygon>;
|
|
47
|
+
/**
|
|
48
|
+
* 基于turf画点,返回GeoJSON Feature<Point>
|
|
49
|
+
* @param lat
|
|
50
|
+
* @param lng
|
|
51
|
+
* @param options
|
|
52
|
+
* @returns
|
|
53
|
+
*/
|
|
54
|
+
static drawPoint(lat: number, lng: number, options?: GeoJsonOptions): turf.Feature<turf.Point>;
|
|
48
55
|
/**
|
|
49
56
|
* 解析ORM GeoJSON Feature (圆), 返回FeatureCollection
|
|
50
57
|
* @param feature
|
|
@@ -66,7 +73,7 @@ export declare class GeoJsonHelper {
|
|
|
66
73
|
* @param feature
|
|
67
74
|
* @param options
|
|
68
75
|
* @returns
|
|
69
|
-
* 如果feature
|
|
76
|
+
* 如果feature是线,则返回所有坐标点(首为start、尾为end、中间为point_N)以及线Feature
|
|
70
77
|
*/
|
|
71
78
|
static parseLine(feature: turf.Feature<turf.LineString>, options?: GeoJsonOptions): turf.FeatureCollection<any>;
|
|
72
79
|
/**
|
|
@@ -77,4 +84,11 @@ export declare class GeoJsonHelper {
|
|
|
77
84
|
* 如果feature是多边形,则返回多边形的顶点和多边形Feature
|
|
78
85
|
*/
|
|
79
86
|
static parsePolygon(feature: turf.Feature<turf.Polygon>, options?: GeoJsonOptions): turf.FeatureCollection<any>;
|
|
87
|
+
/**
|
|
88
|
+
* 将KML转换为GeoJSON
|
|
89
|
+
* @param kml
|
|
90
|
+
* @param options
|
|
91
|
+
* @returns
|
|
92
|
+
*/
|
|
93
|
+
static convertKML2GeoJSON(kml: string, options?: GeoJsonOptions): turf.FeatureCollection<any>;
|
|
80
94
|
}
|