Package org.locationtech.jts.triangulate
Class MidpointSplitPointFinder
java.lang.Object
org.locationtech.jts.triangulate.MidpointSplitPointFinder
- All Implemented Interfaces:
ConstraintSplitPointFinder
A simple split point finder which returns the midpoint of the split segment. This is a default
strategy only. Usually a more sophisticated strategy is required to prevent repeated splitting.
Other points which could be used are:
- The projection of the encroaching point on the segment
- A point on the segment which will produce two segments which will not be further encroached
- The point on the segment which is the same distance from an endpoint as the encroaching point
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindSplitPoint
(Segment seg, Coordinate encroachPt) Gets the midpoint of the split segment
-
Constructor Details
-
MidpointSplitPointFinder
public MidpointSplitPointFinder()
-
-
Method Details
-
findSplitPoint
Gets the midpoint of the split segment- Specified by:
findSplitPoint
in interfaceConstraintSplitPointFinder
- Parameters:
seg
- the encroached segmentencroachPt
- the encroaching point- Returns:
- the point at which to split the encroached segment
-