com.vividsolutions.jts.index.chain

Class MonotoneChainBuilder


public class MonotoneChainBuilder
extends java.lang.Object

A MonotoneChainBuilder implements functions to determine the monotone chains in a sequence of points.
Version:
1.7

Constructor Summary

MonotoneChainBuilder()

Method Summary

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 List
getChains(Coordinate[] pts)
static List
getChains(Coordinate[] pts, Object context)
Return a list of the MonotoneChains for the given list of coordinates.
static int[]
toIntArray(List list)

Constructor Details

MonotoneChainBuilder

public MonotoneChainBuilder()

Method Details

getChainStartIndices

public static int[] getChainStartIndices(Coordinate[] pts)
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.

getChains

public static List getChains(Coordinate[] pts)

getChains

public static List getChains(Coordinate[] pts,
                             Object context)
Return a list of the MonotoneChains for the given list of coordinates.

toIntArray

public static int[] toIntArray(List list)