com.supermap.data
Class GeoArc
- java.lang.Object
-
- com.supermap.data.Geometry
-
- com.supermap.data.GeoArc
-
-
Constructor Summary
Constructors Constructor and Description GeoArc()
Create a new GeoArc object.GeoArc(GeoArc geoArc)
Create a new GeoArc object that is the same with the given GeoArc object.GeoArc(Point2D center, double radius, double startAngle, double sweepAngle)
Create a new GeoArc object with the given parameters.GeoArc(Point2D startPoint, Point2D middlePoint, Point2D endPoint)
Create a new GeoArc object with three points.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description GeoArc
clone()
Return a copy of the current GeoArc object.GeoLine
convertToLine(int segmentCount)
Converts the GeoArc object to the GeoLine object.void
dispose()
Release the resource occupy by this object.Point2D
findPointOnArc(double sweepAngle)
Gets one point of the circular arc according to the specified angle.Point2D
getCenter()
Returns the center of the arc.double
getLength()
Returns the length of the circular arc.double
getRadius()
Returns the radius of the arc.double
getStartAngle()
Returns the start angle of the arc, in degree.double
getSweepAngle()
Returns the sweep angle in degrees.void
setCenter(Point2D point2D)
Sets the center of the arc.void
setRadius(double value)
Sets the radius of the arc.void
setStartAngle(double value)
Sets the start angle of the arc, in degree.void
setSweepAngle(double value)
Sets the sweep angle in degrees.
-
-
-
Constructor Detail
-
GeoArc
public GeoArc()
Create a new GeoArc object.
-
GeoArc
public GeoArc(GeoArc geoArc)
Create a new GeoArc object that is the same with the given GeoArc object.- Parameters:
geoArc
- the specified geoArc object.
-
GeoArc
public GeoArc(Point2D center, double radius, double startAngle, double sweepAngle)
Create a new GeoArc object with the given parameters.- Parameters:
center
- The center of the arcradius
- Radius of arcstartAngle
- The start angle of the arc.sweepAngle
- The sweep angle of the arc.
-
-
Method Detail
-
getCenter
public Point2D getCenter()
Returns the center of the arc.- Returns:
- The center of the arc.
- Default:
- The default value is {X = 0,Y = 0}.
-
setCenter
public void setCenter(Point2D point2D)
Sets the center of the arc.- Parameters:
point2D
- The centre of the arc.
-
getRadius
public double getRadius()
Returns the radius of the arc.- Returns:
- The radius of the arc.
- Default:
- The default value is 1.
-
setRadius
public void setRadius(double value)
Sets the radius of the arc.- Parameters:
value
- The radius of the arc.
-
getStartAngle
public double getStartAngle()
Returns the start angle of the arc, in degree.- Returns:
- The start angle of the arc.
- Default:
- The default value is 0.
-
setStartAngle
public void setStartAngle(double value)
Sets the start angle of the arc, in degree.- Parameters:
value
- The start angle of the arc.
-
getSweepAngle
public double getSweepAngle()
Returns the sweep angle in degrees. The sweep angle (measured from the start angle) ranging from -360 degrees to 360 degrees defining where the arc ends. Positive angle indicates the sweep direction is anticlockwise, negative is clockwise.- Returns:
- The sweep angle of the arc.
- Default:
- The default value is 180.
-
setSweepAngle
public void setSweepAngle(double value)
Sets the sweep angle in degrees. The sweep angle (measured from the start angle) ranging from -360 degrees to 360 degrees defining where the arc ends. Positive angle indicates the sweep direction is anticlockwise, negative is clockwise.- Parameters:
value
- The sweep angle of the arc.
-
getLength
public double getLength()
Returns the length of the circular arc.- Returns:
- the length of the arc.
- Default:
- The default value is 3.14159265358979.
-
convertToLine
public GeoLine convertToLine(int segmentCount)
Converts the GeoArc object to the GeoLine object.- Parameters:
segmentCount
- the count of segments in a circle- Returns:
- The line geometrical object.
-
findPointOnArc
public Point2D findPointOnArc(double sweepAngle)
Gets one point of the circular arc according to the specified angle.- Parameters:
sweepAngle
- the angle swept the angle value is between 0 and the return value of thegetSweepAngle()
method.- Returns:
- the Point2D object.
-
dispose
public void dispose()
Release the resource occupy by this object.
-
-