@@ -29,7 +29,7 @@ export class GeometryAnalysis extends Events {
29
29
* @version 11.2.0
30
30
* @description 缓冲区分析。
31
31
* @param {GeoJSONFeature } feature - geojson 要素。
32
- * @param {string } radius - 半径 。
32
+ * @param {number } radius - 缓冲区距离 。
33
33
* @returns {GeoJSONFeature } 结果要素。
34
34
*/
35
35
buffer ( feature , radius ) {
@@ -107,14 +107,14 @@ export class GeometryAnalysis extends Events {
107
107
* @function GeometryAnalysis.prototype.isParallel
108
108
* @version 11.2.0
109
109
* @description 线平行分析。
110
- * @param {string } x1 - 第一条线的起点X。
111
- * @param {string } y1 - 第一条线的起点Y。
112
- * @param {string } x2 - 第一条线的终点X。
113
- * @param {Object } y2 - 第一条线的终点Y。
114
- * @param {string } x3 - 第二条线的起点X。
115
- * @param {string } y3 - 第二条线的起点Y。
116
- * @param {string } x4 - 第二条线的终点X。
117
- * @param {Object } y4 - 第二条线的终点Y。
110
+ * @param {number } x1 - 第一条线的起点X。
111
+ * @param {number } y1 - 第一条线的起点Y。
112
+ * @param {number } x2 - 第一条线的终点X。
113
+ * @param {number } y2 - 第一条线的终点Y。
114
+ * @param {number } x3 - 第二条线的起点X。
115
+ * @param {number } y3 - 第二条线的起点Y。
116
+ * @param {number } x4 - 第二条线的终点X。
117
+ * @param {number } y4 - 第二条线的终点Y。
118
118
* @returns {boolean } 两条线是否平行。
119
119
*/
120
120
isParallel ( x1 , y1 , x2 , y2 , x3 , y3 , x4 , y4 ) {
@@ -125,12 +125,12 @@ export class GeometryAnalysis extends Events {
125
125
* @function GeometryAnalysis.prototype.computePerpendicularPosition
126
126
* @version 11.2.0
127
127
* @description 点到线的垂线分析。
128
- * @param {string } x1 - 点坐标 X。
129
- * @param {string } y1 - 点坐标 Y。
130
- * @param {string } x2 - 第一条线的起点X。
131
- * @param {Object } y2 - 第一条线的起点Y。
132
- * @param {string } x3 - 第一条线的终点X。
133
- * @param {string } y3 - 第一条线的终点Y。
128
+ * @param {number } x1 - 点坐标 X。
129
+ * @param {number } y1 - 点坐标 Y。
130
+ * @param {number } x2 - 第一条线的起点X。
131
+ * @param {number } y2 - 第一条线的起点Y。
132
+ * @param {number } x3 - 第一条线的终点X。
133
+ * @param {number } y3 - 第一条线的终点Y。
134
134
* @returns {Array } 垂线点坐标。
135
135
*/
136
136
computePerpendicularPosition ( x1 , y1 , x2 , y2 , x3 , y3 ) {
@@ -144,12 +144,12 @@ export class GeometryAnalysis extends Events {
144
144
* @function GeometryAnalysis.prototype.isPointOnLine
145
145
* @version 11.2.0
146
146
* @description 点是否在已知线段上。
147
- * @param {string } x1 - 点坐标 X。
148
- * @param {string } y1 - 点坐标 Y。
149
- * @param {string } x2 - 第一条线的起点X。
150
- * @param {Object } y2 - 第一条线的起点Y。
151
- * @param {string } x3 - 第一条线的终点X。
152
- * @param {string } y3 - 第一条线的终点Y。
147
+ * @param {number } x1 - 点坐标 X。
148
+ * @param {number } y1 - 点坐标 Y。
149
+ * @param {number } x2 - 第一条线的起点X。
150
+ * @param {number } y2 - 第一条线的起点Y。
151
+ * @param {number } x3 - 第一条线的终点X。
152
+ * @param {number } y3 - 第一条线的终点Y。
153
153
* @param {boolean } extended - 是否将线段进行延长计算。
154
154
* @returns {boolean } 点是否在已知线段上。
155
155
*/
@@ -164,9 +164,9 @@ export class GeometryAnalysis extends Events {
164
164
* @param {number } px- 点 X 坐标。
165
165
* @param {number } px - 点 Y 坐标。
166
166
* @param {number } spx - 线起点 X 坐标。
167
- * @param {Object } spy - 线起点 Y 坐标。
168
- * @param {string } epx - 线终点 X 坐标。
169
- * @param {Object } epy - 线终点 Y 坐标。
167
+ * @param {number } spy - 线起点 Y 坐标。
168
+ * @param {number } epx - 线终点 X 坐标。
169
+ * @param {number } epy - 线终点 Y 坐标。
170
170
* @returns {boolean } 点到线段的垂足是否在该线段上。
171
171
*/
172
172
isProjectOnLineSegment ( px , py , spx , spy , epx , epy ) {
@@ -180,9 +180,9 @@ export class GeometryAnalysis extends Events {
180
180
* @param {number } px- 点 X 坐标。
181
181
* @param {number } px - 点 Y 坐标。
182
182
* @param {number } spx - 线起点 X 坐标。
183
- * @param {Object } spy - 线起点 Y 坐标。
184
- * @param {string } epx - 线终点 X 坐标。
185
- * @param {Object } epy - 线终点 Y 坐标。
183
+ * @param {number } spy - 线起点 Y 坐标。
184
+ * @param {number } epx - 线终点 X 坐标。
185
+ * @param {number } epy - 线终点 Y 坐标。
186
186
* @returns {number } 点到线段的距离。如果点到线段的垂足不在线段上,则返回点到线段较近的端点的距离。。
187
187
*/
188
188
distanceToLineSegment ( px , py , spx , spy , epx , epy ) {
@@ -194,7 +194,7 @@ export class GeometryAnalysis extends Events {
194
194
* @description 计算线到点的最近距离点。
195
195
* @param {number } px - 点 X 坐标。
196
196
* @param {number } py - 点 Y 坐标。
197
- * @param {string } lineFeature - geojson 线要素。
197
+ * @param {GeoJSONFeature } lineFeature - geojson 线要素。
198
198
* @returns {Array } 线到点最近点的坐标数组。
199
199
*/
200
200
nearestPointToVertex ( px , py , lineFeature ) {
@@ -211,7 +211,7 @@ export class GeometryAnalysis extends Events {
211
211
* @description 点数组凹闭包计算。
212
212
* @param {Array } xArray - x 坐标数组。
213
213
* @param {Array } yArray - y 坐标数组。
214
- * @param {string } angle - 凹包内最小角度。
214
+ * @param {number } angle - 凹包内最小角度。
215
215
* @returns {GeoJSONFeature } 结果要素。
216
216
*/
217
217
computeConcaveHullPoints ( xArray , yArray , angle ) {
@@ -228,14 +228,14 @@ export class GeometryAnalysis extends Events {
228
228
* @function GeometryAnalysis.prototype.isSegmentIntersect
229
229
* @version 11.2.0
230
230
* @description 计算线段是否相交。
231
- * @param {string } x1 - 第一条线的起点X。
232
- * @param {string } y1 - 第一条线的起点Y。
233
- * @param {string } x2 - 第一条线的终点X。
234
- * @param {Object } y2 - 第一条线的终点Y。
235
- * @param {string } x3 - 第二条线的起点X。
236
- * @param {string } y3 - 第二条线的起点Y。
237
- * @param {string } x4 - 第二条线的终点X。
238
- * @param {Object } y4 - 第二条线的终点Y。
231
+ * @param {number } x1 - 第一条线的起点X。
232
+ * @param {number } y1 - 第一条线的起点Y。
233
+ * @param {number } x2 - 第一条线的终点X。
234
+ * @param {number } y2 - 第一条线的终点Y。
235
+ * @param {number } x3 - 第二条线的起点X。
236
+ * @param {number } y3 - 第二条线的起点Y。
237
+ * @param {number } x4 - 第二条线的终点X。
238
+ * @param {number } y4 - 第二条线的终点Y。
239
239
* @returns {boolean } 线是否相交。
240
240
*/
241
241
isSegmentIntersect ( x1 , y1 , x2 , y2 , x3 , y3 , x4 , y4 ) {
@@ -246,10 +246,12 @@ export class GeometryAnalysis extends Events {
246
246
* @function GeometryAnalysis.prototype.isIntersectRegionWithRect
247
247
* @version 11.2.0
248
248
* @description 几何对象与矩形是否相交分析。
249
- * @param {string } feature - geojson 要素。
250
- * @param {string } url - 请求地址。
251
- * @param {string } params - 请求参数。
252
- * @param {Object } options - 请求的配置属性。
249
+ * @param {GeoJSONFeature } feature - geojson 要素。
250
+ * @param {number } left - 矩形左坐标。
251
+ * @param {number } top - 矩形上坐标。
252
+ * @param {number } right - 矩形右坐标。
253
+ * @param {number } bottom - 矩形下坐标。
254
+ * @param {number } [tolerance=1e-6] - 容限。
253
255
* @returns {boolean } 要素是否与矩形相交。
254
256
*/
255
257
isIntersectRegionWithRect ( feature , left , top , right , bottom , tolerance = 1e-6 ) {
@@ -266,9 +268,9 @@ export class GeometryAnalysis extends Events {
266
268
* @param {number } px1- 点2 X 坐标。
267
269
* @param {number } px2 - 点2 Y 坐标。
268
270
* @param {number } spx - 线起点 X 坐标。
269
- * @param {Object } spy - 线起点 Y 坐标。
270
- * @param {string } epx - 线终点 X 坐标。
271
- * @param {Object } epy - 线终点 Y 坐标。
271
+ * @param {number } spy - 线起点 Y 坐标。
272
+ * @param {number } epx - 线终点 X 坐标。
273
+ * @param {number } epy - 线终点 Y 坐标。
272
274
* @returns {boolean } 是否两点在线的同一侧。
273
275
*/
274
276
isOnSameSide ( px1 , py1 , px2 , py2 , spx , spy , epx , epy ) {
@@ -282,9 +284,9 @@ export class GeometryAnalysis extends Events {
282
284
* @param {number } px- 点 X 坐标。
283
285
* @param {number } px - 点 Y 坐标。
284
286
* @param {number } spx - 线起点 X 坐标。
285
- * @param {Object } spy - 线起点 Y 坐标。
286
- * @param {string } epx - 线终点 X 坐标。
287
- * @param {Object } epy - 线终点 Y 坐标。
287
+ * @param {number } spy - 线起点 Y 坐标。
288
+ * @param {number } epx - 线终点 X 坐标。
289
+ * @param {number } epy - 线终点 Y 坐标。
288
290
* @returns {boolean } 点是否在线的右侧。
289
291
*/
290
292
isRight ( px , py , spx , spy , epx , epy ) {
@@ -298,22 +300,22 @@ export class GeometryAnalysis extends Events {
298
300
* @param {number } px- 点 X 坐标。
299
301
* @param {number } px - 点 Y 坐标。
300
302
* @param {number } spx - 线起点 X 坐标。
301
- * @param {Object } spy - 线起点 Y 坐标。
302
- * @param {string } epx - 线终点 X 坐标。
303
- * @param {Object } epy - 线终点 Y 坐标。
303
+ * @param {number } spy - 线起点 Y 坐标。
304
+ * @param {number } epx - 线终点 X 坐标。
305
+ * @param {number } epy - 线终点 Y 坐标。
304
306
* @returns {boolean } 点是否在线的左侧。
305
307
*/
306
308
isLeft ( px , py , spx , spy , epx , epy ) {
307
309
const result = this . module . _UGCWasm_Geometrist_IsLeft ( px , py , spx , spy , epx , epy ) ;
308
310
return result === 1 ;
309
311
}
310
312
/**
311
- * @function GeometryAnalysis.prototype.computeGeodesicArea
312
- * @version 11.2.0
313
- * @description 计算经纬度面积。
314
- * @param {GeoJSONFeature } feature - geojson 面要素。
315
- * @returns {number } 经纬度面积。
316
- */
313
+ * @function GeometryAnalysis.prototype.computeGeodesicArea
314
+ * @version 11.2.0
315
+ * @description 计算经纬度面积。
316
+ * @param {GeoJSONFeature } feature - geojson 面要素。
317
+ * @returns {number } 经纬度面积。
318
+ */
317
319
computeGeodesicArea ( feature ) {
318
320
const ugFeature = geojson2UGGeometry ( feature ) ;
319
321
const prjCoordSys = this . module . _UGCWasm_Geometry_NewUGPrjCoordSys ( 4326 ) ;
@@ -324,7 +326,7 @@ export class GeometryAnalysis extends Events {
324
326
* @version 11.2.0
325
327
* @description 线要素光滑分析。
326
328
* @param {GeoJSONFeature } feature - geojson 要素。
327
- * @param {string } [smoothness=2] - 光滑系数。
329
+ * @param {number } [smoothness=2] - 光滑系数。
328
330
* @returns {GeoJSONFeature } 结果要素。
329
331
*/
330
332
smooth ( feature , smoothness = 2 ) {
0 commit comments