Class: CoordinateList

jsts.geom.CoordinateList

new CoordinateList(coord, allowRepeated)

Constructs a new list from an array of Coordinates, allowing caller to specify if repeated points are to be removed.
Parameters:
Name Type Description
coord Array.<jsts.geom.Coordinate> the array of coordinates to load into the list.
allowRepeated boolean if false, repeated points are removed.
Source:

Methods

addCoordinate(coord, allowRepeated)

Adds a coordinate to the end of the list.
Parameters:
Name Type Description
coord Coordinate The coordinates.
allowRepeated boolean if set to false, repeated coordinates are collapsed.
Source:

addCoordinates(coord, allowRepeated, direction) → {boolean}

Adds an array of coordinates to the list.
Parameters:
Name Type Description
coord Array.<jsts.geom.Coordinate> The coordinates.
allowRepeated boolean if set to false, repeated coordinates are collapsed.
direction boolean if false, the array is added in reverse order.
Source:
Returns:
true (as by general collection contract).
Type
boolean

closeRing()

Ensure this coordList is a ring, by adding the start point if necessary
Source:

insertCoordinate(index, coord, allowRepeated)

Inserts a coordinate at the specified place in the list
Parameters:
Name Type Description
index Number The index where to insert the coordinate.
coord Coordinate The coordinate.
allowRepeated boolean if set to false, repeated coordinates are collapsed.
Source:

toArray() → {Array}

Creates a standard javascript-array from the contents of this list
Source:
Returns:
the created array.
Type
Array

toCoordinateArray()

Returns the Coordinates in this collection.
Source:
Returns:
the coordinates.