Table of Contents

Class RawCoordinateSequenceFactory

Namespace
NetTopologySuite.Geometries.Implementation
Assembly
NetTopologySuite.dll

Factory for creating RawCoordinateSequence instances.

public sealed class RawCoordinateSequenceFactory : CoordinateSequenceFactory
Inheritance
RawCoordinateSequenceFactory
Inherited Members

Constructors

RawCoordinateSequenceFactory(IEnumerable<Ordinates>)

Initializes a new instance of the RawCoordinateSequenceFactory class.

public RawCoordinateSequenceFactory(IEnumerable<Ordinates> ordinateGroups)

Parameters

ordinateGroups IEnumerable<Ordinates>

A sequence of zero or more Ordinates flags representing ordinate values that should be allocated together.

Remarks

Any flags not represented in ordinateGroups, and any spatial or measure dimensions beyond the 16th, will be allocated together, SoA-style.

Elements without any bits set will be silently ignored.

Exceptions

ArgumentNullException

Thrown when ordinateGroups is null.

ArgumentException

Thrown when a given flag appears in more than one element of ordinateGroups.

Methods

Create(int, int, int)

public override CoordinateSequence Create(int size, int dimension, int measures)

Parameters

size int
dimension int
measures int

Returns

CoordinateSequence

CreateXY(Memory<double>)

Creates a new RawCoordinateSequence that uses the given array for reading and writing X and Y data ignoring the Ordinates flags that were passed into the constructor for this factory instance.

public static RawCoordinateSequence CreateXY(Memory<double> xy)

Parameters

xy Memory<double>

An array of X and Y values, laid out as [x0, y0, x1, y1, x2, y2, ..., xn, yn].

Returns

RawCoordinateSequence

A RawCoordinateSequence instance that's backed by the given array.

Remarks

The resulting instance is essentially a PackedDoubleCoordinateSequence with slightly more overhead, so the main reason to prefer this over that one would be if you really need to avoid copying the data to fit it into that format.

Exceptions

ArgumentException

Thrown when the length of xy is not a multiple of 2.

CreateXY(Memory<double>, Memory<double>)

Creates a new RawCoordinateSequence that uses the given arrays for reading and writing X and Y data ignoring the Ordinates flags that were passed into the constructor for this factory instance.

public static RawCoordinateSequence CreateXY(Memory<double> x, Memory<double> y)

Parameters

x Memory<double>

An array of X values, laid out as [x0, x1, x2, ..., xn].

y Memory<double>

An array of Y values, laid out as [y0, y1, y2, ..., yn].

Returns

RawCoordinateSequence

A RawCoordinateSequence instance that's backed by the given arrays.

Exceptions

ArgumentException

Thrown when the input arrays do not contain data for the same number of coordinates.

CreateXYM(Memory<double>)

Creates a new RawCoordinateSequence that uses the given array for reading and writing X, Y, and M data ignoring the Ordinates flags that were passed into the constructor for this factory instance.

public static RawCoordinateSequence CreateXYM(Memory<double> xym)

Parameters

xym Memory<double>

An array of X, Y, and M values, laid out as [x0, y0, m0, x1, y1, m1, x2, y2, m2, ..., xn, yn, mn].

Returns

RawCoordinateSequence

A RawCoordinateSequence instance that's backed by the given array.

Remarks

The resulting instance is essentially a PackedDoubleCoordinateSequence with slightly more overhead, so the main reason to prefer this over that one would be if you really need to avoid copying the data to fit it into that format.

Exceptions

ArgumentException

Thrown when the length of xym is not a multiple of 3.

CreateXYM(Memory<double>, Memory<double>)

Creates a new RawCoordinateSequence that uses the given array for reading and writing X, Y, and M data ignoring the Ordinates flags that were passed into the constructor for this factory instance.

public static RawCoordinateSequence CreateXYM(Memory<double> xy, Memory<double> m)

Parameters

xy Memory<double>

An array of X and Y values, laid out as [x0, y0, x1, y1, x2, y2, ..., xn, yn].

m Memory<double>

An array of M values, laid out as [m0, m1, m2, ..., mn].

Returns

RawCoordinateSequence

A RawCoordinateSequence instance that's backed by the given array.

Remarks

The resulting instance is essentially a DotSpatialAffineCoordinateSequence with slightly more overhead, so the main reason to prefer this over that one would be if you really need to avoid copying the data to fit it into that format.

Exceptions

ArgumentException

Thrown when the length of xy is not a multiple of 2, or when the input arrays do not contain data for the same number of coordinates.

CreateXYM(Memory<double>, Memory<double>, Memory<double>)

Creates a new RawCoordinateSequence that uses the given arrays for reading and writing X, Y, and M data ignoring the Ordinates flags that were passed into the constructor for this factory instance.

public static RawCoordinateSequence CreateXYM(Memory<double> x, Memory<double> y, Memory<double> m)

Parameters

x Memory<double>

An array of X values, laid out as [x0, x1, x2, ..., xn].

y Memory<double>

An array of Y values, laid out as [y0, y1, y2, ..., yn].

m Memory<double>

An array of M values, laid out as [m0, m1, m2, ..., mn].

Returns

RawCoordinateSequence

A RawCoordinateSequence instance that's backed by the given arrays.

Exceptions

ArgumentException

Thrown when the input arrays do not contain data for the same number of coordinates.

CreateXYZ(Memory<double>)

Creates a new RawCoordinateSequence that uses the given array for reading and writing X, Y, and Z data ignoring the Ordinates flags that were passed into the constructor for this factory instance.

