Class OffsetSegmentString

java.lang.Object
org.locationtech.jts.operation.buffer.OffsetSegmentString

class OffsetSegmentString extends Object
A dynamic list of the vertices in a constructed offset curve. Automatically removes adjacent vertices which are closer than a given tolerance.
  • Field Details

    • COORDINATE_ARRAY_TYPE

      private static final Coordinate[] COORDINATE_ARRAY_TYPE
    • ptList

      private 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.
  • Constructor Details

    • OffsetSegmentString

      public OffsetSegmentString()
  • Method Details

    • 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 String toString()
      Overrides:
      toString in class Object