Package org.locationtech.jts.geom
Class DefaultCoordinateSequence
java.lang.Object
org.locationtech.jts.geom.DefaultCoordinateSequence
- All Implemented Interfaces:
Serializable
,Cloneable
,CoordinateSequence
Deprecated.
no longer used
The CoordinateSequence implementation that Geometries use by default. In
this implementation, Coordinates returned by #toArray and #get are live --
parties that change them are actually changing the
DefaultCoordinateSequence's underlying data.
- Version:
- 1.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Coordinate[]
Deprecated.private static final long
Deprecated.Fields inherited from interface org.locationtech.jts.geom.CoordinateSequence
M, X, Y, Z
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultCoordinateSequence
(int size) Deprecated.Constructs a sequence of a given size, populated with newCoordinate
s.DefaultCoordinateSequence
(Coordinate[] coordinates) Deprecated.Constructs a DefaultCoordinateSequence based on the given array (the array is not copied).DefaultCoordinateSequence
(CoordinateSequence coordSeq) Deprecated.Creates a new sequence based on a deep copy of the givenCoordinateSequence
. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Deprecated.copy()
Deprecated.Creates a deep copy of the DefaultCoordinateSequenceexpandEnvelope
(Envelope env) Deprecated.Expands the givenEnvelope
to include the coordinates in the sequence.getCoordinate
(int i) Deprecated.Get the Coordinate with index i.void
getCoordinate
(int index, Coordinate coord) Deprecated.Copies the i'th coordinate in the sequence to the suppliedCoordinate
.getCoordinateCopy
(int i) Deprecated.Get a copy of the Coordinate with index i.int
Deprecated.Returns the dimension (number of ordinates in each coordinate) for this sequence.double
getOrdinate
(int index, int ordinateIndex) Deprecated.Returns the ordinate of a coordinate in this sequence.double
getX
(int index) Deprecated.Returns ordinate X (0) of the specified coordinate.double
getY
(int index) Deprecated.Returns ordinate Y (1) of the specified coordinate.void
setOrdinate
(int index, int ordinateIndex, double value) Deprecated.Sets the value for a given ordinate of a coordinate in this sequence.int
size()
Deprecated.Returns the size of the coordinate sequenceDeprecated.This method exposes the internal Array of Coordinate ObjectstoString()
Deprecated.Returns the string Representation of the coordinate array
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDDeprecated.- See Also:
-
coordinates
Deprecated.
-
-
Constructor Details
-
DefaultCoordinateSequence
Deprecated.Constructs a DefaultCoordinateSequence based on the given array (the array is not copied).- Parameters:
coordinates
- the coordinate array that will be referenced.
-
DefaultCoordinateSequence
Deprecated.Creates a new sequence based on a deep copy of the givenCoordinateSequence
.- Parameters:
coordSeq
- the coordinate sequence that will be copied.
-
DefaultCoordinateSequence
public DefaultCoordinateSequence(int size) Deprecated.Constructs a sequence of a given size, populated with newCoordinate
s.- Parameters:
size
- the size of the sequence to create
-
-
Method Details
-
getDimension
public int getDimension()Deprecated.Description copied from interface:CoordinateSequence
Returns the dimension (number of ordinates in each coordinate) for this sequence.- Specified by:
getDimension
in interfaceCoordinateSequence
- Returns:
- the dimension of the sequence.
- See Also:
-
getCoordinate
Deprecated.Get the Coordinate with index i.- Specified by:
getCoordinate
in interfaceCoordinateSequence
- Parameters:
i
- the index of the coordinate- Returns:
- the requested Coordinate instance
-
getCoordinateCopy
Deprecated.Get a copy of the Coordinate with index i.- Specified by:
getCoordinateCopy
in interfaceCoordinateSequence
- Parameters:
i
- the index of the coordinate- Returns:
- a copy of the requested Coordinate
-
getCoordinate
Deprecated.Description copied from interface:CoordinateSequence
Copies the i'th coordinate in the sequence to the suppliedCoordinate
. Only the first two dimensions are copied.- Specified by:
getCoordinate
in interfaceCoordinateSequence
- Parameters:
index
- the index of the coordinate to copycoord
- aCoordinate
to receive the value- See Also:
-
getX
public double getX(int index) Deprecated.Description copied from interface:CoordinateSequence
Returns ordinate X (0) of the specified coordinate.- Specified by:
getX
in interfaceCoordinateSequence
- Parameters:
index
-- Returns:
- the value of the X ordinate in the index'th coordinate
- See Also:
-
getY
public double getY(int index) Deprecated.Description copied from interface:CoordinateSequence
Returns ordinate Y (1) of the specified coordinate.- Specified by:
getY
in interfaceCoordinateSequence
- Parameters:
index
-- Returns:
- the value of the Y ordinate in the index'th coordinate
- See Also:
-
getOrdinate
public double getOrdinate(int index, int ordinateIndex) Deprecated.Description copied from interface:CoordinateSequence
Returns the ordinate of a coordinate in this sequence. Ordinate indices 0 and 1 are assumed to be X and Y. Ordinates indices greater than 1 have user-defined semantics (for instance, they may contain other dimensions or measure values).- Specified by:
getOrdinate
in interfaceCoordinateSequence
- Parameters:
index
- the coordinate index in the sequenceordinateIndex
- the ordinate index in the coordinate (in range [0, dimension-1])- See Also:
-
setOrdinate
public void setOrdinate(int index, int ordinateIndex, double value) Deprecated.Description copied from interface:CoordinateSequence
Sets the value for a given ordinate of a coordinate in this sequence.- Specified by:
setOrdinate
in interfaceCoordinateSequence
- Parameters:
index
- the coordinate index in the sequenceordinateIndex
- the ordinate index in the coordinate (in range [0, dimension-1])value
- the new ordinate value- See Also:
-
clone
Deprecated.Creates a deep copy of the Object- Specified by:
clone
in interfaceCoordinateSequence
- Overrides:
clone
in classObject
- Returns:
- The deep copy
-
copy
Deprecated.Creates a deep copy of the DefaultCoordinateSequence- Specified by:
copy
in interfaceCoordinateSequence
- Returns:
- The deep copy
-
size
public int size()Deprecated.Returns the size of the coordinate sequence- Specified by:
size
in interfaceCoordinateSequence
- Returns:
- the number of coordinates
-
toCoordinateArray
Deprecated.This method exposes the internal Array of Coordinate Objects- Specified by:
toCoordinateArray
in interfaceCoordinateSequence
- Returns:
- the Coordinate[] array.
-
expandEnvelope
Deprecated.Description copied from interface:CoordinateSequence
Expands the givenEnvelope
to include the coordinates in the sequence. Allows implementing classes to optimize access to coordinate values.- Specified by:
expandEnvelope
in interfaceCoordinateSequence
- Parameters:
env
- the envelope to expand- Returns:
- a ref to the expanded envelope
-
toString
Deprecated.Returns the string Representation of the coordinate array
-