Class 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 Detail

      • COORDINATE_ARRAY_TYPE

        private static final Coordinate[] COORDINATE_ARRAY_TYPE
      • ptList

        private java.util.ArrayList ptList
      • 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 Detail

      • OffsetSegmentString

        public OffsetSegmentString()
    • Method Detail

      • setPrecisionModel

        public void setPrecisionModel​(PrecisionModel precisionModel)
      • setMinimumVertexDistance

        public void setMinimumVertexDistance​(double minimimVertexDistance)
      • 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 class java.lang.Object