Search Results for

    Show / Hide Table of Contents

    Class RawCoordinateSequence

    An implementation of CoordinateSequence that packs its contents in a way that can be customized by the creator.

    Inheritance
    object
    CoordinateSequence
    RawCoordinateSequence
    Implements
    ISerializable
    Inherited Members
    CoordinateSequence.Dimension
    CoordinateSequence.Measures
    CoordinateSequence.Spatial
    CoordinateSequence.Ordinates
    CoordinateSequence.HasZ
    CoordinateSequence.HasM
    CoordinateSequence.ZOrdinateIndex
    CoordinateSequence.MOrdinateIndex
    CoordinateSequence.CreateCoordinate()
    CoordinateSequence.GetCoordinate(int)
    CoordinateSequence.GetCoordinateCopy(int)
    CoordinateSequence.GetCoordinate(int, Coordinate)
    CoordinateSequence.GetX(int)
    CoordinateSequence.GetY(int)
    CoordinateSequence.GetZ(int)
    CoordinateSequence.GetM(int)
    CoordinateSequence.SetX(int, double)
    CoordinateSequence.SetY(int, double)
    CoordinateSequence.SetZ(int, double)
    CoordinateSequence.SetM(int, double)
    CoordinateSequence.GetOrdinate(int, Ordinate)
    CoordinateSequence.First
    CoordinateSequence.Last
    CoordinateSequence.Count
    CoordinateSequence.SetOrdinate(int, Ordinate, double)
    CoordinateSequence.TryGetOrdinateIndex(Ordinate, out int)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Geometries.Implementation
    Assembly: NetTopologySuite.dll
    Syntax
    [Serializable]
    public sealed class RawCoordinateSequence : CoordinateSequence, ISerializable

    Constructors

    | Edit this page View Source

    RawCoordinateSequence(Memory<double>[], (int RawDataIndex, int DimensionIndex)[], int)

    Initializes a new instance of the RawCoordinateSequence class.

    Declaration
    public RawCoordinateSequence(Memory<double>[] rawData, (int RawDataIndex, int DimensionIndex)[] dimensionMap, int measures)
    Parameters
    Type Name Description
    Memory<double>[] rawData

    Contains the raw data for this sequence.

    (int RawDataIndex, int DimensionIndex)[] dimensionMap

    Contains a pair of indexes to tell us, for each dimension, where to find its data in rawData.

    int measures

    The value for Measures.

    Methods

    | Edit this page View Source

    Copy()

    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
    CoordinateSequence.Copy()
    | Edit this page View Source

    ExpandEnvelope(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
    CoordinateSequence.ExpandEnvelope(Envelope)
    | Edit this page View Source

    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 as described by Dimension and Measures.
    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

    The ordinate value, or NullOrdinate if the sequence does not provide values for ordinateIndex"/>

    Overrides
    CoordinateSequence.GetOrdinate(int, int)
    Remarks

    If the sequence does not provide value for the required ordinate, the implementation must not throw an exception, it should return NullOrdinate.

    | Edit this page View Source

    GetRawCoordinatesAndStride(int)

    Gets the underlying Memory<T> for the ordinates at the given index, along with a "stride" value that represents how many slots there are between elements.

    Declaration
    public (Memory<double> Array, int Stride) GetRawCoordinatesAndStride(int ordinateIndex)
    Parameters
    Type Name Description
    int ordinateIndex

    The index of the ordinate whose values to get, from TryGetOrdinateIndex(Ordinate, out int).

    Returns
    Type Description
    (Memory<double> Array, int Stride)

    The underlying Memory<T> and stride.

    Remarks

    Assuming Count is nonzero, the first element of the returned array holds the first coordinate's value for the requested ordinate, and the last element of the returned array holds the last coordinate's value for the requested ordinate.

    | Edit this page View Source

    Reversed()

    Returns a reversed copy of this CoordinateSequence.

    Declaration
    public override CoordinateSequence Reversed()
    Returns
    Type Description
    CoordinateSequence

    A reversed copy of this CoordinateSequence.

    Overrides
    CoordinateSequence.Reversed()
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown when Copy() returned null.

    | Edit this page View Source

    SetOrdinate(int, int, double)

    Sets the value for a given 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 in the sequence.

    int ordinateIndex

    The ordinate index in the coordinate (in range [0, dimension-1]).

    double value

    The new ordinate value.

    Overrides
    CoordinateSequence.SetOrdinate(int, int, double)
    Remarks

    If the sequence can't store the ordinate value, the implementation must not throw an exception, it should simply ignore the call.

    | Edit this page View Source

    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 override Coordinate[] ToCoordinateArray()
    Returns
    Type Description
    Coordinate[]
    Overrides
    CoordinateSequence.ToCoordinateArray()

    Implements

    ISerializable

    Extension Methods

    CoordinateSequenceEx.GetHashCode(CoordinateSequence, int, Func<int, int>)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX