Package org.geotools.geometry.jts
Class LiteCoordinateSequence
- Object
-
- PackedCoordinateSequence
-
- LiteCoordinateSequence
-
- All Implemented Interfaces:
Serializable
,Cloneable
,CoordinateSequence
public class LiteCoordinateSequence extends PackedCoordinateSequence implements Cloneable
- Since:
- 2.1.x
- Author:
- jeichar
- See Also:
- Serialized Form
- TODO:
- class description
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class PackedCoordinateSequence
PackedCoordinateSequence.Double, PackedCoordinateSequence.Float
-
-
Field Summary
-
Fields inherited from class PackedCoordinateSequence
coordRef, dimension, measures
-
Fields inherited from interface CoordinateSequence
M, X, Y, Z
-
-
Constructor Summary
Constructors Constructor Description LiteCoordinateSequence(double... coords)
Builds a new packed coordinate sequenceLiteCoordinateSequence(double[] coords, int dimensions)
Builds a new packed coordinate sequenceLiteCoordinateSequence(double[] coords, int dimensions, int measures)
Builds a new packed coordinate sequenceLiteCoordinateSequence(float[] coordinates)
Builds a new packed coordinate sequence out of a float coordinate arrayLiteCoordinateSequence(float[] coordinates, int dimension)
Builds a new packed coordinate sequence out of a float coordinate arrayLiteCoordinateSequence(int size, int dimension)
Builds a new empty packed coordinate sequence of a given size and dimensionLiteCoordinateSequence(int size, int dimension, int measures)
Builds a new empty packed coordinate sequence of a given size and dimensionLiteCoordinateSequence(LiteCoordinateSequence seq)
Copy constructorLiteCoordinateSequence(Coordinate... coordinates)
Builds a new packed coordinate sequence out of a coordinate arrayLiteCoordinateSequence(CoordinateSequence cs, int dimension)
LiteCoordinateSequence(CoordinateSequence cs, int dimension, int measures)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
static Geometry
cloneGeometry(Geometry geom)
Clones the specified geometry usingLiteCoordinateSequence
in the resultstatic Geometry
cloneGeometry(Geometry geom, int dimension)
Clones the specified geometry usingLiteCoordinateSequence
in the result, with the specified number of dimensionsPackedCoordinateSequence
copy()
Envelope
expandEnvelope(Envelope env)
double[]
getArray()
Coordinate
getCoordinateInternal(int i)
double
getOrdinate(int index, int ordinate)
double[]
getOrdinateArray(int dimensions)
double[]
getOrdinateArray(int dimensions, int measures)
double
getX(int index)
double[]
getXYArray()
if this is a dimension=2 seq, then this is the same as getArray().double
getY(int index)
void
setArray(double[] coords2)
void
setArray(double[] coords2, int dimension)
void
setOrdinate(int index, int ordinate, double value)
int
size()
String
toString()
-
Methods inherited from class PackedCoordinateSequence
getCoordinate, getCoordinate, getCoordinateCopy, getDimension, getMeasures, readResolve, setX, setY, toCoordinateArray
-
Methods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface CoordinateSequence
createCoordinate, getM, getZ, hasM, hasZ
-
-
-
-
Constructor Detail
-
LiteCoordinateSequence
public LiteCoordinateSequence(double[] coords, int dimensions)
Builds a new packed coordinate sequence
-
LiteCoordinateSequence
public LiteCoordinateSequence(double[] coords, int dimensions, int measures)
Builds a new packed coordinate sequence
-
LiteCoordinateSequence
public LiteCoordinateSequence(double... coords)
Builds a new packed coordinate sequence
-
LiteCoordinateSequence
public LiteCoordinateSequence(float[] coordinates, int dimension)
Builds a new packed coordinate sequence out of a float coordinate array
-
LiteCoordinateSequence
public LiteCoordinateSequence(float[] coordinates)
Builds a new packed coordinate sequence out of a float coordinate array
-
LiteCoordinateSequence
public LiteCoordinateSequence(Coordinate... coordinates)
Builds a new packed coordinate sequence out of a coordinate array
-
LiteCoordinateSequence
public LiteCoordinateSequence(int size, int dimension)
Builds a new empty packed coordinate sequence of a given size and dimension
-
LiteCoordinateSequence
public LiteCoordinateSequence(int size, int dimension, int measures)
Builds a new empty packed coordinate sequence of a given size and dimension
-
LiteCoordinateSequence
public LiteCoordinateSequence(LiteCoordinateSequence seq)
Copy constructor
-
LiteCoordinateSequence
public LiteCoordinateSequence(CoordinateSequence cs, int dimension)
-
LiteCoordinateSequence
public LiteCoordinateSequence(CoordinateSequence cs, int dimension, int measures)
-
-
Method Detail
-
getCoordinateInternal
public Coordinate getCoordinateInternal(int i)
- Specified by:
getCoordinateInternal
in classPackedCoordinateSequence
- See Also:
CoordinateSequence.getCoordinate(int)
-
size
public int size()
- Specified by:
size
in interfaceCoordinateSequence
- See Also:
CoordinateSequence.size()
-
clone
public Object clone()
- Specified by:
clone
in interfaceCoordinateSequence
- Specified by:
clone
in classPackedCoordinateSequence
-
copy
public PackedCoordinateSequence copy()
- Specified by:
copy
in interfaceCoordinateSequence
- Specified by:
copy
in classPackedCoordinateSequence
-
getOrdinate
public double getOrdinate(int index, int ordinate)
- Specified by:
getOrdinate
in interfaceCoordinateSequence
- Specified by:
getOrdinate
in classPackedCoordinateSequence
- See Also:
Beware, for performace reasons the ordinate index is not checked, if it's over dimensions you may not get an exception but a meaningless value.
-
getX
public double getX(int index)
- Specified by:
getX
in interfaceCoordinateSequence
- Overrides:
getX
in classPackedCoordinateSequence
- See Also:
CoordinateSequence.getX(int)
-
getY
public double getY(int index)
- Specified by:
getY
in interfaceCoordinateSequence
- Overrides:
getY
in classPackedCoordinateSequence
- See Also:
CoordinateSequence.getY(int)
-
setOrdinate
public void setOrdinate(int index, int ordinate, double value)
- Specified by:
setOrdinate
in interfaceCoordinateSequence
- Specified by:
setOrdinate
in classPackedCoordinateSequence
- See Also:
org.locationtech.jts.geom.PackedCoordinateSequence#setOrdinate(int, int, double)
-
expandEnvelope
public Envelope expandEnvelope(Envelope env)
- Specified by:
expandEnvelope
in interfaceCoordinateSequence
-
getArray
public double[] getArray()
-
setArray
public void setArray(double[] coords2)
- Parameters:
coords2
-
-
setArray
public void setArray(double[] coords2, int dimension)
-
getXYArray
public double[] getXYArray()
if this is a dimension=2 seq, then this is the same as getArray(). If its >2 dims this will make a new array with dim=2
-
getOrdinateArray
public double[] getOrdinateArray(int dimensions, int measures)
-
getOrdinateArray
public double[] getOrdinateArray(int dimensions)
-
cloneGeometry
public static Geometry cloneGeometry(Geometry geom, int dimension)
Clones the specified geometry usingLiteCoordinateSequence
in the result, with the specified number of dimensions
-
cloneGeometry
public static final Geometry cloneGeometry(Geometry geom)
Clones the specified geometry usingLiteCoordinateSequence
in the result
-
toString
public String toString()
- Overrides:
toString
in classPackedCoordinateSequence
-
-