Class EllipticArcSegment
 java.lang.Object

 com.esri.arcgisruntime.geometry.Segment

 com.esri.arcgisruntime.geometry.EllipticArcSegment

public class EllipticArcSegment extends Segment
An elliptic arc segment for use in a multipart geometry.An elliptic arc is the portion of the boundary of a 2D ellipse that connects two points.
 Since:
 100.12.0


Constructor Summary
Constructors Constructor Description EllipticArcSegment(Point centerPoint, double rotationAngle, double semiMajorAxis, double minorMajorRatio, double startAngle, double centralAngle, SpatialReference spatialReference)
Creates an elliptic arc based on parameters that define an ellipse and the portion of that ellipse that defines the arc.EllipticArcSegment(Point startPoint, Point endPoint, double rotationAngle, boolean isMinor, boolean isCounterClockwise, double semiMajorAxis, double minorMajorRatio, SpatialReference spatialReference)
Creates an elliptic arc segment from the given start and end points, and other parameters that define an ellipse.

Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EllipticArcSegment
createCircularEllipticArc(Point centerPoint, double radius, double startAngle, double centralAngle, SpatialReference spatialReference)
Creates anEllipticArcSegment
that is a partial circle shape from the center point and radius of the embedded circle, and the start and central angle around that circle.static EllipticArcSegment
createCircularEllipticArc(Point startPoint, Point endPoint, Point interiorPoint, SpatialReference spatialReference)
Creates an EllipticArcSegment from start, end, and interior points that is a partial circle shape.Point
getCenterPoint()
Gets the center point of the ellipse that this segment is defined upon.double
getCentralAngle()
Gets the parametric angle in radians measuring the span of the arc fromstart angle
toend angle
.double
getEndAngle()
Gets the parametric angle in radians of the end of the arc relative to the major axis of the embedded ellipse.double
getMinorMajorRatio()
Gets the ratio of the length of the semiminor axis to the semimajor axis.double
getRotationAngle()
Gets the angle in radians by which the major axis of the ellipse this segment is based upon is rotated from the xaxis.double
getSemiMajorAxis()
Gets the length of the longer of the two axes of the ellipse upon which this arc is based.double
getSemiMinorAxis()
Gets the length of the shorter of the two axes of the ellipse upon which this arc is based.double
getStartAngle()
Gets the parametric angle in radians of the start of the arc relative to the major axis of the embedded ellipse.boolean
isCircular()
Indicates if this arc is a portion of the boundary of a 2D circle.boolean
isCounterClockwise()
Indicates if the direction of the segment, from start point to end point, proceeds in a counterclockwise direction.java.lang.String
toString()
Returns a string representation of this EllipticArcSegment instance.
Methods inherited from class com.esri.arcgisruntime.geometry.Segment
getEndPoint, getSpatialReference, getStartPoint, isClosed, isCurve




Constructor Detail

EllipticArcSegment
public EllipticArcSegment(Point centerPoint, double rotationAngle, double semiMajorAxis, double minorMajorRatio, double startAngle, double centralAngle, SpatialReference spatialReference)
Creates an elliptic arc based on parameters that define an ellipse and the portion of that ellipse that defines the arc.The spatial reference parameter is used if the center point parameter has a null spatial reference. If both spatial references are supplied, they must be equal.
The z and m values of the center point (if present) are ignored. Use
EllipticArcSegment(Point, Point, double, boolean, boolean, double, double, SpatialReference)
to create anEllipticArcSegment
with end points with z and/or m values. Parameters:
centerPoint
 the center point of the embedded ellipserotationAngle
 the angle in radians by which the major axis of the embedded ellipse is rotated from the xaxis. A positive value corresponds to a counterclockwise rotation from the xaxis. The value is taken in form of the modulo of 2 * PI (360 degrees); for example, an input rotation angle of 7.5 radians (430 degrees) would return a segment with a rotation angle of 1.22 radians (70 degrees).semiMajorAxis
 the length of the semimajor axis of the embedded ellipse in the units of the spatial referenceminorMajorRatio
 the ratio of the length of the semiminor axis to the length of the semimajor axis of the embedded ellipsestartAngle
 the parametric angle in radians of the start of the arc relative to the major axis of the embedded ellipse. A positive value corresponds to a counterclockwise rotation from the major axis. The value is taken in form of the modulo of 2 * PI (360 degrees); for example, an input rotation angle of 7.5 radians (430 degrees) would return a segment with a rotation angle of 1.22 radians (70 degrees).centralAngle
 the parametric angle in radians measuring the span of the arc from thestart angle
