com.supermap.data

Class GeoEllipse



  • public class GeoEllipse
    extends Geometry
    The GeoEllipse class.

    This class is mainly used in the CAD layer, it is the subobject of the Geometry object.

    • Constructor Detail

      • GeoEllipse

        public GeoEllipse()
        Initializes a new instance of the GeoEllipse class.
      • GeoEllipse

        public GeoEllipse(GeoEllipse geoEllipse)
        Constructs a new object identical to the given GeoEllipseGeoEllipse object.
        Parameters:
        geoEllipse - The given GeoEllipse object.
      • GeoEllipse

        public GeoEllipse(Point2D center,
                          double semimajorAxis,
                          double semiminorAxis,
                          double rotation)
        Creates a new GeoEllipse object according to the specified arguments.
        Parameters:
        center - the specified center of the ellipse where the elliptic arc lies.
        semimajorAxis - The length of the semimajor of the ellipse.
        semiminorAxis - The length of the semiminor of the ellipse.
        rotation - the rotation angle of the ellipse. The pivot point is the center of the ellipse.
      • GeoEllipse

        public GeoEllipse(GeoRectangle geoRectangle)
        Create a GeoEllipse object according to the given GeoRectangle object.

        By default, the rotation angle of the GeoEllipse object is the rotation angle of theGeoRectangleobject.

        Parameters:
        geoRectangle - The specified GeoRectangle object used to specify the GeoEllipse object.
        See Also:
        GeoRectangle
      • GeoEllipse

        public GeoEllipse(Rectangle2D rectangle)
        Creates a new GeoEllipse object according to the specified rectangle.
        Parameters:
        rectangle - The specified GeoRectangle object used to specify the GeoEllipse object.
    • Method Detail

      • getCenter

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

        public void setCenter(Point2D point2D)
        Sets the center of the GeoEllipse object.
        Parameters:
        point2D - the center of the GeoEllipse object.
      • getSemimajorAxis

        public double getSemimajorAxis()
        Returns the length of the semimajor of the ellipse.
        Returns:
        the length of the semimajor of the ellipse.
        Default:
        The default value is 2.
      • setSemimajorAxis

        public void setSemimajorAxis(double value)
        Sets the length of the semimajor of the ellipse.
        Parameters:
        value - the length of the semimajor of the ellipse.
      • getSemiminorAxis

        public double getSemiminorAxis()
        Returns the length of the semiminor of the ellipse.
        Returns:
        the length of the semiminor of the ellipse.
        Default:
        The default value is 1.
      • setSemiminorAxis

        public void setSemiminorAxis(double value)
        Sets the length of the semiminor of the ellipse.
        Parameters:
        value - the length of the semiminor of the ellipse.
      • getRotation

        public double getRotation()
        Returns the rotation angle of the ellipse.

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

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

        public void setRotation(double value)
        Sets the rotation angle of the ellipse.
        Parameters:
        value - the rotation angle of the ellipse.
      • getPerimeter

        public double getPerimeter()
        Returns the perimeter of the ellipse.
        Returns:
        the perimeter of the ellipse.
        Default:
        The default value is 6.28318530717959.
      • getArea

        public double getArea()
        Returns the area of the ellipse.
        Returns:
        the area of the ellipse.
        Default:
        The default value is 3.14159265358979.
      • convertToLine

        public GeoLine convertToLine(int segmentCount)
        Converts the GeoEllipse object to the GeoLine object.
        Parameters:
        segmentCount - The count of the segment that are divided equally into.
        Returns:
        The line geometrical object.
      • convertToRegion

        public GeoRegion convertToRegion(int segmentCount)
        Converts the GeoEllipse object to the GeoRegion object.
        Parameters:
        segmentCount - The count of the segment that are divided equally into.
        Returns:
        The region geometrical object.
      • clone

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