com.supermap.data

Class GeoChord



  • public class GeoChord
    extends Geometry
    The GeoChord class.

    It is the segment consist of an ellipse's chord and arc with rotation angle. This class is mainly used in the CAD layer, it is the subobject of the Geometry object.

    • Constructor Summary

      Constructors 
      Constructor and Description
      GeoChord()
      Constructs a new GeoChord object.
      GeoChord(GeoChord geoChord)
      Initializes a new instance according to the GeoChordspecified GeoChord object.
      GeoChord(Point2D center, double semimajorAxis, double semiminorAxis, double startAngle, double sweepAngle, double rotation)
      Creates a new GeoChord object according to the specified arguments.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      GeoChord clone()
      Returns a copy of the current GeoChord object.
      GeoLine convertToLine(int segmentCount)
      Converts the GeoChord object to the GeoLine object.
      GeoRegion convertToRegion(int segmentCount)
      Converts the GeoChord obhect to the GeoRegion object.
      void dispose()
      Disposes the resources occupied by the object.
      double getArea()
      Gets the perimeter of the GeoChord object.
      Point2D getCenter()
      Returns the center of the ellipse which the GeoChord object belongs to.
      double getPerimeter()
      Returns the perimeter of the GeoChord object.
      double getRotation()
      Returns the rotation angle of the GeoChord object.
      double getSemimajorAxis()
      Returns the semi-major axis of the ellipse which the GeoChord object belongs to.
      double getSemiminorAxis()
      Returns the semi-minor axis of the ellipse which the GeoChord object belongs to.
      double getStartAngle()
      Returns the start angle of the elliptical arc which the GeoChord object corresponds to.
      double getSweepAngle()
      Returns the sweep angle in degrees of the elliptical arc which the GeoChord object corresponds to.
      void setCenter(Point2D center)
      Sets the center of the ellipse which the GeoChord object belongs to.
      void setRotation(double value)
      Sets the rotation angle of the GeoChord object.
      void setSemimajorAxis(double value)
      Sets the semi-major axis of the ellipse which the GeoChord object belongs to.
      void setSemiminorAxis(double value)
      Sets the semi-minor axis of the ellipse which the GeoChord object belongs to.
      void setStartAngle(double value)
      Sets the start angle of the elliptical arc which the GeoChord object corresponds to.
      void setSweepAngle(double value)
      Sets the sweep angle in degrees of the elliptical arc which the GeoChord object corresponds to.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GeoChord

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

        public GeoChord(GeoChord geoChord)
        Initializes a new instance according to the GeoChordspecified GeoChord object.
        Parameters:
        geoChord - the specified GeoChord object.
      • GeoChord

        public GeoChord(Point2D center,
                        double semimajorAxis,
                        double semiminorAxis,
                        double startAngle,
                        double sweepAngle,
                        double rotation)
        Creates a new GeoChord object according to the specified arguments.
        Parameters:
        center - The center of the ellipse which the GeoChord object belongs to.
        semimajorAxis - The length of the semi-major axis of the ellipse which the GeoChord object belongs to.
        semiminorAxis - The length of the semi-minor axis of the ellipse which the GeoChord object belongs to.
        startAngle - The start angle of the ellipse arc corresponding to the GeoChord geometry object.
        sweepAngle - The sweep angle of the elliptical arc which the GeoChord object corresponds to.
        rotation - the rotation angle of the GeoChord object. The pivot point is the center of the ellipse which the GeoChord object belongs to.
    • Method Detail

      • getCenter

        public Point2D getCenter()
        Returns the center of the ellipse which the GeoChord object belongs to.
        Returns:
        The center of the ellipse which the GeoChord object belongs to.
        Default:
        The default value is {X = 0,Y = 0}
      • setCenter

        public void setCenter(Point2D center)
        Sets the center of the ellipse which the GeoChord object belongs to.
        Parameters:
        center - The center of the ellipse which the GeoChord object belongs to.
      • getSemimajorAxis

        public double getSemimajorAxis()
        Returns the semi-major axis of the ellipse which the GeoChord object belongs to.
        Returns:
        The semi-major axis of the ellipse which the GeoChord object belongs to.
        Default:
        The default value is 0.
      • setSemimajorAxis

        public void setSemimajorAxis(double value)
        Sets the semi-major axis of the ellipse which the GeoChord object belongs to.
        Parameters:
        value - The length of the semi-major axis of the ellipse which the GeoChord object belongs to.
      • getSemiminorAxis

        public double getSemiminorAxis()
        Returns the semi-minor axis of the ellipse which the GeoChord object belongs to.
        Returns:
        The semi-minor axis of the ellipse which the GeoChord object belongs to.
        Default:
        The default value is 0.
      • setSemiminorAxis

        public void setSemiminorAxis(double value)
        Sets the semi-minor axis of the ellipse which the GeoChord object belongs to.
        Parameters:
        value - The length of the semi-minor axis of the ellipse which the GeoChord object belongs to.
      • getStartAngle

        public double getStartAngle()
        Returns the start angle of the elliptical arc which the GeoChord object corresponds to. It is accurate to 0.1 degree.
        Returns:
        The start angle of the elliptical arc which the GeoChord object corresponds to.
        Default:
        The default value is 0.
      • setStartAngle

        public void setStartAngle(double value)
        Sets the start angle of the elliptical arc which the GeoChord object corresponds to. It is accurate to 0.1 degree.
        Parameters:
        value - The start angle of the ellipse arc corresponding to the GeoChord geometry object.
      • getSweepAngle

        public double getSweepAngle()
        Returns the sweep angle in degrees of the elliptical arc which the GeoChord object corresponds to. It is accurate to 0.1 degree.The sweep angle (measured from the start angle) ranging from -360 degrees to 360 degrees defining where the elliptical arc ends. Positive angle indicates the sweep direction is anticlockwise, negative is clockwise.
        Returns:
        The sweep angle of the elliptic arc corresponding to the GeoChord object.
        Default:
        The default value is 180.
      • setSweepAngle

        public void setSweepAngle(double value)
        Sets the sweep angle in degrees of the elliptical arc which the GeoChord object corresponds to. It is accurate to 0.1 degree.The sweep angle (measured from the start angle) ranging from -360 degrees to 360 degrees defining where the elliptical arc ends. Positive angle indicates the sweep direction is anticlockwise, negative is clockwise.
        Parameters:
        value - The sweep angle of the elliptical arc which the GeoChord object corresponds to.
      • getRotation

        public double getRotation()
        Returns the rotation angle of the GeoChord object. The pivot point is the center of the ellipse which the GeoChord object belongs to.

        The rotation angle of the GeoChord object after being stored with the data engine. The accuracy is 0.1 degrees. The rotation angle accuracy doesn't change for the GeoChord object constructed by the constructor.

        Returns:
        the rotation angle of the GeoChord object.
        Default:
        The default value is 0.
      • setRotation

        public void setRotation(double value)
        Sets the rotation angle of the GeoChord object. The pivot point is the center of the ellipse which the GeoChord object belongs to.
        Parameters:
        value - the rotation angle of the GeoChord object.
      • getPerimeter

        public double getPerimeter()
        Returns the perimeter of the GeoChord object.
        Returns:
        the perimeter of the GeoChord object.
        Default:
        The default value is 0.
      • getArea

        public double getArea()
        Gets the perimeter of the GeoChord object.
        Returns:
        the area of the GeoChord object.
        Default:
        The default value is 0.
      • convertToLine

        public GeoLine convertToLine(int segmentCount)
        Converts the GeoChord object to the GeoLine object.
        Parameters:
        segmentCount - The count of elliptical arc which the partition of the GeoChord produces.
        Returns:
        The line geometrical object.
      • convertToRegion

        public GeoRegion convertToRegion(int segmentCount)
        Converts the GeoChord obhect to the GeoRegion object.
        Parameters:
        segmentCount - The count of elliptical arc which the partition of the GeoChord produces.
        Returns:
        The region geometrical object.
      • clone

        public GeoChord clone()
        Returns a copy of the current GeoChord object.
        Specified by:
        clone in class Geometry
        Returns:
        The new GeoChord 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