com.supermap.data
Class GeoEllipse
- java.lang.Object
-
- com.supermap.data.Geometry
-
- com.supermap.data.GeoEllipse
-
-
Constructor Summary
Constructors Constructor and Description GeoEllipse()
Initializes a new instance of the GeoEllipse class.GeoEllipse(GeoEllipse geoEllipse)
Constructs a new object identical to the given GeoEllipseGeoEllipse object.GeoEllipse(GeoRectangle geoRectangle)
Create a GeoEllipse object according to the given GeoRectangle object.GeoEllipse(Point2D center, double semimajorAxis, double semiminorAxis, double rotation)
Creates a new GeoEllipse object according to the specified arguments.GeoEllipse(Rectangle2D rectangle)
Creates a new GeoEllipse object according to the specified rectangle.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description GeoEllipse
clone()
the GeoEllipse object got by clone.GeoLine
convertToLine(int segmentCount)
Converts the GeoEllipse object to the GeoLine object.GeoRegion
convertToRegion(int segmentCount)
Converts the GeoEllipse object to the GeoRegion object.void
dispose()
Disposes the resources occupied by the object.double
getArea()
Returns the area of the ellipse.Point2D
getCenter()
Returns the center of the ellipse.double
getPerimeter()
Returns the perimeter of the ellipse.double
getRotation()
Returns the rotation angle of the ellipse.double
getSemimajorAxis()
Returns the length of the semimajor of the ellipse.double
getSemiminorAxis()
Returns the length of the semiminor of the ellipse.void
setCenter(Point2D point2D)
Sets the center of the GeoEllipse object.void
setRotation(double value)
Sets the rotation angle of the ellipse.void
setSemimajorAxis(double value)
Sets the length of the semimajor of the ellipse.void
setSemiminorAxis(double value)
Sets the length of the semiminor of the ellipse.
-
-
-
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 the
GeoRectangle
object.- 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.
-
-