com.supermap.data

Class GeoPie



  • public class GeoPie
    extends Geometry
    The GeoPie class.

    That is, on the Ellipse object from the ellipse heart to the ellipse edge, with two knives to cut out a piece of cake.The object of this class is primarily used for CAD layers and is a subobject of the object Geometry .

    • Constructor Summary

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

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

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

      • GeoPie

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

        public GeoPie(GeoPie geoPie)
        Initializes a new instance according to the specified GeoPie object.
        Parameters:
        geoPie - The specified GeoPie object.
      • GeoPie

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

      • getCenter

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

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

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

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

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

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

        public double getStartAngle()
        Returns the start angle of the elliptical arc which the GeoPie object corresponds to. It is accurate to 0.1 degree.
        Returns:
        The start angle of the elliptical arc which the GeoPie 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 GeoPie object corresponds to. It is accurate to 0.1 degree.
        Parameters:
        value - The start angle of the ellipse arc corresponding to the slice geometry object.
      • getSweepAngle

        public double getSweepAngle()
        Returns the sweep angle in degrees of the elliptical arc which the GeoPie 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 in degrees of the elliptical arc which the GeoPie object corresponds to .
        Default:
        The default value is 180.
      • setSweepAngle

        public void setSweepAngle(double value)
        Sets the sweep angle in degrees of the elliptical arc which the GeoPie object corresponds to. 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 GeoPie object corresponds to.
      • getRotation

        public double getRotation()
        Returns the start angle of ellipse arc which the GeoPie object belongs to.

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

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

        public void setRotation(double value)
        Sets the start angle of ellipse arc which the GeoPie object belongs to.
        Parameters:
        value - The rotation angle of the GeoPie object.
      • convertToLine

        public GeoLine convertToLine(int segmentCount)
        Converts the GeoPie object to the GeoLine object.
        Parameters:
        segmentCount - The count of elliptical arcs.
        Returns:
        The line geometrical object.
      • convertToRegion

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

        public double getArea()
        Returns the area of the GeoPie object.
        Returns:
        The area of the GeoRegion object.
        Default:
        The default value is 1.5702979451521.
      • getPerimeter

        public double getPerimeter()
        Returns the perimeter of the GeoPie object.
        Returns:
        The perimeter of the GeoPie object.
        Default:
        The default value is 5.1413434449768.
      • clone

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