public static class PackedCoordinateSequence.Float extends PackedCoordinateSequence
PackedCoordinateSequence.Double, PackedCoordinateSequence.Float
coordRef, dimension
Constructor and Description |
---|
Float(org.locationtech.jts.geom.Coordinate[] coordinates,
int dimension)
Constructs a packed coordinate sequence out of a coordinate array
|
Float(double[] coordinates,
int dimensions)
Constructs a packed coordinate sequence from an array of double
|
Float(float[] coords,
int dimensions)
Constructs a packed coordinate sequence from an array of float
|
Float(int size,
int dimension)
Constructs an empty packed coordinate sequence of a given size and dimension
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
org.locationtech.jts.geom.CoordinateSequence |
copy() |
org.locationtech.jts.geom.Envelope |
expandEnvelope(org.locationtech.jts.geom.Envelope env) |
org.locationtech.jts.geom.Coordinate |
getCoordinateInternal(int i)
Returns a Coordinate representation of the specified coordinate, by always building a new
Coordinate object
|
double |
getOrdinate(int index,
int ordinate) |
void |
setOrdinate(int index,
int ordinate,
double value)
Sets the ordinate of a coordinate in this sequence.
|
int |
size() |
getCoordinate, getCoordinate, getCoordinateCopy, getDimension, getX, getY, setX, setY, toCoordinateArray, toString
public Float(float[] coords, int dimensions)
floats
- Parameters:
coords
-
dimensions
-
-
Float
public Float(double[] coordinates,
int dimensions)
Constructs a packed coordinate sequence from an array of doubles
-
Float
public Float(org.locationtech.jts.geom.Coordinate[] coordinates,
int dimension)
Constructs a packed coordinate sequence out of a coordinate array
- Parameters:
coordinates
-
-
Float
public Float(int size,
int dimension)
Constructs an empty packed coordinate sequence of a given size and dimension
-
Method Detail
-
getCoordinateInternal
public org.locationtech.jts.geom.Coordinate getCoordinateInternal(int i)
Description copied from class: PackedCoordinateSequence
Returns a Coordinate representation of the specified coordinate, by always building a new
Coordinate object
- Specified by:
getCoordinateInternal
in class PackedCoordinateSequence
- Returns:
- See Also:
CoordinateSequence.getCoordinate(int)
-
size
public int size()
- See Also:
CoordinateSequence.size()
-
clone
public Object clone()
- Specified by:
clone
in interface org.locationtech.jts.geom.CoordinateSequence
- Overrides:
clone
in class PackedCoordinateSequence
- See Also:
Object.clone()
-
getOrdinate
public double getOrdinate(int index,
int ordinate)
- Specified by:
getOrdinate
in interface org.locationtech.jts.geom.CoordinateSequence
- Specified by:
getOrdinate
in class PackedCoordinateSequence
- 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.
-
setOrdinate
public void setOrdinate(int index,
int ordinate,
double value)
Description copied from class: PackedCoordinateSequence
Sets the ordinate of a coordinate in this sequence.
Warning: for performance reasons the ordinate index is not checked - if it is over dimensions
you may not get an exception but a meaningless value.
- Specified by:
setOrdinate
in interface org.locationtech.jts.geom.CoordinateSequence
- Specified by:
setOrdinate
in class PackedCoordinateSequence
- Parameters:
index
- the coordinate index
ordinate
- the ordinate index in the coordinate, 0 based, smaller than the number of
dimensions
value
- the new ordinate value
- See Also:
CoordinateSequence.setOrdinate(int, int, double)
-
expandEnvelope
public org.locationtech.jts.geom.Envelope expandEnvelope(org.locationtech.jts.geom.Envelope env)
-
copy
public org.locationtech.jts.geom.CoordinateSequence copy()
Copyright © 2019. All rights reserved.