aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Knudsen <busstoptaktik@users.noreply.github.com>2017-10-12 21:06:12 +0200
committerGitHub <noreply@github.com>2017-10-12 21:06:12 +0200
commit446ce34042946015cb87b44aadefbff46b808866 (patch)
tree03a5d254971e3d7858a628152f0fa5b1735f093f /src
parentde5059b4efb088f5b88ef73878bda3fc8b6609d0 (diff)
parentb6e37b99b1f7d07de691f428e8d04dbd5f8b3caa (diff)
downloadPROJ-446ce34042946015cb87b44aadefbff46b808866.tar.gz
PROJ-446ce34042946015cb87b44aadefbff46b808866.zip
Merge pull request #603 from busstoptaktik/remove-internal-selftests-1
Remove first batch of internal self tests (from PJ_a*.c, excluding the two apply_gridshift cases)
Diffstat (limited to 'src')
-rw-r--r--src/PJ_aea.c116
-rw-r--r--src/PJ_aeqd.c59
-rw-r--r--src/PJ_airy.c29
-rw-r--r--src/PJ_aitoff.c93
-rw-r--r--src/PJ_august.c28
5 files changed, 5 insertions, 320 deletions
diff --git a/src/PJ_aea.c b/src/PJ_aea.c
index 228d3afd..5e8e3333 100644
--- a/src/PJ_aea.c
+++ b/src/PJ_aea.c
@@ -218,119 +218,5 @@ PJ *PROJECTION(leac) {
}
-#ifndef PJ_SELFTEST
-int pj_aea_selftest (void) {return 10000;}
-#else
-
-int pj_aea_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char e_args[] = {"+proj=aea +ellps=GRS80 +lat_1=0 +lat_2=2"};
- char s_args[] = {"+proj=aea +R=6400000 +lat_1=0 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY e_fwd_expect[] = {
- {222571.60875710563, 110653.32674302977},
- {222706.30650839131, -110484.26714439997},
- {-222571.60875710563, 110653.32674302977},
- {-222706.30650839131, -110484.26714439997},
- };
-
- XY s_fwd_expect[] = {
- {223334.08517088494, 111780.43188447191},
- {223470.15499168713, -111610.33943099028},
- {-223334.08517088494, 111780.43188447191},
- {-223470.15499168713, -111610.33943099028},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP e_inv_expect[] = {
- {0.0017966310597749514, 0.00090436885862202158},
- {0.0017966300767030448, -0.00090437009538581453},
- {-0.0017966310597749514, 0.00090436885862202158},
- {-0.0017966300767030448, -0.00090437009538581453},
- };
-
- LP s_inv_expect[] = {
- {0.0017904935979658752, 0.00089524594491375306},
- {0.0017904926216016812, -0.00089524716502493225},
- {-0.0017904935979658752, 0.00089524594491375306},
- {-0.0017904926216016812, -0.00089524716502493225},
- };
- 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_aea_selftest (void) {return 10000;}
int pj_leac_selftest (void) {return 10000;}
-#else
-
-int pj_leac_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char e_args[] = {"+proj=leac +ellps=GRS80 +lat_1=0 +lat_2=2"};
- char s_args[] = {"+proj=leac +R=6400000 +lat_1=0 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY e_fwd_expect[] = {
- {220685.14054297868, 112983.50088939646},
- {224553.31227982609, -108128.63674487274},
- {-220685.14054297868, 112983.50088939646},
- {-224553.31227982609, -108128.63674487274},
- };
-
- XY s_fwd_expect[] = {
- {221432.86859285168, 114119.45452653214},
- {225331.72412711097, -109245.82943505641},
- {-221432.86859285168, 114119.45452653214},
- {-225331.72412711097, -109245.82943505641},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP e_inv_expect[] = {
- {0.0017966446840328458, 0.00090435171340223211},
- {0.0017966164523713021, -0.00090438724081843625},
- {-0.0017966446840328458, 0.00090435171340223211},
- {-0.0017966164523713021, -0.00090438724081843625},
- };
-
- LP s_inv_expect[] = {
- {0.0017905070979748127, 0.00089522906964877795},
- {0.001790479121519977, -0.00089526404022281043},
- {-0.0017905070979748127, 0.00089522906964877795},
- {-0.001790479121519977, -0.00089526404022281043},
- };
-
- 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
diff --git a/src/PJ_aeqd.c b/src/PJ_aeqd.c
index c6fa9e06..f0c813f5 100644
--- a/src/PJ_aeqd.c
+++ b/src/PJ_aeqd.c
@@ -318,61 +318,4 @@ PJ *PROJECTION(aeqd) {
}
-#ifndef PJ_SELFTEST
-int pj_aeqd_selftest (void) {return 0;}
-#else
-
-int pj_aeqd_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char e_args[] = {"+proj=aeqd +ellps=GRS80 +lat_1=0.5 +lat_2=2"};
- char s_args[] = {"+proj=aeqd +R=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY e_fwd_expect[] = {
- { 222616.522190051648, 110596.996549550197},
- { 222616.522190051648, -110596.996549550211},
- {-222616.522190051648, 110596.996549550197},
- {-222616.522190051648, -110596.996549550211},
- };
-
- XY s_fwd_expect[] = {
- { 223379.456047271, 111723.757570854126},
- { 223379.456047271, -111723.757570854126},
- {-223379.456047271, 111723.757570854126},
- {-223379.456047271, -111723.757570854126},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP e_inv_expect[] = {
- { 0.00179663056838724787, 0.000904369476930248902},
- { 0.00179663056838724787, -0.000904369476930248469},
- {-0.00179663056838724787, 0.000904369476930248902},
- {-0.00179663056838724787, -0.000904369476930248469},
- };
-
- LP s_inv_expect[] = {
- { 0.00179049310992953335, 0.000895246554746200623},
- { 0.00179049310992953335, -0.000895246554746200623},
- {-0.00179049310992953335, 0.000895246554746200623},
- {-0.00179049310992953335, -0.000895246554746200623},
- };
-
- 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_aeqd_selftest (void) {return 10000;}
diff --git a/src/PJ_airy.c b/src/PJ_airy.c
index d832b9b7..a5ee1f24 100644
--- a/src/PJ_airy.c
+++ b/src/PJ_airy.c
@@ -147,31 +147,4 @@ PJ *PROJECTION(airy) {
}
-#ifndef PJ_SELFTEST
-int pj_airy_selftest (void) {return 0;}
-#else
-
-int pj_airy_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=airy +a=6400000 +lat_1=0 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 189109.88690862127, 94583.752387504152},
- { 189109.88690862127, -94583.752387504152},
- {-189109.88690862127, 94583.752387504152},
- {-189109.88690862127, -94583.752387504152},
- };
-
- return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 0, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-
-#endif
+int pj_airy_selftest (void) {return 10000;}
diff --git a/src/PJ_aitoff.c b/src/PJ_aitoff.c
index 3455fa71..8e9201d0 100644
--- a/src/PJ_aitoff.c
+++ b/src/PJ_aitoff.c
@@ -189,94 +189,5 @@ PJ *PROJECTION(wintri) {
}
-#ifndef PJ_SELFTEST
-int pj_aitoff_selftest (void) {return 0;}
-#else
-
-int pj_aitoff_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=aitoff +R=6400000 +lat_1=0 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
-
- XY s_fwd_expect[] = {
- {223379.45881169615, 111706.74288385305},
- {223379.45881169615, -111706.74288385305},
- {-223379.45881169615, 111706.74288385305},
- {-223379.45881169615, -111706.74288385305},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
-
- LP s_inv_expect[] = {
- {0.0017904931100388164, 0.00089524655491012516},
- {0.0017904931100388164, -0.00089524655491012516},
- {-0.0017904931100388164, 0.00089524655491012516},
- {-0.0017904931100388164, -0.00089524655491012516},
- };
-
- 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
-
-
-
-#ifndef PJ_SELFTEST
-int pj_wintri_selftest (void) {return 0;}
-#else
-
-int pj_wintri_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=wintri +a=6400000 +lat_1=0 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- {223390.80153348515, 111703.90750574505},
- {223390.80153348515, -111703.90750574505},
- {-223390.80153348515, 111703.90750574505},
- {-223390.80153348515, -111703.90750574505},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- {0.0017904931099113196, 0.00089524655490101819},
- {0.0017904931099113196, -0.00089524655490101819},
- {-0.0017904931099113196, 0.00089524655490101819},
- {-0.0017904931099113196, -0.00089524655490101819},
- };
-
- 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_aitoff_selftest (void) {return 10000;}
+int pj_wintri_selftest (void) {return 10000;}
diff --git a/src/PJ_august.c b/src/PJ_august.c
index d81644bf..c437ca2f 100644
--- a/src/PJ_august.c
+++ b/src/PJ_august.c
@@ -31,32 +31,4 @@ PJ *PROJECTION(august) {
return P;
}
-#ifndef PJ_SELFTEST
int pj_august_selftest (void) {return 0;}
-#else
-
-int pj_august_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=august +a=6400000 +lat_1=0 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- {223404.97818097242, 111722.34028976287},
- {223404.97818097242, -111722.34028976287},
- {-223404.97818097242, 111722.34028976287},
- {-223404.97818097242, -111722.34028976287},
- };
-
- return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-
-
-#endif