Class: RobustLineIntersector

jsts.algorithm.RobustLineIntersector

new RobustLineIntersector()

A robust version of {@LineIntersector}.
Source:

Extends

Members

(protected) _isProper :boolean

Type:
  • boolean
Overrides:
Source:

(protected) inputLines :Array.<Array.<Coordinate>>

Type:
  • Array.<Array.<Coordinate>>
Inherited From:
Source:

(protected) intLineIndex :Array.<Array.<int>>

Type:
  • Array.<Array.<int>>
Inherited From:
Source:

(protected) intPt :Array.<Coordinate>

Type:
  • Array.<Coordinate>
Inherited From:
Source:

(protected) pa :Coordinate

Type:
  • Coordinate
Inherited From:
Source:

(protected) pb :Coordinate

Type:
  • Coordinate
Inherited From:
Source:

(protected) precisionModel :PrecisionModel

Type:
  • PrecisionModel
Inherited From:
Source:

(protected) result :int

Type:
  • int
Overrides:
Source:

Methods

(protected) computeIntersect(p1, p2, q1, q2) → {Number}

Parameters:
Name Type Description
p1 Coordinate
p2 Coordinate
q1 Coordinate
q2 Coordinate
Overrides:
Source:
Returns:
Type
Number

computeIntersection(p, p1, p2)

Parameters:
Name Type Description
p Coordinate
p1 Coordinate
p2 Coordinate
Overrides:
Source:

(protected) computeIntLineIndex()

Overrides:
Source:

getEdgeDistance(segmentIndex, intIndex) → {double}

Computes the "edge distance" of an intersection point along the specified input line segment.
Parameters:
Name Type Description
segmentIndex int is 0 or 1.
intIndex int is 0 or 1.
Inherited From:
Source:
Returns:
the edge distance of the intersection point.
Type
double

getEndpoint(segmentIndex, ptIndex)

Gets an endpoint of an input segment.
Parameters:
Name Type Description
segmentIndex the index of the input segment (0 or 1).
ptIndex the index of the endpoint (0 or 1).
Inherited From:
Source:
Returns:
the specified endpoint.

getIndexAlongSegment(segmentIndex, intIndex) → {int}

Computes the index of the intIndex'th intersection point in the direction of a specified input line segment
Parameters:
Name Type Description
segmentIndex int is 0 or 1.
intIndex int is 0 or 1.
Inherited From:
Source:
Returns:
the index of the intersection point along the segment (0 or 1).
Type
int

getIntersection(intIndex) → {Coordinate}

Returns the intIndex'th intersection point
Parameters:
Name Type Description
intIndex int is 0 or 1.
Inherited From:
Source:
Returns:
the intIndex'th intersection point.
Type
Coordinate

getIntersectionAlongSegment(segmentIndex, intIndex) → {Coordinate}

Computes the intIndex'th intersection point in the direction of a specified input line segment
Parameters:
Name Type Description
segmentIndex int is 0 or 1.
intIndex int is 0 or 1.
Inherited From:
Source:
Returns:
the intIndex'th intersection point in the direction of the specified input line segment.
Type
Coordinate

getIntersectionNum() → {int}

Returns the number of intersection points found. This will be either 0, 1 or 2.
Inherited From:
Source:
Returns:
Type
int

hasIntersection() → {boolean}

Tests whether the input geometries intersect.
Inherited From:
Source:
Returns:
true if the input geometries intersect.
Type
boolean

(protected) isCollinear() → {boolean}

Inherited From:
Source:
Returns:
Type
boolean

(protected) isEndPoint() → {boolean}

Inherited From:
Source:
Returns:
Type
boolean

isInteriorIntersection() → {boolean}

Tests whether either intersection point is an interior point of one of the input segments.
Inherited From:
Source:
Returns:
true if either intersection point is in the interior of one of the input segments.
Type
boolean

isInteriorIntersection2(inputLineIndex) → {boolean}

Tests whether either intersection point is an interior point of the specified input segment.
Parameters:
Name Type Description
inputLineIndex
Inherited From:
Source:
Returns:
true if either intersection point is in the interior of the input segment.
Type
boolean

isIntersection(pt) → {boolean}

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.
Parameters:
Name Type Description
pt Coordinate
Inherited From:
Source:
Returns:
true if the input point is one of the intersection points.
Type
boolean

isProper() → {boolean}

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).

The intersection between a point and a line segment is considered proper if the point lies in the interior of the segment (e.g. is not equal to either of the endpoints).

Inherited From:
Source:
Returns:
true if the intersection is proper.
Type
boolean

normalizeToEnvCentre(n00, n01, n10, n11, normPt)

Normalize the supplied coordinates to so that the midpoint of their intersection envelope lies at the origin.
Parameters:
Name Type Description
n00 Coordinate
n01 Coordinate
n10 Coordinate
n11 Coordinate
normPt Coordinate
Source:

normalizeToMinimum(n1, n2, n3, n4, normPt)

Normalize the supplied coordinates so that their minimum ordinate values lie at the origin. NOTE: this normalization technique appears to cause large errors in the position of the intersection point for some cases.
Parameters:
Name Type Description
n1 Coordinate
n2 Coordinate
n3 Coordinate
n4 Coordinate
normPt Coordinate
Source:

setPrecisionModel(precisionModel)

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.
Parameters:
Name Type Description
precisionModel
Inherited From:
Source:

smallestInAbsValue(x1, x2, x3, x4) → {double}

Parameters:
Name Type Description
x1 double
x2 double
x3 double
x4 double
Source:
Returns:
Type
double