# Class: GeoVarLine

## GeoVarLine()

#### new GeoVarLine()

Source:
  - GeoVarLine.js, line 13

### Methods

#### (async, static) append2D(dot) → {Promise}

添加2维点

##### Parameters:

Name | Type | Description
--- | --- | ---
`dot` |  | 待添加的二维点坐标

Source:
  - GeoVarLine.js, line 64

##### Returns:

添加成功返回1，失败返回0

Type
  Promise

#### (async, static) append3D(dot) → {Promise}

添加3维点

##### Parameters:

Name | Type | Description
--- | --- | ---
`dot` |  | 待添加的三维点坐标

Source:
  - GeoVarLine.js, line 78

##### Returns:

添加成功返回1，失败返回0

Type
  Promise

#### (async, static) createObj() → {Promise.<GeoVarLine>}

构造一个新的 GeoVarLine 对象

Source:
  - GeoVarLine.js, line 34

##### Returns:

Type
  Promise.<GeoVarLine>

#### (async, static) del(index) → {Promise}

删除坐标点

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` |  | 待删除的点序号

Source:
  - GeoVarLine.js, line 92

##### Returns:

删除成功返回1，失败返回0

Type
  Promise

#### (async, static) empty() → {Promise}

清空数据

Source:
  - GeoVarLine.js, line 278

##### Returns:

清空数据成功返回1，失败返回0

Type
  Promise

#### (async, static) get2D(index) → {Promise.<Dot>}

取2维点

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` |  | 待获取的点序号

Source:
  - GeoVarLine.js, line 106

##### Returns:

获取成功返回1，失败返回0

Type
  Promise.<Dot>

#### (async, static) get3D(index) → {Promise.<Dot3D>}

取3维点

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` |  | 待获取的点序号

Source:
  - GeoVarLine.js, line 123

##### Returns:

获取成功返回1，失败返回0

Type
  Promise.<Dot3D>

#### (async, static) getDim() → {Promise}

取维数

Source:
  - GeoVarLine.js, line 139

##### Returns:

维数

Type
  Promise

#### (async, static) getDotNum() → {Promise}

取点数目

Source:
  - GeoVarLine.js, line 152

##### Returns:

点的数目

Type
  Promise

#### (async, static) getType() → {Promise}

获取几何对象的类型

Source:
  - GeoVarLine.js, line 50

##### Returns:

几何对象类型

Type
  Promise

#### (async, static) getX(index) → {Promise}

取X坐标值

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` |  | 待获取的点序号

Source:
  - GeoVarLine.js, line 166

##### Returns:

获取该点的X坐标值

Type
  Promise

#### (async, static) getY(index) → {Promise}

取Y坐标值

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` |  | 待获取的点序号

Source:
  - GeoVarLine.js, line 180

##### Returns:

获取该点的Y坐标值

Type
  Promise

#### (async, static) getZ(index) → {Promise}

取Z坐标值

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` |  | 待获取的点序号

Source:
  - GeoVarLine.js, line 194

##### Returns:

获取该点的Z坐标值

Type
  Promise

#### (async, static) isClosed() → {Promise}

判断线段是否封闭

Source:
  - GeoVarLine.js, line 265

##### Returns:

线段封闭返回true，不封闭返回false

Type
  Promise

#### (async, static) setDots2D(dots) → {Promise}

由二维点集合构建折线

##### Parameters:

Name | Type | Description
--- | --- | ---
`dots` |  | 用来构建线的二维维点集合

Source:
  - GeoVarLine.js, line 252

##### Returns:

构建成功返回1，失败返回0

Type
  Promise

#### (async, static) setDots3D(dots) → {Promise}

由三维点集合构建折线

##### Parameters:

Name | Type | Description
--- | --- | ---
`dots` |  | 用来构建线的三维点集合

Source:
  - GeoVarLine.js, line 238

##### Returns:

构建成功返回1，失败返回0

Type
  Promise

#### (async, static) update2D(index, dot) → {Promise}

更新2维坐标点

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` |  | 待更新的点序号
`dot` |  | 待更新的点坐标

Source:
  - GeoVarLine.js, line 209

##### Returns:

更新成功返回1，失败返回0

Type
  Promise

#### (async, static) update3D(index, dot) → {Promise}

更新3维坐标点

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` |  | 待更新的点序号
`dot` |  | 待更新的点坐标

Source:
  - GeoVarLine.js, line 224

##### Returns:

更新成功返回1，失败返回0

Type
  Promise