Package org.locationtech.jts.index.chain
Class MonotoneChainBuilder
java.lang.Object
org.locationtech.jts.index.chain.MonotoneChainBuilder
Constructs
MonotoneChain
s
for sequences of Coordinate
s.- Version:
- 1.7
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
findChainEnd
(Coordinate[] pts, int start) Finds the index of the last point in a monotone chain starting at a given point.static List
getChains
(Coordinate[] pts) static List
getChains
(Coordinate[] pts, Object context) Return a list of theMonotoneChain
s for the given list of coordinates.static int[]
getChainStartIndices
(Coordinate[] pts) Return an array containing lists of start/end indexes of the monotone chains for the given list of coordinates.static int[]
toIntArray
(List list)
-
Constructor Details
-
MonotoneChainBuilder
public MonotoneChainBuilder()
-
-
Method Details
-
toIntArray
-
getChains
-
getChains
Return a list of theMonotoneChain
s for the given list of coordinates. -
getChainStartIndices
Return an array containing lists of start/end indexes of the monotone chains for the given list of coordinates. The last entry in the array points to the end point of the point array, for use as a sentinel. -
findChainEnd
Finds the index of the last point in a monotone chain starting at a given point. Any repeated points (0-length segments) will be included in the monotone chain returned.- Returns:
- the index of the last point in the monotone chain
starting at
start
.
-