Class: SpaRelation

SpaRelation()

new SpaRelation()

空间关系判断
Source:

Methods

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

构造一个新的 SpaRelation 对象。
Source:
Returns:
Type
Promise.<SpaRelation>

(async, static) getTolerance() → {Promise.<double>}

获取容差
Source:
Returns:
容差
Type
Promise.<double>

(async, static) isContains(geom0, geom1) → {Promise.<boolean>}

包含判断(geom0是否包含geom1)
Parameters:
Name Type Description
geom0 Geometry 第一个几何对象
geom1 Geometry 第二个几何对象
Source:
Returns:
包含关系返回true,反之返回false
Type
Promise.<boolean>

(async, static) isCrosses(geom0, geom1) → {Promise.<boolean>}

相交判断(geom0是否和geom1相交)
Parameters:
Name Type Description
geom0 Geometry 第一个几何对象
geom1 Geometry 第二个几何对象
Source:
Returns:
相交关系返回true,反之返回false
Type
Promise.<boolean>

(async, static) isDisjoint(geom0, geom1) → {Promise.<boolean>}

相离判断(geom0是否和geom1相离)
Parameters:
Name Type Description
geom0 Geometry 第一个几何对象
geom1 Geometry 第二个几何对象
Source:
Returns:
相离关系返回true,反之返回false
Type
Promise.<boolean>

(async, static) isDotInLin(pnt, lin) → {Promise.<int>}

判断点是否在折线内
Parameters:
Name Type Description
pnt Dot 点坐标
lin GeoVarLine 线
Source:
Returns:
2/1/0=内/边界/外 折线的边界是折线的两个端点,折线的内部是折线除端点以外的部分
Type
Promise.<int>

(async, static) isDotInRect(pnt, rc) → {Promise.<int>}

判断点是否在矩形内
Parameters:
Name Type Description
pnt Dot 点坐标
rc Rect 矩形范围
Source:
Returns:
2/1/0=内/边界/外
Type
Promise.<int>

(async, static) isDotInReg(pnt, reg, flg, esp) → {Promise.<int>}

判断点是否在区内,当pnt点落在dots为边线,esp为半径的BUF区内则认为pnt点落在边界上
Parameters:
Name Type Description
pnt Dot 点坐标
reg GeoPolygon
flg int 1则严格套合,否则只检查第一圈
esp double 半径的BUF区
Source:
Returns:
2/1/0=内/边界/外
Type
Promise.<int>

(async, static) isEquals(geom0, geom1) → {Promise.<boolean>}

相等判断
Parameters:
Name Type Description
geom0 Geometry 第一个几何对象
geom1 Geometry 第二个几何对象
Source:
Returns:
相等关系返回true,反之返回false
Type
Promise.<boolean>

(async, static) isLinInReg(lin, reg, esp) → {Promise.<int>}

判断线是否在区内
Parameters:
Name Type Description
lin GeoVarLine 线
reg GeoPolygon
esp double 半径的BUF区
Source:
Returns:
1/0:在内/相交或者在外
Type
Promise.<int>

(async, static) isLinInterReg(lin, reg) → {Promise.<int>}

判断线是否和区相交
Parameters:
Name Type Description
lin GeoVarLine 线
reg GeoPolygon
Source:
Returns:
1/0:相交/不相交
Type
Promise.<int>

(async, static) isOverlaps(geom0, geom1) → {Promise.<boolean>}

相覆盖 判断
Parameters:
Name Type Description
geom0 Geometry 第一个几何对象
geom1 Geometry 第二个几何对象
Source:
Returns:
相覆盖 关系返回true,反之返回false
Type
Promise.<boolean>

(async, static) isRectInReg(rc, reg, esp) → {Promise.<int>}

判断矩形是否在区内
Parameters:
Name Type Description
rc Rect 矩形范围
reg GeoPolygon
esp double 半径的BUF区
Source:
Returns:
1-内部;2-外部;0 -相交 如果矩形和多边形有公共边,或者矩形的顶点落在多边形的边上或者多边形的顶点落在矩形的边上都算相交
Type
Promise.<int>

(async, static) isRectInterLin(rc, lin) → {Promise.<int>}

判断矩形是否和线相交
Parameters:
Name Type Description
rc Rect 矩形范围
lin GeoVarLine 线
Source:
Returns:
1/0 = 内/其他情况 矩形与线相交或者矩形包含线,返回1;否则返回0
Type
Promise.<int>

(async, static) isRegInReg(reg0, reg1, esp) → {Promise.<int>}

判断区reg0是否在区reg1内
Parameters:
Name Type Description
reg0 GeoPolygon
reg1 GeoPolygon
esp double 半径的BUF区
Source:
Returns:
1/0 = 内/其他情况
Type
Promise.<int>

(async, static) isRegInterReg(reg0, reg1) → {Promise.<int>}

判断区是否和区相交
Parameters:
Name Type Description
reg0 GeoPolygon 第一个区对象
reg1 GeoPolygon 第二个区对象
Source:
Returns:
1/0:相交/不相交
Type
Promise.<int>

(async, static) isTouches(geom0, geom1) → {Promise.<boolean>}

相邻接 判断
Parameters:
Name Type Description
geom0 Geometry 第一个几何对象
geom1 Geometry 第二个几何对象
Source:
Returns:
相邻接 关系返回true,反之返回false
Type
Promise.<boolean>

(async, static) isWithin(geom0, geom1) → {Promise.<boolean>}

被包含 判断
Parameters:
Name Type Description
geom0 Geometry 第一个几何对象
geom1 Geometry 第二个几何对象
Source:
Returns:
被包含 关系返回true,反之返回false
Type
Promise.<boolean>

(async, static) setTolerance(tolerance) → {Promise.<void>}

设置容差
Parameters:
Name Type Description
tolerance double 容差
Source:
Returns:
计算得出的缓冲区
Type
Promise.<void>