com.supermap.data
类 GeoCurvePolygon

java.lang.Object
  继承者 com.supermap.data.Geometry
      继承者 com.supermap.data.GeoCurvePolygon

public class GeoCurvePolygon
extends Geometry

参数化面几何对象类,派生于 Geometry 类。

该类用于描述参数化面地理实体,仅包含一个面几何对象,几何对象必须是闭合环,包含一个外环、零个或多个内环。面的轮廓线可由折线(GeoLine)、圆(GeoCircle)、椭圆(GeoEllipse)、参数化线(GeoCompoundCurve)组成。

为防止三方数据中的参数化对象,迁移到SuperMap数据源后,参数化部分由于拟合导致的精度问题,设计此类来描述参数化面对象。


构造方法摘要
GeoCurvePolygon()
          构造一个新的 GeoCurvePolygon 参数化面对象。
GeoCurvePolygon(GeoCurvePolygon geoParametricRegion)
          根据指定的 GeoCurvePolygon 对象构造一个与其完全相同的新对象。
 
方法摘要
 boolean addRing(Geometry geometry)
          添加子对象,添加对象必须是闭合的,如果非闭合,则返回失败。
 GeoCurvePolygon clone()
          克隆 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, setID, setStyle, toXML
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

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()
克隆 GeoCurvePolygon 参数化面对象。

覆盖:
java.lang.Object 中的 clone
返回:
成功返回克隆的参数化面对象,失败返回空值。

dispose

public void dispose()
释放该对象所占用的资源。当调用该方法之后,此对象不再可用。

覆盖:
Geometry 中的 dispose

isEmpty

public boolean isEmpty()
判断当前参数化面对象几何是否为空,即其子对象个数是否为0。

覆盖:
Geometry 中的 isEmpty
返回:
如果当前对象为空则返回 true;否则返回 false。
另请参见:
Geometry.offset(double, double)
默认值:
默认值为 true。

setEmpty

public void setEmpty()
清空当前参数化面对象的空间数据。

覆盖:
Geometry 中的 setEmpty