to theend angle
. A positive value corresponds to a counterclockwise arc sweep. Values larger than 2 * PI (360 degrees) return a segment with a central angle of exactly 2 * PI (360 degrees), resulting in a full ellipse where the start and end points are identical.spatialReference
 a spatial reference to use for the segment if the center point parameter does not have a spatial reference set, may be null Throws:
java.lang.IllegalArgumentException
 if centerPoint is null Since:
 100.12.0

EllipticArcSegment
public EllipticArcSegment(Point startPoint, Point endPoint, double rotationAngle, boolean isMinor, boolean isCounterClockwise, double semiMajorAxis, double minorMajorRatio, SpatialReference spatialReference)
Creates an elliptic arc segment from the given start and end points, and other parameters that define an ellipse.The z and m values of the start and end points (if present) are used in the EllipticArcSegment.
To maintain the given startPoint and endPoint in the new segment, the other parameters may be adjusted if required. Such adjustments are made according to the Scalable Vector Graphics 1.1 Specification, Appendix F.6.5. If these cannot be adjusted sufficiently, an arc represented with a straight line will be returned.
 Parameters:
startPoint
 the start point of the segmentendPoint
 the end point of the segmentrotationAngle
 the angle in radians by which the major axis of the embedded ellipse is rotated from the xaxisisMinor
 true if thecentral angle
of the segment is less than PIisCounterClockwise
 true if the direction of the segment, from start point to end point, proceeds in a counterclockwise direction, otherwise falsesemiMajorAxis
 the length of the semimajor axis of the embedded ellipse in the units of the spatial referenceminorMajorRatio
 the ratio of the length of the semiminor axis to the length of the semimajor axis of the embedded ellipsespatialReference
 a spatial reference to use for the segment if the points do not have spatial references set, may be null Throws:
java.lang.IllegalArgumentException
 if startPoint is nulljava.lang.IllegalArgumentException
 if endPoint is null Since:
 100.12.0


Method Detail

getCenterPoint
public Point getCenterPoint()
Gets the center point of the ellipse that this segment is defined upon. Returns:
 the center point of the ellipse that this segment is defined upon
 Since:
 100.12.0

getCentralAngle
public double getCentralAngle()
Gets the parametric angle in radians measuring the span of the arc fromstart angle
toend angle
. A positive value corresponds to a counterclockwise arc sweep.This value is always between 2*PI and 2*PI, these limits indicating this arc forms a complete ellipse in either clockwise or counterclockwise direction.
 Returns:
 the central angle, in radians, relative to the xaxis of the ellipse upon which this segment is based
 Since:
 100.12.0

getEndAngle
public double getEndAngle()
Gets the parametric angle in radians of the end of the arc relative to the major axis of the embedded ellipse. A positive value corresponds to a counterclockwise rotation from the major axis. Returns:
 the angle, in radians, defining where this arc ends, measured from a horizontal line through the center point
 Since:
 100.12.0

isCircular
public boolean isCircular()
Indicates if this arc is a portion of the boundary of a 2D circle.An elliptic arc is circular if the ellipse upon which it is based is a circle, meaning the lengths of its major and minor axes are equal.
Use
createCircularEllipticArc(Point, double, double, double, SpatialReference)
andcreateCircularEllipticArc(Point, Point, Point, SpatialReference)
to create circular arcs. Returns:
 indicates if this arc is a portion of the boundary of a 2D circle
 Since:
 100.12.0

isCounterClockwise
public boolean isCounterClockwise()
Indicates if the direction of the segment, from start point to end point, proceeds in a counterclockwise direction. Returns:
 indicates if the direction of the segment, from start point to end point, proceeds in a counterclockwise direction
 Since:
 100.12.0

