Class AxisPlaneCoordinateSequence
A CoordinateSequence wrapper which projects 3D coordinates into one of the three Cartesian axis planes, using the standard orthonormal projection (i.e. simply selecting the appropriate ordinates into the XY ordinates). The projected data is represented as 2D coordinates.
Inherited Members
Namespace: NetTopologySuite.Operation.Distance3D
Assembly: NetTopologySuite.dll
Syntax
public class AxisPlaneCoordinateSequence : CoordinateSequence
Methods
| Edit this page View SourceCopy()
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
| Edit this page View SourceCreateCoordinate()
Creates a coordinate for use in this sequence.
Declaration
public override Coordinate CreateCoordinate()
Returns
Type | Description |
---|---|
Coordinate | A coordinate for use with this sequence |
Overrides
Remarks
The coordinate is created supporting the same number of Dimension and Measures as this sequence and is suitable for use with GetCoordinate(int, Coordinate).
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
| Edit this page View SourceGetCoordinate(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.
Declaration
public override Coordinate GetCoordinate(int i)
Parameters
Type | Name | Description |
---|---|---|
int | i |
Returns
Type | Description |
---|---|
Coordinate |
Overrides
| Edit this page View SourceGetCoordinate(int, Coordinate)
Copies the i'th coordinate in the sequence to the supplied Coordinate. At least the first two dimensions must be copied.
Declaration
public override void GetCoordinate(int index, Coordinate coord)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of the coordinate to copy. |
Coordinate | coord | A Coordinate to receive the value. |
Overrides
| Edit this page View SourceGetCoordinateCopy(int)
Returns a copy of the i'th coordinate in this sequence. This method optimizes the situation where the caller is going to make a copy anyway - if the implementation has already created a new Coordinate object, no further copy is needed.
Declaration
public override Coordinate GetCoordinateCopy(int i)
Parameters
Type | Name | Description |
---|---|---|
int | i | The index of the coordinate to retrieve. |
Returns
Type | Description |
---|---|
Coordinate | A copy of the i'th coordinate in the sequence |
Overrides
| Edit this page View SourceGetM(int)
Returns ordinate M of the specified coordinate if available.
Declaration
public override double GetM(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index |
Returns
Type | Description |
---|---|
double | The value of the M ordinate in the index'th coordinate, or NullOrdinate if not defined. |
Overrides
| Edit this page View SourceGetOrdinate(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 |
Overrides
Remarks
If the sequence does not provide value for the required ordinate, the implementation must not throw an exception, it should return NullOrdinate.
GetX(int)
Returns ordinate X (0) of the specified coordinate.
Declaration
public override double GetX(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index |
Returns
Type | Description |
---|---|
double | The value of the X ordinate in the index'th coordinate. |
Overrides
| Edit this page View SourceGetY(int)
Returns ordinate Y (1) of the specified coordinate.
Declaration
public override double GetY(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index |
Returns
Type | Description |
---|---|
double | The value of the Y ordinate in the index'th coordinate. |
Overrides
| Edit this page View SourceGetZ(int)
Returns ordinate Z of the specified coordinate if available.
Declaration
public override double GetZ(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index |
Returns
Type | Description |
---|---|
double | The value of the Z ordinate in the index'th coordinate, or NullOrdinate if not defined. |
Overrides
| Edit this page View SourceProjectToXY(CoordinateSequence)
Creates a wrapper projecting to the XY plane.
Declaration
public static CoordinateSequence ProjectToXY(CoordinateSequence seq)
Parameters
Type | Name | Description |
---|---|---|
CoordinateSequence | seq | The sequence to be projected |
Returns
Type | Description |
---|---|
CoordinateSequence | A sequence which projects coordinates |
ProjectToXZ(CoordinateSequence)
Creates a wrapper projecting to the XZ plane.
Declaration
public static CoordinateSequence ProjectToXZ(CoordinateSequence seq)
Parameters
Type | Name | Description |
---|---|---|
CoordinateSequence | seq | The sequence to be projected |
Returns
Type | Description |
---|---|
CoordinateSequence | A sequence which projects coordinates |
ProjectToYZ(CoordinateSequence)
Creates a wrapper projecting to the YZ plane.
Declaration
public static CoordinateSequence ProjectToYZ(CoordinateSequence seq)
Parameters
Type | Name | Description |
---|---|---|
CoordinateSequence | seq | The sequence to be projected |
Returns
Type | Description |
---|---|
CoordinateSequence | A sequence which projects coordinates |
Reversed()
Returns a reversed copy of this CoordinateSequence.
Declaration
public override CoordinateSequence Reversed()
Returns
Type | Description |
---|---|
CoordinateSequence | A reversed copy of this CoordinateSequence. |
Overrides
Exceptions
Type | Condition |
---|---|
InvalidOperationException |
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
Remarks
If the sequence can't store the ordinate value, the implementation must not throw an exception, it should simply ignore the call.
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[] |