public class InteriorIntersectionFinder extends Objectimplements SegmentIntersector
SegmentStrings, if one exists. Only the first intersection found is reported.
| Constructor and Description |
|---|
InteriorIntersectionFinder(LineIntersector
Creates an intersection finder which finds an interior intersection if one exists
|
| Modifier and Type | Method and Description |
|---|---|
int |
count()
Gets the count of intersections found.
|
static InteriorIntersectionFinder |
createAllIntersectionsFinder(LineIntersector
Creates an intersection finder which finds all interior intersections.
|
static InteriorIntersectionFinder |
createAnyIntersectionFinder(LineIntersector
Creates an intersection finder which tests if there is at least one interior intersection.
|
static InteriorIntersectionFinder |
createIntersectionCounter(LineIntersector
Creates an intersection finder which counts all interior intersections.
|
Coordinate |
getInteriorIntersection()
Gets the computed location of the intersection.
|
List |
getIntersections()
Gets the intersections found.
|
Coordinate |
getIntersectionSegments()
Gets the endpoints of the intersecting segments.
|
boolean |
hasIntersection()
Tests whether an intersection was found.
|
boolean |
isDone()
Reports whether the client of this class needs to continue testing all intersections in an arrangement.
|
void |
processIntersections(SegmentString
This method is called by clients of the
SegmentIntersector class to process intersections for two segments of the
SegmentStrings being intersected.
|
void |
setCheckEndSegmentsOnly(boolean isCheckEndSegmentsOnly)
Sets whether only end segments should be tested for interior intersection.
|
void |
setFindAllIntersections(boolean findAllIntersections)
Sets whether all intersections should be computed.
|
void |
setKeepIntersections(boolean keepIntersections)
Sets whether intersection points are recorded.
|
public InteriorIntersectionFinder(LineIntersectorli)
li - the LineIntersector to use
public static InteriorIntersectionFindercreateAnyIntersectionFinder(LineIntersector li)
li - a line intersector
public static InteriorIntersectionFindercreateAllIntersectionsFinder(LineIntersector li)
li - a line intersector
public static InteriorIntersectionFindercreateIntersectionCounter(LineIntersector li)
li - a line intersector
public void setFindAllIntersections(boolean findAllIntersections)
false (the default value) the value of
isDone() is
true after the first intersection is found.
Default is false.
findAllIntersections - whether all intersections should be computed
public void setKeepIntersections(boolean keepIntersections)
false.
Default is true.
keepIntersections - indicates whether intersections should be recorded
public ListgetIntersections()
public int count()
public void setCheckEndSegmentsOnly(boolean isCheckEndSegmentsOnly)
isCheckEndSegmentsOnly - whether to test only end segments
public boolean hasIntersection()
public CoordinategetInteriorIntersection()
public Coordinate[] getIntersectionSegments()
public void processIntersections(SegmentStringe0, int segIndex0, SegmentString e1, int segIndex1)
SegmentIntersector class to process intersections for two segments of the
SegmentStrings being intersected. Note that some clients (such as
MonotoneChains) may optimize away this call for segment pairs which they have determined do not intersect (e.g. by an disjoint envelope test).
public boolean isDone()
SegmentIntersector
isDone in interface
SegmentIntersector