public class IntersectionAdder extends java.lang.Object implements SegmentIntersector
NodedSegmentString
s
and adds them to each string
using NodedSegmentString.addIntersection(LineIntersector, int, int, int)
.Modifier and Type | Field and Description |
---|---|
private boolean |
hasInterior |
private boolean |
hasIntersection
These variables keep track of what types of intersections were
found during ALL edges that have been intersected.
|
private boolean |
hasProper |
private boolean |
hasProperInterior |
private boolean |
isSelfIntersection |
private LineIntersector |
li |
int |
numInteriorIntersections |
int |
numIntersections |
int |
numProperIntersections |
int |
numTests |
private Coordinate |
properIntersectionPoint |
Constructor and Description |
---|
IntersectionAdder(LineIntersector li) |
Modifier and Type | Method and Description |
---|---|
LineIntersector |
getLineIntersector() |
Coordinate |
getProperIntersectionPoint() |
boolean |
hasInteriorIntersection()
An interior intersection is an intersection which is
in the interior of some segment.
|
boolean |
hasIntersection() |
boolean |
hasProperInteriorIntersection()
A proper interior intersection is a proper intersection which is not
contained in the set of boundary nodes set for this SegmentIntersector.
|
boolean |
hasProperIntersection()
A proper intersection is an intersection which is interior to at least two
line segments.
|
static boolean |
isAdjacentSegments(int i1,
int i2) |
boolean |
isDone()
Always process all intersections
|
private boolean |
isTrivialIntersection(SegmentString e0,
int segIndex0,
SegmentString e1,
int segIndex1)
A trivial intersection is an apparent self-intersection which in fact
is simply the point shared by adjacent line segments.
|
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. |
private boolean hasIntersection
private boolean hasProper
private boolean hasProperInterior
private boolean hasInterior
private Coordinate properIntersectionPoint
private LineIntersector li
private boolean isSelfIntersection
public int numIntersections
public int numInteriorIntersections
public int numProperIntersections
public int numTests
public IntersectionAdder(LineIntersector li)
public static boolean isAdjacentSegments(int i1, int i2)
public LineIntersector getLineIntersector()
public Coordinate getProperIntersectionPoint()
null
if none was foundpublic boolean hasIntersection()
public boolean hasProperIntersection()
public boolean hasProperInteriorIntersection()
public boolean hasInteriorIntersection()
private boolean isTrivialIntersection(SegmentString e0, int segIndex0, SegmentString e1, int segIndex1)
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()
isDone
in interface SegmentIntersector