CoordinateSequences class

Utility functions for manipulating {@link CoordinateSequence}s

@version 1.7

Constructors

CoordinateSequences()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

asString(CoordinateSequence cs) String
Creates a string representation of a {@link CoordinateSequence}. The format is:
copy(CoordinateSequence src, int srcPos, CoordinateSequence dest, int destPos, int length) → void
Copies a section of a {@link CoordinateSequence} to another {@link CoordinateSequence}. The sequences may have different dimensions; in this case only the common dimensions are copied.
copyCoord(CoordinateSequence src, int srcPos, CoordinateSequence dest, int destPos) → void
Copies a coordinate of a {@link CoordinateSequence} to another {@link CoordinateSequence}. The sequences may have different dimensions; in this case only the common dimensions are copied.
ensureValidRing(CoordinateSequenceFactory fact, CoordinateSequence seq) CoordinateSequence
Ensures that a CoordinateSequence forms a valid ring, returning a new closed sequence of the correct length if required. If the input sequence is already a valid ring, it is returned without modification. If the input sequence is too short or is not closed, it is extended with one or more copies of the start point.
extend(CoordinateSequenceFactory fact, CoordinateSequence seq, int size) CoordinateSequence
indexOf(Coordinate coordinate, CoordinateSequence seq) int
Returns the index of coordinate in a {@link CoordinateSequence} The first position is 0; the second, 1; etc.
isEqual(CoordinateSequence cs1, CoordinateSequence cs2) bool
Tests whether two {@link CoordinateSequence}s are equal. To be equal, the sequences must be the same length. They do not need to be of the same dimension, but the ordinate values for the smallest dimension of the two must be equal. Two NaN ordinates values are considered to be equal.
isRing(CoordinateSequence seq) bool
Tests whether a {@link CoordinateSequence} forms a valid {@link LinearRing}, by checking the sequence length and closure (whether the first and last points are identical in 2D). Self-intersection is not checked.
minCoordinate(CoordinateSequence seq) Coordinate
Returns the minimum coordinate, using the usual lexicographic comparison.
minCoordinateIndex(CoordinateSequence seq) int
Returns the index of the minimum coordinate of the whole coordinate sequence, using the usual lexicographic comparison.
minCoordinateIndexWithRange(CoordinateSequence seq, int from, int to) int
Returns the index of the minimum coordinate of a part of the coordinate sequence (defined by {@code from} and {@code to}, using the usual lexicographic comparison.
reverse(CoordinateSequence seq) → void
Reverses the coordinates in a sequence in-place.
scroll(CoordinateSequence seq, Coordinate firstCoordinate) → void
Shifts the positions of the coordinates until firstCoordinate is first.
scrollWithIndex(CoordinateSequence seq, int indexOfFirstCoordinate) → void
Shifts the positions of the coordinates until the coordinate at firstCoordinateIndex is first.
scrollWithIndexAndRingcheck(CoordinateSequence seq, int indexOfFirstCoordinate, bool ensureRing) → void
Shifts the positions of the coordinates until the coordinate at firstCoordinateIndex is first.
swap(CoordinateSequence seq, int i, int j) → void
Swaps two coordinates in a sequence.