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 Summary
Constructors Constructor Description StretchedVertex(Coordinate vertexPt, Coordinate nearPt, Coordinate[] nearPts, int nearIndex)
Creates a vertex which lies near a vertexStretchedVertex(Coordinate vertexPt, LineSegment nearSeg)
Creates a vertex for a point which lies near a line segment
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Coordinate
getStretchedVertex(double dist)
Gets the point which this near vertex will be stretched to (by a given distance)Coordinate
getVertexCoordinate()
-
-
-
Constructor Detail
-
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
-parentLine
-parentIndex
-nearSeg
-
-
-
Method Detail
-
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
-
-