public abstract class AbstractArc extends AbstractCurve implements Arc
Geometry.DIMENSIONS, Geometry.OPERATIONS, Geometry.SUBTYPES, Geometry.TYPES, Geometry.ValidationStatus| Modifier and Type | Field and Description |
|---|---|
protected Point |
end |
protected Point |
init |
protected Point |
middle
This is the middle point (belongs to the arc), not the center
of the circle/ellipse
|
LOGGERBEST, E, EXTENDED_GEOMSUBTYPE_OFFSET, EXTENDED_GEOMTYPE_OFFSET, JOIN_STYLE_BEVEL, JOIN_STYLE_MITRE, JOIN_STYLE_ROUND, N, NE, NW, S, SE, SELECTHANDLER, STRETCHINGHANDLER, SW, W| Modifier | Constructor and Description |
|---|---|
protected |
AbstractArc(int subtype) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMoveToVertex(Point point)
Adds a vertex (or direct position) to the curve
|
OrientablePrimitive |
addVertex(double x,
double y)
Utility method for add a vertex
|
OrientablePrimitive |
addVertex(double x,
double y,
double z)
Utility method for add a vertex
|
OrientablePrimitive |
addVertex(Point point)
Adds a vertex (or direct position) to the curve
|
boolean |
canBeReprojected(ICoordTrans ct)
Return true if the geometry can be reprojected by the coordinate
transformation
|
boolean |
canBeTransformed(java.awt.geom.AffineTransform at)
Return true if the geometry can be transformed by the affine transform
|
void |
closePrimitive()
Closes the geometry
|
OrientablePrimitive |
ensureCapacity(int capacity) |
protected abstract Point |
fixPoint(Point point) |
void |
flip()
Flip the coordinates of the geometry.
|
Geometry |
force2D() |
Geometry |
force2DM() |
Geometry |
force3D() |
Geometry |
force3DM() |
double |
getCoordinateAt(int index,
int dimension)
Gets the one of the values of a coordinate (direct position) in a
concrete dimension.
|
int |
getDimension()
Returns the largest number n such that each direct position in a
geometric set can be associated with a subset that has the direct
position in its interior and is similar (isomorphic) to Rn, Euclidean
n-space.
|
double |
getEndAngle()
Returns the counterclockwise angle formed by the horizontal line passing
through the center, the center itself and the ending point.
|
Point |
getEndPoint()
Return the end point that has been used to create the arc.
|
GeneralPathX |
getGeneralPath()
Get GeneralPathIterator, to do registered operations to it.
|
Point |
getInitPoint()
Return the first point that has been used to create the arc.
|
Point |
getMiddlePoint()
Return the middle point of the arc.
|
int |
getNumVertices()
Gets the number of vertices (direct positions) of the curve
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at)
If applies an affine transformation and returns the GeneralPathXIterator
with this geometry's information.
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at,
double flatness)
If applies an affine transformation and returns the GeneralPathXIterator
with this geometry's information.
|
protected java.awt.geom.AffineTransform |
getScaleAffineTransform(Point center,
java.lang.Double scale) |
java.awt.Shape |
getShape() |
java.awt.Shape |
getShape(java.awt.geom.AffineTransform affineTransform) |
double |
getStartAngle()
Returns the counterclockwise angle formed by the horizontal line passing
through the center, the center itself and the starting point.
|
Point |
getVertex(int index)
Gets a vertex (direct position)
|
OrientablePrimitive |
insertVertex(int index,
Point p)
Inserts a vertex (direct position) to the curve.
|
boolean |
is3D() |
boolean |
isEmpty() |
protected double |
normalizeAngle(double angle)
Leaves the angle between PI and -PI
|
Geometry |
offset(double distance) |
Geometry |
offset(int joinStyle,
double distance) |
void |
removeVertex(int index)
Remove a vertex (direct position) to the curve
|
void |
reProject(ICoordTrans ct)
Reprojects this geometry by the coordinate transformer passed as
parameter.
|
OrientablePrimitive |
setCoordinateAt(int index,
int dimension,
double value)
Sets the value of a coordinate (direct position) in a concrete dimension
|
void |
setGeneralPath(GeneralPathX generalPathX)
Sets all the coordinates of the curve
|
void |
setPoints(Point initialPoint,
Point endPoint)
Sets the initial point and the end point of the curve.
|
void |
setPoints(Point startPoint,
Point midPoint,
Point endPoint)
Sets the three points to define an arc.
|
void |
setPointsStartEnd(Point center,
double radius,
double startAngle,
double endAngle)
Sets the values to define an arc.
|
void |
setPointsStartExt(Point center,
double radius,
double startAngle,
double angleExt)
Sets the values to define an arc.
|
OrientablePrimitive |
setVertex(int index,
Point p)
Sets a vertex in a concrete position and replaces the
previous one that was in this position.
|
void |
transform(java.awt.geom.AffineTransform at)
It applies an affine transformation to the geometry.
|
get, sizegetHandlersarea, boundary, buffer, buffer, centroid, clone, closestPoints, compareTo, contains, contains, contains, contains, contains, convertTo, convertToEWKB, convertToEWKB, convertToEWKBForcingType, convertToGeoJson, convertToGeoJson, convertToHexEWKB, convertToHexEWKBQuietly, convertToHexWKB, convertToHexWKBQuietly, convertToWKB, convertToWKB, convertToWKBForcingType, convertToWKBQuietly, convertToWKT, convertToWKTQuietly, convexHull, coveredBy, covers, crosses, difference, disjoint, distance, ensureOrientation, equals, fastIntersects, fix, forceSubtype, getBounds, getBounds2D, getEnvelope, getGeometryType, getInteriorPoint, getInternalShape, getManager, getProjection, getType, getValidationStatus, intersection, intersects, intersects, intersects, invokeOperation, invokeOperation, isCCW, isSimple, isValid, isWithinDistance, makeValid, move, notifyDeprecated, out, overlaps, perimeter, rotate, scale, setGeometryType, setProjection, setProjection, setProjectionIffNull, snapTo, toString, touches, union, withinfinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCenterPoint, setPointsarea, boundary, buffer, buffer, centroid, clone, cloneGeometry, closestPoints, contains, convertTo, convertToEWKB, convertToEWKB, convertToEWKBForcingType, convertToGeoJson, convertToHexEWKB, convertToHexEWKBQuietly, convertToHexWKB, convertToHexWKBQuietly, convertToWKB, convertToWKB, convertToWKBForcingType, convertToWKBQuietly, convertToWKT, convertToWKTQuietly, convexHull, coveredBy, covers, crosses, difference, disjoint, distance, ensureOrientation, equals, fastIntersects, fix, forceSubtype, getBounds2D, getEnvelope, getGeometryType, getHandlers, getInteriorPoint, getInternalShape, getProjection, getType, getValidationStatus, intersection, intersects, intersects, invokeOperation, invokeOperation, isCCW, isSimple, isValid, isWithinDistance, makeValid, move, out, overlaps, perimeter, rotate, scale, setProjection, setProjection, setProjectionIffNull, snapTo, toLines, toPoints, toPolygons, touches, union, withincontains, contains, contains, contains, getBounds, intersectsisEmpty, isEmpty, isEmptyQuietlygetJTSprotected Point init
protected Point middle
protected Point end
public void setPoints(Point initialPoint, Point endPoint)
Curvepublic double getCoordinateAt(int index,
int dimension)
OrientablePrimitivegetCoordinateAt in interface OrientablePrimitiveindex - The index of the direct position to set.dimension - The dimension of the direct position.public OrientablePrimitive setCoordinateAt(int index, int dimension, double value)
OrientablePrimitivesetCoordinateAt in interface OrientablePrimitiveindex - The index of the direct position to setdimension - The dimension of the direct positionvalue - The value to setpublic OrientablePrimitive addVertex(Point point)
OrientablePrimitiveaddVertex in interface OrientablePrimitivepoint - The new point to addpublic OrientablePrimitive addVertex(double x, double y)
OrientablePrimitiveaddVertex in interface OrientablePrimitiveOrientablePrimitive.addVertex(Point)public OrientablePrimitive addVertex(double x, double y, double z)
OrientablePrimitiveaddVertex in interface OrientablePrimitiveOrientablePrimitive.addVertex(Point)public void removeVertex(int index)
OrientablePrimitiveremoveVertex in interface OrientablePrimitiveindex - The index of the vertex to removepublic Point getVertex(int index)
OrientablePrimitivegetVertex in interface OrientablePrimitiveindex - The index of the vertex to getpublic int getNumVertices()
OrientablePrimitivegetNumVertices in interface OrientablePrimitivepublic OrientablePrimitive insertVertex(int index, Point p)
OrientablePrimitiveinsertVertex in interface OrientablePrimitiveindex - The index of the vertex where the new point has to be added.p - The vertex to add.public OrientablePrimitive setVertex(int index, Point p)
OrientablePrimitivesetVertex in interface OrientablePrimitiveindex - The index of the vertex where the new point has to be replaced.p - The vertex to set.public void setGeneralPath(GeneralPathX generalPathX)
OrientablePrimitivesetGeneralPath in interface OrientablePrimitivegeneralPathX - The generalPath that contains all the coordinatespublic void addMoveToVertex(Point point)
OrientablePrimitiveaddMoveToVertex in interface OrientablePrimitivepoint - The new point to addpublic void closePrimitive()
OrientablePrimitiveclosePrimitive in interface OrientablePrimitivepublic OrientablePrimitive ensureCapacity(int capacity)
ensureCapacity in interface OrientablePrimitivepublic void reProject(ICoordTrans ct)
Geometrypublic void transform(java.awt.geom.AffineTransform at)
Geometrypublic int getDimension()
GeometrygetDimension in interface Geometrypublic java.awt.Shape getShape(java.awt.geom.AffineTransform affineTransform)
public java.awt.Shape getShape()
public boolean is3D()
is3D in interface GeometryJTSpublic void setPoints(Point startPoint, Point midPoint, Point endPoint)
Arcpublic Point getInitPoint()
ArcgetInitPoint in interface Arcpublic Point getEndPoint()
ArcgetEndPoint in interface Arcpublic Point getMiddlePoint()
ArcgetMiddlePoint in interface Arcprotected double normalizeAngle(double angle)
angle - (radians)public void setPointsStartExt(Point center, double radius, double startAngle, double angleExt)
ArcsetPointsStartExt in interface Arccenter - The center of the arc.radius - The radius.startAngle - The start angle of the arc (in radians)angleExt - The angular extent of the arc (in radians).
The sign convention is:
startAngle = 0 is "3 o'clock";
startAngle = (PI / 3) is "1 o'clock";
angleExt > 0 means "advancing clockwise";
angleExt < 0 means "advancing counterclockwise".public void setPointsStartEnd(Point center, double radius, double startAngle, double endAngle)
ArcsetPointsStartEnd in interface Arccenter - The center of the arc.radius - The radius.startAngle - The start angle of the arc (in radians)endAngle - The end angle of the arc (in radians).public GeneralPathX getGeneralPath()
GeometrygetGeneralPath in interface Geometrypublic java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
GeometrygetPathIterator in interface java.awt.ShapegetPathIterator in interface Geometryat - The transformation to apply.public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at,
double flatness)
GeometrygetPathIterator in interface java.awt.ShapegetPathIterator in interface Geometryat - The affine transformation.public void flip()
throws GeometryOperationNotSupportedException,
GeometryOperationException
Geometryflip in interface GeometryGeometryOperationNotSupportedExceptionGeometryOperationExceptionpublic double getStartAngle()
ArcgetStartAngle in interface Arcpublic double getEndAngle()
ArcgetEndAngle in interface Arcpublic Geometry offset(double distance) throws GeometryOperationNotSupportedException, GeometryOperationException
offset in interface GeometryGeometryOperationNotSupportedExceptionGeometryOperationExceptionpublic Geometry offset(int joinStyle, double distance) throws GeometryOperationNotSupportedException, GeometryOperationException
offset in interface GeometryGeometryOperationNotSupportedExceptionGeometryOperationExceptionprotected java.awt.geom.AffineTransform getScaleAffineTransform(Point center, java.lang.Double scale) throws GeometryOperationNotSupportedException, GeometryOperationException
public boolean canBeTransformed(java.awt.geom.AffineTransform at)
GeometrycanBeTransformed in interface Geometryat - the affine transformpublic boolean canBeReprojected(ICoordTrans ct)
GeometrycanBeReprojected in interface Geometryct - the coordinate transformationpublic Geometry force2D() throws GeometryOperationNotSupportedException, GeometryOperationException
force2D in interface GeometryGeometryOperationNotSupportedExceptionGeometryOperationExceptionpublic Geometry force2DM() throws GeometryOperationNotSupportedException, GeometryOperationException
force2DM in class AbstractGeometryGeometryOperationNotSupportedExceptionGeometryOperationExceptionpublic Geometry force3D() throws GeometryOperationNotSupportedException, GeometryOperationException
force3D in class AbstractGeometryGeometryOperationNotSupportedExceptionGeometryOperationExceptionpublic Geometry force3DM() throws GeometryOperationNotSupportedException, GeometryOperationException
force3DM in class AbstractGeometryGeometryOperationNotSupportedExceptionGeometryOperationException