com.supermap.data

Class GeoCurve



  • public class GeoCurve
    extends Geometry
    The 2D GeoCurve class.

    This class is mainly used for CAD layer, it is the sub object of object Geometry.

    Curve is the object from DGN data, a curve consists of 6 points at least, and the first two points and the last two points are used to control the direction of the curve, the middle points are the points on the curve.

    • Constructor Detail

      • GeoCurve

        public GeoCurve()
        Constructs a new GeoCurve object.
      • GeoCurve

        public GeoCurve(GeoCurve geoCurve)
        Initializes a new instance according to the specified GeoCurve object.
        Parameters:
        geoCurve - the specified GeoCurve object.
      • GeoCurve

        public GeoCurve(Point2Ds controlPoints)
        Creates a new GeoCurve object according to the specified arguments.
        Parameters:
        controlPoints - control Points
    • Method Detail

      • getLength

        public double getLength()
        Returns the length of the GeoCurve object.
        Returns:
        the length of the GeoCurve object.
        Default:
        The default value is 0.
      • isEmpty

        public boolean isEmpty()
        Returns whether the GeoCurve object is null.
        Overrides:
        isEmpty in class Geometry
        Returns:
        A boolean, whether the GeoCurve object returned is empty, true means is empty.
      • setEmpty

        public void setEmpty()
        Set the GeoCurve object as empty.
        Overrides:
        setEmpty in class Geometry
      • getControlPoints

        public Point2Ds getControlPoints()
        Returns the control point set.
        Returns:
        Control point collection.
        Default:
        The default value is an empty Point2Ds object.
      • setControlPoints

        public void setControlPoints(Point2Ds controlPoints)
        Sets the control point set.
        Parameters:
        controlPoints - control Points
      • convertToLine

        public GeoLine convertToLine(int pointCountPerSegment)
        Converts the GeoCurve object to the GeoLine object.
        Parameters:
        pointCountPerSegment - The number of vertices between two neighbor control points.
        Returns:
        The line collection object.
      • clone

        public GeoCurve clone()
        Returns a copy of the current GeoCurve object.
        Specified by:
        clone in class Geometry
        Returns:
        The new GeoCurve object generated from the clone operation.
      • dispose

        public void dispose()
        Disposes the resources occupied by the object. After calling this method, this object will not be usable.
        Overrides:
        dispose in class Geometry