Class CoordinateSequenceFactory
- Namespace
- NetTopologySuite.Geometries
- Assembly
- NetTopologySuite.dll
An object that knows how to build a particular implementation of
CoordinateSequence
from an array of Coordinates.
public abstract class CoordinateSequenceFactory
- Inheritance
-
CoordinateSequenceFactory
- Derived
- Inherited Members
Constructors
CoordinateSequenceFactory()
Initializes a new instance of the CoordinateSequenceFactory class.`
protected CoordinateSequenceFactory()
- See Also
CoordinateSequenceFactory(Ordinates)
Initializes a new instance of the CoordinateSequenceFactory class.
protected CoordinateSequenceFactory(Ordinates ordinates)
Parameters
ordinates
OrdinatesThe maximum set of Ordinates flags that this instance will be able to create sequences for.
- See Also
Properties
Ordinates
Gets the Ordinate flags that sequences created by this factory can maximal cope with.
public Ordinates Ordinates { get; }
Property Value
- See Also
Methods
Create(CoordinateSequence)
Creates a CoordinateSequence which is a copy of the given CoordinateSequence. This method must handle null arguments by creating an empty sequence.
public virtual CoordinateSequence Create(CoordinateSequence coordSeq)
Parameters
coordSeq
CoordinateSequence
Returns
- CoordinateSequence
A coordinate sequence
- See Also
Create(Coordinate[])
Returns a CoordinateSequence based on the given array; whether or not the array is copied is implementation-dependent.
public virtual CoordinateSequence Create(Coordinate[] coordinates)
Parameters
coordinates
Coordinate[]A coordinates array, which may not be null nor contain null elements
Returns
- CoordinateSequence
A coordinate sequence.
- See Also
Create(int, Ordinates)
Creates a CoordinateSequence of the specified size and ordinates. For this to be useful, the CoordinateSequence implementation must be mutable.
public virtual CoordinateSequence Create(int size, Ordinates ordinates)
Parameters
size
intThe number of coordinates.
ordinates
OrdinatesThe ordinates each coordinate has. XY is fix, Z and M can be set.
Returns
- CoordinateSequence
A coordinate sequence.
- See Also
Create(int, int)
Creates a CoordinateSequence of the specified size and dimension. For this to be useful, the CoordinateSequence implementation must be mutable.
[Obsolete("Use an overload that accepts measures. This overload will be removed in a future release.")]
public CoordinateSequence Create(int size, int dimension)
Parameters
size
intdimension
intthe dimension of the coordinates in the sequence (if user-specifiable, otherwise ignored)
Returns
- CoordinateSequence
A coordinate sequence
Remarks
If the requested dimension is larger than the CoordinateSequence implementation can provide, then a sequence of maximum possible dimension should be created. An error should not be thrown.
- See Also
Create(int, int, int)
Creates a CoordinateSequence of the specified size and dimension with measure support. For this to be useful, the CoordinateSequence implementation must be mutable.
public abstract CoordinateSequence Create(int size, int dimension, int measures)
Parameters
size
intThe number of coordinates in the sequence
dimension
intThe dimension of the coordinates in the sequence (if user-specifiable, otherwise ignored)
measures
intThe number of measures of the coordinates in the sequence (if user-specifiable, otherwise ignored)
Returns
Remarks
If the requested dimension or measures are larger than the CoordinateSequence implementation can provide, then a sequence of maximum possible dimension should be created. An error should not be thrown.
- See Also
GetCommonSequenceParameters(Coordinate[])
Gets the three parameters needed to create any CoordinateSequence instance (Count, Dimension, and Measures) such that the sequence can store all the data from a given array of Coordinate instances.
public static (int Count, int Dimension, int Measures) GetCommonSequenceParameters(Coordinate[] coordinates)
Parameters
coordinates
Coordinate[]The array of Coordinate instances that the sequence will be created from.
Returns
- (int Count, int Dimension, int Measures)
The values of the three parameters to use for creating the sequence.
- See Also