getMinorMajorRatio
public double getMinorMajorRatio()
Gets the ratio of the length of the semiminor axis to the semimajor axis. Returns:
 the ratio of the length of the semiminor axis to the semimajor axis
 Since:
 100.12.0

getRotationAngle
public double getRotationAngle()
Gets the angle in radians by which the major axis of the ellipse this segment is based upon is rotated from the xaxis. Returns:
 the angle, in radians, at which the ellipse that this segment is based upon is rotated
 Since:
 100.12.0

getSemiMajorAxis
public double getSemiMajorAxis()
Gets the length of the longer of the two axes of the ellipse upon which this arc is based.The semimajor axis always lies on the line between 0 and PI radians.
The length is in the units of the spatial reference.
 Returns:
 the length of the longer of the two axes of the ellipse upon which this arc is based
 Since:
 100.12.0

getSemiMinorAxis
public double getSemiMinorAxis()
Gets the length of the shorter of the two axes of the ellipse upon which this arc is based.The semiminor axis always lies on the line between PI/2 and 3*PI/2 radians.
The length is in the units of the spatial reference.
 Returns:
 the length of the shorter of the two axes of the ellipse upon which this arc is based
 Since:
 100.12.0

getStartAngle
public double getStartAngle()
Gets the parametric angle in radians of the start of the arc relative to the major axis of the embedded ellipse. A positive value corresponds to a counterclockwise rotation from the major axis. Returns:
 the angle, in radians, defining where this arc begins, measured from a horizontal line through the center point
 Since:
 100.12.0

createCircularEllipticArc
public static EllipticArcSegment createCircularEllipticArc(Point centerPoint, double radius, double startAngle, double centralAngle, SpatialReference spatialReference)
Creates anEllipticArcSegment
that is a partial circle shape from the center point and radius of the embedded circle, and the start and central angle around that circle.The z and m values of the center point (if present) are ignored. Use
createCircularEllipticArc(Point, Point, Point, SpatialReference)
to create a circularEllipticArcSegment
with end points with z and/or m values. Parameters:
centerPoint
 the center point of the embedded circleradius
 the distance from the center of the embedded circle to its perimeterstartAngle
 the parametric angle in radians of the start of the arc relative to the major axis of the embedded ellipse. A positive value corresponds to a counterclockwise rotation from the major axis.centralAngle
 the parametric angle in radians measuring the span of the arc fromstart angle
toend angle
. A positive value corresponds to a counterclockwise arc sweep.spatialReference
 the spatial reference of the new segment, may be null Returns:
 a new EllipticArcSegment with the given center point, radius, start and central angles, and
spatial reference, where
isCircular()
is true  Throws:
java.lang.IllegalArgumentException
 if centerPoint is null Since:
 100.12.0

createCircularEllipticArc
public static EllipticArcSegment createCircularEllipticArc(Point startPoint, Point endPoint, Point interiorPoint, SpatialReference spatialReference)
Creates an EllipticArcSegment from start, end, and interior points that is a partial circle shape.The z and m values of the start and end points (if present) are used in the circular
EllipticArcSegment
. The z and m values of the interior point (if present) are ignored. Parameters:
startPoint
 the start point of the segmentendPoint
 the end point of the segmentinteriorPoint
 a point along the circular arc, between the start and end pointsspatialReference
 the spatial reference of the new segment, may be null Returns:
 a new EllipticArcSegment with the given start, through and end point, and spatial reference, where
isCircular()
is true  Throws:
java.lang.IllegalArgumentException
 if startPoint is nulljava.lang.IllegalArgumentException
 if endPoint is nulljava.lang.IllegalArgumentException
 if interiorPoint is null Since:
 100.12.0

toString
public java.lang.String toString()
Returns a string representation of this EllipticArcSegment instance. The format and content of this string is subject to change without notice.This value may be useful for debugging purposes, but cannot be relied upon for persistence purposes.
 Overrides:
toString
in classjava.lang.Object
 Returns:
 a String representation of this segment with useful information for debugging.
 Since:
 100.12.0

