diff options
| -rw-r--r-- | nad/tv_out.dist | 20 | ||||
| -rw-r--r-- | src/PJ_sch.c | 9 |
2 files changed, 16 insertions, 13 deletions
diff --git a/nad/tv_out.dist b/nad/tv_out.dist index f236eddc..f3c6c39f 100644 --- a/nad/tv_out.dist +++ b/nad/tv_out.dist @@ -319,18 +319,18 @@ Test bug 245 (use expansion of +datum=carthage) 10 34 592302.9819461 3762148.7340609 -30.3110170 ############################################################## Test SCH forward projection -0.0 0.0 -1977112.0305592 5551475.1418378 6595.7256583 -0.0 90.0 -4303095.6927530 -4253039.2182667 6595.7256583 -45.0 45.0 1630035.5650122 -342353.6396475 128.3445654 -45.1 44.9 1642526.7453121 -336878.8571851 131.3265616 -44.9 45.1 1617547.4295637 -347855.9734973 125.4645102 -30.0 45.0 0.0000000 0.0000000 0.0000000 +0.0 0.0 -1977112.0305592 5551475.1418378 6595.7256583 +0.0 90.0 6618337.9734775 -1152927.4060894 10055.1157181 +45.0 45.0 1630035.5650122 -342353.6396475 128.3445654 +45.1 44.9 1617547.4295637 -347855.9734973 125.4645102 +44.9 45.1 1642526.7453121 -336878.8571851 131.3265616 +30.0 45.0 1974596.2356203 787409.8217445 773.0028577 ############################################################## Test SCH inverse projection -0. 0. 30.0000000 45.0000000 0.0000000 -0. 1000. 29.9981240 44.9898625 -0.0003617 -1000. 0. 30.0088238 44.9978450 -0.0000000 -1000. 1000. 30.0069477 44.9877066 -0.0005228 +0. 0. 45.0000000 30.0000000 0.0000000 +0. 1000. 44.9898625 29.9981240 -0.0003617 +1000. 0. 44.9978450 30.0088238 -0.0000000 +1000. 1000. 44.9877066 30.0069477 -0.0005228 ############################################################## Test issue #316 (switch utm to use etmerc) 0 83 145723.870553 9300924.845226 0.000000 diff --git a/src/PJ_sch.c b/src/PJ_sch.c index 5571deb3..9a0120fe 100644 --- a/src/PJ_sch.c +++ b/src/PJ_sch.c @@ -79,8 +79,8 @@ INVERSE3D(inverse3d); temp, temp+1, temp+2); - lpz.lam = temp[0] ; - lpz.phi = temp[1] ; + lpz.lam = temp[1] ; + lpz.phi = temp[0] ; lpz.z = temp[2]; // printf("INVERSE: \n"); @@ -93,11 +93,13 @@ FORWARD3D(forward3d); double temp[3]; double pxyz[3]; + //Convert lat lon to geocentric coordinates - if( pj_Convert_Geodetic_To_Geocentric( &(P->elp_0), lpz.lam, lpz.phi, lpz.z, + if( pj_Convert_Geodetic_To_Geocentric( &(P->elp_0), lpz.phi, lpz.lam, lpz.z, temp, temp+1, temp+2 ) != 0 ) F3_ERROR; + //Adjust for offset temp[0] -= P->xyzoff[0]; temp[1] -= P->xyzoff[1]; @@ -113,6 +115,7 @@ FORWARD3D(forward3d); pj_Convert_Geocentric_To_Geodetic( &(P->sph), pxyz[0], pxyz[1], pxyz[2], temp, temp+1, temp+2); + //Scale by radius xyz.x = temp[1] * P->rcurv / P->a; xyz.y = temp[0] * P->rcurv / P->a; |
