Class OffsetSegmentString
- java.lang.Object
-
- org.locationtech.jts.operation.buffer.OffsetSegmentString
-
class OffsetSegmentString extends java.lang.ObjectA 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_TYPEprivate doubleminimimVertexDistanceThe distance below which two adjacent points on the curve are considered to be coincident.private PrecisionModelprecisionModelprivate java.util.ArrayListptList
-
Constructor Summary
Constructors Constructor Description OffsetSegmentString()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPt(Coordinate pt)voidaddPts(Coordinate[] pt, boolean isForward)voidcloseRing()Coordinate[]getCoordinates()private booleanisRedundant(Coordinate pt)Tests whether the given point is redundant relative to the previous point in the list (up to tolerance).voidreverse()voidsetMinimumVertexDistance(double minimimVertexDistance)voidsetPrecisionModel(PrecisionModel precisionModel)java.lang.StringtoString()
-
-
-
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:
toStringin classjava.lang.Object
-
-