Class PackedCoordinateSequence
- Namespace
- NetTopologySuite.Geometries.Implementation
- Assembly
- NetTopologySuite.dll
A CoordinateSequence
implementation based on a packed arrays.
public abstract class PackedCoordinateSequence : CoordinateSequence
- Inheritance
-
PackedCoordinateSequence
- Derived
- Inherited Members
- Extension Methods
Constructors
PackedCoordinateSequence(int, int, int)
Creates an instance of this class
protected PackedCoordinateSequence(int count, int dimension, int measures)
Parameters
count
intThe number of Coordinates in 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.
Fields
CoordRef
A soft reference to the Coordinate[] representation of this sequence. Makes repeated coordinate array accesses more efficient.
protected WeakReference CoordRef
Field Value
Methods
GetCoordinate(int)
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.
public override sealed Coordinate GetCoordinate(int i)
Parameters
i
int
Returns
GetCoordinateInternal(int)
Returns a Coordinate representation of the specified coordinate, by always building a new Coordinate object.
[Obsolete("Unused. This will be removed in a future release.")]
protected virtual Coordinate GetCoordinateInternal(int index)
Parameters
index
intThe coordinate index
Returns
- Coordinate
The Coordinate at the given index
ReleaseCoordinateArray()
Releases the weak reference to the coordinate array.
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.
public override sealed Coordinate[] ToCoordinateArray()
Returns
ToString()
public override string ToString()