diff options
| author | Thomas Knudsen <thokn@sdfe.dk> | 2017-11-12 06:30:06 +0100 |
|---|---|---|
| committer | Thomas Knudsen <thokn@sdfe.dk> | 2017-11-12 06:30:06 +0100 |
| commit | 0a578911ee7158852eaf62cd9e0cedebf937dc3a (patch) | |
| tree | 3ff56a32f2518f8dcccd609aad3a21688aa7eed2 | |
| parent | 98dd8d5b6c0f24b8e2be1a8e77e4dfac72a2dc50 (diff) | |
| download | PROJ-0a578911ee7158852eaf62cd9e0cedebf937dc3a.tar.gz PROJ-0a578911ee7158852eaf62cd9e0cedebf937dc3a.zip | |
Remove selftests from projection files starting with r,s,t,u
| -rw-r--r-- | src/PJ_robin.c | 44 | ||||
| -rw-r--r-- | src/PJ_rpoly.c | 32 | ||||
| -rw-r--r-- | src/PJ_sch.c | 2 | ||||
| -rw-r--r-- | src/PJ_sconics.c | 477 | ||||
| -rw-r--r-- | src/PJ_somerc.c | 59 | ||||
| -rw-r--r-- | src/PJ_stere.c | 108 | ||||
| -rw-r--r-- | src/PJ_sterea.c | 59 | ||||
| -rw-r--r-- | src/PJ_sts.c | 236 | ||||
| -rw-r--r-- | src/PJ_tcc.c | 27 | ||||
| -rw-r--r-- | src/PJ_tcea.c | 43 | ||||
| -rw-r--r-- | src/PJ_times.c | 44 | ||||
| -rw-r--r-- | src/PJ_tmerc.c | 56 | ||||
| -rw-r--r-- | src/PJ_tpeqd.c | 57 | ||||
| -rw-r--r-- | src/PJ_urm5.c | 29 | ||||
| -rw-r--r-- | src/PJ_urmfps.c | 85 |
15 files changed, 28 insertions, 1330 deletions
diff --git a/src/PJ_robin.c b/src/PJ_robin.c index d3f92cd9..a9bac6ec 100644 --- a/src/PJ_robin.c +++ b/src/PJ_robin.c @@ -154,46 +154,4 @@ PJ *PROJECTION(robin) { } -#ifndef PJ_SELFTEST -int pj_robin_selftest (void) {return 0;} -#else - -int pj_robin_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char s_args[] = {"+proj=robin +a=6400000 +lat_1=0.5 +lat_2=2"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY s_fwd_expect[] = { - { 189588.423282507836, 107318.530350702888}, - { 189588.423282507836, -107318.530350702888}, - {-189588.423282507836, 107318.530350702888}, - {-189588.423282507836, -107318.530350702888}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP s_inv_expect[] = { - { 0.002109689065506131, 0.000931805533547745983}, - { 0.002109689065506131, -0.000931805533547745983}, - {-0.002109689065506131, 0.000931805533547745983}, - {-0.002109689065506131, -0.000931805533547745983}, - }; - - 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_robin_selftest (void) {return 10000;} diff --git a/src/PJ_rpoly.c b/src/PJ_rpoly.c index 8f7b16c6..36e5a63e 100644 --- a/src/PJ_rpoly.c +++ b/src/PJ_rpoly.c @@ -1,6 +1,6 @@ #define PJ_LIB__ #include <errno.h> -#include <projects.h> +#include "projects.h" struct pj_opaque { double phi1; @@ -53,32 +53,4 @@ PJ *PROJECTION(rpoly) { } -#ifndef PJ_SELFTEST -int pj_rpoly_selftest (void) {return 0;} -#else - -int pj_rpoly_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char s_args[] = {"+proj=rpoly +a=6400000 +lat_1=0.5 +lat_2=2"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY s_fwd_expect[] = { - { 223368.09830201423, 111769.110486991223}, - { 223368.09830201423, -111769.110486991223}, - {-223368.09830201423, 111769.110486991223}, - {-223368.09830201423, -111769.110486991223}, - }; - - 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_rpoly_selftest (void) {return 10000;} diff --git a/src/PJ_sch.c b/src/PJ_sch.c index cd4aa95e..4ea3404d 100644 --- a/src/PJ_sch.c +++ b/src/PJ_sch.c @@ -229,4 +229,4 @@ PJ *PROJECTION(sch) { /* Skipping sef-test since the test system is not capable of handling * 3D coordinate systems for the time being. Relying on tests in ../nad/ */ -int pj_sch_selftest (void) {return 0;} +int pj_sch_selftest (void) {return 10000;} diff --git a/src/PJ_sconics.c b/src/PJ_sconics.c index b434c430..1e00a17e 100644 --- a/src/PJ_sconics.c +++ b/src/PJ_sconics.c @@ -215,473 +215,10 @@ PJ *PROJECTION(vitk1) { } -#ifndef PJ_SELFTEST -int pj_euler_selftest (void) {return 0;} -#else - -int pj_euler_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char e_args[] = {"+proj=euler +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5"}; - char s_args[] = {"+proj=euler +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY e_fwd_expect[] = { - {222597.63465910763, 111404.24054991946}, - {222767.16563187627, -111234.6764910177}, - {-222597.63465910763, 111404.24054991946}, - {-222767.16563187627, -111234.6764910177}, - }; - - XY s_fwd_expect[] = { - {223360.65559869423, 111786.11238979101}, - {223530.76769031584, -111615.96709862351}, - {-223360.65559869423, 111786.11238979101}, - {-223530.76769031584, -111615.96709862351}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP e_inv_expect[] = { - {0.0017962807023075235, 0.0008983146697688839}, - {0.0017962794738334226, -0.00089831589842987965}, - {-0.0017962807023075235, 0.0008983146697688839}, - {-0.0017962794738334226, -0.00089831589842987965}, - }; - - LP s_inv_expect[] = { - {0.0017901444369360026, 0.00089524594522202015}, - {0.001790143216840731, -0.00089524716533368484}, - {-0.0017901444369360026, 0.00089524594522202015}, - {-0.001790143216840731, -0.00089524716533368484}, - }; - - 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_murd1_selftest (void) {return 0;} -#else - -int pj_murd1_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char e_args[] = {"+proj=murd1 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5"}; - char s_args[] = {"+proj=murd1 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY e_fwd_expect[] = { - {222600.81347355421, 111404.24418054636}, - {222770.3492878644, -111234.6728566746}, - {-222600.81347355421, 111404.24418054636}, - {-222770.3492878644, -111234.6728566746}, - }; - - XY s_fwd_expect[] = { - {223363.84530949194, 111786.11603286299}, - {223533.96225925098, -111615.96345182261}, - {-223363.84530949194, 111786.11603286299}, - {-223533.96225925098, -111615.96345182261}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP e_inv_expect[] = { - {0.0017962550410516366, 0.0008983146697688839}, - {0.0017962538125775522, -0.00089831589842987965}, - {-0.0017962550410516366, 0.0008983146697688839}, - {-0.0017962538125775522, -0.00089831589842987965}, - }; - - LP s_inv_expect[] = { - {0.0017901188633413715, 0.00089524594522202015}, - {0.0017901176432461162, -0.00089524716492657387}, - {-0.0017901188633413715, 0.00089524594522202015}, - {-0.0017901176432461162, -0.00089524716492657387}, - }; - - 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_murd2_selftest (void) {return 0;} -#else - -int pj_murd2_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char e_args[] = {"+proj=murd2 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5"}; - char s_args[] = {"+proj=murd2 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY e_fwd_expect[] = { - {222588.09975123021, 111426.14002741246}, - {222757.72626701824, -111341.43131750476}, - {-222588.09975123021, 111426.14002741246}, - {-222757.72626701824, -111341.43131750476}, - }; - - XY s_fwd_expect[] = { - {223351.08800702673, 111808.08693438848}, - {223521.2959691704, -111723.08785967289}, - {-223351.08800702673, 111808.08693438848}, - {-223521.2959691704, -111723.08785967289}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP e_inv_expect[] = { - {0.0017963574947305447, 0.00089788747830845382}, - {0.0017963562661689487, -0.00089788809264252983}, - {-0.0017963574947305447, 0.00089788747830845382}, - {-0.0017963562661689487, -0.00089788809264252983}, - }; - - LP s_inv_expect[] = { - {0.0017902209670287586, 0.00089482021163422854}, - {0.0017902197468465887, -0.00089482082161134206}, - {-0.0017902209670287586, 0.00089482021163422854}, - {-0.0017902197468465887, -0.00089482082161134206}, - }; - - 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_murd3_selftest (void) {return 0;} -#else - -int pj_murd3_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char e_args[] = {"+proj=murd3 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5"}; - char s_args[] = {"+proj=murd3 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY e_fwd_expect[] = { - {222600.81407757697, 111404.24660137216}, - {222770.35473389886, -111234.67043217793}, - {-222600.81407757697, 111404.24660137216}, - {-222770.35473389886, -111234.67043217793}, - }; - - XY s_fwd_expect[] = { - {223363.84591558515, 111786.11846198692}, - {223533.96772395336, -111615.96101901523}, - {-223363.84591558515, 111786.11846198692}, - {-223533.96772395336, -111615.96101901523}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP e_inv_expect[] = { - {0.0017962550166583809, 0.0008983146697688839}, - {0.0017962537881492445, -0.00089831589842987965}, - {-0.0017962550166583809, 0.0008983146697688839}, - {-0.0017962537881492445, -0.00089831589842987965}, - }; - - LP s_inv_expect[] = { - {0.0017901188390313859, 0.00089524594522202015}, - {0.0017901176189013177, -0.00089524716533368484}, - {-0.0017901188390313859, 0.00089524594522202015}, - {-0.0017901176189013177, -0.00089524716533368484}, - }; - - 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_pconic_selftest (void) {return 0;} -#else - -int pj_pconic_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char e_args[] = {"+proj=pconic +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5"}; - char s_args[] = {"+proj=pconic +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY e_fwd_expect[] = { - {222588.09884161691, 111416.60477006658}, - {222757.71809109033, -111331.88153107995}, - {-222588.09884161691, 111416.60477006658}, - {-222757.71809109033, -111331.88153107995}, - }; - - XY s_fwd_expect[] = { - {223351.08709429545, 111798.5189920546}, - {223521.28776521701, -111713.50533845725}, - {-223351.08709429545, 111798.5189920546}, - {-223521.28776521701, -111713.50533845725}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP e_inv_expect[] = { - {0.0017963575313784969, 0.0008979644089172499}, - {0.0017963563027642206, -0.00089796502355327969}, - {-0.0017963575313784969, 0.0008979644089172499}, - {-0.0017963563027642206, -0.00089796502355327969}, - }; - - LP s_inv_expect[] = { - {0.0017902210035514285, 0.0008948968793741558}, - {0.0017902197833169374, -0.00089489748965381963}, - {-0.0017902210035514285, 0.0008948968793741558}, - {-0.0017902197833169374, -0.00089489748965381963}, - }; - - 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_tissot_selftest (void) {return 0;} -#else - -int pj_tissot_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char e_args[] = {"+proj=tissot +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5"}; - char s_args[] = {"+proj=tissot +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY e_fwd_expect[] = { - {222641.07869963095, 54347.828487281469}, - {222810.61451394114, -168291.08854993948}, - {-222641.07869963095, 54347.828487281469}, - {-222810.61451394114, -168291.08854993948}, - }; - - XY s_fwd_expect[] = { - {223404.24855684943, 54534.122161157939}, - {223574.36550660848, -168867.95732352766}, - {-223404.24855684943, 54534.122161157939}, - {-223574.36550660848, -168867.95732352766}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP e_inv_expect[] = { - {0.0017962807107425871, 0.51344495513064536}, - {0.0017962794822333915, 0.51164832456244658}, - {-0.0017962807107425871, 0.51344495513064536}, - {-0.0017962794822333915, 0.51164832456244658}, - }; - - LP s_inv_expect[] = { - {0.0017901444453421915, 0.51344188640609856}, - {0.001790143225212064, 0.51165139329554277}, - {-0.0017901444453421915, 0.51344188640609856}, - {-0.001790143225212064, 0.51165139329554277}, - }; - - 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_vitk1_selftest (void) {return 0;} -#else - -int pj_vitk1_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char e_args[] = {"+proj=vitk1 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5"}; - char s_args[] = {"+proj=vitk1 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY e_fwd_expect[] = { - {222607.17121145778, 111404.25144243463}, - {222776.71670959776, -111234.66558744459}, - {-222607.17121145778, 111404.25144243463}, - {-222776.71670959776, -111234.66558744459}, - }; - - XY s_fwd_expect[] = { - {223370.22484047143, 111786.12331964359}, - {223540.3515072545, -111615.9561576751}, - {-223370.22484047143, 111786.12331964359}, - {-223540.3515072545, -111615.9561576751}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP e_inv_expect[] = { - {0.0017962037198570686, 0.0008983146697688839}, - {0.0017962024913830157, -0.00089831589842987965}, - {-0.0017962037198570686, 0.0008983146697688839}, - {-0.0017962024913830157, -0.00089831589842987965}, - }; - - LP s_inv_expect[] = { - {0.0017900677174648159, 0.00089524594522202015}, - {0.0017900664973695916, -0.00089524716533368484}, - {-0.0017900677174648159, 0.00089524594522202015}, - {-0.0017900664973695916, -0.00089524716533368484}, - }; - - 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_euler_selftest (void) {return 10000;} +int pj_murd1_selftest (void) {return 10000;} +int pj_murd2_selftest (void) {return 10000;} +int pj_murd3_selftest (void) {return 10000;} +int pj_pconic_selftest (void) {return 10000;} +int pj_tissot_selftest (void) {return 10000;} +int pj_vitk1_selftest (void) {return 10000;} diff --git a/src/PJ_somerc.c b/src/PJ_somerc.c index 7324d48a..69fb6d47 100644 --- a/src/PJ_somerc.c +++ b/src/PJ_somerc.c @@ -89,61 +89,4 @@ PJ *PROJECTION(somerc) { } -#ifndef PJ_SELFTEST -int pj_somerc_selftest (void) {return 0;} -#else - -int pj_somerc_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char e_args[] = {"+proj=somerc +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5"}; - char s_args[] = {"+proj=somerc +R=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY e_fwd_expect[] = { - {222638.98158654713, 110579.96521824898}, - {222638.98158654713, -110579.96521825089}, - {-222638.98158654713, 110579.96521824898}, - {-222638.98158654713, -110579.96521825089}, - }; - - XY s_fwd_expect[] = { - {223402.14425527418, 111706.74357494408}, - {223402.14425527418, -111706.74357494518}, - {-223402.14425527418, 111706.74357494408}, - {-223402.14425527418, -111706.74357494518}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP e_inv_expect[] = { - {0.0017966305682390426, 0.00090436947704129484}, - {0.0017966305682390426, -0.00090436947704377105}, - {-0.0017966305682390426, 0.00090436947704129484}, - {-0.0017966305682390426, -0.00090436947704377105}, - }; - - LP s_inv_expect[] = { - {0.0017904931097838226, 0.00089524655485801927}, - {0.0017904931097838226, -0.00089524655484529714}, - {-0.0017904931097838226, 0.00089524655485801927}, - {-0.0017904931097838226, -0.00089524655484529714}, - }; - - 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_somerc_selftest (void) {return 10000;} diff --git a/src/PJ_stere.c b/src/PJ_stere.c index 500b512d..82d83061 100644 --- a/src/PJ_stere.c +++ b/src/PJ_stere.c @@ -314,109 +314,5 @@ PJ *PROJECTION(ups) { } -#ifndef PJ_SELFTEST -int pj_stere_selftest (void) {return 0;} -#else - -int pj_stere_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char e_args[] = {"+proj=stere +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5"}; - char s_args[] = {"+proj=stere +R=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY e_fwd_expect[] = { - { 222644.8545501172, 110610.8834741739}, - { 222644.8545501172, -110610.8834741739}, - {-222644.8545501172, 110610.8834741739}, - {-222644.8545501172, -110610.8834741739}, - }; - - XY s_fwd_expect[] = { - { 223407.81025950745, 111737.938996443}, - { 223407.81025950745, -111737.938996443}, - {-223407.81025950745, 111737.938996443}, - {-223407.81025950745, -111737.938996443}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP e_inv_expect[] = { - { 0.0017966305682022392, 0.00090436947502443507}, - { 0.0017966305682022392, -0.00090436947502443507}, - {-0.0017966305682022392, 0.00090436947502443507}, - {-0.0017966305682022392, -0.00090436947502443507}, - }; - - LP s_inv_expect[] = { - { 0.001790493109747395, 0.00089524655465513144}, - { 0.001790493109747395, -0.00089524655465513144}, - {-0.001790493109747395, 0.00089524655465513144}, - {-0.001790493109747395, -0.00089524655465513144}, - }; - - 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_ups_selftest (void) {return 0;} -#else - -int pj_ups_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char e_args[] = {"+proj=ups +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY e_fwd_expect[] = { - {2433455.5634384668, -10412543.301512826}, - {2448749.1185681992, -10850493.419804076}, - {1566544.4365615332, -10412543.301512826}, - {1551250.8814318008, -10850493.419804076}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP e_inv_expect[] = { - {-44.998567498074834, 64.9182362867341}, - {-44.995702709112308, 64.917020250675748}, - {-45.004297076028529, 64.915804280954518}, - {-45.001432287066002, 64.914588377560719}, - }; - - 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_stere_selftest (void) {return 10000;} +int pj_ups_selftest (void) {return 10000;} diff --git a/src/PJ_sterea.c b/src/PJ_sterea.c index e0ff15e7..8a73f453 100644 --- a/src/PJ_sterea.c +++ b/src/PJ_sterea.c @@ -115,61 +115,4 @@ PJ *PROJECTION(sterea) { } -#ifndef PJ_SELFTEST -int pj_sterea_selftest (void) {return 0;} -#else - -int pj_sterea_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char e_args[] = {"+proj=sterea +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5"}; - char s_args[] = {"+proj=sterea +R=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY e_fwd_expect[] = { - { 222644.89410919772, 110611.09187173686}, - { 222644.89410919772, -110611.09187173827}, - {-222644.89410919772, 110611.09187173686}, - {-222644.89410919772, -110611.09187173827}, - }; - - XY s_fwd_expect[] = { - { 223407.81025950745, 111737.93899644315}, - { 223407.81025950745, -111737.93899644315}, - {-223407.81025950745, 111737.93899644315}, - {-223407.81025950745, -111737.93899644315}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP e_inv_expect[] = { - { 0.0017966305682019911, 0.00090436947683099009}, - { 0.0017966305682019911, -0.00090436947684371233}, - {-0.0017966305682019911, 0.00090436947683099009}, - {-0.0017966305682019911, -0.00090436947684371233}, - }; - - LP s_inv_expect[] = { - { 0.001790493109747395, 0.00089524655465446378}, - { 0.001790493109747395, -0.00089524655465446378}, - {-0.001790493109747395, 0.00089524655465446378}, - {-0.001790493109747395, -0.00089524655465446378}, - }; - - 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_sterea_selftest (void) {return 10000;} diff --git a/src/PJ_sts.c b/src/PJ_sts.c index 3e6168bd..0349e67b 100644 --- a/src/PJ_sts.c +++ b/src/PJ_sts.c @@ -64,8 +64,6 @@ static PJ *setup(PJ *P, double p, double q, int mode) { - - PJ *PROJECTION(fouc) { struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque)); if (0==Q) @@ -75,66 +73,6 @@ PJ *PROJECTION(fouc) { } -#ifndef PJ_SELFTEST -int pj_fouc_selftest (void) {return 0;} -#else -int pj_fouc_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char e_args[] = {"+proj=fouc +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5"}; - char s_args[] = {"+proj=fouc +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY e_fwd_expect[] = { - {222588.12067589167, 111322.31670069379}, - {222588.12067589167, -111322.31670069379}, - {-222588.12067589167, 111322.31670069379}, - {-222588.12067589167, -111322.31670069379}, - }; - - XY s_fwd_expect[] = { - {223351.10900341379, 111703.9077217125}, - {223351.10900341379, -111703.9077217125}, - {-223351.10900341379, 111703.9077217125}, - {-223351.10900341379, -111703.9077217125}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP e_inv_expect[] = { - {0.0017966305685702751, 0.00089831528410111959}, - {0.0017966305685702751, -0.00089831528410111959}, - {-0.0017966305685702751, 0.00089831528410111959}, - {-0.0017966305685702751, -0.00089831528410111959}, - }; - - LP s_inv_expect[] = { - {0.0017904931101116717, 0.00089524655487369749}, - {0.0017904931101116717, -0.00089524655487369749}, - {-0.0017904931101116717, 0.00089524655487369749}, - {-0.0017904931101116717, -0.00089524655487369749}, - }; - - 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 - - - - - PJ *PROJECTION(kav5) { struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque)); @@ -146,65 +84,6 @@ PJ *PROJECTION(kav5) { } -#ifndef PJ_SELFTEST -int pj_kav5_selftest (void) {return 0;} -#else -int pj_kav5_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char e_args[] = {"+proj=kav5 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5"}; - char s_args[] = {"+proj=kav5 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY e_fwd_expect[] = { - {200360.90530882866, 123685.08247699818}, - {200360.90530882866, -123685.08247699818}, - {-200360.90530882866, 123685.08247699818}, - {-200360.90530882866, -123685.08247699818}, - }; - - XY s_fwd_expect[] = { - {201047.7031108776, 124109.05062917093}, - {201047.7031108776, -124109.05062917093}, - {-201047.7031108776, 124109.05062917093}, - {-201047.7031108776, -124109.05062917093}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP e_inv_expect[] = { - {0.0019962591348533314, 0.00080848256185253912}, - {0.0019962591348533314, -0.00080848256185253912}, - {-0.0019962591348533314, 0.00080848256185253912}, - {-0.0019962591348533314, -0.00080848256185253912}, - }; - - LP s_inv_expect[] = { - {0.0019894397264987643, 0.00080572070962591153}, - {0.0019894397264987643, -0.00080572070962591153}, - {-0.0019894397264987643, 0.00080572070962591153}, - {-0.0019894397264987643, -0.00080572070962591153}, - }; - - 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 - - - - PJ *PROJECTION(qua_aut) { struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque)); @@ -214,64 +93,6 @@ PJ *PROJECTION(qua_aut) { return setup(P, 2., 2., 0); } -#ifndef PJ_SELFTEST -int pj_qua_aut_selftest (void) {return 0;} -#else -int pj_qua_aut_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char e_args[] = {"+proj=qua_aut +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5"}; - char s_args[] = {"+proj=qua_aut +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY e_fwd_expect[] = { - {222613.54903309655, 111318.07788798446}, - {222613.54903309655, -111318.07788798446}, - {-222613.54903309655, 111318.07788798446}, - {-222613.54903309655, -111318.07788798446}, - }; - - XY s_fwd_expect[] = { - {223376.62452402918, 111699.65437918637}, - {223376.62452402918, -111699.65437918637}, - {-223376.62452402918, 111699.65437918637}, - {-223376.62452402918, -111699.65437918637}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP e_inv_expect[] = { - {0.0017966305684046586, 0.00089831528412872229}, - {0.0017966305684046586, -0.00089831528412872229}, - {-0.0017966305684046586, 0.00089831528412872229}, - {-0.0017966305684046586, -0.00089831528412872229}, - }; - - LP s_inv_expect[] = { - {0.0017904931099477471, 0.00089524655490101819}, - {0.0017904931099477471, -0.00089524655490101819}, - {-0.0017904931099477471, 0.00089524655490101819}, - {-0.0017904931099477471, -0.00089524655490101819}, - }; - - 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 - - - PJ *PROJECTION(mbt_s) { @@ -282,58 +103,9 @@ PJ *PROJECTION(mbt_s) { return setup(P, 1.48875, 1.36509, 0); } -#ifndef PJ_SELFTEST -int pj_mbt_s_selftest (void) {return 0;} -#else -int pj_mbt_s_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char e_args[] = {"+proj=mbt_s +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5"}; - char s_args[] = {"+proj=mbt_s +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - XY e_fwd_expect[] = { - {204131.51785027285, 121400.33022550763}, - {204131.51785027285, -121400.33022550763}, - {-204131.51785027285, 121400.33022550763}, - {-204131.51785027285, -121400.33022550763}, - }; - - XY s_fwd_expect[] = { - {204831.24057099217, 121816.46669603503}, - {204831.24057099217, -121816.46669603503}, - {-204831.24057099217, 121816.46669603503}, - {-204831.24057099217, -121816.46669603503}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP e_inv_expect[] = { - {0.0019593827209883237, 0.00082369854658027549}, - {0.0019593827209883237, -0.00082369854658027549}, - {-0.0019593827209883237, 0.00082369854658027549}, - {-0.0019593827209883237, -0.00082369854658027549}, - }; - - LP s_inv_expect[] = { - {0.0019526892859206603, 0.00082088471512331508}, - {0.0019526892859206603, -0.00082088471512331508}, - {-0.0019526892859206603, 0.00082088471512331508}, - {-0.0019526892859206603, -0.00082088471512331508}, - }; - - 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_fouc_selftest (void) {return 10000;} +int pj_kav5_selftest (void) {return 10000;} +int pj_qua_aut_selftest (void) {return 10000;} +int pj_mbt_s_selftest (void) {return 10000;} diff --git a/src/PJ_tcc.c b/src/PJ_tcc.c index 26cf67b6..37211fdd 100644 --- a/src/PJ_tcc.c +++ b/src/PJ_tcc.c @@ -31,29 +31,4 @@ PJ *PROJECTION(tcc) { } -#ifndef PJ_SELFTEST -int pj_tcc_selftest (void) {return 0;} -#else -int pj_tcc_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char s_args[] = {"+proj=tcc +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY s_fwd_expect[] = { - {223458.84419245756, 111769.14504058579}, - {223458.84419245756, -111769.14504058579}, - {-223458.84419245756, 111769.14504058579}, - {-223458.84419245756, -111769.14504058579}, - }; - - 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_tcc_selftest (void) {return 10000;} diff --git a/src/PJ_tcea.c b/src/PJ_tcea.c index 65b3c604..76249827 100644 --- a/src/PJ_tcea.c +++ b/src/PJ_tcea.c @@ -1,5 +1,5 @@ #define PJ_LIB__ -#include <projects.h> +#include "projects.h" PROJ_HEAD(tcea, "Transverse Cylindrical Equal Area") "\n\tCyl, Sph"; @@ -33,43 +33,4 @@ PJ *PROJECTION(tcea) { } -#ifndef PJ_SELFTEST -int pj_tcea_selftest (void) {return 0;} -#else -int pj_tcea_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char s_args[] = {"+proj=tcea +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY s_fwd_expect[] = { - { 223322.76057672748, 111769.14504058579}, - { 223322.76057672748, -111769.14504058579}, - {-223322.76057672748, 111769.14504058579}, - {-223322.76057672748, -111769.14504058579}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP s_inv_expect[] = { - { 0.0017904931102938101, 0.00089524655445477922}, - { 0.0017904931102938101, -0.00089524655445477922}, - {-0.0017904931102938101, 0.00089524655445477922}, - {-0.0017904931102938101, -0.00089524655445477922}, - }; - - 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_tcea_selftest (void) {return 10000;} diff --git a/src/PJ_times.c b/src/PJ_times.c index a8d6e67a..696c9fd5 100644 --- a/src/PJ_times.c +++ b/src/PJ_times.c @@ -76,46 +76,4 @@ PJ *PROJECTION(times) { } -#ifndef PJ_SELFTEST -int pj_times_selftest (void) {return 0;} -#else - -int pj_times_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - int result; - int n = 5; - - char s_args[] = {"+proj=times +ellps=sphere"}; - - XY *inv_in = malloc(n*sizeof(XY)); - LP *s_inv_expect = malloc(n*sizeof(LP)); - - LP fwd_in[] = { - { 0, 0}, - { 80, 70}, - { 25, -10}, - {-35, 20}, - {-45, -30} - }; - - XY s_fwd_expect[] = { - { 0.0, 0.0}, - { 5785183.5760670956, 7615452.0661204215}, - { 2065971.5301078814, -951526.0648494592}, - {-2873054.0454850947, 1917730.9530005211}, - {-3651383.2035214868, -2914213.4578159209}, - }; - - memcpy(inv_in, &s_fwd_expect, n*sizeof(XY)); - memcpy(s_inv_expect, &fwd_in, n*sizeof(LP)); - - result = pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, n, n, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect); - free(inv_in); - free(s_inv_expect); - - return result; -} - - -#endif +int pj_times_selftest (void) {return 10000;} diff --git a/src/PJ_tmerc.c b/src/PJ_tmerc.c index b3ec0030..2aa189fd 100644 --- a/src/PJ_tmerc.c +++ b/src/PJ_tmerc.c @@ -205,58 +205,4 @@ PJ *PROJECTION(tmerc) { } -#ifndef PJ_SELFTEST -int pj_tmerc_selftest (void) {return 0;} -#else -int pj_tmerc_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char e_args[] = {"+proj=tmerc +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5"}; - char s_args[] = {"+proj=tmerc +R=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY e_fwd_expect[] = { - { 222650.79679577847, 110642.22941192707}, - { 222650.79679577847, -110642.22941192707}, - {-222650.79679577847, 110642.22941192707}, - {-222650.79679577847, -110642.22941192707}, - }; - - XY s_fwd_expect[] = { - { 223413.46640632232, 111769.14504059685}, - { 223413.46640632232, -111769.14504059685}, - {-223413.46640632208, 111769.14504059685}, - {-223413.46640632208, -111769.14504059685}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP e_inv_expect[] = { - { 0.0017966305681649396, 0.00090436947663183841}, - { 0.0017966305681649396, -0.00090436947663183841}, - {-0.0017966305681649396, 0.00090436947663183841}, - {-0.0017966305681649396, -0.00090436947663183841}, - }; - - LP s_inv_expect[] = { - { 0.0017904931097048034, 0.00089524670602767842}, - { 0.0017904931097048034, -0.00089524670602767842}, - {-0.001790493109714345, 0.00089524670602767842}, - {-0.001790493109714345, -0.00089524670602767842}, - }; - - 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_tmerc_selftest (void) {return 10000;} diff --git a/src/PJ_tpeqd.c b/src/PJ_tpeqd.c index 6bea3968..dd19da8c 100644 --- a/src/PJ_tpeqd.c +++ b/src/PJ_tpeqd.c @@ -105,61 +105,4 @@ PJ *PROJECTION(tpeqd) { } -#ifndef PJ_SELFTEST int pj_tpeqd_selftest (void) {return 0;} -#else - -int pj_tpeqd_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char e_args[] = {"+proj=tpeqd +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5"}; - char s_args[] = {"+proj=tpeqd +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY e_fwd_expect[] = { - {-27750.758831679042, -222599.40369177726}, - {-250434.93702403645, -222655.93819326628}, - {-27750.758831679042, 222599.40369177726}, - {-250434.93702403645, 222655.93819326628}, - }; - - XY s_fwd_expect[] = { - {-27845.882978485075, -223362.43069526015}, - {-251293.37876465076, -223419.15898590829}, - {-27845.882978485075, 223362.43069526015}, - {-251293.37876465076, 223419.15898590829}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP e_inv_expect[] = { - {-0.00089855554821257374, 1.2517966304145272}, - {0.0008985555481998515, 1.2517966304145272}, - {-0.00089855431859741167, 1.2482033692781642}, - {0.00089855431859741167, 1.2482033692781642}, - }; - - LP s_inv_expect[] = { - {-0.00089548606640108474, 1.2517904929571837}, - {0.0008954860663883625, 1.2517904929571837}, - {-0.000895484845182587, 1.248209506737604}, - {0.00089548484516986475, 1.248209506737604}, - }; - - 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_urm5.c b/src/PJ_urm5.c index bd073459..e90cc9ee 100644 --- a/src/PJ_urm5.c +++ b/src/PJ_urm5.c @@ -29,7 +29,7 @@ PJ *PROJECTION(urm5) { if (0==Q) return pj_default_destructor(P, ENOMEM); P->opaque = Q; - + if (pj_param(P->ctx, P->params, "tn").i) { Q->n = pj_param(P->ctx, P->params, "dn").f; if (Q->n <= 0. || Q->n > 1.) @@ -51,29 +51,4 @@ PJ *PROJECTION(urm5) { } -#ifndef PJ_SELFTEST -int pj_urm5_selftest (void) {return 0;} -#else -int pj_urm5_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char s_args[] = {"+proj=urm5 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY s_fwd_expect[] = { - { 223393.6384339639, 111696.81878511712}, - { 223393.6384339639, -111696.81878511712}, - {-223393.6384339639, 111696.81878511712}, - {-223393.6384339639, -111696.81878511712}, - }; - - 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_urm5_selftest (void) {return 10000;} diff --git a/src/PJ_urmfps.c b/src/PJ_urmfps.c index 64eb5c80..04ee8296 100644 --- a/src/PJ_urmfps.c +++ b/src/PJ_urmfps.c @@ -71,86 +71,5 @@ PJ *PROJECTION(wag1) { } -#ifndef PJ_SELFTEST -int pj_urmfps_selftest (void) {return 0;} -#else -int pj_urmfps_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char s_args[] = {"+proj=urmfps +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY s_fwd_expect[] = { - { 196001.70813419219, 127306.84332999329}, - { 196001.70813419219, -127306.84332999329}, - {-196001.70813419219, 127306.84332999329}, - {-196001.70813419219, -127306.84332999329}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP s_inv_expect[] = { - { 0.002040720839642371, 0.00078547381740438178}, - { 0.002040720839642371, -0.00078547381740438178}, - {-0.002040720839642371, 0.00078547381740438178}, - {-0.002040720839642371, -0.00078547381740438178}, - }; - - 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_wag1_selftest (void) {return 0;} -#else -int pj_wag1_selftest (void) { - double tolerance_lp = 1e-10; - double tolerance_xy = 1e-7; - - char s_args[] = {"+proj=wag1 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5"}; - - LP fwd_in[] = { - { 2, 1}, - { 2,-1}, - {-2, 1}, - {-2,-1} - }; - - XY s_fwd_expect[] = { - { 195986.78156115755, 127310.07506065986}, - { 195986.78156115755, -127310.07506065986}, - {-195986.78156115755, 127310.07506065986}, - {-195986.78156115755, -127310.07506065986}, - }; - - XY inv_in[] = { - { 200, 100}, - { 200,-100}, - {-200, 100}, - {-200,-100} - }; - - LP s_inv_expect[] = { - { 0.002040720839738254, 0.00078547381739207999}, - { 0.002040720839738254, -0.00078547381739207999}, - {-0.002040720839738254, 0.00078547381739207999}, - {-0.002040720839738254, -0.00078547381739207999}, - }; - - 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_urmfps_selftest (void) {return 10000;} +int pj_wag1_selftest (void) {return 10000;} |
