aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2018-03-05 11:36:26 +0100
committerGitHub <noreply@github.com>2018-03-05 11:36:26 +0100
commitcdab910c2fdd52a90f4001a7fd3e97db8d4d074e (patch)
tree437c001f1736f4cbc8268cc5f236c9b66eb4305d
parent5506990d47606c4ca0458fbd1a69cb4cbc8df618 (diff)
parent60d93bae884a3b3067f5089d00c2cda2c2aa0111 (diff)
downloadPROJ-cdab910c2fdd52a90f4001a7fd3e97db8d4d074e.tar.gz
PROJ-cdab910c2fdd52a90f4001a7fd3e97db8d4d074e.zip
Merge pull request #832 from awulkiew/fix/parameters
Improve consistency of parameters
-rw-r--r--src/PJ_nsper.c4
-rw-r--r--src/PJ_omerc.c2
-rw-r--r--test/gie/builtins.gie46
3 files changed, 49 insertions, 3 deletions
diff --git a/src/PJ_nsper.c b/src/PJ_nsper.c
index 0b3a1d1b..64154fa0 100644
--- a/src/PJ_nsper.c
+++ b/src/PJ_nsper.c
@@ -186,8 +186,8 @@ PJ *PROJECTION(tpers) {
return pj_default_destructor (P, ENOMEM);
P->opaque = Q;
- omega = pj_param(P->ctx, P->params, "dtilt").f * DEG_TO_RAD;
- gamma = pj_param(P->ctx, P->params, "dazi").f * DEG_TO_RAD;
+ omega = pj_param(P->ctx, P->params, "rtilt").f;
+ gamma = pj_param(P->ctx, P->params, "razi").f;
Q->tilt = 1;
Q->cg = cos(gamma); Q->sg = sin(gamma);
Q->cw = cos(omega); Q->sw = sin(omega);
diff --git a/src/PJ_omerc.c b/src/PJ_omerc.c
index eca5b241..4bfb1fd8 100644
--- a/src/PJ_omerc.c
+++ b/src/PJ_omerc.c
@@ -122,7 +122,7 @@ PJ *PROJECTION(omerc) {
return pj_default_destructor (P, ENOMEM);
P->opaque = Q;
- Q->no_rot = pj_param(P->ctx, P->params, "tno_rot").i;
+ Q->no_rot = pj_param(P->ctx, P->params, "bno_rot").i;
if ((alp = pj_param(P->ctx, P->params, "talpha").i) != 0)
alpha_c = pj_param(P->ctx, P->params, "ralpha").f;
if ((gam = pj_param(P->ctx, P->params, "tgamma").i) != 0)
diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie
index a8a440e3..f2ee2e16 100644
--- a/test/gie/builtins.gie
+++ b/test/gie/builtins.gie
@@ -3029,6 +3029,29 @@ expect -0.001796631 0.000904369
accept -200 -100
expect -0.001796631 -0.000904369
+-------------------------------------------------------------------------------
+operation +proj=omerc +ellps=GRS80 +lat_1=0.5 +lat_2=2 +no_rot
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+accept 2 1
+expect 110642.229314984 222650.796885261
+accept 2 -1
+expect -110642.229314984 222650.796885261
+accept -2 1
+expect 110642.229314984 -222650.796885262
+accept -2 -1
+expect -110642.229314984 -222650.796885262
+
+direction inverse
+accept 200 100
+expect 0.000898315 0.001808739
+accept 200 -100
+expect -0.000898315 0.001808739
+accept -200 100
+expect 0.000898315 -0.001808739
+accept -200 -100
+expect -0.000898315 -0.001808739
+
===============================================================================
Ortelius Oval
@@ -4163,6 +4186,29 @@ expect -0.001376321 0.001453641
accept -200 -100
expect -0.001988706 -0.000228872
+-------------------------------------------------------------------------------
+operation +proj=tpers +a=6400000 +h=1000000 +tilt=20
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+accept 2 1
+expect 213598.340357101 113687.930830744
+accept 2 -1
+expect 231609.982792523 -123274.645577324
+accept -2 1
+expect -213598.340357101 113687.930830744
+accept -2 -1
+expect -231609.982792523 -123274.645577324
+
+direction inverse
+accept 200 100
+expect 0.001790554 0.000841285
+accept 200 -100
+expect 0.001790432 -0.000841228
+accept -200 100
+expect -0.001790554 0.000841285
+accept -200 -100
+expect -0.001790432 -0.000841228
+
===============================================================================
Universal Polar Stereographic