new GeoVarLine()
- Source:
Methods
(async, static) append2D(dot) → {Promise}
添加2维点
Parameters:
| Name | Type | Description |
|---|---|---|
dot |
待添加的二维点坐标 |
- Source:
Returns:
添加成功返回1,失败返回0
- Type
- Promise
(async, static) append3D(dot) → {Promise}
添加3维点
Parameters:
| Name | Type | Description |
|---|---|---|
dot |
待添加的三维点坐标 |
- Source:
Returns:
添加成功返回1,失败返回0
- Type
- Promise
(async, static) createObj() → {Promise.<GeoVarLine>}
构造一个新的 GeoVarLine 对象
- Source:
Returns:
- Type
- Promise.<GeoVarLine>
(async, static) del(index) → {Promise}
删除坐标点
Parameters:
| Name | Type | Description |
|---|---|---|
index |
待删除的点序号 |
- Source:
Returns:
删除成功返回1,失败返回0
- Type
- Promise
(async, static) empty() → {Promise}
清空数据
- Source:
Returns:
清空数据成功返回1,失败返回0
- Type
- Promise
(async, static) get2D(index) → {Promise.<Dot>}
取2维点
Parameters:
| Name | Type | Description |
|---|---|---|
index |
待获取的点序号 |
- Source:
Returns:
获取成功返回1,失败返回0
- Type
- Promise.<Dot>
(async, static) get3D(index) → {Promise.<Dot3D>}
取3维点
Parameters:
| Name | Type | Description |
|---|---|---|
index |
待获取的点序号 |
- Source:
Returns:
获取成功返回1,失败返回0
- Type
- Promise.<Dot3D>
(async, static) getDim() → {Promise}
取维数
- Source:
Returns:
维数
- Type
- Promise
(async, static) getDotNum() → {Promise}
取点数目
- Source:
Returns:
点的数目
- Type
- Promise
(async, static) getType() → {Promise}
获取几何对象的类型
- Source:
Returns:
几何对象类型
- Type
- Promise
(async, static) getX(index) → {Promise}
取X坐标值
Parameters:
| Name | Type | Description |
|---|---|---|
index |
待获取的点序号 |
- Source:
Returns:
获取该点的X坐标值
- Type
- Promise
(async, static) getY(index) → {Promise}
取Y坐标值
Parameters:
| Name | Type | Description |
|---|---|---|
index |
待获取的点序号 |
- Source:
Returns:
获取该点的Y坐标值
- Type
- Promise
(async, static) getZ(index) → {Promise}
取Z坐标值
Parameters:
| Name | Type | Description |
|---|---|---|
index |
待获取的点序号 |
- Source:
Returns:
获取该点的Z坐标值
- Type
- Promise
(async, static) isClosed() → {Promise}
判断线段是否封闭
- Source:
Returns:
线段封闭返回true,不封闭返回false
- Type
- Promise
(async, static) setDots2D(dots) → {Promise}
由二维点集合构建折线
Parameters:
| Name | Type | Description |
|---|---|---|
dots |
用来构建线的二维维点集合 |
- Source:
Returns:
构建成功返回1,失败返回0
- Type
- Promise
(async, static) setDots3D(dots) → {Promise}
由三维点集合构建折线
Parameters:
| Name | Type | Description |
|---|---|---|
dots |
用来构建线的三维点集合 |
- Source:
Returns:
构建成功返回1,失败返回0
- Type
- Promise
(async, static) update2D(index, dot) → {Promise}
更新2维坐标点
Parameters:
| Name | Type | Description |
|---|---|---|
index |
待更新的点序号 | |
dot |
待更新的点坐标 |
- Source:
Returns:
更新成功返回1,失败返回0
- Type
- Promise
(async, static) update3D(index, dot) → {Promise}
更新3维坐标点
Parameters:
| Name | Type | Description |
|---|---|---|
index |
待更新的点序号 | |
dot |
待更新的点坐标 |
- Source:
Returns:
更新成功返回1,失败返回0
- Type
- Promise