Package org.meteoinfo.jts.noding
Class IntersectionAdder
- java.lang.Object
-
- org.meteoinfo.jts.noding.IntersectionAdder
-
- All Implemented Interfaces:
SegmentIntersector
public class IntersectionAdder extends java.lang.Object implements SegmentIntersector
Computes the possible intersections between two line segments inNodedSegmentStrings and adds them to each string usingNodedSegmentString.addIntersection(LineIntersector, int, int, int).
-
-
Field Summary
Fields Modifier and Type Field Description intnumInteriorIntersectionsintnumIntersectionsintnumProperIntersectionsintnumTests
-
Constructor Summary
Constructors Constructor Description IntersectionAdder(LineIntersector li)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LineIntersectorgetLineIntersector()CoordinategetProperIntersectionPoint()booleanhasInteriorIntersection()An interior intersection is an intersection which is in the interior of some segment.booleanhasIntersection()booleanhasProperInteriorIntersection()A proper interior intersection is a proper intersection which is not contained in the set of boundary nodes set for this SegmentIntersector.booleanhasProperIntersection()A proper intersection is an intersection which is interior to at least two line segments.static booleanisAdjacentSegments(int i1, int i2)booleanisDone()Always process all intersectionsvoidprocessIntersections(SegmentString e0, int segIndex0, SegmentString e1, int segIndex1)This method is called by clients of theSegmentIntersectorclass to process intersections for two segments of theSegmentStrings being intersected.
-
-
-
Constructor Detail
-
IntersectionAdder
public IntersectionAdder(LineIntersector li)
-
-
Method Detail
-
isAdjacentSegments
public static boolean isAdjacentSegments(int i1, int i2)
-
getLineIntersector
public LineIntersector getLineIntersector()
-
getProperIntersectionPoint
public Coordinate getProperIntersectionPoint()
- Returns:
- the proper intersection point, or
nullif none was found
-
hasIntersection
public boolean hasIntersection()
-
hasProperIntersection
public boolean hasProperIntersection()
A proper intersection is an intersection which is interior to at least two line segments. Note that a proper intersection is not necessarily in the interior of the entire Geometry, since another edge may have an endpoint equal to the intersection, which according to SFS semantics can result in the point being on the Boundary of the Geometry.
-
hasProperInteriorIntersection
public boolean hasProperInteriorIntersection()
A proper interior intersection is a proper intersection which is not contained in the set of boundary nodes set for this SegmentIntersector.
-
hasInteriorIntersection
public boolean hasInteriorIntersection()
An interior intersection is an intersection which is in the interior of some segment.
-
processIntersections
public void processIntersections(SegmentString e0, int segIndex0, SegmentString e1, int segIndex1)
This method is called by clients of theSegmentIntersectorclass to process intersections for two segments of theSegmentStrings being intersected. Note that some clients (such asMonotoneChains) may optimize away this call for segment pairs which they have determined do not intersect (e.g. by an disjoint envelope test).- Specified by:
processIntersectionsin interfaceSegmentIntersector
-
isDone
public boolean isDone()
Always process all intersections- Specified by:
isDonein interfaceSegmentIntersector- Returns:
- false always
-
-