PackedCoordinateSequence class abstract
A {@link CoordinateSequence} implementation based on a packed arrays. In this implementation, {@link Coordinate}s returned by #toArray and #get are copies of the internal values. To change the actual values, use the provided setters.
For efficiency, created Coordinate arrays are cached using a soft reference. The cache is cleared each time the coordinate sequence contents are modified through a setter method.
@version 1.7
- Inheritance
-
- Object
- CoordinateSequence
- PackedCoordinateSequence
- Implementers
Constructors
- PackedCoordinateSequence(int dimension, int measures)
- Creates an instance of this class @param dimension the total number of ordinates that make up a {@link Coordinate} in this sequence. @param measures the number of measure-ordinates each {@link Coordinate} in this sequence has.
Properties
-
coordRef
↔ List<
Coordinate> ? -
A soft reference to the List
getter/setter pair
- dimension ↔ int
-
The dimensions of the coordinates held in the packed array
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- measures ↔ int
-
The number of measures of the coordinates held in the packed array.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
asString(
) → String -
clone(
) → Object -
@see java.lang.Object#clone()
@see CoordinateSequence#clone()
@deprecated
override
-
copy(
) → PackedCoordinateSequence -
Returns a deep copy of this collection.
override
-
createCoordinate(
) → Coordinate -
Creates a coordinate for use in this sequence.
inherited
-
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.
inherited
-
getCachedCoords(
) → List< Coordinate> ? -
getCoordinate(
int i) → Coordinate -
@see CoordinateSequence#getCoordinate(int)
override
-
getCoordinateCopy(
int i) → Coordinate -
@see CoordinateSequence#getCoordinate(int)
override
-
getCoordinateInternal(
int index) → Coordinate - Returns a Coordinate representation of the specified coordinate, by always building a new Coordinate object
-
getCoordinateInto(
int i, Coordinate coord) → void -
@see CoordinateSequence#getCoordinate(int)
override
-
getDimension(
) → int -
@see CoordinateSequence#getDimension()
override
-
getM(
int index) → double -
Returns ordinate M of the specified coordinate if available.
inherited
-
getMeasures(
) → int -
@see CoordinateSequence#getMeasures()
override
-
getOrdinate(
int index, int ordinateIndex) → double -
@see CoordinateSequence#getOrdinate(int, int)
override
-
getX(
int index) → double -
@see CoordinateSequence#getX(int)
override
-
getY(
int index) → double -
@see CoordinateSequence#getY(int)
override
-
getZ(
int index) → double -
Returns ordinate Z of the specified coordinate if available.
inherited
-
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 ordinate, double value) → void -
Sets the ordinate of a coordinate in this sequence.
Warning: for performance reasons the ordinate index is not checkedoverride -
setX(
int index, double value) → void - Sets the first ordinate of a coordinate in this sequence.
-
setY(
int index, double value) → void - Sets the second ordinate of a coordinate in this sequence.
-
size(
) → int -
Returns the number of coordinates in this sequence.
@return the size of the sequence
inherited
-
toCoordinateArray(
) → List< Coordinate> -
@see CoordinateSequence#toCoordinateArray()
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited