com.supermap.data
Class GeoEllipticArc
- java.lang.Object
-
- com.supermap.data.Geometry
-
- com.supermap.data.GeoEllipticArc
-
-
Constructor Summary
Constructors Constructor and Description GeoEllipticArc()
Initializes a new GeoEllipticArc object.GeoEllipticArc(GeoEllipticArc geoEllipticArc)
Initializes an object identical to the given GeoEllipticArc object.GeoEllipticArc(Point2D center, double semimajorAxis, double semiminorAxis, double startAngle, double sweepAngle, double rotation)
Creates a new GeoEllipticArc object according to the specified arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description GeoEllipticArc
clone()
Returns a copy of the current GeoEllipticArc object.GeoLine
convertToLine(int segmentCount)
Converts the GeoEllipticArc object to the GeoLine object.void
dispose()
Disposes the resources occupied by the object.Point2D
findPointOnArc(double sweepAngle)
Gets one point of the elliptic arc according to the specified angle.Point2D
getCenter()
Returns the center of the ellipse which the GeoEllipticArc object belongs to.double
getLength()
Returns the length of the elliptic arc.double
getRotation()
Returns the angle of the rotation of the elliptic arc.double
getSemimajorAxis()
Returns the length of the semimajor of the ellipse where the elliptic arc lies.double
getSemiminorAxis()
Returns the length of the semiminor of the ellipse where the elliptic arc lies.double
getStartAngle()
Returns the start angle of the elliptic arc, with the accuracy being 0.1 degrees.double
getSweepAngle()
Returns the sweep angle in degrees of the elliptical arc.void
setCenter(Point2D point2D)
Sets the center of the ellipse where the elliptic arc lies.void
setRotation(double value)
Sets the angle of the rotation of the elliptic arc.void
setSemimajorAxis(double value)
Sets the length of the semimajor of the ellipse where the elliptic arc lies.void
setSemiminorAxis(double value)
Sets the length of the semiminor of the ellipse where the elliptic arc lies.void
setStartAngle(double value)
Sets the start angle of the elliptic arc, with the accuracy being 0.1 degrees.void
setSweepAngle(double value)
Sets the sweep angle in degrees of the elliptical arc.
-
-
-
Constructor Detail
-
GeoEllipticArc
public GeoEllipticArc()
Initializes a new GeoEllipticArc object.
-
GeoEllipticArc
public GeoEllipticArc(GeoEllipticArc geoEllipticArc)
Initializes an object identical to the given GeoEllipticArc object.- Parameters:
geoEllipticArc
- The given GeoEllipticArc object.
-
GeoEllipticArc
public GeoEllipticArc(Point2D center, double semimajorAxis, double semiminorAxis, double startAngle, double sweepAngle, double rotation)
Creates a new GeoEllipticArc object according to the specified arguments.- Parameters:
center
- the specified center of the ellipse where the elliptic arc lies.semimajorAxis
- The semimajor axissemiminorAxis
- The semiminor axisstartAngle
- The start anglesweepAngle
- The end anglerotation
- the rotation angle of the ellipse where the elliptic arc lies. The pivot point is the center of the ellipse which the GeoEllipticArc object belongs to.
-
-
Method Detail
-
getCenter
public Point2D getCenter()
Returns the center of the ellipse which the GeoEllipticArc object belongs to.- Returns:
- the center of the ellipse which the GeoEllipticArc object belongs to.
- Default:
- The default value is {X = 0,Y = 0}.
-
setCenter
public void setCenter(Point2D point2D)
Sets the center of the ellipse where the elliptic arc lies.- Parameters:
point2D
- the center of the ellipse which the GeoEllipticArc object belongs to.
-
getSemimajorAxis
public double getSemimajorAxis()
Returns the length of the semimajor of the ellipse where the elliptic arc lies.- Returns:
- the length of the semimajor of the ellipse where the elliptic arc lies.
- Default:
- The default value is 2.
-
setSemimajorAxis
public void setSemimajorAxis(double value)
Sets the length of the semimajor of the ellipse where the elliptic arc lies.- Parameters:
value
- the length of the semimajor of the ellipse where the elliptic arc lies.
-
getSemiminorAxis
public double getSemiminorAxis()
Returns the length of the semiminor of the ellipse where the elliptic arc lies.- Returns:
- the length of the semiminor of the ellipse where the elliptic arc lies.
- Default:
- The default value is 1.
-
setSemiminorAxis
public void setSemiminorAxis(double value)
Sets the length of the semiminor of the ellipse where the elliptic arc lies.- Parameters:
value
- the length of the semiminor of the ellipse where the elliptic arc lies.
-
getStartAngle
public double getStartAngle()
Returns the start angle of the elliptic arc, with the accuracy being 0.1 degrees.- Returns:
- the start angle of the GeoEllipticArc object.
- Default:
- The default value is 0.
-
setStartAngle
public void setStartAngle(double value)
Sets the start angle of the elliptic arc, with the accuracy being 0.1 degrees.- Parameters:
value
- the start angle of the GeoEllipticArc object.
-
getSweepAngle
public double getSweepAngle()
Returns the sweep angle in degrees of the elliptical arc. 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 GeoEllipticArc object.
- Default:
- The default value is 180.
-
setSweepAngle
public void setSweepAngle(double value)
Sets the sweep angle in degrees of the elliptical arc. 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 GeoEllipticArc object.
-
getRotation
public double getRotation()
Returns the angle of the rotation of the elliptic arc. It is accurate to 0.1 degree. The pivot point is the center of the ellipse which the GeoEllipticArc object belongs to.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 GeoEllipticArc object.
- Default:
- The default value is 0.
-
setRotation
public void setRotation(double value)
Sets the angle of the rotation of the elliptic arc. It is accurate to 0.1 degree. The pivot point is the center of the ellipse which the GeoEllipticArc object belongs to.- Parameters:
value
- the start angle of the GeoEllipticArc object.
-
getLength
public double getLength()
Returns the length of the elliptic arc.- Returns:
- the length of the elliptic arc.
- Default:
- The default value is 3.1413434449768.
-
convertToLine
public GeoLine convertToLine(int segmentCount)
Converts the GeoEllipticArc object to the GeoLine object.- Parameters:
segmentCount
- The count of the segment that are divided equally into.- Returns:
- The line geometrical object.
-
findPointOnArc
public Point2D findPointOnArc(double sweepAngle)
Gets one point of the elliptic arc according to the specified angle.- Parameters:
sweepAngle
- Angle value, it's a absolute angle value here, it's between the start angle and the end angle.- Returns:
Point2D
Type object.
-
clone
public GeoEllipticArc clone()
Returns a copy of the current GeoEllipticArc object.
-
-