Skip to main content

Position

Namespace: Meshmakers.Octo.Runtime.Contracts.Geospatial.Geometry

A position is the fundamental geometry construct, consisting of Position.Latitude, Position.Longitude and (optionally) Position.Altitude.

public class Position : IPosition, IEqualityComparer<Position>, IEquatable<Position>

Inheritance ObjectPosition
Implements IPosition, IEqualityComparer<Position>, IEquatable<Position>

Properties

Altitude

Gets the altitude.

public Nullable<double> Altitude { get; set; }

Property Value

Nullable<Double>

Latitude

Gets the latitude or Y coordinate

public double Latitude { get; set; }

Property Value

Double

Longitude

Gets the longitude or X coordinate

public double Longitude { get; set; }

Property Value

Double

Constructors

Position(Double, Double, Nullable<Double>)

Initializes a new instance of the Position class.

public Position(double latitude, double longitude, Nullable<double> altitude)

Parameters

latitude Double
The latitude, or Y coordinate.

longitude Double
The longitude or X coordinate.

altitude Nullable<Double>
The altitude in m(eter).

Position(String, String, String)

Initializes a new instance of the Position class.

public Position(string latitude, string longitude, string altitude)

Parameters

latitude String
The latitude, or Y coordinate e.g. '38.889722'.

longitude String
The longitude, or X coordinate e.g. '-77.008889'.

altitude String
The altitude in m(eters).

Methods

ToString()

Returns a String that represents this instance.

public string ToString()

Returns

String
A String that represents this instance.

Equals(Object)

Determines whether the specified object is equal to the current object

public bool Equals(object obj)

Parameters

obj Object

Returns

Boolean

Equals(Position)

Determines whether the specified object is equal to the current object

public bool Equals(Position other)

Parameters

other Position

Returns

Boolean

Equals(Position, Position)

Determines whether the specified object instances are considered equal

public bool Equals(Position left, Position right)

Parameters

left Position

right Position

Returns

Boolean

GetHashCode()

Returns the hash code for this instance

public int GetHashCode()

Returns

Int32

GetHashCode(Position)

Returns the hash code for the specified object

public int GetHashCode(Position other)

Parameters

other Position

Returns

Int32