Class: CoordinateArrays

jsts.geom.CoordinateArrays

new CoordinateArrays()

Source:

Methods

(static) copyDeep1(coordinates) → {Array.<jsts.geom.Coordinate>}

Creates a deep copy of the argument Coordinate array.
Parameters:
Name Type Description
coordinates Array.<jsts.geom.Coordinate> an array of Coordinates
Source:
Returns:
a deep copy of the input
Type
Array.<jsts.geom.Coordinate>

(static) copyDeep2(src, srcStart, dest, destStart, length)

Creates a deep copy of a given section of a source Coordinate array into a destination Coordinate array. The destination array must be an appropriate size to receive the copied coordinates.
Parameters:
Name Type Description
src Array.<jsts.geom.Coordinate> an array of Coordinates
srcStart number the index to start copying from
dest Array.<jsts.geom.Coordinate> the
destStart number the destination index to start copying to
length number the number of items to copy
Source:

(static) hasRepeatedPoints(coord) → {boolean}

Returns whether #equals returns true for any two consecutive Coordinates in the given array.
Parameters:
Name Type Description
coord Array.<Coordinate>
Source:
Returns:
Type
boolean

(static) increasingDirection(pts)

Determines which orientation of the Coordinate array is (overall) increasing. In other words, determines which end of the array is "smaller" (using the standard ordering on Coordinate). Returns an integer indicating the increasing direction. If the sequence is a palindrome, it is defined to be oriented in a positive direction.
Parameters:
Name Type Description
pts the array of Coordinates to test.
Source:
Returns:
1 if the array is smaller at the start or is a palindrome, -1 if smaller at the end.

(static) indexOf(coordinate, coordinates)

Returns the index of coordinate in coordinates. The first position is 0; the second, 1; etc.
Parameters:
Name Type Description
coordinate the Coordinate to search for.
coordinates the array to search.
Source:
Returns:
the position of coordinate, or -1 if it is not found.

(static) minCoordinate(coordinates)

Returns the minimum coordinate, using the usual lexicographic comparison.
Parameters:
Name Type Description
coordinates the array to search.
Source:
See:
  • Coordinate#compareTo(Object)
Returns:
the minimum coordinate in the array, found using compareTo.

(static) ptNotInList(testPts, pts)

Finds a point in a list of points which is not contained in another list of points
Parameters:
Name Type Description
testPts the Coordinate s to test.
pts an array of Coordinate s to test the input points against.
Source:
Returns:
a Coordinate from testPts which is not in pts, ' or null.

(static) removeRepeatedPoints() → {Array.<Coordinate>}

If the coordinate array argument has repeated points, constructs a new array containing no repeated points. Otherwise, returns the argument.
Source:
See:
Returns:
Type
Array.<Coordinate>

(static) scroll(coordinates, firstCoordinate)

Shifts the positions of the coordinates until firstCoordinate is first.
Parameters:
Name Type Description
coordinates the array to rearrange.
firstCoordinate the coordinate to make first.
Source: