diff options
| author | Thomas Knudsen <lastname DOT firstname AT gmail DOT com> | 2016-05-11 13:32:50 +0200 |
|---|---|---|
| committer | Thomas Knudsen <lastname DOT firstname AT gmail DOT com> | 2016-05-11 13:32:50 +0200 |
| commit | cb0f8f624f2ce61c7b801daf5ffe20c01b4d3783 (patch) | |
| tree | 6d0cee62e66bbd6d92795a7ed6b98e0ec1ecc609 /src | |
| parent | 8da93d5e308483ad279edda9e3783b8e0e2f3f50 (diff) | |
| download | PROJ-cb0f8f624f2ce61c7b801daf5ffe20c01b4d3783.tar.gz PROJ-cb0f8f624f2ce61c7b801daf5ffe20c01b4d3783.zip | |
Yet another round of minor corrections
A few args had gone missing in the test setups for lagrng, ob_tran,
omerc, mod_ster.
A mixed declarations and code case corrected in proj_rouss
A missing include added to test228.c
Diffstat (limited to 'src')
| -rw-r--r-- | src/PJ_lagrng.c | 2 | ||||
| -rw-r--r-- | src/PJ_mod_ster.c | 8 | ||||
| -rw-r--r-- | src/PJ_ob_tran.c | 2 | ||||
| -rw-r--r-- | src/PJ_omerc.c | 8 | ||||
| -rw-r--r-- | src/proj_rouss.c | 4 | ||||
| -rw-r--r-- | src/test228.c | 6 |
6 files changed, 17 insertions, 13 deletions
diff --git a/src/PJ_lagrng.c b/src/PJ_lagrng.c index 244cf043..776894d7 100644 --- a/src/PJ_lagrng.c +++ b/src/PJ_lagrng.c @@ -80,7 +80,7 @@ int pj_lagrng_selftest (void) { double tolerance_lp = 1e-10; double tolerance_xy = 1e-7; - char s_args[] = {"+proj=lagrng +a=6400000 +lat_1=0.5 +lat_2=2"}; + char s_args[] = {"+proj=lagrng +a=6400000 +W=2 +lat_1=0.5 +lat_2=2"}; LP fwd_in[] = { { 2, 1}, diff --git a/src/PJ_mod_ster.c b/src/PJ_mod_ster.c index 7de7c01b..4c217141 100644 --- a/src/PJ_mod_ster.c +++ b/src/PJ_mod_ster.c @@ -8,7 +8,7 @@ PROJ_HEAD(gs48, "Mod. Stererographics of 48 U.S.") "\n\tAzi(mod)"; PROJ_HEAD(alsk, "Mod. Stererographics of Alaska") "\n\tAzi(mod)"; PROJ_HEAD(gs50, "Mod. Stererographics of 50 U.S.") "\n\tAzi(mod)"; -#define EPSLN 1e-10 +#define EPSLN 1e-12 struct pj_opaque { COMPLEX *zcoeff; \ @@ -424,8 +424,10 @@ int pj_alsk_selftest (void) {return 0;} #else int pj_alsk_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; + + /* The standard test points are way outside the definition area bounds, hence we relax tolerances */ + double tolerance_lp = 1e-7; + double tolerance_xy = 1e-4; char e_args[] = {"+proj=alsk +ellps=GRS80 +lat_1=0.5 +lat_2=2"}; char s_args[] = {"+proj=alsk +a=6400000 +lat_1=0.5 +lat_2=2"}; diff --git a/src/PJ_ob_tran.c b/src/PJ_ob_tran.c index 634bb552..e726b3b2 100644 --- a/src/PJ_ob_tran.c +++ b/src/PJ_ob_tran.c @@ -189,7 +189,7 @@ int pj_ob_tran_selftest (void) { double tolerance_lp = 1e-10; double tolerance_xy = 1e-7; - char s_args[] = {"+proj=ob_tran +o_proj=latlon +o_lon_p=20 +o_lat_p=20 +lon_0=180"}; + char s_args[] = {"+proj=ob_tran +a=6400000 +o_proj=latlon +o_lon_p=20 +o_lat_p=20 +lon_0=180"}; LP fwd_in[] = { { 2, 1}, diff --git a/src/PJ_omerc.c b/src/PJ_omerc.c index 95960dfa..2fe41426 100644 --- a/src/PJ_omerc.c +++ b/src/PJ_omerc.c @@ -123,15 +123,15 @@ static void freeup (PJ *P) { PJ *PROJECTION(omerc) { + double con, com, cosph0, D, F, H, L, sinph0, p, J, gamma=0, + gamma0, lamc=0, lam1=0, lam2=0, phi1=0, phi2=0, alpha_c=0; + int alp, gam, no_off = 0; + struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque)); if (0==Q) return freeup_new (P); P->opaque = Q; - double con, com, cosph0, D, F, H, L, sinph0, p, J, gamma=0, - gamma0, lamc=0, lam1=0, lam2=0, phi1=0, phi2=0, alpha_c=0; - int alp, gam, no_off = 0; - Q->no_rot = pj_param(P->ctx, P->params, "tno_rot").i; if ((alp = pj_param(P->ctx, P->params, "talpha").i) != 0) alpha_c = pj_param(P->ctx, P->params, "ralpha").f; diff --git a/src/proj_rouss.c b/src/proj_rouss.c index 35cc73c7..fc9918be 100644 --- a/src/proj_rouss.c +++ b/src/proj_rouss.c @@ -97,13 +97,13 @@ static void freeup (PJ *P) { PJ *PROJECTION(rouss) { + double N0, es2, t, t2, R_R0_2, R_R0_4; + struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque)); if (0==Q) return freeup_new (P); P->opaque = Q; - double N0, es2, t, t2, R_R0_2, R_R0_4; - if (!((Q->en = proj_mdist_ini(P->es)))) E_ERROR_0; es2 = sin(P->phi0); diff --git a/src/test228.c b/src/test228.c index cdfc8650..a8e55c4c 100644 --- a/src/test228.c +++ b/src/test228.c @@ -1,4 +1,6 @@ #include <proj_api.h> +#include <stdio.h> /* for printf declaration */ + #ifdef _WIN32 @@ -33,7 +35,7 @@ void* thread_main(void* unused) p_OSGB36_proj=pj_init_plus_ctx(p_proj_ctxt, "+proj=longlat +ellps=airy +datum=OSGB36 +nadgrids=OSTN02_NTv2.gsb " "+no_defs"); - + while(run) { double x, y; @@ -73,4 +75,4 @@ int main(int argc, char* argv[]) return 0; } -#endif /* _WIN32 */
\ No newline at end of file +#endif /* _WIN32 */ |
