aboutsummaryrefslogtreecommitdiff
path: root/src/PJ_ob_tran.c
diff options
context:
space:
mode:
authorThomas Knudsen <thokn@sdfe.dk>2017-10-06 12:56:22 +0200
committerThomas Knudsen <thokn@sdfe.dk>2017-10-06 12:56:22 +0200
commitee0e2a0ff7315b3e77e5e570b566a735ec6a817a (patch)
tree6f21a1d1337927e988c199465f747c380e93570b /src/PJ_ob_tran.c
parentca84e57463cacaa0d6b8f81b11ca6714c77e88c5 (diff)
downloadPROJ-ee0e2a0ff7315b3e77e5e570b566a735ec6a817a.tar.gz
PROJ-ee0e2a0ff7315b3e77e5e570b566a735ec6a817a.zip
Enable ob_tran for ellipsoidal projection definitions. While formally wrong, it gives consistent results, and is more safe than the original hack of setting es=0
Diffstat (limited to 'src/PJ_ob_tran.c')
-rw-r--r--src/PJ_ob_tran.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/PJ_ob_tran.c b/src/PJ_ob_tran.c
index cd6f72db..d35bb1b3 100644
--- a/src/PJ_ob_tran.c
+++ b/src/PJ_ob_tran.c
@@ -169,9 +169,11 @@ PJ *PROJECTION(ob_tran) {
P->opaque = Q;
P->destructor = destructor;
-
+
+#if 0
if (0 != P->es)
return destructor(P, PJD_ERR_ELLIPSOIDAL_UNSUPPORTED);
+#endif
/* get name of projection to be translated */
if (!(name = pj_param(P->ctx, P->params, "so_proj").s))
@@ -181,7 +183,7 @@ PJ *PROJECTION(ob_tran) {
if( strcmp(name, "ob_tran") == 0 )
return destructor(P, PJD_ERR_FAILED_TO_FIND_PROJ);
- /* Create the projection object to rotate */
+ /* Create the target projection object to rotate */
args = ob_tran_target_params (P->params);
R = pj_init_ctx (pj_get_ctx(P), args.argc, args.argv);
pj_dealloc (args.argv);
@@ -278,7 +280,7 @@ int pj_ob_tran_selftest (void) {
};
/* -- Tests from nad/testvarious -------------------------------------------- */
- P = proj_create (0, "+proj=ob_tran +o_proj=moll +a=6378137.0 +es=0 +o_lon_p=0 +o_lat_p=0 +lon_0=180");
+ P = proj_create (0, "+proj=ob_tran +o_proj=moll +R=6378137.0 +o_lon_p=0 +o_lat_p=0 +lon_0=180");
if (0==P)
return 1;