Package org.locationtech.jts.triangulate
Class SplitSegment
- java.lang.Object
-
- org.locationtech.jts.triangulate.SplitSegment
-
public class SplitSegment extends java.lang.ObjectModels 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 doubleminimumLenprivate LineSegmentsegprivate doublesegLenprivate CoordinatesplitPt
-
Constructor Summary
Constructors Constructor Description SplitSegment(LineSegment seg)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private doublegetConstrainedLength(double len)CoordinategetSplitPoint()private static CoordinatepointAlongReverse(LineSegment seg, double segmentLengthFraction)Computes theCoordinatethat lies a given fraction along the line defined by the reverse of the given segment.voidsetMinimumLength(double minLen)voidsplitAt(double length, Coordinate endPt)voidsplitAt(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 theCoordinatethat lies a given fraction along the line defined by the reverse of the given segment. A fraction of0.0returns the end point of the segment; a fraction of1.0returns 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)
-
-