Polygon
多边形几何构造函数。
关系
Extends
Polygon Extends Geometry
继承: Geometry
构造函数
Polygon
多边形几何构造函数。
属性
cache
几何图形缓存 - 用于存储从几何图形计算得出的值
cache: any
类型: any
centroid
多边形的质心。
centroid: Point
类型: Point
extent
几何图形的范围 - 包含几何图形的最小边界矩形
extent: Extent
类型: Extent
hasM
是否包含M值 - 指示几何图形是否具有测量值
hasM: boolean
类型: boolean
hasZ
是否包含Z值 - 指示几何图形是否具有高程值
hasZ: boolean
类型: boolean
isSelfIntersecting
多边形自相交检测。
isSelfIntersecting: boolean
类型: boolean
rings
环的数组。
rings: number[]
类型: number[]
type
表示几何类型的字符串值。
type: "polygon"
类型: "polygon"
访问器
spatialReference
几何图形的空间参考系统
get spatialReference(): SpatialReference
返回: SpatialReference 几何图形的空间参考系统
set spatialReference(value: SpatialReferenceProperties): void
参数
- value:
SpatialReferenceProperties
返回: void
方法
addRing
向多边形添加环。
addRing(points): Polygon
参数
- points:
number[] |Point多边形环的点数组。环中的第一个和最后一个坐标/点必须相同以形成封闭环。 可以定义为 Point 几何体数组或 XY 坐标数组。
返回:Polygon
clone
创建多边形对象的深拷贝。
clone(): Polygon
返回:Polygon
contains
检查点是否在多边形内部。
getPoint
获取指定环和索引位置的点。
getPoint(ringIndex, pointIndex): Point
参数
- ringIndex:
number包含所需点的环的索引 - pointIndex:
number环中所需点的索引
返回:Point
insertPoint
在多边形中插入一个新点。
insertPoint(ringIndex, pointIndex, point): Polygon
参数
- ringIndex:
number要插入点的环的索引。 - pointIndex:
number在环中插入点的位置索引。 - point:
number|Point要插入的点。
返回:Polygon
isClockwise
检查多边形环是否为顺时针方向。
removePoint
从由 ringIndex 标识的环中,移除 pointIndex 处的点。
removePoint(ringIndex, pointIndex): Point
参数
- ringIndex:
number包含要移除点的环的索引。 - pointIndex:
number要移除点在环中的索引。
返回:Point
removeRing
从多边形中移除一个环。
setPoint
更新多边形中的一个点。
setPoint(ringIndex, pointIndex, point): Polygon
参数
- ringIndex:
number包含要更新点的环的索引。 - pointIndex:
number要更新点在环中的索引。 - point:
number|Point新的点几何。
返回:Polygon
toJSON
转换为JSON表示
toJSON(): any
返回:any

BIMFlux AI
