com.supermap.data
类 GeoCurvePolygon
- java.lang.Object
-
- com.supermap.data.InternalHandle
-
- com.supermap.data.InternalHandleDisposable
-
- com.supermap.data.Geometry
-
- com.supermap.data.GeoCurvePolygon
-
- 所有已实现的接口:
- IDisposable
public class GeoCurvePolygon extends Geometry
参数化面几何对象类,派生于Geometry
类。该类用于描述参数化面地理实体,仅包含一个面几何对象,几何对象必须是闭合环,包含一个外环、零个或多个内环。面的轮廓线可由折线(GeoLine)、圆(GeoCircle)、椭圆(GeoEllipse)、参数化线(GeoCompoundCurve)组成。
为防止三方数据中的参数化对象,迁移到SuperMap数据源后,参数化部分由于拟合导致的精度问题,设计此类来描述参数化面对象。
-
-
构造器概要
构造器 构造器和说明 GeoCurvePolygon()
构造一个新的 GeoCurvePolygon 参数化面对象。GeoCurvePolygon(GeoCurvePolygon geoParametricRegion)
根据指定的 GeoCurvePolygon 对象构造一个与其完全相同的新对象。
-
方法概要
所有方法 实例方法 具体方法 限定符和类型 方法和说明 boolean
addRing(Geometry geometry)
添加子对象,添加对象必须是闭合的,如果非闭合,则返回失败。GeoCurvePolygon
clone()
克隆一个Geometry对象。GeoLine
convertToLine()
GeoCurvePolygon对象转换成线对象GeoRegion
convertToRegion()
GeoCurvePolygon对象转换为面对象,成功返回面对象。void
dispose()
释放该对象所占用的资源。double
getArea()
返回二维面对象的面积,单位与数据集的单位相同。double
getPerimeter()
返回二维面对象的周长,单位与数据集的单位相同Geometry
getRing(int index)
获取指定索引的子对象。int
getRingCount()
获取参数化面包含的对象数目。boolean
isEmpty()
判断当前参数化面对象几何是否为空,即其子对象个数是否为0。void
setEmpty()
清空当前参数化面对象的空间数据。-
从类继承的方法 com.supermap.data.Geometry
addCustomGeometryCreatedListener, fromXML, getBounds, getID, getInnerPoint, getStyle, getType, getVariantID, hitTest, mirror, offset, removeCustomGeometryCreatedListener, resize, rotate, setBounds, setID, setStyle, toXML
-
-
-
-
构造器详细资料
-
GeoCurvePolygon
public GeoCurvePolygon()
构造一个新的 GeoCurvePolygon 参数化面对象。
-
GeoCurvePolygon
public GeoCurvePolygon(GeoCurvePolygon geoParametricRegion)
根据指定的 GeoCurvePolygon 对象构造一个与其完全相同的新对象。- 参数:
geoParametricRegion
- 指定的 GeoCurvePolygon 参数化面对象。
-
-
方法详细资料
-
getPerimeter
public double getPerimeter()
返回二维面对象的周长,单位与数据集的单位相同- 返回:
- 参数化面几何对象的周长。
- 默认值:
- 默认值为 0.0。
-
getArea
public double getArea()
返回二维面对象的面积,单位与数据集的单位相同。- 返回:
- 参数化面几何对象的面积。
- 默认值:
- 默认值为 0.0。
-
addRing
public boolean addRing(Geometry geometry)
添加子对象,添加对象必须是闭合的,如果非闭合,则返回失败。 添加对象只能是如下类型:GeoLine,@link GeoArc GeoArc,@link GeoCircle GeoCircle,@link GeoEllipse GeoEllipse,@link GeoEllipticArc GeoEllipticArc
- 参数:
geometry
- 待添加的面几何子对象。- 返回:
- 如果添加成功则返回 true;否则返回 false。
- 默认值:
- 默认值为 true。
-
getRingCount
public int getRingCount()
获取参数化面包含的对象数目。- 返回:
- 面几何子对象的数量。
- 默认值:
- 默认值为 0。
-
getRing
public Geometry getRing(int index)
获取指定索引的子对象。- 参数:
index
- 指定的子对象的序号。- 返回:
- 成功返回
Geometry
对象,失败返回空值。 - 默认值:
- 默认值为 0。
-
clone
public GeoCurvePolygon clone()
从类复制的说明:Geometry
克隆一个Geometry对象。
-
dispose
public void dispose()
从类复制的说明:Geometry
释放该对象所占用的资源。当调用该方法之后,此对象不再可用。- 指定者:
dispose
在接口中IDisposable
- 指定者:
dispose
在类中Geometry
-
isEmpty
public boolean isEmpty()
判断当前参数化面对象几何是否为空,即其子对象个数是否为0。- 覆盖:
isEmpty
在类中Geometry
- 返回:
- 如果当前对象为空则返回 true;否则返回 false。
- 另请参阅:
Geometry.offset(double, double)
- 默认值:
- 默认值为 true。
-
convertToRegion
public GeoRegion convertToRegion()
GeoCurvePolygon对象转换为面对象,成功返回面对象。- 返回:
- GeoRegion 转换成功返回区域对象,否则就返回null;
-
convertToLine
public GeoLine convertToLine()
GeoCurvePolygon对象转换成线对象- 返回:
- GeoLine 成功则返回线对象 ,否则就返回null;
-
-
Copyright © 2021–2024 SuperMap. All rights reserved.