Skip to content

Commit 9072c6a

Browse files
author
user name
committed
fix videolayer geometryAnalysis doc
1 parent 7dccb58 commit 9072c6a

File tree

2 files changed

+63
-57
lines changed

2 files changed

+63
-57
lines changed

build/jsdocs/template/config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,10 @@
418418
"L7": {
419419
"name": "L7",
420420
"name_en": "L7"
421+
},
422+
"Video": {
423+
"name": "Video",
424+
"name_en": "Video"
421425
}
422426
}
423427
},

src/common/util/GeometryAnalysis.js

Lines changed: 59 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class GeometryAnalysis extends Events {
2929
* @version 11.2.0
3030
* @description 缓冲区分析。
3131
* @param {GeoJSONFeature} feature - geojson 要素。
32-
* @param {string} radius - 半径
32+
* @param {number} radius - 缓冲区距离
3333
* @returns {GeoJSONFeature} 结果要素。
3434
*/
3535
buffer(feature, radius) {
@@ -107,14 +107,14 @@ export class GeometryAnalysis extends Events {
107107
* @function GeometryAnalysis.prototype.isParallel
108108
* @version 11.2.0
109109
* @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。
118118
* @returns {boolean} 两条线是否平行。
119119
*/
120120
isParallel(x1, y1, x2, y2, x3, y3, x4, y4) {
@@ -125,12 +125,12 @@ export class GeometryAnalysis extends Events {
125125
* @function GeometryAnalysis.prototype.computePerpendicularPosition
126126
* @version 11.2.0
127127
* @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。
134134
* @returns {Array} 垂线点坐标。
135135
*/
136136
computePerpendicularPosition(x1, y1, x2, y2, x3, y3) {
@@ -144,12 +144,12 @@ export class GeometryAnalysis extends Events {
144144
* @function GeometryAnalysis.prototype.isPointOnLine
145145
* @version 11.2.0
146146
* @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。
153153
* @param {boolean} extended - 是否将线段进行延长计算。
154154
* @returns {boolean} 点是否在已知线段上。
155155
*/
@@ -164,9 +164,9 @@ export class GeometryAnalysis extends Events {
164164
* @param {number} px- 点 X 坐标。
165165
* @param {number} px - 点 Y 坐标。
166166
* @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 坐标。
170170
* @returns {boolean} 点到线段的垂足是否在该线段上。
171171
*/
172172
isProjectOnLineSegment(px, py, spx, spy, epx, epy) {
@@ -180,9 +180,9 @@ export class GeometryAnalysis extends Events {
180180
* @param {number} px- 点 X 坐标。
181181
* @param {number} px - 点 Y 坐标。
182182
* @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 坐标。
186186
* @returns {number} 点到线段的距离。如果点到线段的垂足不在线段上,则返回点到线段较近的端点的距离。。
187187
*/
188188
distanceToLineSegment(px, py, spx, spy, epx, epy) {
@@ -194,7 +194,7 @@ export class GeometryAnalysis extends Events {
194194
* @description 计算线到点的最近距离点。
195195
* @param {number} px - 点 X 坐标。
196196
* @param {number} py - 点 Y 坐标。
197-
* @param {string} lineFeature - geojson 线要素。
197+
* @param {GeoJSONFeature} lineFeature - geojson 线要素。
198198
* @returns {Array} 线到点最近点的坐标数组。
199199
*/
200200
nearestPointToVertex(px, py, lineFeature) {
@@ -211,7 +211,7 @@ export class GeometryAnalysis extends Events {
211211
* @description 点数组凹闭包计算。
212212
* @param {Array} xArray - x 坐标数组。
213213
* @param {Array} yArray - y 坐标数组。
214-
* @param {string} angle - 凹包内最小角度。
214+
* @param {number} angle - 凹包内最小角度。
215215
* @returns {GeoJSONFeature} 结果要素。
216216
*/
217217
computeConcaveHullPoints(xArray, yArray, angle) {
@@ -228,14 +228,14 @@ export class GeometryAnalysis extends Events {
228228
* @function GeometryAnalysis.prototype.isSegmentIntersect
229229
* @version 11.2.0
230230
* @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。
239239
* @returns {boolean} 线是否相交。
240240
*/
241241
isSegmentIntersect(x1, y1, x2, y2, x3, y3, x4, y4) {
@@ -246,10 +246,12 @@ export class GeometryAnalysis extends Events {
246246
* @function GeometryAnalysis.prototype.isIntersectRegionWithRect
247247
* @version 11.2.0
248248
* @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] - 容限。
253255
* @returns {boolean} 要素是否与矩形相交。
254256
*/
255257
isIntersectRegionWithRect(feature, left, top, right, bottom, tolerance = 1e-6) {
@@ -266,9 +268,9 @@ export class GeometryAnalysis extends Events {
266268
* @param {number} px1- 点2 X 坐标。
267269
* @param {number} px2 - 点2 Y 坐标。
268270
* @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 坐标。
272274
* @returns {boolean} 是否两点在线的同一侧。
273275
*/
274276
isOnSameSide(px1, py1, px2, py2, spx, spy, epx, epy) {
@@ -282,9 +284,9 @@ export class GeometryAnalysis extends Events {
282284
* @param {number} px- 点 X 坐标。
283285
* @param {number} px - 点 Y 坐标。
284286
* @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 坐标。
288290
* @returns {boolean} 点是否在线的右侧。
289291
*/
290292
isRight(px, py, spx, spy, epx, epy) {
@@ -298,22 +300,22 @@ export class GeometryAnalysis extends Events {
298300
* @param {number} px- 点 X 坐标。
299301
* @param {number} px - 点 Y 坐标。
300302
* @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 坐标。
304306
* @returns {boolean} 点是否在线的左侧。
305307
*/
306308
isLeft(px, py, spx, spy, epx, epy) {
307309
const result = this.module._UGCWasm_Geometrist_IsLeft(px, py, spx, spy, epx, epy);
308310
return result === 1;
309311
}
310312
/**
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+
*/
317319
computeGeodesicArea(feature) {
318320
const ugFeature = geojson2UGGeometry(feature);
319321
const prjCoordSys = this.module._UGCWasm_Geometry_NewUGPrjCoordSys(4326);
@@ -324,7 +326,7 @@ export class GeometryAnalysis extends Events {
324326
* @version 11.2.0
325327
* @description 线要素光滑分析。
326328
* @param {GeoJSONFeature} feature - geojson 要素。
327-
* @param {string} [smoothness=2] - 光滑系数。
329+
* @param {number} [smoothness=2] - 光滑系数。
328330
* @returns {GeoJSONFeature} 结果要素。
329331
*/
330332
smooth(feature, smoothness = 2) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy