Table of Contents

Struct LatLonAltitude

Namespace
LansMap.Core.Geo

A geographic position with altitude, one item of a 3D path (a measured line, a trail, an imported track).

public readonly struct LatLonAltitude : IEquatable<LatLonAltitude>
Implements

Remarks

Replaces a List<LatLon> paired with a separate List<double> of altitudes kept index-aligned by convention only: nothing stopped the two lists from growing to different lengths or being mutated out of step. A single List<LatLonAltitude> makes that desync unrepresentable, since position and altitude can no longer be added, removed, or reordered independently.

Constructors

LatLonAltitude(LatLon, double)

Creates a position with altitude.

public LatLonAltitude(LatLon position, double altitudeMeters)

Parameters

position LatLon

Geographic position in degrees WGS84.

altitudeMeters double

Altitude in meters above the map plane.

Properties

AltitudeMeters

Altitude in meters above the map plane.

public double AltitudeMeters { get; }

Property Value

double

Position

The geographic position in degrees WGS84.

public LatLon Position { get; }

Property Value

LatLon

Methods

Equals(LatLonAltitude)

Exact component-wise equality. No tolerance.

public bool Equals(LatLonAltitude other)

Parameters

other LatLonAltitude

Returns

bool

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToString()

Returns "(lat,lon)@altM".

public override string ToString()

Returns

string