public class SegmentIntersectionDetector extends Objectimplements SegmentIntersector
SegmentStrings, if one exists. Only a single intersection is recorded. This strategy can be configured to search for
proper intersections>/b>. In this case, the presence of any kind of intersection will still be recorded, but searching will continue until either a proper intersection has been found or no intersections are detected.
| Constructor and Description |
|---|
SegmentIntersectionDetector()
Creates an intersection finder using a
RobustLineIntersector.
|
SegmentIntersectionDetector(LineIntersector
Creates an intersection finder using a given LineIntersector.
|
| Modifier and Type | Method and Description |
|---|---|
Coordinate |
getIntersection()
Gets the computed location of the intersection.
|
Coordinate |
getIntersectionSegments()
Gets the endpoints of the intersecting segments.
|
boolean |
hasIntersection()
Tests whether an intersection was found.
|
boolean |
hasNonProperIntersection()
Tests whether a non-proper intersection was found.
|
boolean |
hasProperIntersection()
Tests whether a proper intersection was found.
|
boolean |
isDone()
Tests whether processing can terminate, because all required information has been obtained (e.g.
|
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 |
setFindAllIntersectionTypes(boolean findAllTypes)
Sets whether processing can terminate once any intersection is found.
|
void |
setFindProper(boolean findProper)
Sets whether processing must continue until a proper intersection is found.
|
public SegmentIntersectionDetector()
RobustLineIntersector.
public SegmentIntersectionDetector(LineIntersectorli)
li - the LineIntersector to use
public void setFindProper(boolean findProper)
findProper - true if processing should continue until a proper intersection is found
public void setFindAllIntersectionTypes(boolean findAllTypes)
findAllTypes - true if processing can terminate once any intersection is found.
public boolean hasIntersection()
public boolean hasProperIntersection()
public boolean hasNonProperIntersection()
public CoordinategetIntersection()
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()
isDone in interface
SegmentIntersector