Class GeodesicHelper
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
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
latDegdoubleOrigin latitude in degrees.
lonDegdoubleOrigin longitude in degrees.
bearingDegdoubleInitial true bearing in degrees (clockwise from north).
distanceMetresdoubleDistance 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
latDegdoubleOrigin latitude in degrees.
lonDegdoubleOrigin longitude in degrees.
bearingDegdoubleConstant true bearing in degrees (clockwise from north).
distanceMetresdoubleDistance 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
centreLatdoubleCentre latitude in degrees.
centreLondoubleCentre longitude in degrees.
radiusMetresdoubleArc radius in metres.
startBearingDegdoubleStart bearing in degrees (clockwise from north).
sweepDegdoubleSweep 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
originLatdoubleOrigin latitude in degrees.
originLondoubleOrigin longitude in degrees.
bearingDegdoubleTrue bearing in degrees (clockwise from north).
distanceMetresdoubleTotal 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.