aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Knudsen <thokn@sdfe.dk>2017-11-12 06:05:22 +0100
committerThomas Knudsen <thokn@sdfe.dk>2017-11-12 06:05:22 +0100
commit4498951c4e5169e922b1640cfec7b3fd9e9c47ca (patch)
tree47c5f86ac8d2054c2fcd7c337b1c392c5de81afd
parent98dd8d5b6c0f24b8e2be1a8e77e4dfac72a2dc50 (diff)
downloadPROJ-4498951c4e5169e922b1640cfec7b3fd9e9c47ca.tar.gz
PROJ-4498951c4e5169e922b1640cfec7b3fd9e9c47ca.zip
Remove selftests from projection files starting with n,o,p,q
-rw-r--r--src/PJ_natearth.c44
-rw-r--r--src/PJ_natearth2.c44
-rw-r--r--src/PJ_nell.c44
-rw-r--r--src/PJ_nell_h.c44
-rw-r--r--src/PJ_nocol.c31
-rw-r--r--src/PJ_nsper.c44
-rw-r--r--src/PJ_nzmg.c44
-rw-r--r--src/PJ_ob_tran.c34
-rw-r--r--src/PJ_ocea.c44
-rw-r--r--src/PJ_oea.c44
-rw-r--r--src/PJ_omerc.c44
-rw-r--r--src/PJ_ortho.c44
-rw-r--r--src/PJ_patterson.c44
-rw-r--r--src/PJ_poly.c59
-rw-r--r--src/PJ_putp2.c46
-rw-r--r--src/PJ_putp3.c92
-rw-r--r--src/PJ_putp4p.c92
-rw-r--r--src/PJ_putp5.c88
-rw-r--r--src/PJ_putp6.c88
-rw-r--r--src/PJ_qsc.c59
20 files changed, 26 insertions, 1047 deletions
diff --git a/src/PJ_natearth.c b/src/PJ_natearth.c
index 9c40f3da..2395ebb5 100644
--- a/src/PJ_natearth.c
+++ b/src/PJ_natearth.c
@@ -96,46 +96,4 @@ PJ *PROJECTION(natearth) {
return P;
}
-#ifndef PJ_SELFTEST
-int pj_natearth_selftest (void) {return 0;}
-#else
-
-int pj_natearth_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=natearth +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 194507.265257889288, 112508.737358294515},
- { 194507.265257889288, -112508.737358294515},
- {-194507.265257889288, 112508.737358294515},
- {-194507.265257889288, -112508.737358294515},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.00205638349586440223, 0.000888823913291242177},
- { 0.00205638349586440223, -0.000888823913291242177},
- {-0.00205638349586440223, 0.000888823913291242177},
- {-0.00205638349586440223, -0.000888823913291242177},
- };
-
- 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_natearth_selftest (void) {return 10000;}
diff --git a/src/PJ_natearth2.c b/src/PJ_natearth2.c
index 95bb8646..162fd768 100644
--- a/src/PJ_natearth2.c
+++ b/src/PJ_natearth2.c
@@ -93,46 +93,4 @@ PJ *PROJECTION(natearth2) {
return P;
}
-#ifndef PJ_SELFTEST
-int pj_natearth2_selftest (void) {return 0;}
-#else
-
-int pj_natearth2_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=natearth2 +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 189255.172934730799, 113022.495810907014},
- { 189255.172934730799, -113022.495810907014},
- {-189255.172934730799, 113022.495810907014},
- {-189255.172934730799, -113022.495810907014},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.00211344929691056112, 0.000884779612080993237},
- { 0.00211344929691056112, -0.000884779612080993237},
- {-0.00211344929691056112, 0.000884779612080993237},
- {-0.00211344929691056112, -0.000884779612080993237},
- };
-
- 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_natearth2_selftest (void) {return 10000;}
diff --git a/src/PJ_nell.c b/src/PJ_nell.c
index ac071fc9..c4d65b88 100644
--- a/src/PJ_nell.c
+++ b/src/PJ_nell.c
@@ -47,46 +47,4 @@ PJ *PROJECTION(nell) {
return P;
}
-#ifndef PJ_SELFTEST
-int pj_nell_selftest (void) {return 0;}
-#else
-
-int pj_nell_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=nell +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 223385.132504695706, 111698.23644718733},
- { 223385.132504695706, -111698.23644718733},
- {-223385.132504695706, 111698.23644718733},
- {-223385.132504695706, -111698.23644718733},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.00179049310989310567, 0.000895246554910125161},
- { 0.00179049310989310567, -0.000895246554910125161},
- {-0.00179049310989310567, 0.000895246554910125161},
- {-0.00179049310989310567, -0.000895246554910125161},
- };
-
- 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_nell_selftest (void) {return 10000;}
diff --git a/src/PJ_nell_h.c b/src/PJ_nell_h.c
index fe9a75c6..ebc8be90 100644
--- a/src/PJ_nell_h.c
+++ b/src/PJ_nell_h.c
@@ -50,46 +50,4 @@ PJ *PROJECTION(nell_h) {
}
-#ifndef PJ_SELFTEST
-int pj_nell_h_selftest (void) {return 0;}
-#else
-
-int pj_nell_h_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=nell_h +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 223385.131640952837, 111698.236533561678},
- { 223385.131640952837, -111698.236533561678},
- {-223385.131640952837, 111698.236533561678},
- {-223385.131640952837, -111698.236533561678},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.00179049310989310567, 0.000895246554910125378},
- { 0.00179049310989310567, -0.000895246554910125378},
- {-0.00179049310989310567, 0.000895246554910125378},
- {-0.00179049310989310567, -0.000895246554910125378},
- };
-
- 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_nell_h_selftest (void) {return 10000;}
diff --git a/src/PJ_nocol.c b/src/PJ_nocol.c
index 934ba7ab..aed5c382 100644
--- a/src/PJ_nocol.c
+++ b/src/PJ_nocol.c
@@ -50,33 +50,4 @@ PJ *PROJECTION(nicol) {
return P;
}
-
-#ifndef PJ_SELFTEST
-int pj_nicol_selftest (void) {return 0;}
-#else
-
-int pj_nicol_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=nicol +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 223374.561814139714, 111732.553988545071},
- { 223374.561814139714, -111732.553988545071},
- {-223374.561814139714, 111732.553988545071},
- {-223374.561814139714, -111732.553988545071},
- };
-
- 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_nicol_selftest (void) {return 10000;}
diff --git a/src/PJ_nsper.c b/src/PJ_nsper.c
index 6c8ef74a..b83b807b 100644
--- a/src/PJ_nsper.c
+++ b/src/PJ_nsper.c
@@ -241,46 +241,4 @@ int pj_nsper_selftest (void) {
#endif
-#ifndef PJ_SELFTEST
-int pj_tpers_selftest (void) {return 0;}
-#else
-
-int pj_tpers_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=tpers +a=6400000 +h=1000000 +azi=20"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 170820.288955531199, 180460.865555804776},
- { 246853.941538942483, -28439.8780357754222},
- {-246853.941538942483, 28439.8780357754222},
- {-170820.288955531199, -180460.865555804776}
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.00198870552603137678, 0.000228871872278689991},
- { 0.00137632081376749859, -0.00145364129728205432},
- {-0.00137632081376749859, 0.00145364129728205432},
- {-0.00198870552603137678, -0.000228871872278689991},
- };
-
- 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_tpers_selftest (void) {return 10000;}
diff --git a/src/PJ_nzmg.c b/src/PJ_nzmg.c
index b489e32f..04128cfb 100644
--- a/src/PJ_nzmg.c
+++ b/src/PJ_nzmg.c
@@ -119,46 +119,4 @@ PJ *PROJECTION(nzmg) {
}
-#ifndef PJ_SELFTEST
-int pj_nzmg_selftest (void) {return 0;}
-#else
-
-int pj_nzmg_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char e_args[] = {"+proj=nzmg +ellps=GRS80 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY e_fwd_expect[] = {
- {3352675144.74742508, -7043205391.10024357},
- {3691989502.77930641, -6729069415.33210468},
- {4099000768.45323849, -7863208779.66724873},
- {4466166927.36997604, -7502531736.62860489},
- };
-
- XY inv_in[] = {
- { 200000, 100000},
- { 200000,-100000},
- {-200000, 100000},
- {-200000,-100000}
- };
-
- LP e_inv_expect[] = {
- {175.48208682711271, -69.4226921826331846},
- {175.756819472543611, -69.5335710883796168},
- {134.605119233460016, -61.4599957106629091},
- {134.333684315954827, -61.6215536756024349},
- };
-
- 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_nzmg_selftest (void) {return 10000;}
diff --git a/src/PJ_ob_tran.c b/src/PJ_ob_tran.c
index 4f064809..4e71165a 100644
--- a/src/PJ_ob_tran.c
+++ b/src/PJ_ob_tran.c
@@ -243,42 +243,10 @@ int pj_ob_tran_selftest (void) {return 0;}
#else
int pj_ob_tran_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
double d;
PJ *P;
PJ_COORD a, b;
- char s_args[] = {"+proj=ob_tran +R=6400000 +o_proj=latlon +o_lon_p=20 +o_lat_p=20 +lon_0=180"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- {-2.6856872138416592, 1.2374302350496296},
- {-2.6954069748943286, 1.2026833954513816},
- {-2.8993663925401947, 1.2374302350496296},
- {-2.8896466314875244, 1.2026833954513816},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 121.5518748407577, -2.5361001573966084},
- { 63.261184340201858, 17.585319578673531},
- {-141.10073322351622, 26.091712304855108},
- {-65.862385598848391, 51.830295078417215},
- };
-
/* -- Tests from nad/testvarious -------------------------------------------- */
P = proj_create (0, "+proj=ob_tran +o_proj=moll +R=6378137.0 +o_lon_p=0 +o_lat_p=0 +lon_0=180");
if (0==P)
@@ -303,7 +271,7 @@ int pj_ob_tran_selftest (void) {
/* -------------------------------------------------------------------------- */
- 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);
+ return 0;
}
#endif \ No newline at end of file
diff --git a/src/PJ_ocea.c b/src/PJ_ocea.c
index d3fe9fe7..b4b6d68c 100644
--- a/src/PJ_ocea.c
+++ b/src/PJ_ocea.c
@@ -97,46 +97,4 @@ PJ *PROJECTION(ocea) {
}
-#ifndef PJ_SELFTEST
-int pj_ocea_selftest (void) {return 0;}
-#else
-
-int pj_ocea_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=ocea +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- {19994423.837934087962, 223322.760576727800},
- {20217962.128015257418, 223322.760576729401},
- {19994423.837934091687, -223322.760576726549},
- {20217962.128015264869, -223322.760576724948},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 179.999104753445, 0.001790493110},
- {-179.999104753445, 0.001790493110},
- { 179.999104753445, -0.001790493110},
- {-179.999104753445, -0.001790493110},
- };
-
- 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_ocea_selftest (void) {return 10000;}
diff --git a/src/PJ_oea.c b/src/PJ_oea.c
index 800a266e..aeef87c0 100644
--- a/src/PJ_oea.c
+++ b/src/PJ_oea.c
@@ -83,46 +83,4 @@ PJ *PROJECTION(oea) {
}
-#ifndef PJ_SELFTEST
-int pj_oea_selftest (void) {return 0;}
-#else
-
-int pj_oea_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=oea +a=6400000 +lat_1=0.5 +lat_2=2 +n=1 +m=2 +theta=3"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 228926.872097864107, 99870.4884300760023},
- { 217242.584036940476, -123247.885607474513},
- {-217242.584036940476, 123247.885607474556},
- {-228926.872097864078, -99870.4884300760168},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.0017411857167771369, 0.000987726819566195693},
- { 0.00183489288577854998, -0.000800312481495174641},
- {-0.00183489288577854954, 0.000800312481495174966},
- {-0.00174118571677713712, -0.000987726819566195043},
- };
-
- 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_oea_selftest (void) {return 10000;}
diff --git a/src/PJ_omerc.c b/src/PJ_omerc.c
index f0b4b439..b29033eb 100644
--- a/src/PJ_omerc.c
+++ b/src/PJ_omerc.c
@@ -224,46 +224,4 @@ PJ *PROJECTION(omerc) {
}
-#ifndef PJ_SELFTEST
-int pj_omerc_selftest (void) {return 0;}
-#else
-
-int pj_omerc_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char e_args[] = {"+proj=omerc +ellps=GRS80 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY e_fwd_expect[] = {
- { 222650.796885261341, 110642.229314983808},
- { 222650.796885261341, -110642.229314983808},
- {-222650.796885261545, 110642.229314983808},
- {-222650.796885261545, -110642.229314983808},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP e_inv_expect[] = {
- { 0.00179663056816996357, 0.000904369474808157338},
- { 0.00179663056816996357, -0.000904369474820879583},
- {-0.0017966305681604536, 0.000904369474808157338},
- {-0.0017966305681604536, -0.000904369474820879583},
- };
-
- 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_omerc_selftest (void) {return 10000;}
diff --git a/src/PJ_ortho.c b/src/PJ_ortho.c
index 14e228f7..a497b160 100644
--- a/src/PJ_ortho.c
+++ b/src/PJ_ortho.c
@@ -131,46 +131,4 @@ PJ *PROJECTION(ortho) {
}
-#ifndef PJ_SELFTEST
-int pj_ortho_selftest (void) {return 0;}
-#else
-
-int pj_ortho_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=ortho +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 223322.76057672748, 111695.401198614476},
- { 223322.76057672748, -111695.401198614476},
- {-223322.76057672748, 111695.401198614476},
- {-223322.76057672748, -111695.401198614476},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.0017904931102938101, 0.000895246554928338998},
- { 0.0017904931102938101, -0.000895246554928338998},
- {-0.0017904931102938101, 0.000895246554928338998},
- {-0.0017904931102938101, -0.000895246554928338998},
- };
-
- 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_ortho_selftest (void) {return 10000;}
diff --git a/src/PJ_patterson.c b/src/PJ_patterson.c
index 40b90010..9f9e3e39 100644
--- a/src/PJ_patterson.c
+++ b/src/PJ_patterson.c
@@ -114,46 +114,4 @@ PJ *PROJECTION(patterson) {
}
-#ifndef PJ_SELFTEST
-int pj_patterson_selftest (void) {return 0;}
-#else
-
-int pj_patterson_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=patterson +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- {223402.144255274179, 113354.250397779804},
- {223402.144255274179, -113354.250397779804},
- {-223402.144255274179, 113354.250397779804},
- {-223402.144255274179, -113354.250397779804},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- {0.00179049310978382265, 0.000882190140807953657},
- {0.00179049310978382265, -0.000882190140807953657},
- {-0.00179049310978382265, 0.000882190140807953657},
- {-0.00179049310978382265, -0.000882190140807953657},
- };
-
- 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_patterson_selftest (void) {return 10000;}
diff --git a/src/PJ_poly.c b/src/PJ_poly.c
index 209669c0..d748be09 100644
--- a/src/PJ_poly.c
+++ b/src/PJ_poly.c
@@ -165,61 +165,4 @@ PJ *PROJECTION(poly) {
}
-#ifndef PJ_SELFTEST
-int pj_poly_selftest (void) {return 0;}
-#else
-
-int pj_poly_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char e_args[] = {"+proj=poly +ellps=GRS80 +lat_1=0.5 +lat_2=2"};
- char s_args[] = {"+proj=poly +R=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY e_fwd_expect[] = {
- { 222605.285770237475, 110642.194561440483},
- { 222605.285770237475, -110642.194561440483},
- {-222605.285770237475, 110642.194561440483},
- {-222605.285770237475, -110642.194561440483},
- };
-
- XY s_fwd_expect[] = {
- { 223368.105210218986, 111769.110491224754},
- { 223368.105210218986, -111769.110491224754},
- {-223368.105210218986, 111769.110491224754},
- {-223368.105210218986, -111769.110491224754},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP e_inv_expect[] = {
- { 0.00179663056846135222, 0.000904369476631838518},
- { 0.00179663056846135222, -0.000904369476631838518},
- {-0.00179663056846135222, 0.000904369476631838518},
- {-0.00179663056846135222, -0.000904369476631838518},
- };
-
- LP s_inv_expect[] = {
- { 0.0017904931100023887, 0.000895246554454779222},
- { 0.0017904931100023887, -0.000895246554454779222},
- {-0.0017904931100023887, 0.000895246554454779222},
- {-0.0017904931100023887, -0.000895246554454779222},
- };
-
- 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_poly_selftest (void) {return 10000;}
diff --git a/src/PJ_putp2.c b/src/PJ_putp2.c
index 83aa5f45..59eca8a6 100644
--- a/src/PJ_putp2.c
+++ b/src/PJ_putp2.c
@@ -1,5 +1,5 @@
#define PJ_LIB__
-#include <projects.h>
+#include "projects.h"
PROJ_HEAD(putp2, "Putnins P2") "\n\tPCyl., Sph.";
@@ -57,46 +57,4 @@ PJ *PROJECTION(putp2) {
return P;
}
-#ifndef PJ_SELFTEST
-int pj_putp2_selftest (void) {return 0;}
-#else
-
-int pj_putp2_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=putp2 +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 211638.039634339279, 117895.033043379764},
- { 211638.039634339279, -117895.033043379764},
- {-211638.039634339279, 117895.033043379764},
- {-211638.039634339279, -117895.033043379764},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.00188980221640386672, 0.000848201580276863377},
- { 0.00188980221640386672, -0.000848201580276863377},
- {-0.00188980221640386672, 0.000848201580276863377},
- {-0.00188980221640386672, -0.000848201580276863377},
- };
-
- 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_putp2_selftest (void) {return 10000;}
diff --git a/src/PJ_putp3.c b/src/PJ_putp3.c
index cb216370..dfd152f8 100644
--- a/src/PJ_putp3.c
+++ b/src/PJ_putp3.c
@@ -63,93 +63,5 @@ PJ *PROJECTION(putp3p) {
return P;
}
-
-#ifndef PJ_SELFTEST
-int pj_putp3_selftest (void) {return 0;}
-#else
-
-int pj_putp3_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=putp3 +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 178227.115507793525, 89124.5607860879827},
- { 178227.115507793525, -89124.5607860879827},
- {-178227.115507793525, 89124.5607860879827},
- {-178227.115507793525, -89124.5607860879827},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.00224405032986489889, 0.00112202516475805899},
- { 0.00224405032986489889, -0.00112202516475805899},
- {-0.00224405032986489889, 0.00112202516475805899},
- {-0.00224405032986489889, -0.00112202516475805899},
- };
-
- 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_putp3p_selftest (void) {return 0;}
-#else
-
-int pj_putp3p_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=putp3p +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 178238.118539984745, 89124.5607860879827},
- { 178238.118539984745, -89124.5607860879827},
- {-178238.118539984745, 89124.5607860879827},
- {-178238.118539984745, -89124.5607860879827},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.00224405032969050844, 0.00112202516475805899},
- { 0.00224405032969050844, -0.00112202516475805899},
- {-0.00224405032969050844, 0.00112202516475805899},
- {-0.00224405032969050844, -0.00112202516475805899},
-
- };
-
- 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_putp3_selftest (void) {return 10000;}
+int pj_putp3p_selftest (void) {return 10000;}
diff --git a/src/PJ_putp4p.c b/src/PJ_putp4p.c
index 197f24c4..576ffbf6 100644
--- a/src/PJ_putp4p.c
+++ b/src/PJ_putp4p.c
@@ -1,6 +1,6 @@
#define PJ_LIB__
#include <errno.h>
-#include <projects.h>
+#include "projects.h"
struct pj_opaque {
double C_x, C_y;
@@ -71,91 +71,5 @@ PJ *PROJECTION(weren) {
}
-#ifndef PJ_SELFTEST
-int pj_putp4p_selftest (void) {return 0;}
-#else
-
-int pj_putp4p_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=putp4p +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 195241.47734938623, 127796.782307926231},
- { 195241.47734938623, -127796.782307926231},
- {-195241.47734938623, 127796.782307926231},
- {-195241.47734938623, -127796.782307926231},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.00204852830860296001, 0.000782480174932193733},
- { 0.00204852830860296001, -0.000782480174932193733},
- {-0.00204852830860296001, 0.000782480174932193733},
- {-0.00204852830860296001, -0.000782480174932193733},
- };
-
- 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_weren_selftest (void) {return 0;}
-#else
-
-int pj_weren_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=weren +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 223378.515757633519, 146214.093042288267},
- { 223378.515757633519, -146214.093042288267},
- {-223378.515757633519, 146214.093042288267},
- {-223378.515757633519, -146214.093042288267},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.00179049310987240413, 0.000683917989676492265},
- { 0.00179049310987240413, -0.000683917989676492265},
- {-0.00179049310987240413, 0.000683917989676492265},
- {-0.00179049310987240413, -0.000683917989676492265},
- };
-
- 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_putp4p_selftest (void) {return 10000;}
+int pj_weren_selftest (void) {return 10000;}
diff --git a/src/PJ_putp5.c b/src/PJ_putp5.c
index f8b431b1..2a847fa7 100644
--- a/src/PJ_putp5.c
+++ b/src/PJ_putp5.c
@@ -69,89 +69,5 @@ PJ *PROJECTION(putp5p) {
return P;
}
-#ifndef PJ_SELFTEST
-int pj_putp5_selftest (void) {return 0;}
-#else
-
-int pj_putp5_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=putp5 +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 226367.21338056153, 113204.56855847509},
- { 226367.21338056153, -113204.56855847509},
- {-226367.21338056153, 113204.56855847509},
- {-226367.21338056153, -113204.56855847509},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.00176671315102969553, 0.000883356575387199546},
- { 0.00176671315102969553, -0.000883356575387199546},
- {-0.00176671315102969553, 0.000883356575387199546},
- {-0.00176671315102969553, -0.000883356575387199546},
- };
-
- 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_putp5p_selftest (void) {return 0;}
-#else
-
-int pj_putp5p_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=putp5p +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 226388.175248755841, 113204.56855847509},
- { 226388.175248755841, -113204.56855847509},
- {-226388.175248755841, 113204.56855847509},
- {-226388.175248755841, -113204.56855847509},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.00176671315090204742, 0.000883356575387199546},
- { 0.00176671315090204742, -0.000883356575387199546},
- {-0.00176671315090204742, 0.000883356575387199546},
- {-0.00176671315090204742, -0.000883356575387199546},
- };
-
- 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_putp5_selftest (void) {return 10000;}
+int pj_putp5p_selftest (void) {return 10000;}
diff --git a/src/PJ_putp6.c b/src/PJ_putp6.c
index 50859f14..be86f805 100644
--- a/src/PJ_putp6.c
+++ b/src/PJ_putp6.c
@@ -92,89 +92,5 @@ PJ *PROJECTION(putp6p) {
}
-#ifndef PJ_SELFTEST
-int pj_putp6_selftest (void) {return 0;}
-#else
-
-int pj_putp6_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=putp6 +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 226369.395133402577, 110218.523796520662},
- { 226369.395133402577, -110218.523796520749},
- {-226369.395133402577, 110218.523796520662},
- {-226369.395133402577, -110218.523796520749},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.00176671315102969921, 0.000907295534210503544},
- { 0.00176671315102969921, -0.000907295534205924308},
- {-0.00176671315102969921, 0.000907295534210503544},
- {-0.00176671315102969921, -0.000907295534205924308},
- };
-
- 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_putp6p_selftest (void) {return 0;}
-#else
-
-int pj_putp6p_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char s_args[] = {"+proj=putp6p +a=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY s_fwd_expect[] = {
- { 198034.195132195076, 125989.475461323193},
- { 198034.195132195076, -125989.475461323193},
- {-198034.195132195076, 125989.475461323193},
- {-198034.195132195076, -125989.475461323193},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP s_inv_expect[] = {
- { 0.00201955053120177067, 0.000793716441164738612},
- { 0.00201955053120177067, -0.000793716441164738612},
- {-0.00201955053120177067, 0.000793716441164738612},
- {-0.00201955053120177067, -0.000793716441164738612},
- };
-
- 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_putp6_selftest (void) {return 10000;}
+int pj_putp6p_selftest (void) {return 10000;}
diff --git a/src/PJ_qsc.c b/src/PJ_qsc.c
index f30a7048..c8079f9e 100644
--- a/src/PJ_qsc.c
+++ b/src/PJ_qsc.c
@@ -399,61 +399,4 @@ PJ *PROJECTION(qsc) {
}
-#ifndef PJ_SELFTEST
-int pj_qsc_selftest (void) {return 0;}
-#else
-
-int pj_qsc_selftest (void) {
- double tolerance_lp = 1e-10;
- double tolerance_xy = 1e-7;
-
- char e_args[] = {"+proj=qsc +ellps=GRS80 +lat_1=0.5 +lat_2=2"};
- char s_args[] = {"+proj=qsc +R=6400000 +lat_1=0.5 +lat_2=2"};
-
- LP fwd_in[] = {
- { 2, 1},
- { 2,-1},
- {-2, 1},
- {-2,-1}
- };
-
- XY e_fwd_expect[] = {
- { 304638.450843852363, 164123.870923793991},
- { 304638.450843852363, -164123.870923793991},
- {-304638.450843852363, 164123.870923793962},
- {-304638.450843852421, -164123.870923793904},
- };
-
- XY s_fwd_expect[] = {
- { 305863.792402890511, 165827.722754715243},
- { 305863.792402890511, -165827.722754715243},
- {-305863.792402890511, 165827.722754715243},
- {-305863.792402890569, -165827.722754715156},
- };
-
- XY inv_in[] = {
- { 200, 100},
- { 200,-100},
- {-200, 100},
- {-200,-100}
- };
-
- LP e_inv_expect[] = {
- { 0.00132134098471627126, 0.000610652900922527926},
- { 0.00132134098471627126, -0.000610652900922527926},
- {-0.00132134098471627126, 0.000610652900922527926},
- {-0.00132134098471627126, -0.000610652900922527926},
- };
-
- LP s_inv_expect[] = {
- { 0.00131682718763827234, 0.000604493198178676161},
- { 0.00131682718763827234, -0.000604493198178676161},
- {-0.00131682718763827234, 0.000604493198178676161},
- {-0.00131682718763827234, -0.000604493198178676161},
- };
-
- 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_qsc_selftest (void) {return 10000;}