Class PackedFloatCoordinateSequence
Packed coordinate sequence implementation based on floats.
Inherited Members
Namespace: NetTopologySuite.Geometries.Implementation
Assembly: NetTopologySuite.dll
Syntax
[Serializable]
public class PackedFloatCoordinateSequence : PackedCoordinateSequence
Constructors
| Edit this page View SourcePackedFloatCoordinateSequence(Coordinate[])
Initializes a new instance of the PackedDoubleCoordinateSequence class.
Declaration
public PackedFloatCoordinateSequence(Coordinate[] coords)
Parameters
| Type | Name | Description |
|---|---|---|
| Coordinate[] | coords | An array of Coordinates. |
PackedFloatCoordinateSequence(Coordinate[], int)
Initializes a new instance of the PackedFloatCoordinateSequence class.
Declaration
[Obsolete("Use an overload that accepts measures. This overload will be removed in a future release.")]
public PackedFloatCoordinateSequence(Coordinate[] coords, int dimension)
Parameters
| Type | Name | Description |
|---|---|---|
| Coordinate[] | coords | An array of Coordinates. |
| int | dimension | The total number of ordinates that make up a Coordinate in this sequence. |
PackedFloatCoordinateSequence(Coordinate[], int, int)
Initializes a new instance of the PackedFloatCoordinateSequence class.
Declaration
public PackedFloatCoordinateSequence(Coordinate[] coords, int dimension, int measures)
Parameters
| Type | Name | Description |
|---|---|---|
| Coordinate[] | coords | An array of Coordinates. |
| int | dimension | The total number of ordinates that make up a Coordinate in this sequence. |
| int | measures | The number of measure-ordinates each Coordinate in this sequence has. |
PackedFloatCoordinateSequence(double[], int, int)
Initializes a new instance of the PackedFloatCoordinateSequence class.
Declaration
public PackedFloatCoordinateSequence(double[] coords, int dimension, int measures)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | coords | An array of |
| int | dimension | The total number of ordinates that make up a Coordinate in this sequence. |
| int | measures | The number of measure-ordinates each Coordinate in this sequence has. |
PackedFloatCoordinateSequence(int, int, int)
Initializes a new instance of the PackedFloatCoordinateSequence class.
Declaration
public PackedFloatCoordinateSequence(int size, int dimension, int measures)
Parameters
| Type | Name | Description |
|---|---|---|
| int | size | |
| int | dimension | |
| int | measures |
PackedFloatCoordinateSequence(float[], int, int)
Initializes a new instance of the PackedFloatCoordinateSequence class.
Declaration
public PackedFloatCoordinateSequence(float[] coords, int dimension, int measures)
Parameters
| Type | Name | Description |
|---|---|---|
| float[] | coords | An array of |
| int | dimension | The total number of ordinates that make up a Coordinate in this sequence. |
| int | measures | The number of measure-ordinates each Coordinate in this sequence has. |
Methods
| Edit this page View SourceCopy()
Returns a deep copy of this collection.
Declaration
public override CoordinateSequence Copy()
Returns
| Type | Description |
|---|---|
| CoordinateSequence | A copy of the coordinate sequence containing copies of all points |
Overrides
| Edit this page View SourceExpandEnvelope(Envelope)
Expands the given Envelope to include the coordinates in the sequence. Allows implementing classes to optimize access to coordinate values.
Declaration
public override Envelope ExpandEnvelope(Envelope env)
Parameters
| Type | Name | Description |
|---|---|---|
| Envelope | env | The envelope to expand. |
Returns
| Type | Description |
|---|---|
| Envelope | A reference to the expanded envelope. |
Overrides
| Edit this page View SourceGetOrdinate(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).
Declaration
public override double GetOrdinate(int index, int ordinateIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The coordinate index in the sequence. |
| int | ordinateIndex | The ordinate index in the coordinate (in range [0, dimension-1]). |
Returns
| Type | Description |
|---|---|
| double |
Overrides
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.
Declaration
public float[] GetRawCoordinates()
Returns
| Type | Description |
|---|---|
| float[] | The array of coordinate values |
Reversed()
Returns a reversed copy of this CoordinateSequence.
Declaration
public override CoordinateSequence Reversed()
Returns
| Type | Description |
|---|---|
| CoordinateSequence | A reversed copy of this CoordinateSequence. |
Overrides
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException |
SetOrdinate(int, int, double)
Sets the ordinate of a coordinate in this sequence.
Declaration
public override void SetOrdinate(int index, int ordinateIndex, double value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The coordinate index. |
| int | ordinateIndex | The ordinate index in the coordinate, 0 based, smaller than the number of dimensions. |
| double | value | The new ordinate value. |
Overrides
Remarks
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.