Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inverse ortho ellipsoidal oblique: address a few remarks... #2855

Merged
merged 1 commit into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/projections/ortho.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,13 @@ static PJ_LP ortho_e_inverse (PJ_XY xy, PJ *P) { /* Ellipsoidal, inver
lp.phi += dphi;
if( lp.phi > M_PI_2)
{
lp.phi = M_PI_2 - (M_PI_2 - lp.phi);
lp.lam = adjlon(lp.lam + 180);
lp.phi = M_PI_2 - (lp.phi - M_PI_2);
lp.lam = adjlon(lp.lam + M_PI);
}
else if( lp.phi < -M_PI_2)
{
lp.phi = -M_PI_2 + (-M_PI_2 - lp.phi);
lp.lam = adjlon(lp.lam + 180);
lp.lam = adjlon(lp.lam + M_PI);
}
lp.lam += dlam;
if( fabs(dphi) < 1e-12 && fabs(dlam) < 1e-12 )
Expand Down
9 changes: 9 additions & 0 deletions test/gie/builtins.gie
Original file line number Diff line number Diff line change
Expand Up @@ -4603,6 +4603,15 @@ accept 120.0 84.0
expect 663929.0678 5118338.2423
roundtrip 1

tolerance 0.1 mm
accept -132.1803037588 60.171013757
expect -1335097.4621 6158336.7476
roundtrip 1

tolerance 0.1 mm
accept 171.66658585876 55.670679094
expect 1874756.6327 6061693.5075
roundtrip 1

-------------------------------------------------------------------------------
# Equatorial
Expand Down