Class StretchedVertex
- java.lang.Object
-
- com.vividsolutions.jtstest.testbuilder.topostretch.StretchedVertex
-
public class StretchedVertex extends java.lang.ObjectModels 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[] parentLine, int parentIndex, Coordinate nearPt, Coordinate[] nearPts, int nearIndex)Creates a vertex which lies near a vertexStretchedVertex(Coordinate vertexPt, Coordinate[] parentLine, int parentIndex, 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 CoordinategetStretchedVertex(double dist)Gets the point which this near vertex will be stretched to (by a given distance)CoordinategetVertexCoordinate()
-
-
-
Constructor Detail
-
StretchedVertex
public StretchedVertex(Coordinate vertexPt, Coordinate[] parentLine, int parentIndex, Coordinate nearPt, Coordinate[] nearPts, int nearIndex)
Creates a vertex which lies near a vertex
-
StretchedVertex
public StretchedVertex(Coordinate vertexPt, Coordinate[] parentLine, int parentIndex, 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
-
-