aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Knudsen <busstoptaktik@users.noreply.github.com>2017-11-12 06:04:13 +0100
committerGitHub <noreply@github.com>2017-11-12 06:04:13 +0100
commitd332eb78f87d8732c63ba0cf07dc711f45e43b31 (patch)
tree6595791cf39c972e5ae588a2fc60a67129c1022d /src
parent451dec5d82c01dcdc20cc954ed834a8042686f84 (diff)
parent5b0b6cb8d477a39f3f59a38d0a1968cc9ac9f847 (diff)
downloadPROJ-d332eb78f87d8732c63ba0cf07dc711f45e43b31.tar.gz
PROJ-d332eb78f87d8732c63ba0cf07dc711f45e43b31.zip
Merge pull request #656 from busstoptaktik/selftest-removal-hijk
Remove selftests from projection files starting with h, i, j, k
Diffstat (limited to 'src')
-rw-r--r--src/PJ_hammer.c44
-rw-r--r--src/PJ_hatano.c52
-rw-r--r--src/PJ_healpix.c119
-rw-r--r--src/PJ_igh.c44
-rw-r--r--src/PJ_imw_p.c44
-rw-r--r--src/PJ_isea.c30
-rw-r--r--src/PJ_krovak.c44
7 files changed, 8 insertions, 369 deletions
diff --git a/src/PJ_hammer.c b/src/PJ_hammer.c
index c18c9a69..443ce247 100644
--- a/src/PJ_hammer.c
+++ b/src/PJ_hammer.c
@@ -72,46 +72,4 @@ PJ *PROJECTION(hammer) {
}
-#ifndef PJ_SELFTEST
-int pj_hammer_selftest (void) {return 0;}
-#else
-
-int pj_hammer_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=hammer +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 223373.78870324057, 111703.90739776699},
- { 223373.78870324057, -111703.90739776699},
- {-223373.78870324057, 111703.90739776699},
- {-223373.78870324057, -111703.90739776699},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.001790493109965961, 0.00089524655487369749},
- { 0.001790493109965961, -0.00089524655487369749},
- {-0.001790493109965961, 0.00089524655487369749},
- {-0.001790493109965961, -0.00089524655487369749},
- };
-
- return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
+int pj_hammer_selftest (void) {return 10000;}
diff --git a/src/PJ_hatano.c b/src/PJ_hatano.c
index be95fe73..ea4bacf8 100644
--- a/src/PJ_hatano.c
+++ b/src/PJ_hatano.c
@@ -79,54 +79,4 @@ PJ *PROJECTION(hatano) {
return P;
}
-#ifndef PJ_SELFTEST
-int pj_hatano_selftest (void) {return 0;}
-#else
-
-int pj_hatano_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=hatano +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 189878.87894652804, 131409.8024406255
-},
- { 189881.08195244463, -131409.14227607418
-},
- {-189878.87894652804, 131409.8024406255
-},
- {-189881.08195244463, -131409.14227607418
-},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.0021064624821817597, 0.00076095689425791926
-},
- { 0.0021064624821676096, -0.00076095777439265377
-},
- {-0.0021064624821817597, 0.00076095689425791926
-},
- {-0.0021064624821676096, -0.00076095777439265377
-},
- };
-
- return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
+int pj_hatano_selftest (void) {return 10000;}
diff --git a/src/PJ_healpix.c b/src/PJ_healpix.c
index 438cb595..2d2af805 100644
--- a/src/PJ_healpix.c
+++ b/src/PJ_healpix.c
@@ -669,120 +669,5 @@ PJ *PROJECTION(rhealpix) {
}
-#ifndef PJ_SELFTEST
-int pj_healpix_selftest (void) {return 0;}
-#else
-
-int pj_healpix_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char e_args[] = {"+proj=healpix +ellps=GRS80 +lat_1=0.5 +lat_2=2"};
- char s_args[] = {"+proj=healpix +R=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY e_fwd_expect[] = {
- { 222390.10394923863, 130406.58866448226},
- { 222390.10394923863, -130406.58866448054},
- {-222390.10394923863, 130406.58866448226},
- {-222390.10394923863, -130406.58866448054},
- };
-
- XY s_fwd_expect[] = {
- { 223402.14425527418, 131588.04444199943},
- { 223402.14425527418, -131588.04444199943},
- {-223402.14425527418, 131588.04444199943},
- {-223402.14425527418, -131588.04444199943},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP e_inv_expect[] = {
- { 0.0017986411845524453, 0.00076679453057823619},
- { 0.0017986411845524453, -0.00076679453057823619},
- {-0.0017986411845524453, 0.00076679453057823619},
- {-0.0017986411845524453, -0.00076679453057823619},
- };
-
- LP s_inv_expect[] = {
- { 0.0017904931097838226, 0.00075990887733981202},
- { 0.0017904931097838226, -0.00075990887733981202},
- {-0.0017904931097838226, 0.00075990887733981202},
- {-0.0017904931097838226, -0.00075990887733981202},
- };
-
- return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
-
-#ifndef PJ_SELFTEST
-int pj_rhealpix_selftest (void) {return 0;}
-#else
-
-int pj_rhealpix_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char e_args[] = {"+proj=rhealpix +ellps=GRS80 +lat_1=0.5 +lat_2=2"};
- char s_args[] = {"+proj=rhealpix +R=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY e_fwd_expect[] = {
- { 222390.10394923863, 130406.58866448226},
- { 222390.10394923863, -130406.58866448054},
- {-222390.10394923863, 130406.58866448226},
- {-222390.10394923863, -130406.58866448054},
- };
-
- XY s_fwd_expect[] = {
- { 223402.14425527418, 131588.04444199943},
- { 223402.14425527418, -131588.04444199943},
- {-223402.14425527418, 131588.04444199943},
- {-223402.14425527418, -131588.04444199943},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP e_inv_expect[] = {
- { 0.0017986411845524453, 0.00076679453057823619},
- { 0.0017986411845524453, -0.00076679453057823619},
- {-0.0017986411845524453, 0.00076679453057823619},
- {-0.0017986411845524453, -0.00076679453057823619},
- };
-
- LP s_inv_expect[] = {
- { 0.0017904931097838226, 0.00075990887733981202},
- { 0.0017904931097838226, -0.00075990887733981202},
- {-0.0017904931097838226, 0.00075990887733981202},
- {-0.0017904931097838226, -0.00075990887733981202},
- };
-
- return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
+int pj_healpix_selftest (void) {return 10000;}
+int pj_rhealpix_selftest (void) {return 10000;}
diff --git a/src/PJ_igh.c b/src/PJ_igh.c
index 33cdde22..01cfa246 100644
--- a/src/PJ_igh.c
+++ b/src/PJ_igh.c
@@ -222,46 +222,4 @@ PJ *PROJECTION(igh) {
}
-#ifndef PJ_SELFTEST
-int pj_igh_selftest (void) {return 0;}
-#else
-
-int pj_igh_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=igh +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 223878.49745627123, 111701.07212763709},
- { 223708.37131305804, -111701.07212763709},
- {-222857.74059699223, 111701.07212763709},
- {-223027.86674020503, -111701.07212763709},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.001790489447892545, 0.00089524655489191132},
- { 0.0017904906685957927, -0.00089524655489191132},
- {-0.001790496772112032, 0.00089524655489191132},
- {-0.0017904955514087843, -0.00089524655489191132},
- };
-
- return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
+int pj_igh_selftest (void) {return 10000;}
diff --git a/src/PJ_imw_p.c b/src/PJ_imw_p.c
index 7fd31fbb..f0c88efb 100644
--- a/src/PJ_imw_p.c
+++ b/src/PJ_imw_p.c
@@ -212,46 +212,4 @@ PJ *PROJECTION(imw_p) {
}
-#ifndef PJ_SELFTEST
-int pj_imw_p_selftest (void) {return 0;}
-#else
-
-int pj_imw_p_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char e_args[] = {"+proj=imw_p +ellps=GRS80 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY e_fwd_expect[] = {
- { 222588.4411393762, 55321.128653809537},
- { 222756.90637768712, -165827.58428832365},
- {-222588.4411393762, 55321.128653809537},
- {-222756.90637768712, -165827.58428832365},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP e_inv_expect[] = {
- { 0.0017966991379592214, 0.50090492361427374},
- { 0.0017966979081574697, 0.49909507588689922},
- {-0.0017966991379592214, 0.50090492361427374},
- {-0.0017966979081574697, 0.49909507588689922},
- };
-
- return pj_generic_selftest (e_args, 0, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, 0, inv_in, e_inv_expect, 0);
-}
-
-
-#endif
+int pj_imw_p_selftest (void) {return 10000;}
diff --git a/src/PJ_isea.c b/src/PJ_isea.c
index 223d8f28..72c34744 100644
--- a/src/PJ_isea.c
+++ b/src/PJ_isea.c
@@ -1148,32 +1148,4 @@ PJ *PROJECTION(isea) {
}
-#ifndef PJ_SELFTEST
-int pj_isea_selftest (void) {return 0;}
-#else
-
-int pj_isea_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=isea +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- {-1097074.9480224741, 3442909.3090371834},
- {-1097074.9482647954, 3233611.7285857084},
- {-1575486.3536415542, 3442168.3420281881},
- {-1575486.353880283, 3234352.6955947056},
- };
-
- return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-
-
-#endif
+int pj_isea_selftest (void) {return 10000;}
diff --git a/src/PJ_krovak.c b/src/PJ_krovak.c
index 640ce07f..929a2a6d 100644
--- a/src/PJ_krovak.c
+++ b/src/PJ_krovak.c
@@ -220,46 +220,4 @@ PJ *PROJECTION(krovak) {
}
-#ifndef PJ_SELFTEST
-int pj_krovak_selftest (void) {return 0;}
-#else
-
-int pj_krovak_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char e_args[] = {"+proj=krovak +ellps=GRS80 +no_defs"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY e_fwd_expect[] = {
- {-3196535.2325636409, -6617878.8675514441},
- {-3260035.4405521089, -6898873.6148780314},
- {-3756305.3288691747, -6478142.5615715114},
- {-3831703.6585019818, -6759107.1701553948},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP e_inv_expect[] = {
- {24.836218918719162, 59.758403933233858},
- {24.836315484509566, 59.756888425730189},
- {24.830447747947495, 59.758403933233858},
- {24.830351182157091, 59.756888425730189},
- };
-
- return pj_generic_selftest (e_args, 0, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, 0, inv_in, e_inv_expect, 0);
-}
-
-
-#endif
+int pj_krovak_selftest (void) {return 10000;}