SegmentIntersector
public class NodingIntersectionFinder extends java.lang.Object implements SegmentIntersector
SegmentString
s,
if any exist.
Non-noded intersections include:
SegmentString
(e.g. with a segment string endpoint or other interior vertex)
Constructor | Description |
---|---|
NodingIntersectionFinder(LineIntersector li) |
Creates an intersection finder which finds an interior intersection
if one exists
|
Modifier and Type | Method | Description |
---|---|---|
int |
count() |
Gets the count of intersections found.
|
static NodingIntersectionFinder |
createAllIntersectionsFinder(LineIntersector li) |
Creates an intersection finder which finds all interior intersections.
|
static NodingIntersectionFinder |
createAnyIntersectionFinder(LineIntersector li) |
Creates an intersection finder which tests if there is at least one interior intersection.
|
static NodingIntersectionFinder |
createIntersectionCounter(LineIntersector li) |
Creates an intersection finder which counts all interior intersections.
|
Coordinate |
getInteriorIntersection() |
Gets the computed location of the intersection.
|
java.util.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 e0,
int segIndex0,
SegmentString e1,
int segIndex1) |
This method is called by clients
of the
SegmentIntersector class to process
intersections for two segments of the SegmentString s 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 NodingIntersectionFinder(LineIntersector li)
li
- the LineIntersector to usepublic static NodingIntersectionFinder createAnyIntersectionFinder(LineIntersector li)
li
- a line intersectorpublic static NodingIntersectionFinder createAllIntersectionsFinder(LineIntersector li)
li
- a line intersectorpublic static NodingIntersectionFinder createIntersectionCounter(LineIntersector li)
li
- a line intersectorpublic 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 computedpublic void setKeepIntersections(boolean keepIntersections)
false
.
Default is true
.
keepIntersections
- indicates whether intersections should be recordedpublic java.util.List getIntersections()
Coordinate
public int count()
public void setCheckEndSegmentsOnly(boolean isCheckEndSegmentsOnly)
isCheckEndSegmentsOnly
- whether to test only end segmentspublic boolean hasIntersection()
public Coordinate getInteriorIntersection()
public Coordinate[] getIntersectionSegments()
public void processIntersections(SegmentString e0, int segIndex0, SegmentString e1, int segIndex1)
SegmentIntersector
class to process
intersections for two segments of the SegmentString
s being intersected.
Note that some clients (such as MonotoneChain
s) may optimize away
this call for segment pairs which they have determined do not intersect
(e.g. by an disjoint envelope test).processIntersections
in interface SegmentIntersector
public boolean isDone()
SegmentIntersector
isDone
in interface SegmentIntersector
Copyright © 2018. All rights reserved.