Class CoordinateSequenceFactory
An object that knows how to build a particular implementation of
CoordinateSequence
from an array of Coordinates.
Inheritance
Inherited Members
Namespace: NetTopologySuite.Geometries
Assembly: NetTopologySuite.dll
Syntax
[Serializable]
public abstract class CoordinateSequenceFactory
Constructors
| Improve this Doc View SourceCoordinateSequenceFactory()
Initializes a new instance of the CoordinateSequenceFactory class.`
Declaration
protected CoordinateSequenceFactory()
CoordinateSequenceFactory(Ordinates)
Initializes a new instance of the CoordinateSequenceFactory class.
Declaration
protected CoordinateSequenceFactory(Ordinates ordinates)
Parameters
Type | Name | Description |
---|---|---|
Ordinates | ordinates | The maximum set of Ordinates flags that this instance will be able to create sequences for. |
Properties
| Improve this Doc View SourceOrdinates
Gets the Ordinate flags that sequences created by this factory can maximal cope with.
Declaration
public Ordinates Ordinates { get; }
Property Value
Type | Description |
---|---|
Ordinates |
Methods
| Improve this Doc View SourceCreate(Coordinate[])
Returns a CoordinateSequence based on the given array; whether or not the array is copied is implementation-dependent.
Declaration
public virtual CoordinateSequence Create(Coordinate[] coordinates)
Parameters
Type | Name | Description |
---|---|---|
Coordinate[] | coordinates | A coordinates array, which may not be null nor contain null elements |
Returns
Type | Description |
---|---|
CoordinateSequence | A coordinate sequence. |
Create(CoordinateSequence)
Creates a CoordinateSequence which is a copy of the given CoordinateSequence. This method must handle null arguments by creating an empty sequence.
Declaration
public virtual CoordinateSequence Create(CoordinateSequence coordSeq)
Parameters
Type | Name | Description |
---|---|---|
CoordinateSequence | coordSeq |
Returns
Type | Description |
---|---|
CoordinateSequence | A coordinate sequence |
Create(Int32, Ordinates)
Creates a CoordinateSequence of the specified size and ordinates. For this to be useful, the CoordinateSequence implementation must be mutable.
Declaration
public virtual CoordinateSequence Create(int size, Ordinates ordinates)
Parameters
Type | Name | Description |
---|---|---|
Int32 | size | The number of coordinates. |
Ordinates | ordinates | The ordinates each coordinate has. XY is fix, Z and M can be set. |
Returns
Type | Description |
---|---|
CoordinateSequence | A coordinate sequence. |
Create(Int32, Int32)
Creates a CoordinateSequence of the specified size and dimension. For this to be useful, the CoordinateSequence implementation must be mutable.
Declaration
[Obsolete("Use an overload that accepts measures. This overload will be removed in a future release.")]
public CoordinateSequence Create(int size, int dimension)
Parameters
Type | Name | Description |
---|---|---|
Int32 | size | |
Int32 | dimension | the dimension of the coordinates in the sequence (if user-specifiable, otherwise ignored) |
Returns
Type | Description |
---|---|
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.
Create(Int32, Int32, Int32)
Creates a CoordinateSequence of the specified size and dimension with measure support. For this to be useful, the CoordinateSequence implementation must be mutable.
Declaration
public abstract CoordinateSequence Create(int size, int dimension, int measures)
Parameters
Type | Name | Description |
---|---|---|
Int32 | size | The number of coordinates in the sequence |
Int32 | dimension | The dimension of the coordinates in the sequence (if user-specifiable, otherwise ignored) |
Int32 | measures | The number of measures of the coordinates in the sequence (if user-specifiable, otherwise ignored) |
Returns
Type | Description |
---|---|
CoordinateSequence |
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.
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.
Declaration
public static (int Count, int Dimension, int Measures) GetCommonSequenceParameters(Coordinate[] coordinates)
Parameters
Type | Name | Description |
---|---|---|
Coordinate[] | coordinates | The array of Coordinate instances that the sequence will be created from. |
Returns
Type | Description |
---|---|
(T1, T2, T3)<Int32, Int32, Int32> | The values of the three parameters to use for creating the sequence. |