Package org.locationtech.jts.triangulate
Class SplitSegment
- java.lang.Object
-
- org.locationtech.jts.triangulate.SplitSegment
-
public class SplitSegment extends java.lang.Object
Models a constraint segment which can be split in two in various ways, according to certain geometric constraints.
-
-
Field Summary
Fields Modifier and Type Field Description private double
minimumLen
private LineSegment
seg
private double
segLen
private Coordinate
splitPt
-
Constructor Summary
Constructors Constructor Description SplitSegment(LineSegment seg)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private double
getConstrainedLength(double len)
Coordinate
getSplitPoint()
private static Coordinate
pointAlongReverse(LineSegment seg, double segmentLengthFraction)
Computes theCoordinate
that lies a given fraction along the line defined by the reverse of the given segment.void
setMinimumLength(double minLen)
void
splitAt(double length, Coordinate endPt)
void
splitAt(Coordinate pt)
-
-
-
Field Detail
-
seg
private LineSegment seg
-
segLen
private double segLen
-
splitPt
private Coordinate splitPt
-
minimumLen
private double minimumLen
-
-
Constructor Detail
-
SplitSegment
public SplitSegment(LineSegment seg)
-
-
Method Detail
-
pointAlongReverse
private static Coordinate pointAlongReverse(LineSegment seg, double segmentLengthFraction)
Computes theCoordinate
that lies a given fraction along the line defined by the reverse of the given segment. A fraction of0.0
returns the end point of the segment; a fraction of1.0
returns the start point of the segment.- Parameters:
seg
- the LineSegmentsegmentLengthFraction
- the fraction of the segment length along the line- Returns:
- the point at that distance
-
setMinimumLength
public void setMinimumLength(double minLen)
-
getSplitPoint
public Coordinate getSplitPoint()
-
splitAt
public void splitAt(double length, Coordinate endPt)
-
splitAt
public void splitAt(Coordinate pt)
-
getConstrainedLength
private double getConstrainedLength(double len)
-
-