com.supermap.data
类 GeoCompoundCurve

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

public class GeoCompoundCurve
extends Geometry

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

该类用于描述参数化线地理实体,组成部分可包含:折线(GeoLine)、圆弧(GeoArc)、圆(GeoCircle)、椭圆弧(GeoEllipticArc)、椭圆(GeoEllipse)、贝塞尔曲线(GeoBezier3Curve),并且上一部分的终止坐标与下一部分的起始坐标重合。

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


构造方法摘要
GeoCompoundCurve()
          构造一个新的 GeoCompoundCurve 参数化线对象。
GeoCompoundCurve(GeoCompoundCurve geoParametricLine)
          根据指定的 GeoCompoundCurve 对象构造一个与其完全相同的新对象。
 
方法摘要
 boolean addCurve(Geometry geometry)
          添加一个参数化部分,添加的对象必须要保证和上一个对象首尾相接,否则返回失败
 GeoCompoundCurve clone()
          克隆参数化线对象。
 void dispose()
          释放该对象所占用的资源。
 Geometry getCurve(int index)
          获取指定索引的参数化部分。
 int getCurveCount()
          获取包含的对象数目。
 double getLength()
          返回线对象的长度,单位与数据集的单位相同。
 boolean isEmpty()
          返回是否为空。
 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
 

构造方法详细信息

GeoCompoundCurve

public GeoCompoundCurve()
构造一个新的 GeoCompoundCurve 参数化线对象。


GeoCompoundCurve

public GeoCompoundCurve(GeoCompoundCurve geoParametricLine)
根据指定的 GeoCompoundCurve 对象构造一个与其完全相同的新对象。

参数:
geoParametricLine - 指定的 GeoCompoundCurve 参数化线对象。
方法详细信息

getLength

public double getLength()
返回线对象的长度,单位与数据集的单位相同。

返回:
参数化线几何对象的长度。
默认值:
默认值为 0.0。

addCurve

public boolean addCurve(Geometry geometry)
添加一个参数化部分,添加的对象必须要保证和上一个对象首尾相接,否则返回失败

参数:
geometry - 参数化部分。
返回:
如果添加成功则返回 true;否则返回 false。
默认值:
默认值为 true。

getCurveCount

public int getCurveCount()
获取包含的对象数目。

返回:
线几何子对象的数量。
默认值:
默认值为 0。

getCurve

public Geometry getCurve(int index)
获取指定索引的参数化部分。

参数:
index - 指定的子对象的序号。
返回:
参数化部分。
默认值:
默认值为 0。

clone

public GeoCompoundCurve clone()
克隆参数化线对象。

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

dispose

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

覆盖:
Geometry 中的 dispose

isEmpty

public boolean isEmpty()
返回是否为空。

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

setEmpty

public void setEmpty()
清空几何对象。

覆盖:
Geometry 中的 setEmpty