Class PackedCoordinateSequence
A CoordinateSequence
implementation based on a packed arrays.
Inheritance
Inherited Members
Namespace: NetTopologySuite.Geometries.Implementation
Assembly: NetTopologySuite.dll
Syntax
[Serializable]
public abstract class PackedCoordinateSequence : CoordinateSequence
Constructors
| Improve this Doc View SourcePackedCoordinateSequence(Int32, Int32, Int32)
Creates an instance of this class
Declaration
protected PackedCoordinateSequence(int count, int dimension, int measures)
Parameters
Type | Name | Description |
---|---|---|
Int32 | count | The number of Coordinates in the sequence. |
Int32 | dimension | The total number of ordinates that make up a Coordinate in this sequence. |
Int32 | measures | the number of measure-ordinates each {Coordinate in this sequence has. |
Fields
| Improve this Doc View SourceCoordRef
A soft reference to the Coordinate[] representation of this sequence. Makes repeated coordinate array accesses more efficient.
Declaration
[NonSerialized]
protected WeakReference CoordRef
Field Value
Type | Description |
---|---|
WeakReference |
Methods
| Improve this Doc View SourceGetCoordinate(Int32)
Returns (possibly a copy of) the ith Coordinate in this collection. Whether or not the Coordinate returned is the actual underlying Coordinate or merely a copy depends on the implementation. Note that in the future the semantics of this method may change to guarantee that the Coordinate returned is always a copy. Callers are advised not to assume that they can modify a CoordinateSequence by modifying the Coordinate returned by this method.
Declaration
public sealed override Coordinate GetCoordinate(int i)
Parameters
Type | Name | Description |
---|---|---|
Int32 | i |
Returns
Type | Description |
---|---|
Coordinate |
Overrides
| Improve this Doc View SourceGetCoordinateInternal(Int32)
Returns a Coordinate representation of the specified coordinate, by always building a new Coordinate object.
Declaration
[Obsolete("Unused. This will be removed in a future release.")]
protected virtual Coordinate GetCoordinateInternal(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The coordinate index |
Returns
Type | Description |
---|---|
Coordinate | The Coordinate at the given index |
ReleaseCoordinateArray()
Releases the weak reference to the coordinate array.
Declaration
public void ReleaseCoordinateArray()
Remarks
This is necessary if you directly modify the array from GetRawCoordinates
.
ToCoordinateArray()
Returns (possibly copies of) the Coordinates in this collection. Whether or not the Coordinates returned are the actual underlying Coordinates or merely copies depends on the implementation. Note that if this implementation does not store its data as an array of Coordinates, this method will incur a performance penalty because the array needs to be built from scratch.
Declaration
public sealed override Coordinate[] ToCoordinateArray()
Returns
Type | Description |
---|---|
Coordinate[] |
Overrides
| Improve this Doc View SourceToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |