Class OffsetSegmentString
- java.lang.Object
-
- org.locationtech.jts.operation.buffer.OffsetSegmentString
-
class OffsetSegmentString extends java.lang.Object
A dynamic list of the vertices in a constructed offset curve. Automatically removes adjacent vertices which are closer than a given tolerance.
-
-
Field Summary
Fields Modifier and Type Field Description private static Coordinate[]
COORDINATE_ARRAY_TYPE
private double
minimimVertexDistance
The distance below which two adjacent points on the curve are considered to be coincident.private PrecisionModel
precisionModel
private java.util.ArrayList
ptList
-
Constructor Summary
Constructors Constructor Description OffsetSegmentString()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPt(Coordinate pt)
void
addPts(Coordinate[] pt, boolean isForward)
void
closeRing()
Coordinate[]
getCoordinates()
private boolean
isRedundant(Coordinate pt)
Tests whether the given point is redundant relative to the previous point in the list (up to tolerance).void
reverse()
void
setMinimumVertexDistance(double minimimVertexDistance)
void
setPrecisionModel(PrecisionModel precisionModel)
java.lang.String
toString()
-
-
-
Field Detail
-
COORDINATE_ARRAY_TYPE
private static final Coordinate[] COORDINATE_ARRAY_TYPE
-
ptList
private java.util.ArrayList ptList
-
precisionModel
private PrecisionModel precisionModel
-
minimimVertexDistance
private double minimimVertexDistance
The distance below which two adjacent points on the curve are considered to be coincident. This is chosen to be a small fraction of the offset distance.
-
-
Method Detail
-
setPrecisionModel
public void setPrecisionModel(PrecisionModel precisionModel)
-
setMinimumVertexDistance
public void setMinimumVertexDistance(double minimimVertexDistance)
-
addPt
public void addPt(Coordinate pt)
-
addPts
public void addPts(Coordinate[] pt, boolean isForward)
-
isRedundant
private boolean isRedundant(Coordinate pt)
Tests whether the given point is redundant relative to the previous point in the list (up to tolerance).- Parameters:
pt
-- Returns:
- true if the point is redundant
-
closeRing
public void closeRing()
-
reverse
public void reverse()
-
getCoordinates
public Coordinate[] getCoordinates()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-