CoordinateArraySequence class
A {@link CoordinateSequence} backed by an array of {@link Coordinate}s. This is the implementation that {@link Geometry}s use by default. Coordinates returned by #toArray and #getCoordinate are live -- modifications to them are actually changing the CoordinateSequence's underlying data. A dimension may be specified for the coordinates in the sequence, which may be 2 or 3. The actual coordinates will always have 3 ordinates, but the dimension is useful as metadata in some situations.
@version 1.7
- Inheritance
-
- Object
- CoordinateSequence
- CoordinateArraySequence
Constructors
-
CoordinateArraySequence(List<
Coordinate> coordinates) - Constructs a sequence based on the given array of {@link Coordinate}s (the array is not copied). The coordinate dimension defaults to 3.
- CoordinateArraySequence.fromSequence(CoordinateSequence? coordSeq)
- Creates a sequence based on a deep copy of the given {@link CoordinateSequence}. The coordinate dimension is set to equal the dimension of the input.
- CoordinateArraySequence.fromSize(int size)
- Constructs a sequence of a given size, populated with {@link Coordinate}s.
- CoordinateArraySequence.fromSizeDimension(int size, int dimension)
- Constructs a sequence of a given size, populated with {@link Coordinate}s.
- CoordinateArraySequence.fromSizeDimensionMeasures(int size, int dimension, int measures)
- Constructs a sequence of a given size, populated with {@link Coordinate}s.
-
CoordinateArraySequence.withDimension(List<
Coordinate> coordinates, int dimension) - Constructs a sequence based on the given array of {@link Coordinate}s (the array is not copied).
-
CoordinateArraySequence.withDimensionMeasures(List<
Coordinate> ? coordinates, int dimension, int measures) - Constructs a sequence based on the given array of {@link Coordinate}s (the array is not copied).
Properties
-
coordinates
↔ List<
Coordinate> ? -
getter/setter pair
- dimension ↔ int
-
The actual dimension of the coordinates in the sequence.
Allowable values are 2, 3 or 4.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- measures ↔ int
-
The number of measures of the coordinates in the sequence.
Allowable values are 0 or 1.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clone(
) → Object -
Creates a deep copy of the Object
override
-
copy(
) → CoordinateArraySequence -
Creates a deep copy of the CoordinateArraySequence
override
-
createCoordinate(
) → Coordinate -
Creates a coordinate for use in this sequence.
inherited
-
enforceArrayConsistency(
List< Coordinate?> array) → void - Ensure array contents of the same type, making use of {@link #createCoordinate()} as needed.
-
expandEnvelope(
Envelope env) → Envelope -
Expands the given {@link Envelope} to include the coordinates in the sequence.
Allows implementing classes to optimize access to coordinate values.
override
-
getCoordinate(
int i) → Coordinate -
Get the Coordinate with index i.
override
-
getCoordinateCopy(
int i) → Coordinate -
Get a copy of the Coordinate with index i.
override
-
getCoordinateInto(
int index, Coordinate coord) → void -
@see org.locationtech.jts.geom.CoordinateSequence#getX(int)
override
-
getDimension(
) → int -
@see org.locationtech.jts.geom.CoordinateSequence#getDimension()
override
-
getM(
int index) → double -
@see org.locationtech.jts.geom.CoordinateSequence#getM(int)
override
-
getMeasures(
) → int -
Returns the number of measures included in {@link #getDimension()} for each coordinate for this
sequence.
override
-
getOrdinate(
int index, int ordinateIndex) → double -
@see org.locationtech.jts.geom.CoordinateSequence#getOrdinate(int, int)
override
-
getX(
int index) → double -
@see org.locationtech.jts.geom.CoordinateSequence#getX(int)
override
-
getY(
int index) → double -
@see org.locationtech.jts.geom.CoordinateSequence#getY(int)
override
-
getZ(
int index) → double -
@see org.locationtech.jts.geom.CoordinateSequence#getZ(int)
override
-
hasM(
) → bool -
Checks {@link #getMeasures()} to determine if {@link #getM(int)}
is supported.
inherited
-
hasZ(
) → bool -
Checks {@link #getDimension()} and {@link #getMeasures()} to determine if {@link #getZ(int)}
is supported.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setOrdinate(
int index, int ordinateIndex, double value) → void -
@see org.locationtech.jts.geom.CoordinateSequence#setOrdinate(int, int, double)
override
-
size(
) → int -
Returns the size of the coordinate sequence
override
-
toCoordinateArray(
) → List< Coordinate> -
This method exposes the internal Array of Coordinate Objects
override
-
toString(
) → String -
Returns the string Representation of the coordinate array
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited