Pātuhitia tēnei: Mathematical Foundation of Geodesy