/// <summary> /// Reverse projection, from Cassini-Soldner to geographic. /// </summary> /// <param name="x">easting of point (meters).</param> /// <param name="y">northing of point (meters).</param> /// <param name="azi">azimuth of easting direction at point (degrees).</param> /// <param name="rk">reciprocal of azimuthal northing scale at point.</param> /// <returns> /// <i>lat</i>, latitude of point and <i>lon</i>, longitude of point, in degress. /// </returns> /// <remarks> /// A call to <see cref="Reverse(double, double, out double, out double)"/> followed /// by a call to <see cref="Forward(double, double, out double, out double)"/> will /// return the original (<paramref name="x"/>, <paramref name="y"/>) (to within roundoff), /// provided that <paramref name="x"/> and <paramref name="y"/> are sufficiently small not to "wrap around" the earth. /// The routine does nothing if the origin has not been set. /// </remarks> public (double lat, double lon) Reverse(double x, double y, out double azi, out double rk) { _meridian.Position(y, out var lat1, out var lon1, out var azi0); _earth.Direct(lat1, lon1, azi0 + 90, x, out var lat, out var lon, out azi, out rk, out _); return(lat, lon); }