Class MonotoneChainEdge
java.lang.Object
org.locationtech.jts.geomgraph.index.MonotoneChainEdge
MonotoneChains are a way of partitioning the segments of an edge to
allow for fast searching of intersections.
They have the following properties:
- the segments within a monotone chain will never intersect each other
- the envelope of any contiguous subset of the segments in a monotone chain is simply the envelope of the endpoints of the subset.
- Version:
- 1.7
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) Edge(package private) Coordinate[](package private) int[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate voidcomputeIntersectsForChain(int start0, int end0, MonotoneChainEdge mce, int start1, int end1, SegmentIntersector ei) voidcomputeIntersectsForChain(int chainIndex0, MonotoneChainEdge mce, int chainIndex1, SegmentIntersector si) doublegetMaxX(int chainIndex) doublegetMinX(int chainIndex) int[]private booleanoverlaps(int start0, int end0, MonotoneChainEdge mce, int start1, int end1) Tests whether the envelopes of two chain sections overlap (intersect).
-
Field Details
-
e
Edge e -
pts
Coordinate[] pts -
startIndex
int[] startIndex
-
-
Constructor Details
-
MonotoneChainEdge
-
-
Method Details
-
getCoordinates
-
getStartIndexes
public int[] getStartIndexes() -
getMinX
public double getMinX(int chainIndex) -
getMaxX
public double getMaxX(int chainIndex) -
computeIntersects
-
computeIntersectsForChain
public void computeIntersectsForChain(int chainIndex0, MonotoneChainEdge mce, int chainIndex1, SegmentIntersector si) -
computeIntersectsForChain
private void computeIntersectsForChain(int start0, int end0, MonotoneChainEdge mce, int start1, int end1, SegmentIntersector ei) -
overlaps
Tests whether the envelopes of two chain sections overlap (intersect).- Parameters:
start0-end0-mce-start1-end1-- Returns:
- true if the section envelopes overlap
-