public static RawCoordinateSequence CreateXYZ(Memory<double> xyz)

Parameters

xyz Memory<double>

An array of X, Y, and Z values, laid out as [x0, y0, z0, x1, y1, z1, x2, y2, z2, ..., xn, yn, zn].

Returns

RawCoordinateSequence

A RawCoordinateSequence instance that's backed by the given array.

Remarks

The resulting instance is essentially a PackedDoubleCoordinateSequence with slightly more overhead, so the main reason to prefer this over that one would be if you really need to avoid copying the data to fit it into that format.

Exceptions

ArgumentException

Thrown when the length of xyz is not a multiple of 3.

CreateXYZ(Memory<double>, Memory<double>)

Creates a new RawCoordinateSequence that uses the given array for reading and writing X, Y, and Z data ignoring the Ordinates flags that were passed into the constructor for this factory instance.

public static RawCoordinateSequence CreateXYZ(Memory<double> xy, Memory<double> z)

Parameters

xy Memory<double>

An array of X and Y values, laid out as [x0, y0, x1, y1, x2, y2, ..., xn, yn].

z Memory<double>

An array of Z values, laid out as [z0, z1, z2, ..., zn].

Returns

RawCoordinateSequence

A RawCoordinateSequence instance that's backed by the given array.

Remarks

The resulting instance is essentially a DotSpatialAffineCoordinateSequence with slightly more overhead, so the main reason to prefer this over that one would be if you really need to avoid copying the data to fit it into that format.

Exceptions

ArgumentException

Thrown when the length of xy is not a multiple of 2, or when the input arrays do not contain data for the same number of coordinates.

CreateXYZ(Memory<double>, Memory<double>, Memory<double>)

Creates a new RawCoordinateSequence that uses the given arrays for reading and writing X, Y, and Z data ignoring the Ordinates flags that were passed into the constructor for this factory instance.

public static RawCoordinateSequence CreateXYZ(Memory<double> x, Memory<double> y, Memory<double> z)

Parameters

x Memory<double>

An array of X values, laid out as [x0, x1, x2, ..., xn].

y Memory<double>

An array of Y values, laid out as [y0, y1, y2, ..., yn].

z Memory<double>

An array of Z values, laid out as [z0, z1, z2, ..., zn].

Returns

RawCoordinateSequence

A RawCoordinateSequence instance that's backed by the given arrays.

Exceptions

ArgumentException

Thrown when the input arrays do not contain data for the same number of coordinates.

CreateXYZM(Memory<double>)

Creates a new RawCoordinateSequence that uses the given array for reading and writing X, Y, Z, and M data ignoring the Ordinates flags that were passed into the constructor for this factory instance.

public static RawCoordinateSequence CreateXYZM(Memory<double> xyzm)

Parameters

xyzm Memory<double>

An array of X, Y, Z, and M values, laid out as [x0, y0, z0, m0, x1, y1, z1, m1, x2, y2, z2, m2, ..., xn, yn, zn, mn].

Returns

RawCoordinateSequence

A RawCoordinateSequence instance that's backed by the given array.

Remarks

The resulting instance is essentially a PackedDoubleCoordinateSequence with slightly more overhead, so the main reason to prefer this over that one would be if you really need to avoid copying the data to fit it into that format.

Exceptions

ArgumentException

Thrown when the length of xyzm is not a multiple of 4.

CreateXYZM(Memory<double>, Memory<double>, Memory<double>)

Creates a new RawCoordinateSequence that uses the given array for reading and writing X, Y, Z, and M data ignoring the Ordinates flags that were passed into the constructor for this factory instance.

public static RawCoordinateSequence CreateXYZM(Memory<double> xy, Memory<double> z, Memory<double> m)

Parameters

xy Memory<double>

An array of X and Y values, laid out as [x0, y0, x1, y1, x2, y2, ..., xn, yn].

z Memory<double>

An array of Z values, laid out as [z0, z1, z2, ..., zn].

m Memory<double>

An array of M values, laid out as [m0, m1, m2, ..., mn].

Returns

RawCoordinateSequence

A RawCoordinateSequence instance that's backed by the given array.

Remarks

The resulting instance is essentially a DotSpatialAffineCoordinateSequence with slightly more overhead, so the main reason to prefer this over that one would be if you really need to avoid copying the data to fit it into that format.

Exceptions

ArgumentException

Thrown when the length of xy is not a multiple of 2, or when the input arrays do not contain data for the same number of coordinates.

CreateXYZM(Memory<double>, Memory<double>, Memory<double>, Memory<double>)

Creates a new RawCoordinateSequence that uses the given arrays for reading and writing X, Y, Z, and M data ignoring the Ordinates flags that were passed into the constructor for this factory instance.

public static RawCoordinateSequence CreateXYZM(Memory<double> x, Memory<double> y, Memory<double> z, Memory<double> m)

Parameters

x Memory<double>

An array of X values, laid out as [x0, x1, x2, ..., xn].

y Memory<double>

An array of Y values, laid out as [y0, y1, y2, ..., yn].

z Memory<double>

An array of Z values, laid out as [z0, z1, z2, ..., zn].

m Memory<double>

An array of M values, laid out as [m0, m1, m2, ..., mn].

Returns

RawCoordinateSequence

A RawCoordinateSequence instance that's backed by the given arrays.

Exceptions

ArgumentException

Thrown when the input arrays do not contain data for the same number of coordinates.