org.locationtech.jts.geomgraph.index

Type members

Classlikes

abstract class EdgeSetIntersector()

An EdgeSetIntersector computes all the intersections between the edges in the set. It adds the computed intersections to each edge they are found on. It may be used in two scenarios:

An EdgeSetIntersector computes all the intersections between the edges in the set. It adds the computed intersections to each edge they are found on. It may be used in two scenarios:

  • determining the internal intersections between a single set of edges

  • determining the mutual intersections between two different sets of edges

It uses a {link SegmentIntersector} to compute the intersections between segments and to record statistics about what kinds of intersections were found.

Version

1.7

class MonotoneChain(var mce: MonotoneChainEdge, var chainIndex: Int)
Version

1.7

class MonotoneChainEdge(var e: Edge)

MonotoneChains are a way of partitioning the segments of an edge to allow for fast searching of intersections. They have the following properties:

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.

Property 1 means that there is no need to test pairs of segments from within the same monotone chain for intersection. Property 2 allows binary search to be used to find the intersection points of two monotone chains. For many types of real-world data, these properties eliminate a large number of segment comparisons, producing substantial speed gains.

Version

1.7

MonotoneChains are a way of partitioning the segments of an edge to allow for fast searching of intersections. Specifically, a sequence of contiguous line segments is a monotone chain iff all the vectors defined by the oriented segments lies in the same quadrant.

MonotoneChains are a way of partitioning the segments of an edge to allow for fast searching of intersections. Specifically, a sequence of contiguous line segments is a monotone chain iff all the vectors defined by the oriented segments lies in the same quadrant.

Monotone Chains have the following useful 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.

Property 1 means that there is no need to test pairs of segments from within the same monotone chain for intersection. Property 2 allows binary search to be used to find the intersection points of two monotone chains. For many types of real-world data, these properties eliminate a large number of segment comparisons, producing substantial speed gains.

Note that due to the efficient intersection test, there is no need to limit the size of chains to obtain fast performance.

Version

1.7

Companion
class
Companion
object

Computes the intersection of line segments, and adds the intersection to the edges containing the segments.

Computes the intersection of line segments, and adds the intersection to the edges containing the segments.

Version

1.7

Companion
class
class SegmentIntersector(var li: LineIntersector, var includeProper: Boolean, var recordIsolated: Boolean)
Companion
object

Finds all intersections in one or two sets of edges, using the straightforward method of comparing all segments. This algorithm is too slow for production use, but is useful for testing purposes.

Finds all intersections in one or two sets of edges, using the straightforward method of comparing all segments. This algorithm is too slow for production use, but is useful for testing purposes.

Version

1.7

Finds all intersections in one or two sets of edges, using an x-axis sweepline algorithm in conjunction with Monotone Chains. While still O(n^2) in the worst case, this algorithm drastically improves the average-case time. The use of MonotoneChains as the items in the index seems to offer an improvement in performance over a sweep-line alone.

Finds all intersections in one or two sets of edges, using an x-axis sweepline algorithm in conjunction with Monotone Chains. While still O(n^2) in the worst case, this algorithm drastically improves the average-case time. The use of MonotoneChains as the items in the index seems to offer an improvement in performance over a sweep-line alone.

Version

1.7

Finds all intersections in one or two sets of edges, using a simple x-axis sweepline algorithm. While still O(n^2) in the worst case, this algorithm drastically improves the average-case time.

Finds all intersections in one or two sets of edges, using a simple x-axis sweepline algorithm. While still O(n^2) in the worst case, this algorithm drastically improves the average-case time.

Version

1.7

Version

1.7

Companion
class
class SweepLineEvent(val label: Any, val x: Double, val obj: Any) extends Comparable[SweepLineEvent]
Companion
object
class SweepLineSegment(var edge: Edge, var ptIndex: Int)
Version

1.7