com.supermap.data

Class GeoArc



  • public class GeoArc
    extends Geometry
    The GeoArc class.

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

    • Constructor Detail

      • GeoArc

        public GeoArc()
        Create a new GeoArc object.
      • GeoArc

        public GeoArc(GeoArc geoArc)
        Create a new GeoArc object that is the same with the given GeoArc object.
        Parameters:
        geoArc - the specified geoArc object.
      • GeoArc

        public GeoArc(Point2D center,
                      double radius,
                      double startAngle,
                      double sweepAngle)
        Create a new GeoArc object with the given parameters.
        Parameters:
        center - The center of the arc
        radius - Radius of arc
        startAngle - The start angle of the arc.
        sweepAngle - The sweep angle of the arc.
      • GeoArc

        public GeoArc(Point2D startPoint,
                      Point2D middlePoint,
                      Point2D endPoint)
        Create a new GeoArc object with three points.
        Parameters:
        startPoint - The start point of the arc.
        middlePoint - The middle point of the arc.
        endPoint - The end point of the arc.
    • Method Detail

      • getCenter

        public Point2D getCenter()
        Returns the center of the arc.
        Returns:
        The center of the arc.
        Default:
        The default value is {X = 0,Y = 0}.
      • setCenter

        public void setCenter(Point2D point2D)
        Sets the center of the arc.
        Parameters:
        point2D - The centre of the arc.
      • getRadius

        public double getRadius()
        Returns the radius of the arc.
        Returns:
        The radius of the arc.
        Default:
        The default value is 1.
      • setRadius

        public void setRadius(double value)
        Sets the radius of the arc.
        Parameters:
        value - The radius of the arc.
      • getStartAngle

        public double getStartAngle()
        Returns the start angle of the arc, in degree.
        Returns:
        The start angle of the arc.
        Default:
        The default value is 0.
      • setStartAngle

        public void setStartAngle(double value)
        Sets the start angle of the arc, in degree.
        Parameters:
        value - The start angle of the arc.
      • getSweepAngle

        public double getSweepAngle()
        Returns the sweep angle in degrees. The sweep angle (measured from the start angle) ranging from -360 degrees to 360 degrees defining where the arc ends. Positive angle indicates the sweep direction is anticlockwise, negative is clockwise.
        Returns:
        The sweep angle of the arc.
        Default:
        The default value is 180.
      • setSweepAngle

        public void setSweepAngle(double value)
        Sets the sweep angle in degrees. The sweep angle (measured from the start angle) ranging from -360 degrees to 360 degrees defining where the arc ends. Positive angle indicates the sweep direction is anticlockwise, negative is clockwise.
        Parameters:
        value - The sweep angle of the arc.
      • getLength

        public double getLength()
        Returns the length of the circular arc.
        Returns:
        the length of the arc.
        Default:
        The default value is 3.14159265358979.
      • convertToLine

        public GeoLine convertToLine(int segmentCount)
        Converts the GeoArc object to the GeoLine object.
        Parameters:
        segmentCount - the count of segments in a circle
        Returns:
        The line geometrical object.
      • findPointOnArc

        public Point2D findPointOnArc(double sweepAngle)
        Gets one point of the circular arc according to the specified angle.
        Parameters:
        sweepAngle - the angle swept the angle value is between 0 and the return value of the getSweepAngle() method.
        Returns:
        the Point2D object.
      • dispose

        public void dispose()
        Release the resource occupy by this object.
        Overrides:
        dispose in class Geometry
      • clone

        public GeoArc clone()
        Return a copy of the current GeoArc object.
        Specified by:
        clone in class Geometry
        Returns:
        The new GeoDatum object generated from the clone operation.