Mercator Projection Notes

To calculate \frac{d\phi}{dy}

public static double DPhi_Over_Dy(double latitudeDegrees)
{
var x = CalculateY(latitudeDegrees) / RadiusInMeters;
var t = Math.Exp(x);
// using wolfram alpha: derivative of 2arctan(exp(x))
return (1.0 / RadiusInMeters) * (2 * t) / (t * t + 1) * 180.0 / Math.PI;
}

public static double CalculateY(double latitudeDegrees)
{
var radians = latitudeDegrees * Math.PI / 180;
return RadiusInMeters * Math.Log(Math.Tan(Math.PI / 4 + radians / 2));
}

\frac{dy}{d\phi} (mercator meters per latitude) is simply \frac{1}{d\phi/dy}

This entry was posted in Software. Bookmark the permalink.

Leave a comment