Package org.locationtech.jts.geom
Class DefaultCoordinateSequence
- java.lang.Object
-
- org.locationtech.jts.geom.DefaultCoordinateSequence
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,CoordinateSequence
class DefaultCoordinateSequence extends java.lang.Object implements CoordinateSequence, java.io.Serializable
Deprecated.no longer usedThe 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
Fields Modifier and Type Field Description private Coordinate[]coordinatesDeprecated.private static longserialVersionUIDDeprecated.-
Fields inherited from interface org.locationtech.jts.geom.CoordinateSequence
M, X, Y, Z
-
-
Constructor Summary
Constructors Constructor Description DefaultCoordinateSequence(int size)Deprecated.Constructs a sequence of a given size, populated with newCoordinates.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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Objectclone()Deprecated.DefaultCoordinateSequencecopy()Deprecated.Creates a deep copy of the DefaultCoordinateSequenceEnvelopeexpandEnvelope(Envelope env)Deprecated.Expands the givenEnvelopeto include the coordinates in the sequence.CoordinategetCoordinate(int i)Deprecated.Get the Coordinate with index i.voidgetCoordinate(int index, Coordinate coord)Deprecated.Copies the i'th coordinate in the sequence to the suppliedCoordinate.CoordinategetCoordinateCopy(int i)Deprecated.Get a copy of the Coordinate with index i.intgetDimension()Deprecated.Returns the dimension (number of ordinates in each coordinate) for this sequence.doublegetOrdinate(int index, int ordinateIndex)Deprecated.Returns the ordinate of a coordinate in this sequence.doublegetX(int index)Deprecated.Returns ordinate X (0) of the specified coordinate.doublegetY(int index)Deprecated.Returns ordinate Y (1) of the specified coordinate.voidsetOrdinate(int index, int ordinateIndex, double value)Deprecated.Sets the value for a given ordinate of a coordinate in this sequence.intsize()Deprecated.Returns the size of the coordinate sequenceCoordinate[]toCoordinateArray()Deprecated.This method exposes the internal Array of Coordinate Objectsjava.lang.StringtoString()Deprecated.Returns the string Representation of the coordinate array
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Deprecated.- See Also:
- Constant Field Values
-
coordinates
private Coordinate[] coordinates
Deprecated.
-
-
Constructor Detail
-
DefaultCoordinateSequence
public DefaultCoordinateSequence(Coordinate[] coordinates)
Deprecated.Constructs a DefaultCoordinateSequence based on the given array (the array is not copied).- Parameters:
coordinates- the coordinate array that will be referenced.
-
DefaultCoordinateSequence
public DefaultCoordinateSequence(CoordinateSequence coordSeq)
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 newCoordinates.- Parameters:
size- the size of the sequence to create
-
-
Method Detail
-
getDimension
public int getDimension()
Deprecated.Description copied from interface:CoordinateSequenceReturns the dimension (number of ordinates in each coordinate) for this sequence.- Specified by:
getDimensionin interfaceCoordinateSequence- Returns:
- the dimension of the sequence.
- See Also:
CoordinateSequence.getDimension()
-
getCoordinate
public Coordinate getCoordinate(int i)
Deprecated.Get the Coordinate with index i.- Specified by:
getCoordinatein interfaceCoordinateSequence- Parameters:
i- the index of the coordinate- Returns:
- the requested Coordinate instance
-
getCoordinateCopy
public Coordinate getCoordinateCopy(int i)
Deprecated.Get a copy of the Coordinate with index i.- Specified by:
getCoordinateCopyin interfaceCoordinateSequence- Parameters:
i- the index of the coordinate- Returns:
- a copy of the requested Coordinate
-
getCoordinate
public void getCoordinate(int index, Coordinate coord)Deprecated.Description copied from interface:CoordinateSequenceCopies the i'th coordinate in the sequence to the suppliedCoordinate. Only the first two dimensions are copied.- Specified by:
getCoordinatein interfaceCoordinateSequence- Parameters:
index- the index of the coordinate to copycoord- aCoordinateto receive the value- See Also:
CoordinateSequence.getX(int)
-
getX
public double getX(int index)
Deprecated.Description copied from interface:CoordinateSequenceReturns ordinate X (0) of the specified coordinate.- Specified by:
getXin interfaceCoordinateSequence- Returns:
- the value of the X ordinate in the index'th coordinate
- See Also:
CoordinateSequence.getX(int)
-
getY
public double getY(int index)
Deprecated.Description copied from interface:CoordinateSequenceReturns ordinate Y (1) of the specified coordinate.- Specified by:
getYin interfaceCoordinateSequence- Returns:
- the value of the Y ordinate in the index'th coordinate
- See Also:
CoordinateSequence.getY(int)
-
getOrdinate
public double getOrdinate(int index, int ordinateIndex)Deprecated.Description copied from interface:CoordinateSequenceReturns 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:
getOrdinatein interfaceCoordinateSequence- Parameters:
index- the coordinate index in the sequenceordinateIndex- the ordinate index in the coordinate (in range [0, dimension-1])- See Also:
CoordinateSequence.getOrdinate(int, int)
-
setOrdinate
public void setOrdinate(int index, int ordinateIndex, double value)Deprecated.Description copied from interface:CoordinateSequenceSets the value for a given ordinate of a coordinate in this sequence.- Specified by:
setOrdinatein 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:
CoordinateSequence.setOrdinate(int, int, double)
-
clone
public java.lang.Object clone()
Deprecated.Creates a deep copy of the Object- Specified by:
clonein interfaceCoordinateSequence- Overrides:
clonein classjava.lang.Object- Returns:
- The deep copy
-
copy
public DefaultCoordinateSequence copy()
Deprecated.Creates a deep copy of the DefaultCoordinateSequence- Specified by:
copyin interfaceCoordinateSequence- Returns:
- The deep copy
-
size
public int size()
Deprecated.Returns the size of the coordinate sequence- Specified by:
sizein interfaceCoordinateSequence- Returns:
- the number of coordinates
-
toCoordinateArray
public Coordinate[] toCoordinateArray()
Deprecated.This method exposes the internal Array of Coordinate Objects- Specified by:
toCoordinateArrayin interfaceCoordinateSequence- Returns:
- the Coordinate[] array.
-
expandEnvelope
public Envelope expandEnvelope(Envelope env)
Deprecated.Description copied from interface:CoordinateSequenceExpands the givenEnvelopeto include the coordinates in the sequence. Allows implementing classes to optimize access to coordinate values.- Specified by:
expandEnvelopein interfaceCoordinateSequence- Parameters:
env- the envelope to expand- Returns:
- a ref to the expanded envelope
-
toString
public java.lang.String toString()
Deprecated.Returns the string Representation of the coordinate array- Overrides:
toStringin classjava.lang.Object- Returns:
- The string
-
-