public abstract class AbstractLine extends AbstractCurve implements Size, GetItem<Point>
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractLine.LineIterator |
class |
AbstractLine.VertexIterator |
Geometry.DIMENSIONS, Geometry.OPERATIONS, Geometry.SUBTYPES, Geometry.TYPES, Geometry.ValidationStatus| Modifier and Type | Field and Description |
|---|---|
protected ArrayListCoordinateSequence |
coordinates |
protected static Logger |
LOGGER |
BEST, 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 |
AbstractLine(int subtype) |
|
AbstractLine(int type,
int subtype) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMoveToVertex(Point point)
Adds a vertex (or direct position) to the curve
|
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
|
protected ArrayListCoordinateSequence |
cloneCoordinates() |
void |
closePrimitive()
Closes the geometry
|
OrientablePrimitive |
ensureCapacity(int capacity) |
Point |
extractPoint(double length) |
protected abstract Point |
fixPoint(Point point) |
void |
flip()
Flip the coordinates of the geometry.
|
Geometry |
force2D() |
Geometry |
force2DM() |
Geometry |
force3D() |
Geometry |
force3DM() |
void |
forceClose(double tolerance) |
Point |
get(int position) |
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.
|
GeneralPathX |
getGeneralPath()
Get GeneralPathIterator, to do registered operations to it.
|
com.vividsolutions.jts.geom.Geometry |
getJTS() |
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.
|
double |
getPathLength(Point point) |
java.awt.Shape |
getShape() |
java.awt.Shape |
getShape(java.awt.geom.AffineTransform affineTransform) |
abstract 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 |
isClosed() |
boolean |
isClosed(double tolerance) |
boolean |
isEmpty() |
java.util.Iterator<Point> |
iterator() |
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) |
OrientablePrimitive |
setVertex(int index,
Point p)
Sets a vertex in a concrete position and replaces the
previous one that was in this position.
|
int |
size() |
void |
transform(java.awt.geom.AffineTransform at)
It applies an affine transformation to the geometry.
|
getHandlersarea, 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, waitaddVertex, addVertexarea, 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, offset, offset, out, overlaps, perimeter, rotate, scale, setProjection, setProjection, setProjectionIffNull, snapTo, toLines, toPoints, toPolygons, touches, union, withincontains, contains, contains, contains, getBounds, intersectsisEmpty, isEmpty, isEmptyQuietlyprotected static final Logger LOGGER
protected ArrayListCoordinateSequence coordinates
protected AbstractLine(int subtype)
subtype - public AbstractLine(int type,
int subtype)
type - subtype - public abstract Point getVertex(int index)
OrientablePrimitivegetVertex in interface OrientablePrimitiveindex - The index of the vertex to getpublic java.util.Iterator<Point> iterator()
public com.vividsolutions.jts.geom.Geometry getJTS()
getJTS in interface GeometryJTSpublic OrientablePrimitive addVertex(Point point)
OrientablePrimitiveaddVertex in interface OrientablePrimitivepoint - The new point to addpublic 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 void removeVertex(int index)
OrientablePrimitiveremoveVertex in interface OrientablePrimitiveindex - The index of the vertex to removepublic boolean isEmpty()
public 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 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 GeneralPathX getGeneralPath()
GeometrygetGeneralPath in interface Geometrypublic boolean is3D()
is3D in interface GeometryJTSpublic void flip()
throws GeometryOperationNotSupportedException,
GeometryOperationException
Geometryflip in interface GeometryGeometryOperationNotSupportedExceptionGeometryOperationExceptionprotected ArrayListCoordinateSequence cloneCoordinates()
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 boolean isClosed()
public boolean isClosed(double tolerance)
public void forceClose(double tolerance)
public 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 AbstractGeometryGeometryOperationNotSupportedExceptionGeometryOperationExceptionpublic int size()
size in interface Sizesize in class AbstractCurvepublic Point get(int position)
get in interface GetItem<Point>get in class AbstractCurvepublic double getPathLength(Point point)
public Point extractPoint(double length)