Added geodesic distance calculation