Class PackedDoubleCoordinateSequence
- Namespace
- NetTopologySuite.Geometries.Implementation
- Assembly
- NetTopologySuite.dll
Packed coordinate sequence implementation based on doubles.
public class PackedDoubleCoordinateSequence : PackedCoordinateSequence
- Inheritance
-
PackedDoubleCoordinateSequence
- Inherited Members
- Extension Methods
Constructors
PackedDoubleCoordinateSequence(Coordinate[])
Initializes a new instance of the PackedDoubleCoordinateSequence class.
public PackedDoubleCoordinateSequence(Coordinate[] coords)
Parameters
coords
Coordinate[]An array of Coordinates.
PackedDoubleCoordinateSequence(Coordinate[], int)
Initializes a new instance of the PackedDoubleCoordinateSequence class.
[Obsolete("Use an overload that accepts measures. This overload will be removed in a future release.")]
public PackedDoubleCoordinateSequence(Coordinate[] coords, int dimension)
Parameters
coords
Coordinate[]An array of Coordinates.
dimension
intThe total number of ordinates that make up a Coordinate in this sequence.
PackedDoubleCoordinateSequence(Coordinate[], int, int)
Initializes a new instance of the PackedDoubleCoordinateSequence class.
public PackedDoubleCoordinateSequence(Coordinate[] coords, int dimension, int measures)
Parameters
coords
Coordinate[]An array of Coordinates.
dimension
intThe total number of ordinates that make up a Coordinate in this sequence.
measures
intThe number of measure-ordinates each Coordinate in this sequence has.
PackedDoubleCoordinateSequence(double[], int, int)
Initializes a new instance of the PackedDoubleCoordinateSequence class.
public PackedDoubleCoordinateSequence(double[] coords, int dimension, int measures)
Parameters
coords
double[]An array of
double
values that contains the ordinate values of the sequence.dimension
intThe total number of ordinates that make up a Coordinate in this sequence.
measures
intThe number of measure-ordinates each Coordinate in this sequence has.
PackedDoubleCoordinateSequence(int, int, int)
Initializes a new instance of the PackedDoubleCoordinateSequence class.
public PackedDoubleCoordinateSequence(int size, int dimension, int measures)
Parameters
size
intThe number of coordinates in this sequence
dimension
intThe total number of ordinates that make up a Coordinate in this sequence.
measures
intThe number of measure-ordinates each Coordinate in this sequence has.
PackedDoubleCoordinateSequence(float[], int, int)
Initializes a new instance of the PackedDoubleCoordinateSequence class.
public PackedDoubleCoordinateSequence(float[] coords, int dimension, int measures)
Parameters
coords
float[]An array of
float
values that contains the ordinate values of the sequence.dimension
intThe total number of ordinates that make up a Coordinate in this sequence.
measures
intThe number of measure-ordinates each Coordinate in this sequence has.
Methods
Copy()
public override CoordinateSequence Copy()
Returns
ExpandEnvelope(Envelope)
Expands the given Envelope to include the coordinates in the sequence. Allows implementing classes to optimize access to coordinate values.
public override Envelope ExpandEnvelope(Envelope env)
Parameters
env
EnvelopeThe envelope to expand.
Returns
- Envelope
A reference to the expanded envelope.
GetOrdinate(int, int)
Returns the ordinate of a coordinate in this sequence. Ordinate indices 0 and 1 are assumed to be X and Y. Ordinate indices greater than 1 have user-defined semantics (for instance, they may contain other dimensions or measure values).
public override double GetOrdinate(int index, int ordinateIndex)
Parameters
index
intThe coordinate index in the sequence.
ordinateIndex
intThe ordinate index in the coordinate (in range [0, dimension-1]).
Returns
Remarks
Beware, for performance reasons the ordinate index is not checked, if it's over dimensions you may not get an exception but a meaningless value.
GetRawCoordinates()
Gets the underlying array containing the coordinate values.
public double[] GetRawCoordinates()
Returns
- double[]
The array of coordinate values
Reversed()
public override CoordinateSequence Reversed()
Returns
SetOrdinate(int, int, double)
Sets the ordinate of a coordinate in this sequence.
public override void SetOrdinate(int index, int ordinateIndex, double value)
Parameters
index
intThe coordinate index.
ordinateIndex
intThe ordinate index in the coordinate, 0 based, smaller than the number of dimensions.
value
doubleThe new ordinate value.
Remarks
Warning: for performance reasons the ordinate index is not checked. If it is larger than the dimension a meaningless value may be returned.