com.supermap.data

类 GeoMultiCurve

  • 所有已实现的接口:
    IDisposable


    public class GeoMultiCurve
    extends Geometry
    参数化多线几何对象类,派生于 Geometry 类。

    该类用于描述参数化多线地理实体,几何对象可包含多个子对象。

    现实中的地物轮廓线存在曲线时,采用参数化数据进行描述,在地图显示上与实际地物轮廓更为贴合,在面积周长等几何计算中更加准确。

    由多个子对象组成,每个子对象仅包含一个几何对象,几何对象可以为:线(GeoLine)、圆弧(GeoArc)、圆(GeoCircle)、椭圆弧(GeoEllipticArc)、椭圆(GeoEllipse)、参数化线(GeoCompoundCurve)、贝塞尔曲线(GeoBezier3Curve),特别的,子对象为GeoLine时,所包含的线对象个数只能是 1。

    • 构造器详细资料

      • GeoMultiCurve

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

        public GeoMultiCurve(GeoMultiCurve geoMCurve)
        根据指定的 GeoMultiCurve 对象构造一个与其完全相同的新对象。
        参数:
        geoMCurve - 指定的 GeoCompoundCurve 参数化线对象。
    • 方法详细资料

      • getLength

        public double getLength()
        计算线对象的长度,单位与数据集的单位相同。
        返回:
        参数化多线几何对象的长度。
        默认值:
        默认值为 0.0。
      • getNumGeometries

        public int getNumGeometries()
        获取包含的线几何子对象的数量。
        返回:
        线几何子对象的数量。
        默认值:
        默认值为 0。
      • addGeometry

        public boolean addGeometry(Geometry geometry)
        添加一个几何子对象,Geometry类型只能是线、圆、圆弧、椭圆、椭圆弧、参数化线、贝塞尔曲线。
        参数:
        geometry - 线几何对象。
        返回:
        添加成功返回 true;否则返回 false。
      • removeGeometry

        public boolean removeGeometry(int index)
        移除指定索引的几何子对象。
        参数:
        index - 指定的子对象的序号
        返回:
        移除成功返回 true;否则返回 false。
      • getGeometry

        public Geometry getGeometry(int index)
        获取指定索引的几何子对象。
        参数:
        index - 指定的子对象的序号。
        返回:
        几何子对象。
      • convertToLine

        public GeoLine convertToLine(int pointCountPerSegment)
        将参数化多线几何对象转换为线几何对象。
        参数:
        pointCountPerSegment - 拟合参数,表示参数化多线拟合的折线段数量,默认为72。
        返回:
        线几何对象
      • setEmpty

        public void setEmpty()
        清空几何对象。
        覆盖:
        setEmpty 在类中 Geometry
      • clone

        public Geometry clone()
        克隆参数化多线几何对象。
        指定者:
        clone 在类中 Geometry
        返回:
        新的参数化多线几何对象。
      • dispose

        public void dispose()
        从类复制的说明: Geometry
        释放该对象所占用的资源。当调用该方法之后,此对象不再可用。
        指定者:
        dispose 在接口中 IDisposable
        指定者:
        dispose 在类中 Geometry

Copyright © 2021–2024 SuperMap. All rights reserved.