RobustLineIntersector class

A robust version of {@link LineIntersector}.

@version 1.7

Inheritance

Constructors

RobustLineIntersector()

Properties

hashCode int
The hash code for this object.
no setterinherited
inputLines List<List<Coordinate?>>
getter/setter pairinherited
intLineIndex List<List<int>>?
The indexes of the endpoints of the intersection lines, in order along the corresponding line
getter/setter pairinherited
intPt List<Coordinate>
getter/setter pairinherited
pa Coordinate
getter/setter pairinherited
pb Coordinate
getter/setter pairinherited
precisionModel PrecisionModel?
If makePrecise is true, computed intersection coordinates will be made precise using Coordinate#makePrecise
getter/setter pairinherited
result int
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkDD(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2, Coordinate intPt) → void
computeCollinearIntersection(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2) int
computeIntersect(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2) int
override
computeIntersection(Coordinate p1, Coordinate p2, Coordinate p3, Coordinate p4) → void
Computes the intersection of the lines p1-p2 and p3-p4. This function computes both the bool value of the hasIntersection test and the (approximate) value of the intersection point itself (if there is one).
inherited
computeIntersectionPointLine(Coordinate p, Coordinate p1, Coordinate p2) → void
Compute the intersection of a point p and the line p1-p2. This function computes the bool value of the hasIntersection test. The actual value of the intersection (if there is one) is equal to the value of p.
override
computeIntLineIndex() → void
inherited
computeIntLineIndexWithIndex(int segmentIndex) → void
inherited
getEdgeDistance(int segmentIndex, int intIndex) double
Computes the "edge distance" of an intersection point along the specified input line segment.
inherited
getEndpoint(int segmentIndex, int ptIndex) Coordinate?
Gets an endpoint of an input segment.
inherited
getIndexAlongSegment(int segmentIndex, int intIndex) int
Computes the index (order) of the intIndex'th intersection point in the direction of a specified input line segment
inherited
getIntersection(int intIndex) Coordinate
Returns the intIndex'th intersection point
inherited
getIntersectionAlongSegment(int segmentIndex, int intIndex) Coordinate
Computes the intIndex'th intersection point in the direction of a specified input line segment
inherited
getIntersectionNum() int
Returns the number of intersection points found. This will be either 0, 1 or 2.
inherited
getTopologySummary() String
inherited
hasIntersection() bool
Tests whether the input geometries intersect.
inherited
intersection(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2) Coordinate
This method computes the actual value of the intersection point. To obtain the maximum precision from the intersection calculation, the coordinates are normalized by subtracting the minimum ordinate values (in absolute value). This has the effect of removing common significant digits from the calculation to maintain more bits of precision.
intersectionSafe(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2) Coordinate
Computes a segment intersection using homogeneous coordinates. Round-off error can cause the raw computation to fail, (usually due to the segments being approximately parallel). If this happens, a reasonable approximation is computed instead.
isCollinear() bool
inherited
isEndPoint() bool
inherited
isInSegmentEnvelopes(Coordinate intPt) bool
Tests whether a point lies in the envelopes of both input segments. A correctly computed intersection point should return true for this test. Since this test is for debugging purposes only, no attempt is made to optimize the envelope test.
isInteriorIntersection() bool
Tests whether either intersection point is an interior point of one of the input segments.
inherited
isInteriorIntersectionWithIndex(int inputLineIndex) bool
Tests whether either intersection point is an interior point of the specified input segment.
inherited
isIntersection(Coordinate pt) bool
Test whether a point is a intersection point of two line segments. Note that if the intersection is a line segment, this method only tests for equality with the endpoints of the intersection segment. It does not return true if the input point is internal to the intersection segment.
inherited
isProper() bool
Tests whether an intersection is proper.
The intersection between two line segments is considered proper if they intersect in a single point in the interior of both segments (e.g. the intersection is a single point and is not equal to any of the endpoints).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setMakePrecise(PrecisionModel precisionModel) → void
Force computed intersection to be rounded to a given precision model @param precisionModel @deprecated use setPrecisionModel instead
inherited
setPrecisionModel(PrecisionModel? precisionModel) → void
Force computed intersection to be rounded to a given precision model. No getter is provided, because the precision model is not required to be specified. @param precisionModel
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

nearestEndpoint(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2) Coordinate
Finds the endpoint of the segments P and Q which is closest to the other segment. This is a reasonable surrogate for the true intersection points in ill-conditioned cases (e.g. where two segments are nearly coincident, or where the endpoint of one segment lies almost on the other segment).