Table of Contents

Class GeodesicHelper

Namespace
EncDotNet.S100.Geodesy
Assembly
EncDotNet.S100.Core.dll

Geodesic helpers: the direct problem along a geodesic or a rhumb line, and tessellation of augmented line geometry (S-100 Part 9A ยง11.5 AugmentedRay, ArcByRadius).

public static class GeodesicHelper
Inheritance
GeodesicHelper
Inherited Members

Remarks

The direct problems are solved on the WGS-84 ellipsoid by Wgs84Geodesy.

Fields

EarthRadiusMetres

WGS-84 mean Earth radius in metres, for local approximations such as metres per degree or a Web Mercator scale. Distances and bearings between positions come from the ellipsoid (Wgs84Geodesy).

public const double EarthRadiusMetres = 6371008.8

Field Value

double

Methods

DirectProblem(double, double, double, double)

Solves the geodesic direct problem on the WGS-84 ellipsoid: given an origin point, initial true bearing, and distance, computes the destination point.

public static GeoPosition DirectProblem(double latDeg, double lonDeg, double bearingDeg, double distanceMetres)

Parameters

latDeg double

Origin latitude in degrees.

lonDeg double

Origin longitude in degrees.

bearingDeg double

Initial true bearing in degrees (clockwise from north).

distanceMetres double

Distance along the geodesic in metres.

Returns

GeoPosition

Destination (latitude, longitude) in degrees.

RhumbDirectProblem(double, double, double, double)

Solves the direct problem along a rhumb line (loxodrome) on the WGS-84 ellipsoid: given an origin point, a constant true bearing and a distance, computes the destination point.

public static GeoPosition RhumbDirectProblem(double latDeg, double lonDeg, double bearingDeg, double distanceMetres)

Parameters

latDeg double

Origin latitude in degrees.

lonDeg double

Origin longitude in degrees.

bearingDeg double

Constant true bearing in degrees (clockwise from north).

distanceMetres double

Distance along the rhumb line in metres.

Returns

GeoPosition

Destination (latitude, longitude) in degrees. A rhumb line can't pass a pole, so a line that would reach one ends there.

TessellateArc(double, double, double, double, double)

Tessellates a circular arc around an origin point into a polyline of (latitude, longitude) coordinates.

public static IReadOnlyList<GeoPosition> TessellateArc(double centreLat, double centreLon, double radiusMetres, double startBearingDeg, double sweepDeg)

Parameters

centreLat double

Centre latitude in degrees.

centreLon double

Centre longitude in degrees.

radiusMetres double

Arc radius in metres.

startBearingDeg double

Start bearing in degrees (clockwise from north).

sweepDeg double

Sweep angle in degrees. Positive = clockwise. A sweep of 360 produces a closed circle.

Returns

IReadOnlyList<GeoPosition>

An ordered list of coordinates approximating the arc. For a full circle the first and last points coincide.

TessellateRay(double, double, double, double)

Tessellates a geodesic ray from an origin along a bearing for a given distance.

public static IReadOnlyList<GeoPosition> TessellateRay(double originLat, double originLon, double bearingDeg, double distanceMetres)

Parameters

originLat double

Origin latitude in degrees.

originLon double

Origin longitude in degrees.

bearingDeg double

True bearing in degrees (clockwise from north).

distanceMetres double

Total ray length in metres.

Returns

IReadOnlyList<GeoPosition>

An ordered list of at least two coordinates from origin to endpoint. Short rays (< 10 km) are returned as a simple two-point segment; longer rays are tessellated to follow the geodesic.