Class StretchedVertex

java.lang.Object
org.locationtech.jtstest.testbuilder.topostretch.StretchedVertex

public class StretchedVertex extends Object
Models a vertex of a Geometry which will be stretched due to being too near other segments and vertices.

Currently for simplicity a vertex is assumed to be near only one segment or other vertex. This is sufficient for most cases.

Author:
Martin Davis
  • Constructor Details

    • StretchedVertex

      public StretchedVertex(Coordinate vertexPt, Coordinate nearPt, Coordinate[] nearPts, int nearIndex)
      Creates a vertex which lies near a vertex
    • StretchedVertex

      public StretchedVertex(Coordinate vertexPt, LineSegment nearSeg)
      Creates a vertex for a point which lies near a line segment
      Parameters:
      vertexPt -
      nearSeg -
      parentLine -
      parentIndex -
  • Method Details

    • getVertexCoordinate

      public Coordinate getVertexCoordinate()
    • getStretchedVertex

      public Coordinate getStretchedVertex(double dist)
      Gets the point which this near vertex will be stretched to (by a given distance)
      Parameters:
      dist - the distance to adjust the point by
      Returns:
      the stretched coordinate