From 3adb9f80135d08ad9e8d90609b034cc1c67a513b Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Wed, 6 Dec 2017 11:38:25 +0100 Subject: Use t_epoch and t_obs instead of epoch and tobs. Prefixing with t_ is more consistent with the existing parameters in PROJ, such as x_0 and friends. t_epoch and t_obs is already used in PJ_deformation. Now users can expect consistency across time-varying transformations. --- nad/ITRF2000 | 20 ++++++++++---------- nad/ITRF2008 | 22 +++++++++++----------- nad/ITRF2014 | 24 ++++++++++++------------ src/PJ_helmert.c | 16 ++++++++-------- src/gie.c | 2 +- test/gie/GDA.gie | 2 +- test/gie/more_builtins.gie | 4 ++-- 7 files changed, 45 insertions(+), 45 deletions(-) diff --git a/nad/ITRF2000 b/nad/ITRF2000 index 4fab8d6d..f0a80db6 100644 --- a/nad/ITRF2000 +++ b/nad/ITRF2000 @@ -3,22 +3,22 @@ # ITRF2000 -> ITRF2005 is only defined the opposite way, so we flip the sign on all # parameters to get the opposite transformation. Parameters from http://itrf.ign.fr/ITRF_solutions/2005/tp_05-00.php - +proj=helmert +x=-0.0001 +y=0.0008 +z=0.0058 +s=-0.0004 +dx=0.0002 +dy=-0.0001 +dz=0.0018 +ds=-0.000008 +epoch=2000.0 +transpose + +proj=helmert +x=-0.0001 +y=0.0008 +z=0.0058 +s=-0.0004 +dx=0.0002 +dy=-0.0001 +dz=0.0018 +ds=-0.000008 +t_epoch=2000.0 +transpose - +proj=helmert +x=0.0067 +y=0.0061 +z=-0.0185 +s=0.00155 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +epoch=1997.0 +transpose + +proj=helmert +x=0.0067 +y=0.0061 +z=-0.0185 +s=0.00155 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1997.0 +transpose - +proj=helmert +x=0.0067 +y=0.0061 +z=-0.0185 +s=0.00155 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +epoch=1997.0 +transpose + +proj=helmert +x=0.0067 +y=0.0061 +z=-0.0185 +s=0.00155 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1997.0 +transpose - +proj=helmert +x=0.0067 +y=0.0061 +z=-0.0185 +s=0.00155 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +epoch=1997.0 +transpose + +proj=helmert +x=0.0067 +y=0.0061 +z=-0.0185 +s=0.00155 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1997.0 +transpose - +proj=helmert +x=0.0127 +y=0.0065 +z=-0.0209 +s=0.00195 +rx=-0.00039 +ry=0.00080 +rz=-0.00114 +dx=-0.0029 +dy=-0.0002 +dz=-0.0006 +ds=0.00001 +drx=-0.00011 +dry=-0.00019 +drz=0.00007 +epoch=1988.0 +transpose + +proj=helmert +x=0.0127 +y=0.0065 +z=-0.0209 +s=0.00195 +rx=-0.00039 +ry=0.00080 +rz=-0.00114 +dx=-0.0029 +dy=-0.0002 +dz=-0.0006 +ds=0.00001 +drx=-0.00011 +dry=-0.00019 +drz=0.00007 +t_epoch=1988.0 +transpose - +proj=helmert +x=0.0147 +y=0.0135 +z=-0.0139 +s=0.00075 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +epoch=1988.0 +transpose + +proj=helmert +x=0.0147 +y=0.0135 +z=-0.0139 +s=0.00075 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1988.0 +transpose - +proj=helmert +x=0.0267 +y=0.0275 +z=-0.0199 +s=0.00215 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +epoch=1988.0 +transpose + +proj=helmert +x=0.0267 +y=0.0275 +z=-0.0199 +s=0.00215 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1988.0 +transpose - +proj=helmert +x=0.0247 +y=0.0235 +z=-0.0359 +s=0.00245 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +epoch=1988.0 +transpose + +proj=helmert +x=0.0247 +y=0.0235 +z=-0.0359 +s=0.00245 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1988.0 +transpose - +proj=helmert +x=0.0297 +y=0.0475 +z=-0.0739 +s=0.00585 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +epoch=1988.0 +transpose + +proj=helmert +x=0.0297 +y=0.0475 +z=-0.0739 +s=0.00585 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1988.0 +transpose - +proj=helmert +x=0.0247 +y=0.0115 +z=-0.0979 +s=0.00895 +rx=0.0001 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +epoch=1988.0 +transpose + +proj=helmert +x=0.0247 +y=0.0115 +z=-0.0979 +s=0.00895 +rx=0.0001 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1988.0 +transpose diff --git a/nad/ITRF2008 b/nad/ITRF2008 index c2e2a710..7baa48c7 100644 --- a/nad/ITRF2008 +++ b/nad/ITRF2008 @@ -1,24 +1,24 @@ # ITRF2008 params are in mm/year, PJ_helmert uses m/year +version=1.0.0 +origin=http://itrf.ign.fr/doc_ITRF/Transfo-ITRF2008_ITRFs.txt +lastupdate=2017-07-26 - +proj=helmert +x=-0.002 +y=-0.0009 +z=-0.0047 +s=0.00094 +dx=0.0003 +epoch=2000.0 +transpose + +proj=helmert +x=-0.002 +y=-0.0009 +z=-0.0047 +s=0.00094 +dx=0.0003 +t_epoch=2000.0 +transpose - +proj=helmert +x=-0.0019 +y=-0.0017 +z=-0.0105 +s=0.00134 +dx=0.0001 +dy=0.0001 +dz=-0.0018 +ds=0.00008 +epoch=2000.0 +transpose + +proj=helmert +x=-0.0019 +y=-0.0017 +z=-0.0105 +s=0.00134 +dx=0.0001 +dy=0.0001 +dz=-0.0018 +ds=0.00008 +t_epoch=2000.0 +transpose - +proj=helmert +x=0.0048 +y=0.0026 +z=-0.0332 +s=0.00292 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +epoch=2000.0 +transpose + +proj=helmert +x=0.0048 +y=0.0026 +z=-0.0332 +s=0.00292 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +transpose - +proj=helmert +x=0.0048 +y=0.0026 +z=-0.0332 +s=0.00292 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +epoch=2000.0 +transpose + +proj=helmert +x=0.0048 +y=0.0026 +z=-0.0332 +s=0.00292 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +transpose - +proj=helmert +x=0.0048 +y=0.0026 +z=-0.0332 +s=0.00292 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +epoch=2000.0 +transpose + +proj=helmert +x=0.0048 +y=0.0026 +z=-0.0332 +s=0.00292 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +transpose - +proj=helmert +x=-0.024 +y=0.0024 +z=-0.00386 +s=0.00341 +rx=-0.00171 +ry=-0.00148 +rz=-0.0003 +dx=-0.0028 +dy=-0.0001 +dz=-0.0024 +ds=0.00009 +drx=-0.00011 +dry=-0.00019 +drz=0.00007 +epoch=2000.0 +transpose + +proj=helmert +x=-0.024 +y=0.0024 +z=-0.00386 +s=0.00341 +rx=-0.00171 +ry=-0.00148 +rz=-0.0003 +dx=-0.0028 +dy=-0.0001 +dz=-0.0024 +ds=0.00009 +drx=-0.00011 +dry=-0.00019 +drz=0.00007 +t_epoch=2000.0 +transpose - +proj=helmert +x=0.0128 +y=0.0046 +z=-0.0412 +s=0.00221 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +epoch=2000.0 +transpose + +proj=helmert +x=0.0128 +y=0.0046 +z=-0.0412 +s=0.00221 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +transpose - +proj=helmert +x=0.0248 +y=0.0186 +z=-0.0472 +s=0.00361 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +epoch=2000.0 +transpose + +proj=helmert +x=0.0248 +y=0.0186 +z=-0.0472 +s=0.00361 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +transpose - +proj=helmert +x=0.0228 +y=0.0146 +z=-0.0632 +s=0.00391 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +epoch=2000.0 +transpose + +proj=helmert +x=0.0228 +y=0.0146 +z=-0.0632 +s=0.00391 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +transpose - +proj=helmert +x=0.0278 +y=0.0386 +z=-0.1012 +s=0.00731 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +epoch=2000.0 +transpose + +proj=helmert +x=0.0278 +y=0.0386 +z=-0.1012 +s=0.00731 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +transpose - +proj=helmert +x=0.0228 +y=0.0026 +z=-0.1252 +s=0.01041 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +epoch=2000.0 +transpose + +proj=helmert +x=0.0228 +y=0.0026 +z=-0.1252 +s=0.01041 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +transpose diff --git a/nad/ITRF2014 b/nad/ITRF2014 index ff743e12..3c6239bd 100644 --- a/nad/ITRF2014 +++ b/nad/ITRF2014 @@ -1,26 +1,26 @@ # ITRF2014 params are in mm/year, PJ_helmert uses m/year +version=1.0.0 +origin=http://itrf.ign.fr/doc_ITRF/Transfo-ITRF2014_ITRFs.txt +lastupdate=2017-07-26 - +proj=helmert +x=0.0016 +y=0.0019 +z=0.0024 +s=-0.00002 +dz=-0.0001 +ds=0.00003 +epoch=2010.0 +transpose + +proj=helmert +x=0.0016 +y=0.0019 +z=0.0024 +s=-0.00002 +dz=-0.0001 +ds=0.00003 +t_epoch=2010.0 +transpose - +proj=helmert +x=0.0026 +y=0.001 +z=-0.0023 +s=0.00092 +dx=0.0003 +dz=-0.0001 +ds=0.00003 +epoch=2010.0 +transpose + +proj=helmert +x=0.0026 +y=0.001 +z=-0.0023 +s=0.00092 +dx=0.0003 +dz=-0.0001 +ds=0.00003 +t_epoch=2010.0 +transpose - +proj=helmert +x=0.0007 +y=0.0012 +z=-0.0261 +s=0.00212 +dx=0.0001 +dy=0.0001 +dz=-0.0019 +ds=0.00011 +epoch=2010.0 +transpose + +proj=helmert +x=0.0007 +y=0.0012 +z=-0.0261 +s=0.00212 +dx=0.0001 +dy=0.0001 +dz=-0.0019 +ds=0.00011 +t_epoch=2010.0 +transpose - +proj=helmert +x=0.0074 +y=-0.0005 +z=-0.0628 +d=0.0038 +rz=0.00026 +dx0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +epoch=2010.0 +transpose + +proj=helmert +x=0.0074 +y=-0.0005 +z=-0.0628 +d=0.0038 +rz=0.00026 +dx0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +transpose - +proj=helmert +x=0.0074 +y=-0.0005 +z=-0.0628 +s=0.0038 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +epoch=2010.0 +transpose + +proj=helmert +x=0.0074 +y=-0.0005 +z=-0.0628 +s=0.0038 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +t_epoch=2010.0 +transpose - +proj=helmert +x=0.0074 +y=-0.0005 +z=-0.0628 +s=0.0038 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +epoch=2010.0 +transpose + +proj=helmert +x=0.0074 +y=-0.0005 +z=-0.0628 +s=0.0038 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +t_epoch=2010.0 +transpose - +proj=helmert +x=-0.0504 +y=0.0033 +z=-0.0602 +s=0.00429 +rx=-0.00281 +ry=-0.00338 +rz=0.0004 +dx=-0.0028 +dy=-0.0001 +dz=-0.0025 +ds=0.00012 +drx=-0.00011 +dry=-0.00019 +drz=0.00007 +epoch=2010.0 +transpose + +proj=helmert +x=-0.0504 +y=0.0033 +z=-0.0602 +s=0.00429 +rx=-0.00281 +ry=-0.00338 +rz=0.0004 +dx=-0.0028 +dy=-0.0001 +dz=-0.0025 +ds=0.00012 +drx=-0.00011 +dry=-0.00019 +drz=0.00007 +t_epoch=2010.0 +transpose - +proj=helmert +x=0.0154 +y=0.0015 +z=-0.0708 +s=0.00309 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +epoch=2010.0 +transpose + +proj=helmert +x=0.0154 +y=0.0015 +z=-0.0708 +s=0.00309 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +transpose - +proj=helmert +x=0.0274 +y=0.0155 +z=-0.0768 +s=0.00449 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +epoch=2010.0 +transpose + +proj=helmert +x=0.0274 +y=0.0155 +z=-0.0768 +s=0.00449 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +transpose - +proj=helmert +x=0.0254 +y=0.0115 +z=-0.0928 +s=0.00479 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +epoch=2010.0 +transpose + +proj=helmert +x=0.0254 +y=0.0115 +z=-0.0928 +s=0.00479 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +transpose - +proj=helmert +x=0.0304 +y=0.0355 +z=-0.1308 +s=0.00819 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +epoch=2010.0 +transpose + +proj=helmert +x=0.0304 +y=0.0355 +z=-0.1308 +s=0.00819 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +transpose - +proj=helmert +x=0.0254 +y=-0.0005 +z=-0.1548 +s=0.01129 +rx=0.0001 +rz= +dx=0.00026 +dy=0.0001 +dx=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +epoch=2010.0 +transpose + +proj=helmert +x=0.0254 +y=-0.0005 +z=-0.1548 +s=0.01129 +rx=0.0001 +rz= +dx=0.00026 +dy=0.0001 +dx=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +transpose diff --git a/src/PJ_helmert.c b/src/PJ_helmert.c index 34bb7a68..1f36acee 100644 --- a/src/PJ_helmert.c +++ b/src/PJ_helmert.c @@ -73,7 +73,7 @@ struct pj_opaque_helmert { double theta_0; double dtheta; double R[3][3]; - double epoch, t_obs; + double t_epoch, t_obs; int no_rotation, approximate, transpose, fourparam; }; @@ -118,7 +118,7 @@ static void update_parameters(PJ *P) { *******************************************************************************/ struct pj_opaque_helmert *Q = (struct pj_opaque_helmert *) P->opaque; - double dt = Q->t_obs - Q->epoch; + double dt = Q->t_obs - Q->t_epoch; Q->xyz.x = Q->xyz_0.x + Q->dxyz.x * dt; Q->xyz.y = Q->xyz_0.y + Q->dxyz.y * dt; @@ -134,7 +134,7 @@ static void update_parameters(PJ *P) { /* debugging output */ if (proj_log_level(P->ctx, PJ_LOG_TELL) >= PJ_LOG_TRACE) { - proj_log_trace(P, "Transformation parameters for observation epoch %g:", Q->t_obs); + proj_log_trace(P, "Transformation parameters for observation t_epoch %g:", Q->t_obs); proj_log_trace(P, "x: %g", Q->xyz.x); proj_log_trace(P, "y: %g", Q->xyz.y); proj_log_trace(P, "z: %g", Q->xyz.z); @@ -539,11 +539,11 @@ PJ *TRANSFORMATION(helmert, 0) { /* Epoch */ - if (pj_param(P->ctx, P->params, "tepoch").i) - Q->epoch = pj_param (P->ctx, P->params, "depoch").f; + if (pj_param(P->ctx, P->params, "tt_epoch").i) + Q->t_epoch = pj_param (P->ctx, P->params, "dt_epoch").f; - if (pj_param(P->ctx, P->params, "ttobs").i) - Q->t_obs = pj_param (P->ctx, P->params, "dtobs").f; + if (pj_param(P->ctx, P->params, "tt_obs").i) + Q->t_obs = pj_param (P->ctx, P->params, "dt_obs").f; /* Use small angle approximations? */ if (pj_param (P->ctx, P->params, "bapprox").i) @@ -568,7 +568,7 @@ PJ *TRANSFORMATION(helmert, 0) { Q->scale, Q->approximate, Q->transpose); proj_log_debug(P, "dx= % 3.5f dy= % 3.5f dz= % 3.5f", Q->dxyz.x, Q->dxyz.y, Q->dxyz.z); proj_log_debug(P, "drx=% 3.5f dry=% 3.5f drz=% 3.5f", Q->dopk.o, Q->dopk.p, Q->dopk.k); - proj_log_debug(P, "ds=% 3.5f epoch=% 5.5f tobs=% 5.5f", Q->dscale, Q->epoch, Q->t_obs); + proj_log_debug(P, "ds=% 3.5f t_epoch=% 5.5f t_obs=% 5.5f", Q->dscale, Q->t_epoch, Q->t_obs); } if ((Q->opk.o==0) && (Q->opk.p==0) && (Q->opk.k==0) && (Q->scale==0) && diff --git a/src/gie.c b/src/gie.c index 9e377648..fa7921dd 100644 --- a/src/gie.c +++ b/src/gie.c @@ -1592,7 +1592,7 @@ static int pj_cart_selftest (void) { " +rx=-0.00039 +ry=0.00080 +rz=-0.00114" " +dx=-0.0029 +dy=-0.0002 +dz=-0.0006 +ds=0.00001" " +drx=-0.00011 +dry=-0.00019 +drz=0.00007" - " +epoch=1988.0 +transpose" + " +t_epoch=1988.0 +transpose" ); if (0==P) return 0; if (proj_angular_input (P, PJ_FWD)) return 116; diff --git a/test/gie/GDA.gie b/test/gie/GDA.gie index 3fe0f3e3..423443a6 100644 --- a/test/gie/GDA.gie +++ b/test/gie/GDA.gie @@ -57,7 +57,7 @@ operation proj = helmert; \ y = 0; ry = 0; dy = 0; dry = 0.00118346; \ z = 0; rz = 0; dz = 0; drz = 0.00120716; \ \ - ds = 0; epoch=2020.0; + ds = 0; t_epoch=2020.0; ----------------------------------------------------------------------------------- tolerance 50 um diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index ea37a763..1837313e 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -211,7 +211,7 @@ operation proj=helmert ellps=GRS80 \ dx=-0.0029 dy=-0.0002 dz=-0.0006 ds=0.00001 \ rx=-0.00039 ry=0.00080 rz=-0.00114 \ drx=-0.00011 dry=-0.00019 drz=0.00007 \ - epoch=1988.0 tobs=2017.0 transpose + t_epoch=1988.0 t_obs=2017.0 transpose ------------------------------------------------------------------------------- tolerance 0.03 mm accept 3370658.37800 711877.31400 5349787.08600 2017.0 # ITRF2000@2017.0 @@ -243,7 +243,7 @@ operation proj=helmert ellps=GRS80 \ dx=-0.0029 dy=-0.0002 dz=-0.0006 ds=0.00001 \ rx=-0.00039 ry=0.00080 rz=-0.00114 \ drx=-0.00011 dry=-0.00019 drz=0.00007 \ - epoch=1988.0 transpose + t_epoch=1988.0 transpose ------------------------------------------------------------------------------- tolerance 0.1 mm accept 3370658.378 711877.314 5349787.086 2017.0 -- cgit v1.2.3 From 2203189482646c208cc4c9d212909c5a7944bb1a Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Wed, 6 Dec 2017 14:42:51 +0100 Subject: Use approximate equations instead of exact as default in Helmert. --- src/PJ_helmert.c | 47 ++++++++++++++++++++++++---------------------- test/gie/more_builtins.gie | 2 +- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/src/PJ_helmert.c b/src/PJ_helmert.c index 1f36acee..ca14a5cb 100644 --- a/src/PJ_helmert.c +++ b/src/PJ_helmert.c @@ -74,7 +74,7 @@ struct pj_opaque_helmert { double dtheta; double R[3][3]; double t_epoch, t_obs; - int no_rotation, approximate, transpose, fourparam; + int no_rotation, exact, transpose, fourparam; }; @@ -160,7 +160,7 @@ static void build_rot_matrix(PJ *P) { at https://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions The relevant section is Euler angles ( z-’-x" intrinsic) -> Rotation matrix - If the option "approximate" is set, small angle approximations are used: + By default small angle approximations are used: The matrix elements are approximated by expanding the trigonometric functions to linear order (i.e. cos(x) = 1, sin(x) = x), and discarding products of second order. @@ -179,8 +179,11 @@ static void build_rot_matrix(PJ *P) { However, in many cases the approximation is necessary, since it has been used historically: Rotation angles from older published datum shifts may actually be a least squares fit to the linearized rotation - approximation, hence not being strictly valid for deriving the full - rotation matrix. + approximation, hence not being strictly valid for deriving the exact + rotation matrix. In fact, most publicly available transformation + parameters are based on the approximate Helmert transform, which is why + we use that as the default setting, even though it is more correct to + use the exact form of the equations. So in order to fit historically derived coordinates, the access to the approximate rotation matrix is necessary - at least in principle. @@ -222,20 +225,7 @@ static void build_rot_matrix(PJ *P) { t = Q->opk.p; p = Q->opk.k; - if (Q->approximate) { - R00 = 1; - R01 = p; - R02 = -t; - - R10 = -p; - R11 = 1; - R12 = f; - - R20 = t; - R21 = -f; - R22 = 1; - } - else { + if (Q->exact) { cf = cos(f); sf = sin(f); ct = cos(t); @@ -255,8 +245,21 @@ static void build_rot_matrix(PJ *P) { R20 = st; R21 = -sf*ct; R22 = cf*ct; + } else{ + R00 = 1; + R01 = p; + R02 = -t; + + R10 = -p; + R11 = 1; + R12 = f; + + R20 = t; + R21 = -f; + R22 = 1; } + /* For comparison: Description from Engsager/Poder implementation in set_dtm_1.c (trlib) @@ -546,8 +549,8 @@ PJ *TRANSFORMATION(helmert, 0) { Q->t_obs = pj_param (P->ctx, P->params, "dt_obs").f; /* Use small angle approximations? */ - if (pj_param (P->ctx, P->params, "bapprox").i) - Q->approximate = 1; + if (pj_param (P->ctx, P->params, "bexact").i) + Q->exact = 1; /* Use "other" rotation sign convention? */ if (pj_param (P->ctx, P->params, "ttranspose").i) @@ -564,8 +567,8 @@ PJ *TRANSFORMATION(helmert, 0) { proj_log_debug(P, "x= % 3.5f y= % 3.5f z= % 3.5f", Q->xyz.x, Q->xyz.y, Q->xyz.z); proj_log_debug(P, "rx= % 3.5f ry= % 3.5f rz= % 3.5f", Q->opk.o / ARCSEC_TO_RAD, Q->opk.p / ARCSEC_TO_RAD, Q->opk.k / ARCSEC_TO_RAD); - proj_log_debug(P, "s=% 3.5f approximate=% d transpose=% d", - Q->scale, Q->approximate, Q->transpose); + proj_log_debug(P, "s=% 3.5f exact=% d transpose=% d", + Q->scale, Q->exact, Q->transpose); proj_log_debug(P, "dx= % 3.5f dy= % 3.5f dz= % 3.5f", Q->dxyz.x, Q->dxyz.y, Q->dxyz.z); proj_log_debug(P, "drx=% 3.5f dry=% 3.5f drz=% 3.5f", Q->dopk.o, Q->dopk.p, Q->dopk.k); proj_log_debug(P, "ds=% 3.5f t_epoch=% 5.5f t_obs=% 5.5f", Q->dscale, Q->t_epoch, Q->t_obs); diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index 1837313e..501406ae 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -192,7 +192,7 @@ expect 3565285.41342351 855948.67986759 5201382.72939791 ------------------------------------------------------------------------------- This example is a random point, transformed from ED50 to ETRS89 using KMStrans2 ------------------------------------------------------------------------------- -operation proj=helmert ellps=GRS80 \ +operation proj=helmert ellps=GRS80 exact \ x=-81.0703 y=-89.3603 z=-115.7526 \ rx=-0.48488 ry=-0.02436 rz=-0.41321 s=-0.540645 ------------------------------------------------------------------------------- -- cgit v1.2.3 From cbb497636ec29f5350864b128e7d09d603f6a15d Mon Sep 17 00:00:00 2001 From: Charles Karney Date: Wed, 6 Dec 2017 16:41:34 -0500 Subject: CMakeLists.txt: fix typo, copysigna -> copysign. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f6147c3e..a9c9cdbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,7 +84,7 @@ int main() { int q; return (int)(hypot(3.0, 4.0) + atanh(0.8) + cbrt(8.0) + remquo(100.0, 90.0, &q) + - remainder(100.0, 90.0) + copysigna(1.0, -0.0)); + remainder(100.0, 90.0) + copysign(1.0, -0.0)); }\n" C99_MATH) if (C99_MATH) add_definitions (-DHAVE_C99_MATH=1) -- cgit v1.2.3 From 5975ff8f0920b1f4b4353f59f45e9033ea784c5f Mon Sep 17 00:00:00 2001 From: Charles Karney Date: Thu, 7 Dec 2017 11:11:16 -0500 Subject: Squelch Visual Studio's obnoxious warnings about sprintf being unsafe. Also set policy CMP0054 to stop a cmake warning. --- CMakeLists.txt | 3 +++ src/PJ_chamb.c | 5 +++++ src/PJ_horner.c | 5 +++++ src/cct.c | 4 ++++ src/gie.c | 5 ++++- src/nad2bin.c | 5 +++++ src/optargpm.h | 10 ++++++++++ src/pj_apply_gridshift.c | 5 +++++ src/pj_apply_vgridshift.c | 5 +++++ src/pj_datum_set.c | 5 +++++ src/pj_fileapi.c | 5 +++++ src/pj_gridinfo.c | 5 +++++ src/pj_gridlist.c | 5 +++++ src/pj_init.c | 5 +++++ src/pj_log.c | 5 +++++ src/pj_open_lib.c | 5 +++++ src/proj_4D_api.c | 4 ++++ 17 files changed, 85 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9c9cdbf..33547190 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,9 @@ cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR) project(PROJ4 C) set(PROJECT_INTERN_NAME PROJ) +if (NOT CMAKE_VERSION VERSION_LESS 3.1) + cmake_policy(SET CMP0054 NEW) +endif () # Set warnings if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") set(CMAKE_C_FLAGS "/WX ${CMAKE_C_FLAGS}") diff --git a/src/PJ_chamb.c b/src/PJ_chamb.c index d0b9250e..0a18ecf0 100644 --- a/src/PJ_chamb.c +++ b/src/PJ_chamb.c @@ -3,6 +3,11 @@ #include #include "projects.h" +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + typedef struct { double r, Az; } VECT; struct pj_opaque { struct { /* control point data */ diff --git a/src/PJ_horner.c b/src/PJ_horner.c index fe0452d6..2f564edf 100644 --- a/src/PJ_horner.c +++ b/src/PJ_horner.c @@ -82,6 +82,11 @@ #include #include +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + PROJ_HEAD(horner, "Horner polynomial evaluation"); /* make horner.h interface with proj's memory management */ diff --git a/src/cct.c b/src/cct.c index a1c275b5..ae294190 100644 --- a/src/cct.c +++ b/src/cct.c @@ -81,6 +81,10 @@ Thomas Knudsen, thokn@sdfe.dk, 2016-05-25/2017-10-26 #include #include +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif double proj_strtod(const char *str, char **endptr); double proj_atof(const char *str); diff --git a/src/gie.c b/src/gie.c index 9e377648..fcf78a71 100644 --- a/src/gie.c +++ b/src/gie.c @@ -119,7 +119,10 @@ Thomas Knudsen, thokn@sdfe.dk, 2017-10-01/2017-10-08 #include #include - +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif /* from proj_strtod.c */ double proj_strtod(const char *str, char **endptr); diff --git a/src/nad2bin.c b/src/nad2bin.c index 8401df79..92ceab09 100644 --- a/src/nad2bin.c +++ b/src/nad2bin.c @@ -2,6 +2,11 @@ #include #include +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + #define PJ_LIB__ #include "proj_internal.h" #include "projects.h" diff --git a/src/optargpm.h b/src/optargpm.h index acb96583..c2b23466 100644 --- a/src/optargpm.h +++ b/src/optargpm.h @@ -193,6 +193,12 @@ Thomas Knudsen, thokn@sdfe.dk, 2016-05-25/2017-09-10 #include #include +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (push) +# pragma warning (disable: 4996) +#endif + /**************************************************************************************************/ struct OPTARGS; typedef struct OPTARGS OPTARGS; @@ -599,3 +605,7 @@ OPTARGS *opt_parse (int argc, char **argv, const char *flags, const char *keys, return o; } + +#if defined(_MSC_VER) +# pragma warning (pop) +#endif diff --git a/src/pj_apply_gridshift.c b/src/pj_apply_gridshift.c index a2267cbd..d8bd8b43 100644 --- a/src/pj_apply_gridshift.c +++ b/src/pj_apply_gridshift.c @@ -35,6 +35,11 @@ #include "proj_internal.h" #include "projects.h" +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + /************************************************************************/ /* pj_apply_gridshift() */ /* */ diff --git a/src/pj_apply_vgridshift.c b/src/pj_apply_vgridshift.c index 6435b954..d5baf9e8 100644 --- a/src/pj_apply_vgridshift.c +++ b/src/pj_apply_vgridshift.c @@ -33,6 +33,11 @@ #include "proj_internal.h" #include "projects.h" +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + static double pj_read_vgrid_value( PJ *defn, LP input, int *gridlist_count_p, PJ_GRIDINFO **tables, struct CTABLE *ct) { int itable = 0; double value = HUGE_VAL; diff --git a/src/pj_datum_set.c b/src/pj_datum_set.c index c2fb1608..1622364c 100644 --- a/src/pj_datum_set.c +++ b/src/pj_datum_set.c @@ -29,6 +29,11 @@ #include #include +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + /* SEC_TO_RAD = Pi/180/3600 */ #define SEC_TO_RAD 4.84813681109535993589914102357e-6 diff --git a/src/pj_fileapi.c b/src/pj_fileapi.c index e223993e..9fd6a2b4 100644 --- a/src/pj_fileapi.c +++ b/src/pj_fileapi.c @@ -30,6 +30,11 @@ #include #include +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + static PAFile pj_stdio_fopen(projCtx ctx, const char *filename, const char *access); static size_t pj_stdio_fread(void *buffer, size_t size, size_t nmemb, diff --git a/src/pj_gridinfo.c b/src/pj_gridinfo.c index 9b9a8d82..9d69876e 100644 --- a/src/pj_gridinfo.c +++ b/src/pj_gridinfo.c @@ -34,6 +34,11 @@ #include #include +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + /************************************************************************/ /* swap_words() */ /* */ diff --git a/src/pj_gridlist.c b/src/pj_gridlist.c index fbefdcea..5bc608d7 100644 --- a/src/pj_gridlist.c +++ b/src/pj_gridlist.c @@ -33,6 +33,11 @@ #include #include +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + static PJ_GRIDINFO *grid_list = NULL; #define PJ_MAX_PATH_LENGTH 1024 diff --git a/src/pj_init.c b/src/pj_init.c index 2d588ee4..a72dbec1 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -36,6 +36,11 @@ #include "proj_internal.h" #include "projects.h" +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + /* Maximum size of files using the "escape carriage return" feature */ #define MAX_CR_ESCAPE 65537 typedef struct { diff --git a/src/pj_log.c b/src/pj_log.c index bab5f078..3c4b7213 100644 --- a/src/pj_log.c +++ b/src/pj_log.c @@ -30,6 +30,11 @@ #include #include +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + /************************************************************************/ /* pj_stderr_logger() */ /************************************************************************/ diff --git a/src/pj_open_lib.c b/src/pj_open_lib.c index 08532beb..35d0341f 100644 --- a/src/pj_open_lib.c +++ b/src/pj_open_lib.c @@ -35,6 +35,11 @@ #include #include +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + static const char *(*pj_finder)(const char *) = NULL; static int path_count = 0; static char **search_path = NULL; diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index 5f4bf334..34c03db2 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -34,6 +34,10 @@ #include "projects.h" #include "geodesic.h" +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif /* Initialize PJ_COORD struct */ PJ_COORD proj_coord (double x, double y, double z, double t) { -- cgit v1.2.3 From 0bc0e045e4352feb3acc374c779e66c79fcade75 Mon Sep 17 00:00:00 2001 From: Aaron Puchert Date: Mon, 11 Dec 2017 17:53:06 +0100 Subject: Allow including the new API header in proj.c This didn't work before because the elaborate type punning scheme was deactivated by including proj.h. Now we use the type punning from the new API header and build our own. This change is required for #674. --- src/proj.c | 118 ++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 61 insertions(+), 57 deletions(-) diff --git a/src/proj.c b/src/proj.c index 77d6b28b..7922a5ac 100644 --- a/src/proj.c +++ b/src/proj.c @@ -1,4 +1,5 @@ /* <<<< Cartographic projection filter program >>>> */ +#include "proj.h" #include "projects.h" #include #include @@ -10,7 +11,7 @@ #if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__WIN32__) # include # include -# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) +# define SET_BINARY_MODE(file) _setmode(_fileno(file), O_BINARY) #else # define SET_BINARY_MODE(file) #endif @@ -22,7 +23,11 @@ extern void gen_cheb(int, projUV(*)(projUV), char *, PJ *, int, char **); static PJ *Proj; -static projUV (*proj)(projUV, PJ *); +static union { + projUV (*generic)(projUV, PJ *); + projXY (*fwd)(projLP, PJ *); + projLP (*inv)(projXY, PJ *); +} proj; static int reversein = 0, /* != 0 reverse input arguments */ @@ -55,7 +60,7 @@ static projUV int_proj(projUV data) { data.v *= fscale; } - data = (*proj)(data, Proj); + data = (*proj.generic)(data, Proj); if (postscale && data.u != HUGE_VAL) { data.u *= fscale; @@ -68,7 +73,7 @@ static projUV int_proj(projUV data) { /* file processing function */ static void process(FILE *fid) { char line[MAX_LINE+3], *s = 0, pline[40]; - projUV data; + PJ_COORD data; for (;;) { ++emess_dat.File_line; @@ -94,15 +99,15 @@ static void process(FILE *fid) { } if (reversein) { - data.v = (*informat)(s, &s); - data.u = (*informat)(s, &s); + data.uv.v = (*informat)(s, &s); + data.uv.u = (*informat)(s, &s); } else { - data.u = (*informat)(s, &s); - data.v = (*informat)(s, &s); + data.uv.u = (*informat)(s, &s); + data.uv.v = (*informat)(s, &s); } - if (data.v == HUGE_VAL) - data.u = HUGE_VAL; + if (data.uv.v == HUGE_VAL) + data.uv.u = HUGE_VAL; if (!*s && (s > line)) --s; /* assumed we gobbled \n */ if (!bin_out && echoin) { @@ -115,53 +120,53 @@ static void process(FILE *fid) { } } - if (data.u != HUGE_VAL) { - if (prescale) { data.u *= fscale; data.v *= fscale; } + if (data.uv.u != HUGE_VAL) { + if (prescale) { data.uv.u *= fscale; data.uv.v *= fscale; } if (dofactors && !inverse) - facs_bad = pj_factors(data, Proj, 0., &facs); - data = (*proj)(data, Proj); + facs_bad = pj_factors(data.lp, Proj, 0., &facs); + data.xy = (*proj.fwd)(data.lp, Proj); if (dofactors && inverse) - facs_bad = pj_factors(data, Proj, 0., &facs); + facs_bad = pj_factors(data.lp, Proj, 0., &facs); - if (postscale && data.u != HUGE_VAL) - { data.u *= fscale; data.v *= fscale; } + if (postscale && data.uv.u != HUGE_VAL) + { data.uv.u *= fscale; data.uv.v *= fscale; } } if (bin_out) { /* binary output */ (void)fwrite(&data, sizeof(projUV), 1, stdout); continue; - } else if (data.u == HUGE_VAL) /* error output */ + } else if (data.uv.u == HUGE_VAL) /* error output */ (void)fputs(oterr, stdout); else if (inverse && !oform) { /*ascii DMS output */ if (reverseout) { - (void)fputs(rtodms(pline, data.v, 'N', 'S'), stdout); + (void)fputs(rtodms(pline, data.uv.v, 'N', 'S'), stdout); putchar('\t'); - (void)fputs(rtodms(pline, data.u, 'E', 'W'), stdout); + (void)fputs(rtodms(pline, data.uv.u, 'E', 'W'), stdout); } else { - (void)fputs(rtodms(pline, data.u, 'E', 'W'), stdout); + (void)fputs(rtodms(pline, data.uv.u, 'E', 'W'), stdout); putchar('\t'); - (void)fputs(rtodms(pline, data.v, 'N', 'S'), stdout); + (void)fputs(rtodms(pline, data.uv.v, 'N', 'S'), stdout); } } else { /* x-y or decimal degree ascii output, scale if warranted by output units */ if (inverse) { if (Proj->left == PJ_IO_UNITS_RADIANS) { - data.v *= RAD_TO_DEG; - data.u *= RAD_TO_DEG; + data.uv.v *= RAD_TO_DEG; + data.uv.u *= RAD_TO_DEG; } } else { if (Proj->right == PJ_IO_UNITS_RADIANS) { - data.v *= RAD_TO_DEG; - data.u *= RAD_TO_DEG; + data.uv.v *= RAD_TO_DEG; + data.uv.u *= RAD_TO_DEG; } } if (reverseout) { - (void)printf(oform,data.v); putchar('\t'); - (void)printf(oform,data.u); + (void)printf(oform, data.uv.v); putchar('\t'); + (void)printf(oform, data.uv.u); } else { - (void)printf(oform,data.u); putchar('\t'); - (void)printf(oform,data.v); + (void)printf(oform, data.uv.u); putchar('\t'); + (void)printf(oform, data.uv.v); } } @@ -181,7 +186,8 @@ static void process(FILE *fid) { /* file processing function --- verbosely */ static void vprocess(FILE *fid) { char line[MAX_LINE+3], *s, pline[40]; - projUV dat_ll, dat_xy, temp; + LP dat_ll; + projXY dat_xy; int linvers; @@ -224,41 +230,39 @@ static void vprocess(FILE *fid) { emess(-1,"inverse for this projection not avail.\n"); continue; } - dat_xy.u = strtod(s, &s); - dat_xy.v = strtod(s, &s); - if (dat_xy.u == HUGE_VAL || dat_xy.v == HUGE_VAL) { + dat_xy.x = strtod(s, &s); + dat_xy.y = strtod(s, &s); + if (dat_xy.x == HUGE_VAL || dat_xy.y == HUGE_VAL) { emess(-1,"lon-lat input conversion failure\n"); continue; } - if (prescale) { dat_xy.u *= fscale; dat_xy.v *= fscale; } + if (prescale) { dat_xy.x *= fscale; dat_xy.y *= fscale; } if (reversein) { - temp.u = dat_xy.u; - temp.v = dat_xy.v; - dat_xy.u = temp.v; - dat_xy.v = temp.u; + projXY temp = dat_xy; + dat_xy.x = temp.y; + dat_xy.y = temp.x; } dat_ll = pj_inv(dat_xy, Proj); } else { - dat_ll.u = dmstor(s, &s); - dat_ll.v = dmstor(s, &s); - if (dat_ll.u == HUGE_VAL || dat_ll.v == HUGE_VAL) { + dat_ll.lam = dmstor(s, &s); + dat_ll.phi = dmstor(s, &s); + if (dat_ll.lam == HUGE_VAL || dat_ll.phi == HUGE_VAL) { emess(-1,"lon-lat input conversion failure\n"); continue; } if (reversein) { - temp.u = dat_ll.u; - temp.v = dat_ll.v; - dat_ll.u = temp.v; - dat_ll.v = temp.u; + LP temp = dat_ll; + dat_ll.lam = temp.phi; + dat_ll.phi = temp.lam; } dat_xy = pj_fwd(dat_ll, Proj); - if (postscale) { dat_xy.u *= fscale; dat_xy.v *= fscale; } + if (postscale) { dat_xy.x *= fscale; dat_xy.y *= fscale; } } /* apply rad->deg scaling in case the output from a pipeline has degrees as units */ if (!inverse && Proj->right == PJ_IO_UNITS_RADIANS) { - dat_xy.u *= RAD_TO_DEG; - dat_xy.v *= RAD_TO_DEG; + dat_xy.x *= RAD_TO_DEG; + dat_xy.y *= RAD_TO_DEG; } /* For some reason pj_errno does not work as expected in some */ @@ -278,15 +282,15 @@ static void vprocess(FILE *fid) { (void)fputs(s, stdout); (void)fputs("Longitude: ", stdout); - (void)fputs(rtodms(pline, dat_ll.u, 'E', 'W'), stdout); - (void)printf(" [ %.11g ]\n", dat_ll.u * RAD_TO_DEG); + (void)fputs(rtodms(pline, dat_ll.lam, 'E', 'W'), stdout); + (void)printf(" [ %.11g ]\n", dat_ll.lam * RAD_TO_DEG); (void)fputs("Latitude: ", stdout); - (void)fputs(rtodms(pline, dat_ll.v, 'N', 'S'), stdout); - (void)printf(" [ %.11g ]\n", dat_ll.v * RAD_TO_DEG); + (void)fputs(rtodms(pline, dat_ll.phi, 'N', 'S'), stdout); + (void)printf(" [ %.11g ]\n", dat_ll.phi * RAD_TO_DEG); (void)fputs("Easting (x): ", stdout); - (void)printf(oform, dat_xy.u); putchar('\n'); + (void)printf(oform, dat_xy.x); putchar('\n'); (void)fputs("Northing (y): ", stdout); - (void)printf(oform, dat_xy.v); putchar('\n'); + (void)printf(oform, dat_xy.y); putchar('\n'); (void)printf("Meridian scale (h) : %.8f ( %.4g %% error )\n", facs.h, (facs.h-1.)*100.); (void)printf("Parallel scale (k) : %.8f ( %.4g %% error )\n", facs.k, (facs.k-1.)*100.); (void)printf("Areal scale (s): %.8f ( %.4g %% error )\n", facs.s, (facs.s-1.)*100.); @@ -489,9 +493,9 @@ int main(int argc, char **argv) { if (inverse) { if (!Proj->inv) emess(3,"inverse projection not available"); - proj = pj_inv; + proj.inv = pj_inv; } else - proj = pj_fwd; + proj.fwd = pj_fwd; if (cheby_str) { gen_cheb(inverse, int_proj, cheby_str, Proj, iargc, iargv); exit(0); -- cgit v1.2.3 From 17dccab19af6e135c5d530f1919f862e9b0f0388 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 12 Dec 2017 13:53:54 +0100 Subject: Travis MacOSX: install pip --- travis/osx/before_install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/travis/osx/before_install.sh b/travis/osx/before_install.sh index 17c0e141..e4d3b00d 100755 --- a/travis/osx/before_install.sh +++ b/travis/osx/before_install.sh @@ -2,6 +2,8 @@ set -e +sudo easy_install pip + ./travis/before_install.sh brew update -- cgit v1.2.3 From 8ed970e6856ed3d61ab8cc827899a8cced0591d0 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Thu, 14 Dec 2017 09:19:37 +0100 Subject: Updates to deformation operation. The initial approach taken in the deformation operation was not geodetically sound. The deformation model grids were required to be indexed in lat/long space with the velocities in the grids being in cartesian space. This is quite confusing and it is not a normal way of making deformation models. The usual approach is to keep everything in the east, north, up, or ENU, space. We adopt that tradition in this commit. The velocities are still applied in cartesian space which requires that the grid-velocities are converted from ENU space to cartesian space. As a consequence of this change the operation is changed so that it only works in full 3D mode. That is, both horizontal and vertical grids need to be applied. The inverse operation is changed slightly to accommodate the now fully 3D transformation. In it's present form it is a modification to the original algorithm that also includes the vertical component in the iteration. This is necessary to get a proper mapping from ENU to cartesian space in the loop. The vertical component is overwritten with the initial z-correction at the end of the loop. This approach is not completely accurate and will introduce errors, especially when doing many roundtrip calculations, but it seems to be good enough for a few roundtrips. The PJ_ENU data type is re-introduced to better communicate the what state the grid corrections are in throughout the code. --- src/PJ_deformation.c | 172 +++++++++++++++++++++++++++-------------------- src/proj.h | 2 + test/gie/deformation.gie | 54 ++------------- 3 files changed, 108 insertions(+), 120 deletions(-) diff --git a/src/PJ_deformation.c b/src/PJ_deformation.c index 09692ccb..d227e49f 100644 --- a/src/PJ_deformation.c +++ b/src/PJ_deformation.c @@ -13,18 +13,21 @@ Perform datum shifts by means of a deformation/velocity model. Z_out = Z_in + (T_ct - T_obs)*DZ -Corrections are done in cartesian space. Coordinates of the -gridded model are in lat/long space and the corrections in the model are -in cartesian space. Hence the input coordinates needs to be converted -to lat/long space when searching for corrections in the grid. The -corrections are then applied to the input coordinates in cartesian -space. +The deformation operation takes cartesian coordinates as input and +returns cartesian coordinates as well. + +Corrections in the gridded model are in east, north, up (ENU) space. +Hence the input coordinates needs to be converted to ENU-space when +searching for corrections in the grid. The corrections are then converted +to cartesian XYZ-space and applied to the input coordinates (also in +cartesian space). A full deformation model is described by two grids, one for the horizontal components and one for the vertical component. The horizontal grid is stored in CTable/CTable2 and the vertical grid is stored in the GTX -format. Both grids are expected to contain grid-values in units of -m/year. +format. The NTv2 format should not be used for this purpose since grid- +values are scaled upon reading. Both grids are expected to contain +grid-values in units of mm/year in ENU-space. ************************************************************************ * Copyright (c) 2017, Kristian Evers @@ -62,50 +65,91 @@ PROJ_HEAD(deformation, "Kinematic grid shift"); struct pj_opaque { double t_obs; double t_epoch; - int has_xy_grids, has_z_grids; PJ *cart; }; -static XYZ get_xygrid_shift(PJ* P, XYZ cartesian) { - PJ_COORD geodetic, shift; +/********************************************************************************/ +static XYZ get_grid_shift(PJ* P, XYZ cartesian) { +/******************************************************************************** + Read correction values from grid. The cartesian input coordinates are + converted to geodetic coordinates in order look up the correction values + in the grid. Once the grid corrections are read we need to convert them + from ENU-space to cartesian XYZ-space. ENU -> XYZ formula described in: + + Nørbech, T., et al, 2003(?), "Transformation from a Common Nordic Reference + Frame to ETRS89 in Denmark, Finland, Norway, and Sweden – status report" + +********************************************************************************/ + PJ_COORD geodetic, shift, temp; + double sp, cp, sl, cl; + /* cartesian to geodetic */ geodetic.lpz = pj_inv3d(cartesian, P->opaque->cart); - shift.lp = proj_hgrid_value(P, geodetic.lp); - return shift.xyz; -} + /* look up correction values in grids */ + shift.lp = proj_hgrid_value(P, geodetic.lp); + shift.enu.u = proj_vgrid_value(P, geodetic.lp); -static double get_zgrid_shift(PJ* P, XYZ cartesian) { - PJ_COORD geodetic; + /* grid values are stored as mm/yr, we need m/yr */ + shift.xyz.x /= 1000; + shift.xyz.y /= 1000; + shift.xyz.z /= 1000; - geodetic.lpz = pj_inv3d(cartesian, P->opaque->cart); + /* pre-calc cosines and sines */ + sp = sin(geodetic.lp.phi); + cp = cos(geodetic.lp.phi); + sl = sin(geodetic.lp.lam); + cl = cos(geodetic.lp.lam); - return proj_vgrid_value(P, geodetic.lp); + /* ENU -> XYZ */ + temp.xyz.x = -sp*cl*shift.enu.n - sl*shift.enu.e + cp*cl*shift.enu.u; + temp.xyz.y = -sp*sl*shift.enu.n + cl*shift.enu.e + cp*sl*shift.enu.u; + temp.xyz.z = cp*shift.enu.n + sp*shift.enu.u; + + shift.xyz = temp.xyz; + + return shift.xyz; } -static XYZ reverse_hshift(PJ *P, XYZ input, double dt) { +/********************************************************************************/ +static XYZ reverse_shift(PJ *P, XYZ input, double dt) { +/******************************************************************************** + Iteratively determine the reverse grid shift correction values. +*********************************************************************************/ XYZ out, delta, dif; + double z0; int i = MAX_ITERATIONS; - delta = get_xygrid_shift(P, input); + delta = get_grid_shift(P, input); - out.x = input.x + dt*delta.x; + /* Store the origial z shift for later application */ + z0 = delta.z; + + /* When iterating to find the best horizontal coordinate we also carry */ + /* along the z-component, since we need it for the cartesian -> geodetic */ + /* conversion. The z-component adjustment is overwritten with z0 after */ + /* the loop has finished. */ + out.x = input.x - dt*delta.x; out.y = input.y - dt*delta.y; - out.z = input.z; + out.z = input.z + dt*delta.z; do { - delta = get_xygrid_shift(P, out); + delta = get_grid_shift(P, out); if (delta.x == HUGE_VAL) break; - dif.x = out.x - dt*delta.x - input.x; + dif.x = out.x + dt*delta.x - input.x; dif.y = out.y + dt*delta.y - input.y; + dif.z = out.z - dt*delta.z - input.z; out.x += dif.x; out.y += dif.y; + out.z += dif.z; } while ( --i && hypot(dif.x, dif.y) > TOL ); + out.z = input.z - dt*z0; + return out; } @@ -118,22 +162,18 @@ static XYZ forward_3d(LPZ lpz, PJ *P) { out = in; if (Q->t_obs != HUGE_VAL) { - dt = Q->t_obs - Q->t_epoch; + dt = Q->t_epoch - Q->t_obs; } else { out = proj_coord_error(); /* in the 3D case +t_obs must be specified */ proj_log_debug(P, "deformation: +t_obs must be specified"); return out.xyz; } - if (Q->has_xy_grids) { - shift = get_xygrid_shift(P, in.xyz); + shift = get_grid_shift(P, in.xyz); - out.xyz.x += dt * shift.x; - out.xyz.y += dt * shift.y; - } - - if (Q->has_z_grids) - out.xyz.z += dt * get_zgrid_shift(P, in.xyz); + out.xyz.x += dt * shift.x; + out.xyz.y += dt * shift.y; + out.xyz.z += dt * shift.z; return out.xyz; } @@ -146,19 +186,17 @@ static PJ_COORD forward_4d(PJ_COORD in, PJ *P) { PJ_COORD out = in; if (Q->t_obs != HUGE_VAL) { - dt = Q->t_obs - Q->t_epoch; + dt = Q->t_epoch - Q->t_obs; } else { - dt = in.xyzt.t - Q->t_epoch; + dt = Q->t_epoch - in.xyzt.t; } - if (Q->has_xy_grids) { - shift = get_xygrid_shift(P, in.xyz); - out.xyz.x += dt * shift.x; - out.xyz.y += dt * shift.y; - } + shift = get_grid_shift(P, in.xyz); + + out.xyzt.x += dt*shift.x; + out.xyzt.y += dt*shift.y; + out.xyzt.z += dt*shift.z; - if (Q->has_z_grids) - out.xyz.z += dt * get_zgrid_shift(P, in.xyz); return out; } @@ -178,12 +216,7 @@ static LPZ reverse_3d(XYZ in, PJ *P) { return out.lpz; } - if (Q->has_xy_grids) { - out.xyz = reverse_hshift(P, in, dt); - } - - if (Q->has_z_grids) - out.xyz.z = in.z + dt * get_zgrid_shift(P, in); + out.xyz = reverse_shift(P, in, dt); return out.lpz; } @@ -193,18 +226,14 @@ static PJ_COORD reverse_4d(PJ_COORD in, PJ *P) { PJ_COORD out = in; double dt; + if (Q->t_obs != HUGE_VAL) { dt = Q->t_epoch - Q->t_obs; } else { dt = Q->t_epoch - in.xyzt.t; } - if (Q->has_xy_grids) - out.xyz = reverse_hshift(P, in.xyz, dt); - - if (Q->has_z_grids) - out.xyz.z = in.xyz.z + dt * get_zgrid_shift(P, in.xyz); - + out.xyz = reverse_shift(P, in.xyz, dt); return out; } @@ -223,9 +252,11 @@ static void *destructor(PJ *P, int errlev) { PJ *TRANSFORMATION(deformation,1) { + int has_xy_grids = 0; + int has_z_grids = 0; struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque)); if (0==Q) - return pj_default_destructor(P, ENOMEM); + return destructor(P, ENOMEM); P->opaque = (void *) Q; Q->cart = proj_create(P->ctx, "+proj=cart"); @@ -235,30 +266,25 @@ PJ *TRANSFORMATION(deformation,1) { /* inherit ellipsoid definition from P to Q->cart */ pj_inherit_ellipsoid_def (P, Q->cart); - Q->has_xy_grids = pj_param(P->ctx, P->params, "txy_grids").i; - Q->has_z_grids = pj_param(P->ctx, P->params, "tz_grids").i; + has_xy_grids = pj_param(P->ctx, P->params, "txy_grids").i; + has_z_grids = pj_param(P->ctx, P->params, "tz_grids").i; - /* Build gridlists. P->gridlist and P->vgridlist_geoid can be empty if */ - /* +xy_grids or +z_grids only ask for optional grids */ - if (!Q->has_xy_grids && !Q->has_z_grids) { - proj_log_error(P, "deformation: At least one of either +xy_grids or +z_grids should be specified."); + /* Build gridlists. Both horizontal and vertical grids are mandatory. */ + if (!has_xy_grids || !has_z_grids) { + proj_log_error(P, "deformation: Both +xy_grids and +z_grids should be specified."); return destructor(P, PJD_ERR_NO_ARGS ); } - if (Q->has_xy_grids) { - Q->has_xy_grids = proj_hgrid_init(P, "xy_grids"); - if (proj_errno(P)) { - proj_log_error(P, "deformation: could not find requested grid(s)."); - return destructor(P, PJD_ERR_FAILED_TO_LOAD_GRID); - } + proj_hgrid_init(P, "xy_grids"); + if (proj_errno(P)) { + proj_log_error(P, "deformation: could not find requested xy_grid(s)."); + return destructor(P, PJD_ERR_FAILED_TO_LOAD_GRID); } - if (Q->has_z_grids) { - Q->has_z_grids = proj_vgrid_init(P, "z_grids"); - if (proj_errno(P)) { - proj_log_error(P, "deformation: could not find requested grid(s)."); - return destructor(P, PJD_ERR_FAILED_TO_LOAD_GRID); - } + proj_vgrid_init(P, "z_grids"); + if (proj_errno(P)) { + proj_log_error(P, "deformation: could not find requested z_grid(s)."); + return destructor(P, PJD_ERR_FAILED_TO_LOAD_GRID); } Q->t_obs = HUGE_VAL; diff --git a/src/proj.h b/src/proj.h index aa87ae7d..67c28b8d 100644 --- a/src/proj.h +++ b/src/proj.h @@ -206,6 +206,7 @@ typedef struct { double x, y, z, t; } PJ_XYZT; typedef struct { double u, v, w, t; } PJ_UVWT; typedef struct { double lam, phi, z, t; } PJ_LPZT; typedef struct { double o, p, k; } PJ_OPK; /* Rotations: omega, phi, kappa */ +typedef struct { double e, n, u; } PJ_ENU; /* East, North, Up */ /* Classic proj.4 pair/triplet types */ typedef struct { double u, v; } UV; @@ -224,6 +225,7 @@ union PJ_COORD { PJ_UVWT uvwt; PJ_LPZT lpzt; PJ_OPK opk; + PJ_ENU enu; XYZ xyz; UVW uvw; LPZ lpz; diff --git a/test/gie/deformation.gie b/test/gie/deformation.gie index ce9aca75..07a8b45e 100644 --- a/test/gie/deformation.gie +++ b/test/gie/deformation.gie @@ -11,65 +11,25 @@ The input coordinate is located at lon=60, lam=-160 - somewhere in Alaska. BEGIN -------------------------------------------------------------------------------- -Test using only horizontal grid and +tobs parameter -------------------------------------------------------------------------------- -OPERATION +proj=deformation +xy_grids=alaska +t_epoch=2016.0 +t_obs=2000.0 -------------------------------------------------------------------------------- -TOLERANCE 1 um -ACCEPT -3004295.5882503074 -1093474.1690603832 5500477.1338251457 -EXPECT -3004295.5888766116 -1093474.1688513425 5500477.1338251457 -# ROUNDTRIP 1000 - -------------------------------------------------------------------------------- -Test using only vertical grid and +tobs parameter -------------------------------------------------------------------------------- -OPERATION +proj=deformation +z_grids=egm96_15.gtx +t_epoch=2016.0 +t_obs=2000.0 -------------------------------------------------------------------------------- -TOLERANCE 1 um -ACCEPT -3004295.5882503074 -1093474.1690603832 5500477.1338251457 -EXPECT -3004295.5882503074 -1093474.1690603832 5500234.008855661 -# ROUNDTRIP 1000 - ------------------------------------------------------------------------------- Test using both horizontal and vertical grids as well as the +tobs parameter ------------------------------------------------------------------------------- -OPERATION +proj=deformation +xy_grids=alaska +z_grids=egm96_15.gtx +t_epoch=2016.0 +t_obs=2000.0 +OPERATION +proj=deformation +xy_grids=alaska +z_grids=egm96_15.gtx +t_epoch=2016.0 +t_obs=2000.0 +ellps=GRS80 ------------------------------------------------------------------------------- -TOLERANCE 0.000001 m +TOLERANCE 0.1 mm ACCEPT -3004295.5882503074 -1093474.1690603832 5500477.1338251457 -EXPECT -3004295.5888766116 -1093474.1688513425 5500234.008855661 -# ROUNDTRIP 1000 - -------------------------------------------------------------------------------- -Test using only horizontal grid -------------------------------------------------------------------------------- -OPERATION +proj=deformation +xy_grids=alaska +t_epoch=2016.0 -------------------------------------------------------------------------------- -TOLERANCE 1 um -ACCEPT -3004295.5882503074 -1093474.1690603832 5500477.1338251457 2000.0 -EXPECT -3004295.5888766116 -1093474.1688513425 5500477.1338251457 2000.0 -# ROUNDTRIP 1000 - -------------------------------------------------------------------------------- -Test using only vertical grid -------------------------------------------------------------------------------- -OPERATION +proj=deformation +z_grids=egm96_15.gtx +t_epoch=2016.0 -------------------------------------------------------------------------------- -TOLERANCE 1 um -ACCEPT -3004295.5882503074 -1093474.1690603832 5500477.1338251457 2000.0 -EXPECT -3004295.5882503074 -1093474.1690603832 5500234.008855661 2000.0 -# ROUNDTRIP 1000 +EXPECT -3004295.7025 -1093474.2106 5500477.3444 +ROUNDTRIP 5 ------------------------------------------------------------------------------- Test using both horizontal and vertical grids ------------------------------------------------------------------------------- OPERATION +proj=deformation +xy_grids=alaska +z_grids=egm96_15.gtx +t_epoch=2016.0 +ellps=GRS80 ------------------------------------------------------------------------------- -TOLERANCE 1 um +TOLERANCE 0.1 mm ACCEPT -3004295.5882503074 -1093474.1690603832 5500477.1338251457 2000.0 -EXPECT -3004295.5888766116 -1093474.1688513425 5500234.008855661 2000.0 -# ROUNDTRIP 1000 +EXPECT -3004295.7025 -1093474.2106 5500477.3444 2000.0 +ROUNDTRIP 5 END -- cgit v1.2.3 From d4cc6e3ea21acadc2083ab926d6a9ba28ae468f6 Mon Sep 17 00:00:00 2001 From: Charles Karney Date: Thu, 14 Dec 2017 07:04:54 -0500 Subject: Suppress warning C4996 centrally in CMakeLists.txt --- CMakeLists.txt | 3 ++- src/PJ_chamb.c | 5 ----- src/PJ_horner.c | 5 ----- src/cct.c | 4 ---- src/gie.c | 5 +---- src/nad2bin.c | 5 ----- src/optargpm.h | 10 ---------- src/pj_apply_gridshift.c | 5 ----- src/pj_apply_vgridshift.c | 5 ----- src/pj_datum_set.c | 5 ----- src/pj_fileapi.c | 5 ----- src/pj_gridinfo.c | 5 ----- src/pj_gridlist.c | 5 ----- src/pj_init.c | 5 ----- src/pj_log.c | 5 ----- src/pj_open_lib.c | 5 ----- src/proj_4D_api.c | 4 ---- 17 files changed, 3 insertions(+), 83 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 33547190..88f2b594 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,8 @@ if (NOT CMAKE_VERSION VERSION_LESS 3.1) endif () # Set warnings if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") - set(CMAKE_C_FLAGS "/WX ${CMAKE_C_FLAGS}") + # Suppress warning 4996 about sprintf, etc., being unsafe + set(CMAKE_C_FLAGS "/wd4996 /WX ${CMAKE_C_FLAGS}") elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") set(CMAKE_C_FLAGS "-std=c89 -Wall -Wextra -Wswitch -Werror \ -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat \ diff --git a/src/PJ_chamb.c b/src/PJ_chamb.c index 0a18ecf0..d0b9250e 100644 --- a/src/PJ_chamb.c +++ b/src/PJ_chamb.c @@ -3,11 +3,6 @@ #include #include "projects.h" -#if defined(_MSC_VER) -// Squelch warnings about unsafe use of sprintf, etc -# pragma warning (disable: 4996) -#endif - typedef struct { double r, Az; } VECT; struct pj_opaque { struct { /* control point data */ diff --git a/src/PJ_horner.c b/src/PJ_horner.c index 2f564edf..fe0452d6 100644 --- a/src/PJ_horner.c +++ b/src/PJ_horner.c @@ -82,11 +82,6 @@ #include #include -#if defined(_MSC_VER) -// Squelch warnings about unsafe use of sprintf, etc -# pragma warning (disable: 4996) -#endif - PROJ_HEAD(horner, "Horner polynomial evaluation"); /* make horner.h interface with proj's memory management */ diff --git a/src/cct.c b/src/cct.c index ae294190..a1c275b5 100644 --- a/src/cct.c +++ b/src/cct.c @@ -81,10 +81,6 @@ Thomas Knudsen, thokn@sdfe.dk, 2016-05-25/2017-10-26 #include #include -#if defined(_MSC_VER) -// Squelch warnings about unsafe use of sprintf, etc -# pragma warning (disable: 4996) -#endif double proj_strtod(const char *str, char **endptr); double proj_atof(const char *str); diff --git a/src/gie.c b/src/gie.c index fcf78a71..9e377648 100644 --- a/src/gie.c +++ b/src/gie.c @@ -119,10 +119,7 @@ Thomas Knudsen, thokn@sdfe.dk, 2017-10-01/2017-10-08 #include #include -#if defined(_MSC_VER) -// Squelch warnings about unsafe use of sprintf, etc -# pragma warning (disable: 4996) -#endif + /* from proj_strtod.c */ double proj_strtod(const char *str, char **endptr); diff --git a/src/nad2bin.c b/src/nad2bin.c index 92ceab09..8401df79 100644 --- a/src/nad2bin.c +++ b/src/nad2bin.c @@ -2,11 +2,6 @@ #include #include -#if defined(_MSC_VER) -// Squelch warnings about unsafe use of sprintf, etc -# pragma warning (disable: 4996) -#endif - #define PJ_LIB__ #include "proj_internal.h" #include "projects.h" diff --git a/src/optargpm.h b/src/optargpm.h index c2b23466..acb96583 100644 --- a/src/optargpm.h +++ b/src/optargpm.h @@ -193,12 +193,6 @@ Thomas Knudsen, thokn@sdfe.dk, 2016-05-25/2017-09-10 #include #include -#if defined(_MSC_VER) -// Squelch warnings about unsafe use of sprintf, etc -# pragma warning (push) -# pragma warning (disable: 4996) -#endif - /**************************************************************************************************/ struct OPTARGS; typedef struct OPTARGS OPTARGS; @@ -605,7 +599,3 @@ OPTARGS *opt_parse (int argc, char **argv, const char *flags, const char *keys, return o; } - -#if defined(_MSC_VER) -# pragma warning (pop) -#endif diff --git a/src/pj_apply_gridshift.c b/src/pj_apply_gridshift.c index d8bd8b43..a2267cbd 100644 --- a/src/pj_apply_gridshift.c +++ b/src/pj_apply_gridshift.c @@ -35,11 +35,6 @@ #include "proj_internal.h" #include "projects.h" -#if defined(_MSC_VER) -// Squelch warnings about unsafe use of sprintf, etc -# pragma warning (disable: 4996) -#endif - /************************************************************************/ /* pj_apply_gridshift() */ /* */ diff --git a/src/pj_apply_vgridshift.c b/src/pj_apply_vgridshift.c index d5baf9e8..6435b954 100644 --- a/src/pj_apply_vgridshift.c +++ b/src/pj_apply_vgridshift.c @@ -33,11 +33,6 @@ #include "proj_internal.h" #include "projects.h" -#if defined(_MSC_VER) -// Squelch warnings about unsafe use of sprintf, etc -# pragma warning (disable: 4996) -#endif - static double pj_read_vgrid_value( PJ *defn, LP input, int *gridlist_count_p, PJ_GRIDINFO **tables, struct CTABLE *ct) { int itable = 0; double value = HUGE_VAL; diff --git a/src/pj_datum_set.c b/src/pj_datum_set.c index 1622364c..c2fb1608 100644 --- a/src/pj_datum_set.c +++ b/src/pj_datum_set.c @@ -29,11 +29,6 @@ #include #include -#if defined(_MSC_VER) -// Squelch warnings about unsafe use of sprintf, etc -# pragma warning (disable: 4996) -#endif - /* SEC_TO_RAD = Pi/180/3600 */ #define SEC_TO_RAD 4.84813681109535993589914102357e-6 diff --git a/src/pj_fileapi.c b/src/pj_fileapi.c index 9fd6a2b4..e223993e 100644 --- a/src/pj_fileapi.c +++ b/src/pj_fileapi.c @@ -30,11 +30,6 @@ #include #include -#if defined(_MSC_VER) -// Squelch warnings about unsafe use of sprintf, etc -# pragma warning (disable: 4996) -#endif - static PAFile pj_stdio_fopen(projCtx ctx, const char *filename, const char *access); static size_t pj_stdio_fread(void *buffer, size_t size, size_t nmemb, diff --git a/src/pj_gridinfo.c b/src/pj_gridinfo.c index 9d69876e..9b9a8d82 100644 --- a/src/pj_gridinfo.c +++ b/src/pj_gridinfo.c @@ -34,11 +34,6 @@ #include #include -#if defined(_MSC_VER) -// Squelch warnings about unsafe use of sprintf, etc -# pragma warning (disable: 4996) -#endif - /************************************************************************/ /* swap_words() */ /* */ diff --git a/src/pj_gridlist.c b/src/pj_gridlist.c index 5bc608d7..fbefdcea 100644 --- a/src/pj_gridlist.c +++ b/src/pj_gridlist.c @@ -33,11 +33,6 @@ #include #include -#if defined(_MSC_VER) -// Squelch warnings about unsafe use of sprintf, etc -# pragma warning (disable: 4996) -#endif - static PJ_GRIDINFO *grid_list = NULL; #define PJ_MAX_PATH_LENGTH 1024 diff --git a/src/pj_init.c b/src/pj_init.c index a72dbec1..2d588ee4 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -36,11 +36,6 @@ #include "proj_internal.h" #include "projects.h" -#if defined(_MSC_VER) -// Squelch warnings about unsafe use of sprintf, etc -# pragma warning (disable: 4996) -#endif - /* Maximum size of files using the "escape carriage return" feature */ #define MAX_CR_ESCAPE 65537 typedef struct { diff --git a/src/pj_log.c b/src/pj_log.c index 3c4b7213..bab5f078 100644 --- a/src/pj_log.c +++ b/src/pj_log.c @@ -30,11 +30,6 @@ #include #include -#if defined(_MSC_VER) -// Squelch warnings about unsafe use of sprintf, etc -# pragma warning (disable: 4996) -#endif - /************************************************************************/ /* pj_stderr_logger() */ /************************************************************************/ diff --git a/src/pj_open_lib.c b/src/pj_open_lib.c index 35d0341f..08532beb 100644 --- a/src/pj_open_lib.c +++ b/src/pj_open_lib.c @@ -35,11 +35,6 @@ #include #include -#if defined(_MSC_VER) -// Squelch warnings about unsafe use of sprintf, etc -# pragma warning (disable: 4996) -#endif - static const char *(*pj_finder)(const char *) = NULL; static int path_count = 0; static char **search_path = NULL; diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index 34c03db2..5f4bf334 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -34,10 +34,6 @@ #include "projects.h" #include "geodesic.h" -#if defined(_MSC_VER) -// Squelch warnings about unsafe use of sprintf, etc -# pragma warning (disable: 4996) -#endif /* Initialize PJ_COORD struct */ PJ_COORD proj_coord (double x, double y, double z, double t) { -- cgit v1.2.3 From 0c2bf456e4e039ffbb4fe5ede8ed4ee069aff0e4 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Thu, 14 Dec 2017 17:11:04 +0100 Subject: Add time unit yyyymmdd to unitconvert operation (#707) Add time unit yyyymmdd to unitconvert operation --- src/PJ_unitconvert.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++-- src/gie.c | 6 +++- 2 files changed, 83 insertions(+), 3 deletions(-) diff --git a/src/PJ_unitconvert.c b/src/PJ_unitconvert.c index f951ebb6..36461150 100644 --- a/src/PJ_unitconvert.c +++ b/src/PJ_unitconvert.c @@ -94,6 +94,39 @@ static int days_in_year(int year) { return is_leap_year(year) ? 366 : 365; } +/***********************************************************************/ +static unsigned int days_in_month(unsigned int year, unsigned int month) { +/***********************************************************************/ + const unsigned int month_table[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; + unsigned int days; + + if (month > 12) month = 12; + if (month == 0) month = 1; + + days = month_table[month-1]; + if (is_leap_year(year) && month == 2) days++; + + return days; +} + + +/***********************************************************************/ +static int daynumber_in_year(unsigned int year, unsigned int month, unsigned int day) { +/***********************************************************************/ + unsigned int daynumber=0, i; + + if (month > 12) month = 12; + if (month == 0) month = 1; + if (day > days_in_month(year, month)) day = days_in_month(year, month); + + for (i = 1; i < month; i++) + daynumber += days_in_month(year, i); + + daynumber += day; + + return daynumber; + +} /***********************************************************************/ static double mjd_to_mjd(double mjd) { @@ -181,10 +214,53 @@ static double mjd_to_gps_week(double mjd) { return (mjd - 44244.0) / 7.0; } + +/***********************************************************************/ +static double yyyymmdd_to_mjd(double yyyymmdd) { +/************************************************************************ + Date given in YYYY-MM-DD format. +************************************************************************/ + + int year = (int)floor( yyyymmdd / 10000 ); + int month = (int)floor((yyyymmdd - year*10000) / 100); + int day = (int)floor( yyyymmdd - year*10000 - month*100); + double mjd = daynumber_in_year(year, month, day); + + for (year -= 1; year > 1858; year--) + mjd += days_in_year(year); + + return mjd + 13 + 31; +} + + +/***********************************************************************/ +static double mjd_to_yyyymmdd(double mjd) { +/************************************************************************ + Date given in YYYY-MM-DD format. +************************************************************************/ + double mjd_iter = 14 + 31; + int year = 1859, month=0, day=0; + + for (; mjd >= mjd_iter; year++) { + mjd_iter += days_in_year(year); + } + year--; + mjd_iter -= days_in_year(year); + + for (month=1; mjd_iter + days_in_month(year, month) <= mjd; month++) + mjd_iter += days_in_month(year, month); + + day = (int)(mjd - mjd_iter + 1); + + return year*10000 + month*100 + day; +} + + struct TIME_UNITS time_units[] = { {"mjd", mjd_to_mjd, mjd_to_mjd, "Modified julian date"}, {"decimalyear", decimalyear_to_mjd, mjd_to_decimalyear, "Decimal year"}, {"gps_week", gps_week_to_mjd, mjd_to_gps_week, "GPS Week"}, + {"yyyymmdd", yyyymmdd_to_mjd, mjd_to_yyyymmdd, "YYYYMMDD date"}, {NULL, NULL, NULL, NULL} }; @@ -323,8 +399,8 @@ PJ *CONVERSION(unitconvert,0) { P->fwd = forward_2d; P->inv = reverse_2d; - P->left = PJ_IO_UNITS_RADIANS; - P->right = PJ_IO_UNITS_RADIANS; + P->left = PJ_IO_UNITS_METERS; + P->right = PJ_IO_UNITS_METERS; /* if no time input/output unit is specified we can skip them */ Q->t_in_id = -1; diff --git a/src/gie.c b/src/gie.c index fa7921dd..c768c765 100644 --- a/src/gie.c +++ b/src/gie.c @@ -1698,12 +1698,16 @@ static int pj_unitconvert_selftest (void) { char args6[] = "+proj=unitconvert +xy_in=m +xy_out=m +z_in=m +z_out=m"; PJ_COORD in6 = {{12.3, 45.6, 7.89, 0}}; + char args7[] = "+proj=unitconvert +t_in=yyyymmdd +t_out=yyyymmdd"; + double in7 = 20170131; + ret = test_time(args1, 1e-6, in1, in1); if (ret) return ret + 10; ret = test_time(args2, 1e-6, in2, in2); if (ret) return ret + 20; ret = test_time(args3, 1e-6, in3, in3); if (ret) return ret + 30; ret = test_time(args4, 1e-6, in4, exp4); if (ret) return ret + 40; ret = test_xyz (args5, 1e-10, in5, exp5); if (ret) return ret + 50; - ret = test_xyz (args6, 1e-10, in6, in6); if (ret) return ret + 50; + ret = test_xyz (args6, 1e-10, in6, in6); if (ret) return ret + 60; + ret = test_time(args7, 1e-6, in7, in7); if (ret) return ret + 70; return 0; -- cgit v1.2.3 From 9ede4c65a92781ab4c1be5b0adac81ba593bfa8c Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 17 Dec 2017 14:49:58 +0100 Subject: Update epsg file to database v9.2 (fixes #711) --- nad/epsg | 450 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 446 insertions(+), 4 deletions(-) diff --git a/nad/epsg b/nad/epsg index 4276161d..1849ff50 100644 --- a/nad/epsg +++ b/nad/epsg @@ -1,4 +1,4 @@ - +version=9.0.0 +origin=EPSG +lastupdate=2017-01-10 + +version=9.2.0 +origin=EPSG +lastupdate=2017-12-17 # HD1909 <3819> +proj=longlat +ellps=bessel +towgs84=595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408 +no_defs <> # TWD67 @@ -588,7 +588,7 @@ # Perroud 1950 <4637> +proj=longlat +ellps=intl +towgs84=325,154,172,0,0,0,0 +no_defs <> # Saint Pierre et Miquelon 1950 -<4638> +proj=longlat +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +no_defs <> +<4638> +proj=longlat +ellps=clrk66 +towgs84=11.363,424.148,373.13,0,0,0,0 +no_defs <> # MOP78 <4639> +proj=longlat +ellps=intl +towgs84=253,-132,-127,0,0,0,0 +no_defs <> # RRAF 1991 @@ -1005,6 +1005,26 @@ <7881> +proj=longlat +ellps=WGS84 +towgs84=-0.077,0.079,0.086,0,0,0,0 +no_defs <> # SHGD2015 <7886> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <> +# Gusterberg (Ferro) +<8042> +proj=longlat +a=6376045 +b=6355477.112903226 +pm=ferro +no_defs <> +# St. Stephen (Ferro) +<8043> +proj=longlat +a=6376045 +b=6355477.112903226 +pm=ferro +no_defs <> +# ISN2016 +<8086> +proj=longlat +ellps=GRS80 +no_defs <> +# NAD83(CSRS96) +<8232> +proj=longlat +ellps=GRS80 +no_defs <> +# NAD83(CSRS)v2 +<8237> +proj=longlat +ellps=GRS80 +no_defs <> +# NAD83(CSRS)v3 +<8240> +proj=longlat +ellps=GRS80 +no_defs <> +# NAD83(CSRS)v4 +<8246> +proj=longlat +ellps=GRS80 +no_defs <> +# NAD83(CSRS)v5 +<8249> +proj=longlat +ellps=GRS80 +no_defs <> +# NAD83(CSRS)v6 +<8252> +proj=longlat +ellps=GRS80 +no_defs <> +# NAD83(CSRS)v7 +<8255> +proj=longlat +ellps=GRS80 +no_defs <> # Anguilla 1957 / British West Indies Grid <2000> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +units=m +no_defs <> # Antigua 1943 / British West Indies Grid @@ -2979,7 +2999,7 @@ # Unable to translate coordinate system EPSG:2986 into PROJ.4 format. # # Saint Pierre et Miquelon 1950 / UTM zone 21N -<2987> +proj=utm +zone=21 +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +units=m +no_defs <> +<2987> +proj=utm +zone=21 +ellps=clrk66 +towgs84=11.363,424.148,373.13,0,0,0,0 +units=m +no_defs <> # MOP78 / UTM zone 1S <2988> +proj=utm +zone=1 +south +ellps=intl +towgs84=253,-132,-127,0,0,0,0 +units=m +no_defs <> # RRAF 1991 / UTM zone 20N (deprecated) @@ -6931,7 +6951,7 @@ <6861> +proj=tmerc +lat_0=44.08333333333334 +lon_0=-122.5 +k=1.000155 +x_0=0 +y_0=0 +ellps=GRS80 +units=ft +no_defs <> # NAD83(2011) / Oregon Santiam Pass zone (m) <6862> +proj=tmerc +lat_0=44.08333333333334 +lon_0=-122.5 +k=1.000155 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs <> -# NAD83(2011) / Oregon Santiam Pass (ft) +# NAD83(2011) / Oregon Santiam Pass zone (ft) <6863> +proj=tmerc +lat_0=44.08333333333334 +lon_0=-122.5 +k=1.000155 +x_0=0 +y_0=0 +ellps=GRS80 +units=ft +no_defs <> # NAD83(CORS96) / Oregon LCC (m) <6867> +proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs <> @@ -7715,6 +7735,388 @@ <7887> +proj=utm +zone=30 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> # GDA2020 / Vicgrid <7899> +proj=lcc +lat_1=-36 +lat_2=-38 +lat_0=-37 +lon_0=145 +x_0=2500000 +y_0=2500000 +ellps=GRS80 +units=m +no_defs <> +# NAD27 / MTM zone 10 +<7991> +proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 +y_0=0 +datum=NAD27 +units=m +no_defs <> +# Malongo 1987 / UTM zone 33S +<7992> +proj=utm +zone=33 +south +ellps=intl +towgs84=-254.1,-5.36,-100.29,0,0,0,0 +units=m +no_defs <> +# GDA2020 / ALB2020 +<8013> +proj=tmerc +lat_0=0 +lon_0=117.8833333333333 +k=1.0000044 +x_0=50000 +y_0=4100000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / BIO2020 +<8014> +proj=tmerc +lat_0=0 +lon_0=115.25 +k=1.0000022 +x_0=60000 +y_0=2700000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / BRO2020 +<8015> +proj=tmerc +lat_0=0 +lon_0=122.3333333333333 +k=1.00000298 +x_0=50000 +y_0=2300000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / BCG2020 +<8016> +proj=tmerc +lat_0=0 +lon_0=115.4333333333333 +k=0.99999592 +x_0=50000 +y_0=4000000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / CARN2020 +<8017> +proj=tmerc +lat_0=0 +lon_0=113.6666666666667 +k=0.99999796 +x_0=50000 +y_0=3050000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / CIG2020 +<8018> +proj=tmerc +lat_0=0 +lon_0=105.625 +k=1.00002514 +x_0=50000 +y_0=1400000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / CKIG2020 +<8019> +proj=tmerc +lat_0=0 +lon_0=96.875 +k=0.99999387 +x_0=50000 +y_0=1600000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / COL2020 +<8020> +proj=tmerc +lat_0=0 +lon_0=115.9333333333333 +k=1.000019 +x_0=40000 +y_0=4100000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / ESP2020 +<8021> +proj=tmerc +lat_0=0 +lon_0=121.8833333333333 +k=1.0000055 +x_0=50000 +y_0=4050000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / EXM2020 +<8022> +proj=tmerc +lat_0=0 +lon_0=114.0666666666667 +k=1.00000236 +x_0=50000 +y_0=2750000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / GCG2020 +<8023> +proj=tmerc +lat_0=0 +lon_0=114.5833333333333 +k=1.00000628 +x_0=50000 +y_0=3450000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / GOLD2020 +<8024> +proj=tmerc +lat_0=0 +lon_0=121.5 +k=1.00004949 +x_0=60000 +y_0=3800000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / JCG2020 +<8025> +proj=tmerc +lat_0=0 +lon_0=114.9833333333333 +k=1.00000314 +x_0=50000 +y_0=3650000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / KALB2020 +<8026> +proj=tmerc +lat_0=0 +lon_0=114.3152777777778 +k=1.000014 +x_0=55000 +y_0=3700000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / KAR2020 +<8027> +proj=tmerc +lat_0=0 +lon_0=116.9333333333333 +k=0.9999989 +x_0=50000 +y_0=2550000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / KUN2020 +<8028> +proj=tmerc +lat_0=0 +lon_0=128.75 +k=1.0000165 +x_0=50000 +y_0=2100000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / LCG2020 +<8029> +proj=tmerc +lat_0=0 +lon_0=115.3666666666667 +k=1.00000157 +x_0=50000 +y_0=3750000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / MRCG2020 +<8030> +proj=tmerc +lat_0=0 +lon_0=115.1666666666667 +k=1.0000055 +x_0=50000 +y_0=4050000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / PCG2020 +<8031> +proj=tmerc +lat_0=0 +lon_0=115.8166666666667 +k=0.9999990600000001 +x_0=50000 +y_0=3900000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / PHG2020 +<8032> +proj=tmerc +lat_0=0 +lon_0=118.6 +k=1.00000135 +x_0=50000 +y_0=2500000 +ellps=GRS80 +units=m +no_defs <> +# WGS 84 / TM Zone 20N (ftUS) +<8035> +proj=utm +zone=20 +datum=WGS84 +units=us-ft +no_defs <> +# WGS 84 / TM Zone 21N (ftUS) +<8036> +proj=utm +zone=21 +datum=WGS84 +units=us-ft +no_defs <> +# Gusterberg Grid (Ferro) +<8044> +proj=cass +lat_0=48.03846388888888 +lon_0=31.80418055555556 +x_0=0 +y_0=0 +a=6376045 +b=6355477.112903226 +pm=ferro +units=m +no_defs <> +# St. Stephen Grid (Ferro) +<8045> +proj=cass +lat_0=48.20876111111112 +lon_0=34.04092222222222 +x_0=0 +y_0=0 +a=6376045 +b=6355477.112903226 +pm=ferro +units=m +no_defs <> +# GDA2020 / NSW Lambert +<8058> +proj=lcc +lat_1=-30.75 +lat_2=-35.75 +lat_0=-33.25 +lon_0=147 +x_0=9300000 +y_0=4500000 +ellps=GRS80 +units=m +no_defs <> +# GDA2020 / SA Lambert +<8059> +proj=lcc +lat_1=-28 +lat_2=-36 +lat_0=-32 +lon_0=135 +x_0=1000000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / PCCS zone 1 (ft) +<8065> +proj=omerc +lat_0=32.25 +lonc=-111.4 +alpha=45 +k=1.00011 +x_0=48768 +y_0=243840 +gamma=45 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / PCCS zone 2 (ft) +<8066> +proj=tmerc +lat_0=31.25 +lon_0=-112.1666666666667 +k=1.00009 +x_0=548640 +y_0=304800 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / PCCS zone 3 (ft) +<8067> +proj=tmerc +lat_0=31.5 +lon_0=-113.1666666666667 +k=1.000055 +x_0=182880 +y_0=0 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / PCCS zone 4 (ft) +<8068> +proj=lcc +lat_1=30.5 +lat_0=30.5 +lon_0=-110.75 +k_0=0.9998 +x_0=9144 +y_0=-188976 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(CSRS)v6 / MTM Nova Scotia zone 4 +<8082> +proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=24500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <> +# NAD83(CSRS)v6 / MTM Nova Scotia zone 5 +<8083> +proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=25500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <> +# ISN2016 / Lambert 2016 +<8088> +proj=lcc +lat_1=64.25 +lat_2=65.75 +lat_0=65 +lon_0=-19 +x_0=2700000 +y_0=300000 +ellps=GRS80 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Florence (m) +<8090> +proj=tmerc +lat_0=45.43888888888888 +lon_0=-88.14166666666668 +k=1.0000552095 +x_0=133502.6683 +y_0=0.0063 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Florence (ftUS) +<8091> +proj=tmerc +lat_0=45.43888888888888 +lon_0=-88.14166666666668 +k=1.0000552095 +x_0=133502.6682245364 +y_0=0.006400812801625603 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Eau Claire (m) +<8092> +proj=lcc +lat_1=44.87228112638889 +lat_0=44.87228112638889 +lon_0=-91.28888888888889 +k_0=1.000035079 +x_0=120091.4402 +y_0=91687.92389999999 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Eau Claire (ftUS) +<8093> +proj=lcc +lat_1=44.87228112638889 +lat_0=44.87228112638889 +lon_0=-91.28888888888889 +k_0=1.000035079 +x_0=120091.4401828804 +y_0=91687.92390144781 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Wood (m) +<8095> +proj=lcc +lat_1=44.36259546944444 +lat_0=44.36259546944444 +lon_0=-90 +k_0=1.0000421209 +x_0=208483.6173 +y_0=134589.754 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Wood (ftUS) +<8096> +proj=lcc +lat_1=44.36259546944444 +lat_0=44.36259546944444 +lon_0=-90 +k_0=1.0000421209 +x_0=208483.6172720346 +y_0=134589.7539243078 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Waushara (m) +<8097> +proj=lcc +lat_1=44.11394404583334 +lat_0=44.11394404583334 +lon_0=-89.24166666666667 +k_0=1.0000392096 +x_0=120091.4402 +y_0=45069.7587 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Waushara (ftUS) +<8098> +proj=lcc +lat_1=44.11394404583334 +lat_0=44.11394404583334 +lon_0=-89.24166666666667 +k_0=1.0000392096 +x_0=120091.4401828804 +y_0=45069.7588011176 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Waupaca (m) +<8099> +proj=tmerc +lat_0=43.42027777777778 +lon_0=-88.81666666666666 +k=1.0000333645 +x_0=185013.9709 +y_0=0.007 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Waupaca (ftUS) +<8100> +proj=tmerc +lat_0=43.42027777777778 +lon_0=-88.81666666666666 +k=1.0000333645 +x_0=185013.9709423419 +y_0=0.007010414020828041 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Waukesha (m) +<8101> +proj=tmerc +lat_0=42.56944444444445 +lon_0=-88.22499999999999 +k=1.0000346179 +x_0=208788.418 +y_0=0.0034 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Waukesha (ftUS) +<8102> +proj=tmerc +lat_0=42.56944444444445 +lon_0=-88.22499999999999 +k=1.0000346179 +x_0=208788.4178816358 +y_0=0.003352806705613411 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Washington (m) +<8103> +proj=tmerc +lat_0=42.91805555555555 +lon_0=-88.06388888888888 +k=1.00003738 +x_0=120091.4415 +y_0=0.003 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Washington (ftUS) +<8104> +proj=tmerc +lat_0=42.91805555555555 +lon_0=-88.06388888888888 +k=1.00003738 +x_0=120091.4414020828 +y_0=0.003048006096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Washburn (m) +<8105> +proj=lcc +lat_1=45.96121983333334 +lat_0=45.96121983333334 +lon_0=-91.78333333333333 +k_0=1.0000475376 +x_0=234086.8682 +y_0=188358.6058 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Washburn (ftUS) +<8106> +proj=lcc +lat_1=45.96121983333334 +lat_0=45.96121983333334 +lon_0=-91.78333333333333 +k_0=1.0000475376 +x_0=234086.8681737363 +y_0=188358.6059436119 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Walworth (m) +<8107> +proj=lcc +lat_1=42.66946209694444 +lat_0=42.66946209694444 +lon_0=-88.54166666666667 +k_0=1.0000367192 +x_0=232562.8651 +y_0=111088.2224 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Walworth (ftUS) +<8108> +proj=lcc +lat_1=42.66946209694444 +lat_0=42.66946209694444 +lon_0=-88.54166666666667 +k_0=1.0000367192 +x_0=232562.8651257302 +y_0=111088.2224028448 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Vilas (m) +<8109> +proj=lcc +lat_1=46.07784409055556 +lat_0=46.07784409055556 +lon_0=-89.48888888888889 +k_0=1.0000730142 +x_0=134417.0689 +y_0=50337.1092 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Vilas (ftUS) +<8110> +proj=lcc +lat_1=46.07784409055556 +lat_0=46.07784409055556 +lon_0=-89.48888888888889 +k_0=1.0000730142 +x_0=134417.0688341377 +y_0=50337.10927101854 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Vernon (m) +<8111> +proj=lcc +lat_1=43.57503293972223 +lat_0=43.57503293972223 +lon_0=-90.78333333333333 +k_0=1.0000408158 +x_0=222504.4451 +y_0=47532.0602 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Vernon (ftUS) +<8112> +proj=lcc +lat_1=43.57503293972223 +lat_0=43.57503293972223 +lon_0=-90.78333333333333 +k_0=1.0000408158 +x_0=222504.44500889 +y_0=47532.0603505207 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Trempealeau (m) +<8113> +proj=tmerc +lat_0=43.16111111111111 +lon_0=-91.36666666666666 +k=1.0000361538 +x_0=256946.9138 +y_0=0.0041 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Trempealeau (ftUS) +<8114> +proj=tmerc +lat_0=43.16111111111111 +lon_0=-91.36666666666666 +k=1.0000361538 +x_0=256946.9138938278 +y_0=0.003962407924815849 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Taylor (m) +<8115> +proj=lcc +lat_1=45.17782208583333 +lat_0=45.17782208583333 +lon_0=-90.48333333333333 +k_0=1.0000597566 +x_0=187147.5744 +y_0=107746.7522 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Taylor (ftUS) +<8116> +proj=lcc +lat_1=45.17782208583333 +lat_0=45.17782208583333 +lon_0=-90.48333333333333 +k_0=1.0000597566 +x_0=187147.5742951486 +y_0=107746.7521463043 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS St. Croix (m) +<8117> +proj=tmerc +lat_0=44.03611111111111 +lon_0=-92.63333333333334 +k=1.0000381803 +x_0=165506.7302 +y_0=0.0103 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS St. Croix (ftUS) +<8118> +proj=tmerc +lat_0=44.03611111111111 +lon_0=-92.63333333333334 +k=1.0000381803 +x_0=165506.7300990602 +y_0=0.01036322072644145 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Shawano (m) +<8119> +proj=tmerc +lat_0=44.03611111111111 +lon_0=-88.60555555555555 +k=1.000032144 +x_0=262433.3253 +y_0=0.009599999999999999 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Shawano (ftUS) +<8120> +proj=tmerc +lat_0=44.03611111111111 +lon_0=-88.60555555555555 +k=1.000032144 +x_0=262433.3251714504 +y_0=0.009448818897637795 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Sawyer (m) +<8121> +proj=lcc +lat_1=45.90009913138888 +lat_0=45.90009913138888 +lon_0=-91.11666666666666 +k_0=1.0000573461 +x_0=216713.2336 +y_0=120734.1631 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Sawyer (ftUS) +<8122> +proj=lcc +lat_1=45.90009913138888 +lat_0=45.90009913138888 +lon_0=-91.11666666666666 +k_0=1.0000573461 +x_0=216713.2337312675 +y_0=120734.1631699263 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Sauk (m) +<8123> +proj=tmerc +lat_0=42.81944444444445 +lon_0=-89.90000000000001 +k=1.0000373868 +x_0=185623.5716 +y_0=0.0051 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Sauk (ftUS) +<8124> +proj=tmerc +lat_0=42.81944444444445 +lon_0=-89.90000000000001 +k=1.0000373868 +x_0=185623.5715519431 +y_0=0.005181610363220727 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Rusk (m) +<8125> +proj=tmerc +lat_0=43.91944444444444 +lon_0=-91.06666666666666 +k=1.0000495976 +x_0=250546.1013 +y_0=0.0234 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Rusk (ftUS) +<8126> +proj=tmerc +lat_0=43.91944444444444 +lon_0=-91.06666666666666 +k=1.0000495976 +x_0=250546.1013970028 +y_0=0.02346964693929388 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Rock (m) +<8127> +proj=tmerc +lat_0=41.94444444444444 +lon_0=-89.07222222222222 +k=1.0000337311 +x_0=146304.2926 +y_0=0.0068 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Rock (ftUS) +<8128> +proj=tmerc +lat_0=41.94444444444444 +lon_0=-89.07222222222222 +k=1.0000337311 +x_0=146304.2926085852 +y_0=0.006705613411226822 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Richland (m) +<8129> +proj=lcc +lat_1=43.3223129275 +lat_0=43.3223129275 +lon_0=-90.43055555555556 +k_0=1.0000375653 +x_0=202387.6048 +y_0=134255.4253 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Richland (ftUS) +<8130> +proj=lcc +lat_1=43.3223129275 +lat_0=43.3223129275 +lon_0=-90.43055555555556 +k_0=1.0000375653 +x_0=202387.6047752095 +y_0=134255.4254508509 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Price (m) +<8131> +proj=tmerc +lat_0=44.55555555555555 +lon_0=-90.48888888888889 +k=1.0000649554 +x_0=227990.8546 +y_0=0.0109 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Price (ftUS) +<8132> +proj=tmerc +lat_0=44.55555555555555 +lon_0=-90.48888888888889 +k=1.0000649554 +x_0=227990.8544577089 +y_0=0.01097282194564389 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Portage (m) +<8133> +proj=lcc +lat_1=44.41682397527777 +lat_0=44.41682397527777 +lon_0=-89.5 +k_0=1.000039936 +x_0=56388.1128 +y_0=50022.1874 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Portage (ftUS) +<8134> +proj=lcc +lat_1=44.41682397527777 +lat_0=44.41682397527777 +lon_0=-89.5 +k_0=1.000039936 +x_0=56388.11277622555 +y_0=50022.1874523749 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Polk (m) +<8135> +proj=tmerc +lat_0=44.66111111111111 +lon_0=-92.63333333333334 +k=1.0000433849 +x_0=141732.2823 +y_0=0.0059 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Polk (ftUS) +<8136> +proj=tmerc +lat_0=44.66111111111111 +lon_0=-92.63333333333334 +k=1.0000433849 +x_0=141732.2822453645 +y_0=0.005791211582423164 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Pepin and Pierce (m) +<8137> +proj=lcc +lat_1=44.63614887194444 +lat_0=44.63614887194444 +lon_0=-92.22777777777777 +k_0=1.0000362977 +x_0=167640.3354 +y_0=86033.0876 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Pepin and Pierce (ftUS) +<8138> +proj=lcc +lat_1=44.63614887194444 +lat_0=44.63614887194444 +lon_0=-92.22777777777777 +k_0=1.0000362977 +x_0=167640.3352806706 +y_0=86033.08773177546 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Oneida (m) +<8139> +proj=lcc +lat_1=45.70422377027778 +lat_0=45.70422377027778 +lon_0=-89.54444444444444 +k_0=1.0000686968 +x_0=70104.1401 +y_0=57588.0346 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Oneida (ftUS) +<8140> +proj=lcc +lat_1=45.70422377027778 +lat_0=45.70422377027778 +lon_0=-89.54444444444444 +k_0=1.0000686968 +x_0=70104.14020828041 +y_0=57588.03474726949 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Oconto (m) +<8141> +proj=tmerc +lat_0=44.39722222222222 +lon_0=-87.90833333333335 +k=1.0000236869 +x_0=182880.3676 +y_0=0.0033 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Oconto (ftUS) +<8142> +proj=tmerc +lat_0=44.39722222222222 +lon_0=-87.90833333333335 +k=1.0000236869 +x_0=182880.3675895352 +y_0=0.003352806705613411 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Monroe (m) +<8143> +proj=lcc +lat_1=44.00007392861111 +lat_0=44.00007392861111 +lon_0=-90.64166666666668 +k_0=1.0000434122 +x_0=204521.209 +y_0=121923.9861 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Monroe (ftUS) +<8144> +proj=lcc +lat_1=44.00007392861111 +lat_0=44.00007392861111 +lon_0=-90.64166666666668 +k_0=1.0000434122 +x_0=204521.2090424181 +y_0=121923.9861823724 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Menominee (m) +<8145> +proj=tmerc +lat_0=44.71666666666667 +lon_0=-88.41666666666667 +k=1.0000362499 +x_0=105461.0121 +y_0=0.0029 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Menominee (ftUS) +<8146> +proj=tmerc +lat_0=44.71666666666667 +lon_0=-88.41666666666667 +k=1.0000362499 +x_0=105461.0121412243 +y_0=0.003048006096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Marinette (m) +<8147> +proj=tmerc +lat_0=44.69166666666666 +lon_0=-87.71111111111111 +k=1.0000234982 +x_0=238658.8794 +y_0=0.0032 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Marinette (ftUS) +<8148> +proj=tmerc +lat_0=44.69166666666666 +lon_0=-87.71111111111111 +k=1.0000234982 +x_0=238658.8794513589 +y_0=0.003048006096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Marathon (m) +<8149> +proj=lcc +lat_1=44.90090442361111 +lat_0=44.90090442361111 +lon_0=-89.77 +k_0=1.000053289 +x_0=74676.1493 +y_0=55049.2669 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Marathon (ftUS) +<8150> +proj=lcc +lat_1=44.90090442361111 +lat_0=44.90090442361111 +lon_0=-89.77 +k_0=1.000053289 +x_0=74676.1493522987 +y_0=55049.26695453391 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Lincoln (m) +<8151> +proj=tmerc +lat_0=44.84444444444445 +lon_0=-89.73333333333333 +k=1.0000599003 +x_0=116129.0323 +y_0=0.0058 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Lincoln (ftUS) +<8152> +proj=tmerc +lat_0=44.84444444444445 +lon_0=-89.73333333333333 +k=1.0000599003 +x_0=116129.0322580645 +y_0=0.005791211582423164 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Langlade (m) +<8153> +proj=lcc +lat_1=45.15423710527778 +lat_0=45.15423710527778 +lon_0=-89.03333333333333 +k_0=1.0000627024 +x_0=198425.197 +y_0=105279.7829 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Langlade (ftUS) +<8154> +proj=lcc +lat_1=45.15423710527778 +lat_0=45.15423710527778 +lon_0=-89.03333333333333 +k_0=1.0000627024 +x_0=198425.1968503937 +y_0=105279.7828803657 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS La Crosse (m) +<8155> +proj=tmerc +lat_0=43.45111111111111 +lon_0=-91.31666666666666 +k=1.0000319985 +x_0=130454.6598 +y_0=0.0033 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS La Crosse (ftUS) +<8156> +proj=tmerc +lat_0=43.45111111111111 +lon_0=-91.31666666666666 +k=1.0000319985 +x_0=130454.6596901194 +y_0=0.003352806705613411 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Kewaunee, Manitowoc and Sheboygan (m) +<8157> +proj=tmerc +lat_0=43.26666666666667 +lon_0=-87.55 +k=1.0000233704 +x_0=79857.7614 +y_0=0.0012 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Kewaunee, Manitowoc and Sheboygan (ftUS) +<8158> +proj=tmerc +lat_0=43.26666666666667 +lon_0=-87.55 +k=1.0000233704 +x_0=79857.76154432308 +y_0=0.001219202438404877 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Kenosha, Milwaukee, Ozaukee and Racine (m) +<8159> +proj=tmerc +lat_0=42.21666666666667 +lon_0=-87.89444444444445 +k=1.0000260649 +x_0=185928.3728 +y_0=0.0009 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Kenosha, Milwaukee, Ozaukee and Racine (ftUS) +<8160> +proj=tmerc +lat_0=42.21666666666667 +lon_0=-87.89444444444445 +k=1.0000260649 +x_0=185928.3727711455 +y_0=0.0009144018288036576 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Jackson (m) +<8161> +proj=tmerc +lat_0=44.25333512777778 +lon_0=-90.84429651944444 +k=1.0000353 +x_0=27000 +y_0=25000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Jackson (ftUS) +<8162> +proj=tmerc +lat_0=44.25333512777778 +lon_0=-90.84429651944444 +k=1.0000353 +x_0=27000 +y_0=24999.99989839979 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Iron (m) +<8163> +proj=tmerc +lat_0=45.43333333333333 +lon_0=-90.25555555555556 +k=1.0000677153 +x_0=220980.4419 +y_0=0.008500000000000001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Iron (ftUS) +<8164> +proj=tmerc +lat_0=45.43333333333333 +lon_0=-90.25555555555556 +k=1.0000677153 +x_0=220980.4419608839 +y_0=0.008534417068834137 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Iowa (m) +<8165> +proj=tmerc +lat_0=42.53888888888888 +lon_0=-90.16111111111111 +k=1.0000394961 +x_0=113081.0261 +y_0=0.0045 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Iowa (ftUS) +<8166> +proj=tmerc +lat_0=42.53888888888888 +lon_0=-90.16111111111111 +k=1.0000394961 +x_0=113081.0261620523 +y_0=0.004572009144018288 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Green Lake and Marquette (m) +<8167> +proj=lcc +lat_1=43.80700011777778 +lat_0=43.80700011777778 +lon_0=-89.24166666666667 +k_0=1.0000344057 +x_0=150876.3018 +y_0=79170.7795 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Green Lake and Marquette (ftUS) +<8168> +proj=lcc +lat_1=43.80700011777778 +lat_0=43.80700011777778 +lon_0=-89.24166666666667 +k_0=1.0000344057 +x_0=150876.3017526035 +y_0=79170.77937515875 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Green and Lafayette (m) +<8169> +proj=lcc +lat_1=42.63756227694444 +lat_0=42.63756227694444 +lon_0=-89.83888888888889 +k_0=1.0000390487 +x_0=170078.7403 +y_0=45830.2947 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Green and Lafayette (ftUS) +<8170> +proj=lcc +lat_1=42.63756227694444 +lat_0=42.63756227694444 +lon_0=-89.83888888888889 +k_0=1.0000390487 +x_0=170078.7401574803 +y_0=45830.29484378968 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Grant (m) +<8171> +proj=tmerc +lat_0=41.41111111111111 +lon_0=-90.8 +k=1.0000349452 +x_0=242316.4841 +y_0=0.01 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Grant (ftUS) +<8172> +proj=tmerc +lat_0=41.41111111111111 +lon_0=-90.8 +k=1.0000349452 +x_0=242316.484023368 +y_0=0.01005842011684023 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Forest (m) +<8173> +proj=tmerc +lat_0=44.00555555555555 +lon_0=-88.63333333333334 +k=1.0000673004 +x_0=275844.5533 +y_0=0.0157 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Forest (ftUS) +<8177> +proj=tmerc +lat_0=44.00555555555555 +lon_0=-88.63333333333334 +k=1.0000673004 +x_0=275844.5532131065 +y_0=0.0158496316992634 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Dunn (m) +<8179> +proj=tmerc +lat_0=44.40833333333333 +lon_0=-91.89444444444445 +k=1.0000410324 +x_0=51816.104 +y_0=0.003 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Dunn (ftUS) +<8180> +proj=tmerc +lat_0=44.40833333333333 +lon_0=-91.89444444444445 +k=1.0000410324 +x_0=51816.10393700787 +y_0=0.003048006096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Douglas (m) +<8181> +proj=tmerc +lat_0=45.88333333333333 +lon_0=-91.91666666666667 +k=1.0000385418 +x_0=59131.3183 +y_0=0.0041 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Douglas (ftUS) +<8182> +proj=tmerc +lat_0=45.88333333333333 +lon_0=-91.91666666666667 +k=1.0000385418 +x_0=59131.31826263652 +y_0=0.003962407924815849 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Door (m) +<8184> +proj=tmerc +lat_0=44.4 +lon_0=-87.27222222222223 +k=1.0000187521 +x_0=158801.1176 +y_0=0.0023 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Door (ftUS) +<8185> +proj=tmerc +lat_0=44.4 +lon_0=-87.27222222222223 +k=1.0000187521 +x_0=158801.1176022352 +y_0=0.002438404876809754 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Dodge and Jefferson (m) +<8187> +proj=tmerc +lat_0=41.47222222222222 +lon_0=-88.77500000000001 +k=1.0000346418 +x_0=263347.7263 +y_0=0.0076 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Dodge and Jefferson (ftUS) +<8189> +proj=tmerc +lat_0=41.47222222222222 +lon_0=-88.77500000000001 +k=1.0000346418 +x_0=263347.7263906528 +y_0=0.00762001524003048 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Dane (m) +<8191> +proj=lcc +lat_1=43.0695160375 +lat_0=43.0695160375 +lon_0=-89.42222222222223 +k_0=1.0000384786 +x_0=247193.2944 +y_0=146591.9896 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Dane (ftUS) +<8193> +proj=lcc +lat_1=43.0695160375 +lat_0=43.0695160375 +lon_0=-89.42222222222223 +k_0=1.0000384786 +x_0=247193.2943865888 +y_0=146591.9896367793 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Crawford (m) +<8196> +proj=lcc +lat_1=43.200055605 +lat_0=43.200055605 +lon_0=-90.9388888888889 +k_0=1.0000349151 +x_0=113690.6274 +y_0=53703.1201 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Crawford (ftUS) +<8197> +proj=lcc +lat_1=43.200055605 +lat_0=43.200055605 +lon_0=-90.9388888888889 +k_0=1.0000349151 +x_0=113690.6273812548 +y_0=53703.12024384048 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Columbia (m) +<8198> +proj=lcc +lat_1=43.46254664583333 +lat_0=43.46254664583333 +lon_0=-89.39444444444445 +k_0=1.00003498 +x_0=169164.3381 +y_0=111569.6134 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Columbia (ftUS) +<8200> +proj=lcc +lat_1=43.46254664583333 +lat_0=43.46254664583333 +lon_0=-89.39444444444445 +k_0=1.00003498 +x_0=169164.338023876 +y_0=111569.613512827 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Clark (m) +<8201> +proj=tmerc +lat_0=43.6 +lon_0=-90.70833333333334 +k=1.0000463003 +x_0=199949.1989 +y_0=0.0086 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Clark (ftUS) +<8202> +proj=tmerc +lat_0=43.6 +lon_0=-90.70833333333334 +k=1.0000463003 +x_0=199949.198983998 +y_0=0.008534417068834137 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Chippewa (m) +<8203> +proj=lcc +lat_1=44.97785689861112 +lat_0=44.97785689861112 +lon_0=-91.29444444444444 +k_0=1.0000391127 +x_0=60045.72 +y_0=44091.4346 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Chippewa (ftUS) +<8204> +proj=lcc +lat_1=44.97785689861112 +lat_0=44.97785689861112 +lon_0=-91.29444444444444 +k_0=1.0000391127 +x_0=60045.72009144018 +y_0=44091.43449326898 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Calumet, Fond du Lac, Outagamie and Winnebago (m) +<8205> +proj=tmerc +lat_0=42.71944444444445 +lon_0=-88.5 +k=1.0000286569 +x_0=244754.8893 +y_0=0.0049 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Calumet, Fond du Lac, Outagamie and Winnebago (ftUS) +<8206> +proj=tmerc +lat_0=42.71944444444445 +lon_0=-88.5 +k=1.0000286569 +x_0=244754.8892049784 +y_0=0.004876809753619507 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Burnett (m) +<8207> +proj=lcc +lat_1=45.89871486583333 +lat_0=45.89871486583333 +lon_0=-92.45777777777778 +k_0=1.0000383841 +x_0=64008.1276 +y_0=59445.9043 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Burnett (ftUS) +<8208> +proj=lcc +lat_1=45.89871486583333 +lat_0=45.89871486583333 +lon_0=-92.45777777777778 +k_0=1.0000383841 +x_0=64008.12771145543 +y_0=59445.90419100838 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Buffalo (m) +<8209> +proj=tmerc +lat_0=43.48138888888889 +lon_0=-91.79722222222222 +k=1.0000382778 +x_0=175260.3502 +y_0=0.0048 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Buffalo (ftUS) +<8210> +proj=tmerc +lat_0=43.48138888888889 +lon_0=-91.79722222222222 +k=1.0000382778 +x_0=175260.3502159004 +y_0=0.004876809753619507 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Brown (m) +<8212> +proj=tmerc +lat_0=43 +lon_0=-88 +k=1.00002 +x_0=31600 +y_0=4600 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Brown (ftUS) +<8213> +proj=tmerc +lat_0=43 +lon_0=-88 +k=1.00002 +x_0=31599.99989839979 +y_0=4599.999898399797 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Bayfield (m) +<8214> +proj=lcc +lat_1=46.66964837722222 +lat_0=46.66964837722222 +lon_0=-91.15277777777779 +k_0=1.0000331195 +x_0=228600.4575 +y_0=148551.4837 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Bayfield (ftUS) +<8216> +proj=lcc +lat_1=46.66964837722222 +lat_0=46.66964837722222 +lon_0=-91.15277777777779 +k_0=1.0000331195 +x_0=228600.4575057151 +y_0=148551.4835661671 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Barron (m) +<8218> +proj=tmerc +lat_0=45.13333333333333 +lon_0=-91.84999999999999 +k=1.0000486665 +x_0=93150 +y_0=0.0029 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Barron (ftUS) +<8220> +proj=tmerc +lat_0=45.13333333333333 +lon_0=-91.84999999999999 +k=1.0000486665 +x_0=93150 +y_0=0.003048006096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Ashland (m) +<8222> +proj=tmerc +lat_0=45.70611111111111 +lon_0=-90.62222222222222 +k=1.0000495683 +x_0=172821.9461 +y_0=0.0017 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Ashland (ftUS) +<8224> +proj=tmerc +lat_0=45.70611111111111 +lon_0=-90.62222222222222 +k=1.0000495683 +x_0=172821.945948692 +y_0=0.001828803657607315 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(HARN) / WISCRS Adams and Juneau (m) +<8225> +proj=tmerc +lat_0=43.36666666666667 +lon_0=-90 +k=1.0000365285 +x_0=147218.6942 +y_0=0.0037 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> +# NAD83(HARN) / WISCRS Adams and Juneau (ftUS) +<8226> +proj=tmerc +lat_0=43.36666666666667 +lon_0=-90 +k=1.0000365285 +x_0=147218.6941325883 +y_0=0.00365760731521463 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs <> +# NAD83(2011) / Oregon Burns-Harper zone (m) +<8311> +proj=tmerc +lat_0=43.5 +lon_0=-117.6666666666667 +k=1.00014 +x_0=90000 +y_0=0 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon Burns-Harper zone (ft) +<8312> +proj=tmerc +lat_0=43.5 +lon_0=-117.6666666666667 +k=1.00014 +x_0=90000.00001488 +y_0=0 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / Oregon Canyon City-Burns zone (m) +<8313> +proj=tmerc +lat_0=43.5 +lon_0=-119 +k=1.00022 +x_0=20000 +y_0=0 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon Canyon City-Burns zone (ft) +<8314> +proj=tmerc +lat_0=43.5 +lon_0=-119 +k=1.00022 +x_0=19999.99999992 +y_0=0 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / Oregon Coast Range North zone (m) +<8315> +proj=lcc +lat_1=45.58333333333334 +lat_0=45.58333333333334 +lon_0=-123.4166666666667 +k_0=1.000045 +x_0=30000 +y_0=20000 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon Coast Range North zone (ft) +<8316> +proj=lcc +lat_1=45.58333333333334 +lat_0=45.58333333333334 +lon_0=-123.4166666666667 +k_0=1.000045 +x_0=30000.00001512 +y_0=19999.99999992 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / Oregon Dayville-Prairie City zone (m) +<8317> +proj=tmerc +lat_0=44.25 +lon_0=-119.6333333333333 +k=1.00012 +x_0=20000 +y_0=0 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon Dayville-Prairie City zone (ft) +<8318> +proj=tmerc +lat_0=44.25 +lon_0=-119.6333333333333 +k=1.00012 +x_0=19999.99999992 +y_0=0 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / Oregon Denio-Burns zone (m) +<8319> +proj=tmerc +lat_0=41.75 +lon_0=-118.4166666666667 +k=1.00019 +x_0=80000 +y_0=0 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon Denio-Burns zone (ft) +<8320> +proj=tmerc +lat_0=41.75 +lon_0=-118.4166666666667 +k=1.00019 +x_0=79999.99999968 +y_0=0 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / Oregon Halfway zone (m) +<8321> +proj=lcc +lat_1=45.25 +lat_0=45.25 +lon_0=-117.25 +k_0=1.000085 +x_0=40000 +y_0=70000 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon Halfway zone (ft) +<8322> +proj=lcc +lat_1=45.25 +lat_0=45.25 +lon_0=-117.25 +k_0=1.000085 +x_0=39999.99999984 +y_0=70000.00001495999 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / Oregon Medford-Diamond Lake zone (m) +<8323> +proj=lcc +lat_1=42 +lat_0=42 +lon_0=-122.25 +k_0=1.00004 +x_0=60000 +y_0=-60000 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon Medford-Diamond Lake zone (ft) +<8324> +proj=lcc +lat_1=42 +lat_0=42 +lon_0=-122.25 +k_0=1.00004 +x_0=59999.99999976 +y_0=-59999.99999976 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / Oregon Mitchell zone (m) +<8325> +proj=lcc +lat_1=47 +lat_0=47 +lon_0=-120.25 +k_0=0.99927 +x_0=30000 +y_0=290000 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon Mitchell zone (ft) +<8326> +proj=lcc +lat_1=47 +lat_0=47 +lon_0=-120.25 +k_0=0.99927 +x_0=30000.00001512 +y_0=290000.00001408 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / Oregon North Central zone (m) +<8327> +proj=lcc +lat_1=46.16666666666666 +lat_0=46.16666666666666 +lon_0=-120.5 +k_0=1 +x_0=100000 +y_0=140000 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon North Central zone (ft) +<8328> +proj=lcc +lat_1=46.16666666666666 +lat_0=46.16666666666666 +lon_0=-120.5 +k_0=1 +x_0=99999.99999960001 +y_0=139999.99999944 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / Oregon Ochoco Summit zone (m) +<8329> +proj=lcc +lat_1=43.5 +lat_0=43.5 +lon_0=-120.5 +k_0=1.00006 +x_0=40000 +y_0=-80000 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon Ochoco Summit zone (ft) +<8330> +proj=lcc +lat_1=43.5 +lat_0=43.5 +lon_0=-120.5 +k_0=1.00006 +x_0=39999.99999984 +y_0=-79999.99999968 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / Oregon Owyhee zone (m) +<8331> +proj=tmerc +lat_0=41.75 +lon_0=-117.5833333333333 +k=1.00018 +x_0=70000 +y_0=0 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon Owyhee zone (ft) +<8332> +proj=tmerc +lat_0=41.75 +lon_0=-117.5833333333333 +k=1.00018 +x_0=70000.00001495999 +y_0=0 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / Oregon Pilot Rock-Ukiah zone (m) +<8333> +proj=lcc +lat_1=46.16666666666666 +lat_0=46.16666666666666 +lon_0=-119 +k_0=1.000025 +x_0=50000 +y_0=130000 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon Pilot Rock-Ukiah zone (ft) +<8334> +proj=lcc +lat_1=46.16666666666666 +lat_0=46.16666666666666 +lon_0=-119 +k_0=1.000025 +x_0=50000.00001504 +y_0=130000.00001472 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / Oregon Prairie City-Brogan zone (m) +<8335> +proj=lcc +lat_1=44 +lat_0=44 +lon_0=-118 +k_0=1.00017 +x_0=60000 +y_0=0 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon Prairie City-Brogan zone (ft) +<8336> +proj=lcc +lat_1=44 +lat_0=44 +lon_0=-118 +k_0=1.00017 +x_0=59999.99999976 +y_0=0 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / Oregon Riley-Lakeview zone (m) +<8337> +proj=tmerc +lat_0=41.75 +lon_0=-120.3333333333333 +k=1.000215 +x_0=70000 +y_0=0 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon Riley-Lakeview zone (ft) +<8338> +proj=tmerc +lat_0=41.75 +lon_0=-120.3333333333333 +k=1.000215 +x_0=70000.00001495999 +y_0=0 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / Oregon Siskiyou Pass zone (m) +<8339> +proj=lcc +lat_1=42.5 +lat_0=42.5 +lon_0=-122.5833333333333 +k_0=1.00015 +x_0=10000 +y_0=60000 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon Siskiyou Pass zone (ft) +<8340> +proj=lcc +lat_1=42.5 +lat_0=42.5 +lon_0=-122.5833333333333 +k_0=1.00015 +x_0=10000.0000152 +y_0=59999.99999976 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / Oregon Ukiah-Fox zone (m) +<8341> +proj=lcc +lat_1=45.25 +lat_0=45.25 +lon_0=-119 +k_0=1.00014 +x_0=30000 +y_0=90000 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon Ukiah-Fox zone (ft) +<8342> +proj=lcc +lat_1=45.25 +lat_0=45.25 +lon_0=-119 +k_0=1.00014 +x_0=30000.00001512 +y_0=90000.00001488 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / Oregon Wallowa zone (m) +<8343> +proj=tmerc +lat_0=45.25 +lon_0=-117.5 +k=1.000195 +x_0=60000 +y_0=0 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon Wallowa zone (ft) +<8344> +proj=tmerc +lat_0=45.25 +lon_0=-117.5 +k=1.000195 +x_0=59999.99999976 +y_0=0 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / Oregon Warner Highway zone (m) +<8345> +proj=lcc +lat_1=42.5 +lat_0=42.5 +lon_0=-120 +k_0=1.000245 +x_0=40000 +y_0=60000 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon Warner Highway zone (ft) +<8346> +proj=lcc +lat_1=42.5 +lat_0=42.5 +lon_0=-120 +k_0=1.000245 +x_0=39999.99999984 +y_0=59999.99999976 +ellps=GRS80 +units=ft +no_defs <> +# NAD83(2011) / Oregon Willamette Pass zone (m) +<8347> +proj=tmerc +lat_0=43 +lon_0=-122 +k=1.000223 +x_0=20000 +y_0=0 +ellps=GRS80 +units=m +no_defs <> +# NAD83(2011) / Oregon Willamette Pass zone (ft) +<8348> +proj=tmerc +lat_0=43 +lon_0=-122 +k=1.000223 +x_0=19999.99999992 +y_0=0 +ellps=GRS80 +units=ft +no_defs <> # Pulkovo 1995 / Gauss-Kruger zone 4 <20004> +proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22 +units=m +no_defs <> # Pulkovo 1995 / Gauss-Kruger zone 5 @@ -10975,6 +11377,42 @@ <7879> +proj=geocent +ellps=WGS84 +units=m +no_defs <> # SHGD2015 <7884> +proj=geocent +ellps=GRS80 +units=m +no_defs <> +# ETRF89 +<7914> +proj=geocent +ellps=GRS80 +units=m +no_defs <> +# ETRF90 +<7916> +proj=geocent +ellps=GRS80 +units=m +no_defs <> +# ETRF91 +<7918> +proj=geocent +ellps=GRS80 +units=m +no_defs <> +# ETRF92 +<7920> +proj=geocent +ellps=GRS80 +units=m +no_defs <> +# ETRF93 +<7922> +proj=geocent +ellps=GRS80 +units=m +no_defs <> +# ETRF94 +<7924> +proj=geocent +ellps=GRS80 +units=m +no_defs <> +# ETRF96 +<7926> +proj=geocent +ellps=GRS80 +units=m +no_defs <> +# ETRF97 +<7928> +proj=geocent +ellps=GRS80 +units=m +no_defs <> +# ETRF2000 +<7930> +proj=geocent +ellps=GRS80 +units=m +no_defs <> +# ISN2016 +<8084> +proj=geocent +ellps=GRS80 +units=m +no_defs <> +# IGS14 +<8227> +proj=geocent +ellps=GRS80 +units=m +no_defs <> +# NAD83(CSRS96) +<8230> +proj=geocent +ellps=GRS80 +units=m +no_defs <> +# NAD83(CSRS)v2 +<8233> +proj=geocent +ellps=GRS80 +units=m +no_defs <> +# NAD83(CSRS)v3 +<8238> +proj=geocent +ellps=GRS80 +units=m +no_defs <> +# NAD83(CSRS)v4 +<8242> +proj=geocent +ellps=GRS80 +units=m +no_defs <> +# NAD83(CSRS)v5 +<8247> +proj=geocent +ellps=GRS80 +units=m +no_defs <> +# NAD83(CSRS)v6 +<8250> +proj=geocent +ellps=GRS80 +units=m +no_defs <> +# NAD83(CSRS)v7 +<8253> +proj=geocent +ellps=GRS80 +units=m +no_defs <> # KKJ / Finland Uniform Coordinate System + N60 height <3901> +proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=3500000 +y_0=0 +ellps=intl +towgs84=-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496 +units=m +vunits=m +no_defs <> # ETRS89 / TM35FIN(N,E) + N60 height @@ -11287,3 +11725,7 @@ <7955> +proj=utm +zone=30 +south +ellps=WGS84 +towgs84=-0.077,0.079,0.086,0,0,0,0 +units=m +vunits=m +no_defs <> # SHMG2015 + SHVD2015 height <7956> +proj=utm +zone=30 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs <> +# GR96 + GVR2000 height +<8349> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +vunits=m +no_defs <> +# GR96 + GVR2016 height +<8350> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +vunits=m +no_defs <> -- cgit v1.2.3 From 533207012bfd2c5de652b9df8b2104cad82b6988 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Sun, 17 Dec 2017 17:54:28 +0100 Subject: Fix integer overflow in unitconvert. For sufficiently large values of modified julian date the mjd_to_yyyymmdd function would integer overflow in the calculation of the return value. This is fixed by implicit type conversion. Credit to OSS-Fuzz. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4658 and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4667 --- src/PJ_unitconvert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PJ_unitconvert.c b/src/PJ_unitconvert.c index 36461150..fc90821b 100644 --- a/src/PJ_unitconvert.c +++ b/src/PJ_unitconvert.c @@ -252,7 +252,7 @@ static double mjd_to_yyyymmdd(double mjd) { day = (int)(mjd - mjd_iter + 1); - return year*10000 + month*100 + day; + return year*10000.0 + month*100.0 + day; } -- cgit v1.2.3 From 74ae4b09bbc80edb44a123a8272014d15b7d4b8d Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sun, 17 Dec 2017 18:04:13 +0100 Subject: Free format everywhere (#693) * Free format now in cmd lines, in gie, and in init files * Corrected handling of defaults * Add demo of integrated definition and validation * Repair stack-smashing memmove in get_init * repair paralist corruption, clean up debug output * Install test files for nmake builds * Add many improvements following suggestions by @schwehr * Be consistent in requiring lower case everywhere in gie.c Also, this Fixes #703 and Fixes #697 --- appveyor.yml | 4 +- nad/val_def.demo | 83 ++++++ src/PJ_pipeline.c | 9 +- src/cct.c | 15 +- src/gie.c | 676 ++++++++++++++++++++++++++++----------------- src/makefile.vc | 3 + src/optargpm.h | 33 ++- src/pj_factors.c | 15 +- src/pj_init.c | 636 ++++++++++++++++++++++-------------------- src/pj_internal.c | 288 +++++++++++++++++-- src/pj_malloc.c | 3 +- src/pj_param.c | 217 +++++++++------ src/proj.def | 2 + src/proj_4D_api.c | 102 +++---- src/proj_internal.h | 7 + src/projects.h | 6 +- test/gie/GDA.gie | 50 ++-- test/gie/axisswap.gie | 118 ++++---- test/gie/builtins.gie | 7 +- test/gie/deformation.gie | 27 +- test/gie/ellipsoid.gie | 7 +- test/gie/more_builtins.gie | 92 +++--- test/gie/pip.gie | 41 +++ travis/install.sh | 2 +- 24 files changed, 1566 insertions(+), 877 deletions(-) create mode 100644 nad/val_def.demo create mode 100644 test/gie/pip.gie diff --git a/appveyor.yml b/appveyor.yml index 7de5d23c..92740d7e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -58,11 +58,13 @@ test_script: - cd bin - echo "Contents of current directory:" - dir + - echo "Contents of ..\test\gie:" + - dir ..\test\gie - gie.exe ..\test\gie\builtins.gie - - gie.exe ..\test\gie\more_builtins.gie - gie.exe ..\test\gie\deformation.gie - gie.exe ..\test\gie\axisswap.gie - gie.exe ..\test\gie\ellipsoid.gie + - gie.exe -vvvvv ..\test\gie\more_builtins.gie - gie.exe ..\test\gie\GDA.gie deploy: off diff --git a/nad/val_def.demo b/nad/val_def.demo new file mode 100644 index 00000000..87777b9d --- /dev/null +++ b/nad/val_def.demo @@ -0,0 +1,83 @@ + +----------------------------------------------------------------------- + + INTEGRATING DEFINITION AND VALIDATION OF GEODETIC SYSTEMS + +----------------------------------------------------------------------- + Thomas Knudsen, thokn@sdfe.dk, 2017-12-06 +----------------------------------------------------------------------- + +This demo shows how to use the free format definition strings, +introduced in PROJ version 5.0.0, to integrate system definition +information with system validation data. + +The system definition parts are used when doing actual transformations, +e.g. using the cct 4D transformation program: + + echo 9 55 0 0 | cct +init=val_def.demo:DKTM1 + +The system validation parts are used when validating the systems +defined in the file. This is done using the gie test program: + + gie val_def.demo + +Which will respond with a report detailing how many tests succeeded, +resp. failed. + +The syntax of proj init files is orthogonal to the syntax of gie +integrity evaluation files. This makes it possible to interleave +init and gie blocks in the same file. + +#----------------------------------------------------------------------- + + + +#----------------------------------------------------------------------- +# Danish Transverse Mercator, zone 1 +#----------------------------------------------------------------------- + proj = etmerc + lat_0 = 0 lon_0 = 9 + x_0 = 200000 y_0 = -5000000 + + k = 0.99998 + + ellps = GRS80 + units = m + + no_defs +#----------------------------------------------------------------------- + +operation init = val_def.demo:DKTM1 +tolerance 100 um +accept 9 55 +expect 200000.0000 1097108.3684 +roundtrip 1000 1 nm + +#----------------------------------------------------------------------- + + + +#----------------------------------------------------------------------- +# Danish Transverse Mercator, zone 2 +#----------------------------------------------------------------------- + proj = etmerc + lat_0 = 0 lon_0 = 10 + x_0 = 400000 y_0 = -5000000 + + k = 0.99998 + + ellps = GRS80 + units = m + + no_defs +#----------------------------------------------------------------------- + +operation init = val_def.demo:DKTM2 +tolerance 100 um +accept 10 55 +expect 400000.0000 1097108.3684 +accept 10.5 55.5 +expect 431597.1668 1152884.9398 +roundtrip 1000 100 um + +#----------------------------------------------------------------------- diff --git a/src/PJ_pipeline.c b/src/PJ_pipeline.c index c8ce8582..a0ef7c1e 100644 --- a/src/PJ_pipeline.c +++ b/src/PJ_pipeline.c @@ -51,12 +51,9 @@ pj_init code, implementing support for multilevel, embedded pipelines. Syntactically, the pipeline system introduces the "+step" keyword (which - indicates the start of each transformation step), the "+omit_fwd" and - "+omit_inv" keywords (which indicate that a given transformation step - should be omitted when the pipeline is executed in forward, resp. inverse - direction), and reintroduces the +inv keyword (indicating that a given - transformation step should run in reverse, i.e. forward, when the pipeline - is executed in inverse direction, and vice versa). + indicates the start of each transformation step), and reintroduces the +inv + keyword (indicating that a given transformation step should run in reverse, i.e. + forward, when the pipeline is executed in inverse direction, and vice versa). Hence, the first transformation example above, can be implemented as: diff --git a/src/cct.c b/src/cct.c index a1c275b5..eae815e9 100644 --- a/src/cct.c +++ b/src/cct.c @@ -71,20 +71,23 @@ Thomas Knudsen, thokn@sdfe.dk, 2016-05-25/2017-10-26 ***********************************************************************/ -#include "optargpm.h" -#include "proj_internal.h" -#include -#include "projects.h" +#include +#include #include #include -#include #include -#include + +#include +#include "proj_internal.h" +#include "projects.h" +#include "optargpm.h" +/* Prototypes for functions in proj_strtod.c */ double proj_strtod(const char *str, char **endptr); double proj_atof(const char *str); +/* Prototypes from functions in this file */ char *column (char *buf, int n); PJ_COORD parse_input_line (char *buf, int *columns, double fixed_height, double fixed_time); diff --git a/src/gie.c b/src/gie.c index c768c765..e23ca92b 100644 --- a/src/gie.c +++ b/src/gie.c @@ -15,9 +15,9 @@ C compiler already employed for compiling the library. The basic functionality of the gie command language is implemented through just 3 command verbs: -OPERATION, which defines the PROJ.4 operation to test, -ACCEPT, which defines the input coordinate to read, and -EXPECT, which defines the result to expect. +operation, which defines the PROJ.4 operation to test, +accept, which defines the input coordinate to read, and +expect, which defines the result to expect. E.g: @@ -32,7 +32,7 @@ long strings of numbers typically required in projected coordinates. By default, gie considers the EXPECTation met, if the result comes to within 0.5 mm of the expected. This default can be changed using the -TOLERANCE command verb (and yes, I know, linguistically speaking, both +'tolerance' command verb (and yes, I know, linguistically speaking, both "operation" and "tolerance" are nouns, not verbs). See the first few hundred lines of the "builtins.gie" test file for more details of the command verbs available (verbs of both the VERBal and NOUNistic @@ -64,15 +64,16 @@ hence making a map projection function call, pj_fwd(PJ, point), as easy as a traditional function call like hypot(x,y). While today, we may have more formally well defined metadata systems -(most prominent the OGC WKT representation), nothing comes close being +(most prominent the OGC WKT2 representation), nothing comes close being as easily readable ("human compatible") as Gerald's key-value system. This system in particular, and the PROJ.4 system in general, was Gerald's great gift to anyone using and/or communicating about geodata. -It is only reasonable to name a program keeping an eye on the integrity -of the PROJ.4 system in honour of Gerald. So in honour, and hopefully -also in the spirit, of Gerald Ian Evenden (1935--2016), this is the -Geospatial Integrity Investigation Environment. +It is only reasonable to name a program, keeping an eye on the integrity +of the PROJ.4 system, in honour of Gerald. + +So in honour, and hopefully also in the spirit, of Gerald Ian Evenden +(1935--2016), this is the Geospatial Integrity Investigation Environment. ************************************************************************ @@ -103,22 +104,54 @@ Thomas Knudsen, thokn@sdfe.dk, 2017-10-01/2017-10-08 ***********************************************************************/ -#include "optargpm.h" +#include +#include +#include +#include +#include +#include +#include #include #include "proj_internal.h" #include "projects.h" -#include -#include -#include - -#include -#include +#include "optargpm.h" -#include -#include +/* Package for flexible format I/O - ffio */ +typedef struct ffio { + FILE *f; + const char **tags; + const char *tag; + char *args; + char *next_args; + size_t n_tags; + size_t args_size; + size_t next_args_size; + size_t argc; + size_t lineno, next_lineno; + size_t level; +} ffio; + +FILE *test = 0; + +static int get_inp (ffio *F); +static int skip_to_next_tag (ffio *F); +static int step_into_gie_block (ffio *F); +static int locate_tag (ffio *F, const char *tag); +static int nextline (ffio *F); +static int at_end_delimiter (ffio *F); +static const char *at_tag (ffio *F); +static int at_decorative_element (ffio *F); +static ffio *ffio_destroy (ffio *F); +static ffio *ffio_create (const char **tags, size_t n_tags, size_t max_record_size); + +static const char *gie_tags[] = { + "", "operation", "accept", "expect", "roundtrip", "banner", "verbose", + "direction", "tolerance", "builtins", "echo", "" +}; +static const size_t n_gie_tags = sizeof gie_tags / sizeof gie_tags[0]; /* from proj_strtod.c */ @@ -127,16 +160,14 @@ double proj_atof(const char *str); int main(int argc, char **argv); -static int process_file (const char *fname); -static int errmsg (int errlev, const char *msg, ...); -static int get_inp (FILE *f, char *inp, int size); -static int get_cmnd (const char *inp, char *cmnd, int len); -static const char *get_args (const char *inp); static int dispatch (const char *cmnd, const char *args); +static int errmsg (int errlev, const char *msg, ...); +static int errno_from_err_const (const char *err_const); +static int list_err_codes (void); +static int process_file (const char *fname); + static const char *column (const char *buf, int n); -static int errno_from_err_const (const char *err_const); static const char *err_const_from_errno (int err); -static void list_err_codes (void); @@ -148,7 +179,6 @@ typedef struct { PJ_COORD a, b, c, e; PJ_DIRECTION dir; int verbosity; - int nargs; int op_id; int op_ok, op_ko; int total_ok, total_ko; @@ -159,20 +189,15 @@ typedef struct { FILE *fout; } gie_ctx; -gie_ctx T = {{""}, 0, {{0,0,0,0}}, {{0,0,0,0}}, {{0,0,0,0}}, {{0,0,0,0}}, PJ_FWD, 1, 0, 0,0,0,0,0,0,0,0, 0.0005, 0, 0}; +ffio *F = 0; -OPTARGS *o; +static gie_ctx T; +static const char delim[] = {"-------------------------------------------------------------------------------\n"}; -size_t tol_lineno = 0; -size_t lineno = 0; -size_t level = 0; -char delim[] = {"-------------------------------------------------------------------------------\n"}; -char DELIM[] = {"===============================================================================\n"}; - -#define CMDLEN 25000 +#define CMDLEN 250000 int nfiles = 0; @@ -212,7 +237,14 @@ int main (int argc, char **argv) { int i; const char *longflags[] = {"v=verbose", "q=quiet", "h=help", "l=list", 0}; const char *longkeys[] = {"o=output", 0}; + OPTARGS *o; + + memset (&T, 0, sizeof (T)); + T.dir = PJ_FWD; + T.verbosity = 1; + T.tolerance = 5e-4; + test = fopen ("test.c", "wt"); o = opt_parse (argc, argv, "hlvq", "o", longflags, longkeys); if (0==o) return 0; @@ -223,7 +255,7 @@ int main (int argc, char **argv) { } if (opt_given (o, "l")) - list_err_codes (); + return list_err_codes (); T.verbosity = opt_given (o, "q"); @@ -235,6 +267,7 @@ int main (int argc, char **argv) { T.fout = stdout; if (opt_given (o, "o")) T.fout = fopen (opt_arg (o, "output"), "rt"); + if (0==T.fout) { fprintf (stderr, "%s: Cannot open '%s' for output\n", o->progname, opt_arg (o, "output")); free (o); @@ -245,10 +278,18 @@ int main (int argc, char **argv) { if (T.verbosity==-1) return -1; fprintf (T.fout, "Nothing to do\n"); + free (o); return 0; } - for (i = 0; i < o->fargc; i++) + F = ffio_create (gie_tags, n_gie_tags, 1000); + if (0==F) { + fprintf (stderr, "%s: No memory\n", o->progname); + free (o); + return 1; + } + + for (i = 0; i < o->fargc; i++) process_file (o->fargv[i]); if (T.verbosity > 0) { @@ -264,6 +305,7 @@ int main (int argc, char **argv) { fclose (T.fout); free (o); + ffio_destroy (F); return T.grand_ko; } @@ -282,11 +324,8 @@ static int another_success (void) { static int process_file (const char *fname) { FILE *f; - char inp[CMDLEN]; - char cmnd[1000]; - const char *args; - lineno = level = 0; + F->lineno = F->next_lineno = F->level = 0; T.op_ok = T.total_ok = 0; T.op_ko = T.total_ko = 0; @@ -298,37 +337,29 @@ static int process_file (const char *fname) { } errmsg (2, "Cannot open spec'd input file '%s' - bye!\n", fname); } + F->f = f; + if (T.verbosity > 0) fprintf (T.fout, "%sReading file '%s'\n", delim, fname); T.curr_file = fname; - while (get_inp(f, inp, CMDLEN)) { - int len; - - if (feof(f)) - break; - len = get_cmnd (inp, cmnd, 1000); - if (len>=999) { - errmsg (2, "Command verb too long: '%s' - bye!\n", cmnd); - proj_destroy (T.P); - T.P = 0; - return 0; - } - args = get_args (inp); - if (SKIP==dispatch (cmnd, args)) + while (get_inp(F)) { + if (SKIP==dispatch (F->tag, F->args)) return proj_destroy (T.P), T.P = 0, 0; } + fclose (f); + F->lineno = F->next_lineno = 0; T.grand_ok += T.total_ok; T.grand_ko += T.total_ko; if (T.verbosity > 0) fprintf (T.fout, "%stotal: %2d tests succeeded, %2d tests %s\n", delim, T.total_ok, T.total_ko, T.total_ko? "FAILED!": "failed."); - if (level==0) - return errmsg (-3, "File '%s':Missing 'BEGIN' cmnd - bye!\n", fname); - if (level && level%2) - return errmsg (-4, "File '%s':Missing 'END' cmnd - bye!\n", fname); + if (F->level==0) + return errmsg (-3, "File '%s':Missing '' cmnd - bye!\n", fname); + if (F->level && F->level%2) + return errmsg (-4, "File '%s':Missing '' cmnd - bye!\n", fname); return 0; } @@ -336,7 +367,7 @@ static int process_file (const char *fname) { /*****************************************************************************/ const char *column (const char *buf, int n) { /***************************************************************************** - Return a pointer to the n'th column of buf. Coulmn numbers start at 0. +Return a pointer to the n'th column of buf. Column numbers start at 0. ******************************************************************************/ int i; if (n <= 0) @@ -356,8 +387,8 @@ const char *column (const char *buf, int n) { /*****************************************************************************/ static double strtod_scaled (const char *args, double default_scale) { /***************************************************************************** - Interpret as a numeric followed by a linear decadal prefix. - Return the properly scaled numeric +Interpret as a numeric followed by a linear decadal prefix. +Return the properly scaled numeric ******************************************************************************/ double s; const char *endp = args; @@ -424,6 +455,7 @@ static int direction (const char *args) { default: return 1; } + return 0; } @@ -439,46 +471,38 @@ static void finish_previous_operation (const char *args) { /*****************************************************************************/ static int operation (char *args) { /***************************************************************************** - Define the operation to apply to the input data (in ISO 19100 lingo, - an operation is the general term describing something that can be - either a conversion or a transformation) +Define the operation to apply to the input data (in ISO 19100 lingo, +an operation is the general term describing something that can be +either a conversion or a transformation) ******************************************************************************/ - int i, j, n; T.op_id++; - T.operation_lineno = lineno; - - /* compactify the args, so we can fit more info on a line in verbose mode */ - n = (int) strlen (args); - for (i = j = 0; i < n; ) { - /* skip prefix whitespace */ - while (isspace (args[i])) - i++; - /* move a whitespace delimited text string to the left, skipping over superfluous whitespace */ - while ((0!=args[i]) && (!isspace (args[i]))) - args[j++] = args[i++]; - if (args[j+1]!=0) - args[j++] = ' '; - i++; - } - args[j++] = 0; - strcpy (&(T.operation[0]), args); + T.operation_lineno = F->lineno; + + strcpy (&(T.operation[0]), F->args); if (T.verbosity > 1) { - finish_previous_operation (args); + finish_previous_operation (F->args); banner (args); } + T.op_ok = 0; T.op_ko = 0; direction ("forward"); tolerance ("0.5 mm"); + proj_errno_reset (T.P); if (T.P) proj_destroy (T.P); - T.P = proj_create (0, args); + proj_errno_reset (0); + + T.P = proj_create (0, F->args); + + /* Checking that proj_create succeeds is first done at "expect" time, */ + /* since we want to support "expect"ing specific error codes */ return 0; } @@ -493,9 +517,9 @@ static int pj_horner_selftest (void); /*****************************************************************************/ static int builtins (const char *args) { /***************************************************************************** - There are still a few tests that cannot be described using gie - primitives. Instead, they are implemented as builtins, and invoked - using the "builtins" command verb. +There are still a few tests that cannot be described using gie +primitives. Instead, they are implemented as builtins, and invoked +using the "builtins" command verb. ******************************************************************************/ int i; if (T.verbosity > 1) { @@ -504,10 +528,9 @@ static int builtins (const char *args) { } T.op_ok = 0; T.op_ko = 0; - i = pj_unitconvert_selftest (); if (i!=0) { - printf ("pj_unitconvert_selftest fails with %d\n", i); + fprintf (T.fout, "pj_unitconvert_selftest fails with %d\n", i); another_failure(); } else @@ -516,7 +539,7 @@ static int builtins (const char *args) { i = pj_cart_selftest (); if (i!=0) { - printf ("pj_cart_selftest fails with %d\n", i); + fprintf (T.fout, "pj_cart_selftest fails with %d\n", i); another_failure(); } else @@ -524,7 +547,7 @@ static int builtins (const char *args) { i = pj_horner_selftest (); if (i!=0) { - printf ("pj_horner_selftest fails with %d\n", i); + fprintf (T.fout, "pj_horner_selftest fails with %d\n", i); another_failure(); } else @@ -554,7 +577,7 @@ static PJ_COORD todeg_coord (PJ_COORD a) { /*****************************************************************************/ static PJ_COORD parse_coord (const char *args) { /***************************************************************************** - Attempt to interpret args as a PJ_COORD. +Attempt to interpret args as a PJ_COORD. ******************************************************************************/ int i; const char *endp, *prev = args; @@ -575,7 +598,7 @@ static PJ_COORD parse_coord (const char *args) { /*****************************************************************************/ static int accept (const char *args) { /***************************************************************************** - Read ("ACCEPT") a 2, 3, or 4 dimensional input coordinate. +Read ("ACCEPT") a 2, 3, or 4 dimensional input coordinate. ******************************************************************************/ T.a = parse_coord (args); if (T.verbosity > 3) @@ -587,8 +610,8 @@ static int accept (const char *args) { /*****************************************************************************/ static int roundtrip (const char *args) { /***************************************************************************** - Check how far we go from the ACCEPTed point when doing successive - back/forward transformation pairs. +Check how far we go from the ACCEPTed point when doing successive +back/forward transformation pairs. ******************************************************************************/ int ntrips; double d, r, ans; @@ -602,7 +625,6 @@ static int roundtrip (const char *args) { ntrips = (int) (endp==args? 100: fabs(ans)); d = strtod_scaled (endp, 1); d = d==HUGE_VAL? T.tolerance: d; - coo = T.a; /* input ("accepted") values - probably in degrees */ coo = proj_angular_input (T.P, T.dir)? torad_coord (T.a): T.a; @@ -615,7 +637,7 @@ static int roundtrip (const char *args) { if (0==T.op_ko && T.verbosity < 2) banner (T.operation); fprintf (T.fout, "%s", T.op_ko? " -----\n": delim); - fprintf (T.fout, " FAILURE in %s(%d):\n", opt_strip_path (T.curr_file), (int) lineno); + fprintf (T.fout, " FAILURE in %s(%d):\n", opt_strip_path (T.curr_file), (int) F->lineno); fprintf (T.fout, " roundtrip deviation: %.3f mm, expected: %.3f mm\n", 1000*r, 1000*d); } return another_failure (); @@ -633,7 +655,7 @@ static int expect_message (double d, const char *args) { banner (T.operation); fprintf (T.fout, "%s", T.op_ko? " -----\n": delim); - fprintf (T.fout, " FAILURE in %s(%d):\n", opt_strip_path (T.curr_file), (int) lineno); + fprintf (T.fout, " FAILURE in %s(%d):\n", opt_strip_path (T.curr_file), (int) F->lineno); fprintf (T.fout, " expected: %s\n", args); fprintf (T.fout, " got: %.9f %.9f", T.b.xy.x, T.b.xy.y); if (T.b.xyzt.t!=0 || T.b.xyzt.z!=0) @@ -652,7 +674,7 @@ static int expect_message_cannot_parse (const char *args) { if (0==T.op_ko && T.verbosity < 2) banner (T.operation); fprintf (T.fout, "%s", T.op_ko? " -----\n": delim); - fprintf (T.fout, " FAILURE in %s(%d):\n Too few args: %s\n", opt_strip_path (T.curr_file), (int) lineno, args); + fprintf (T.fout, " FAILURE in %s(%d):\n Too few args: %s\n", opt_strip_path (T.curr_file), (int) F->lineno, args); } return 1; } @@ -665,7 +687,7 @@ static int expect_failure_with_errno_message (int expected, int got) { if (0==T.op_ko && T.verbosity < 2) banner (T.operation); fprintf (T.fout, "%s", T.op_ko? " -----\n": delim); - fprintf (T.fout, " FAILURE in %s(%d):\n", opt_strip_path (T.curr_file), (int) lineno); + fprintf (T.fout, " FAILURE in %s(%d):\n", opt_strip_path (T.curr_file), (int) F->lineno); fprintf (T.fout, " got errno %s (%d): %s\n", err_const_from_errno(got), got, pj_strerrno (got)); fprintf (T.fout, " expected %s (%d): %s", err_const_from_errno(expected), expected, pj_strerrno (expected)); fprintf (T.fout, "\n"); @@ -676,7 +698,7 @@ static int expect_failure_with_errno_message (int expected, int got) { /*****************************************************************************/ static int expect (const char *args) { /***************************************************************************** - Tell GIE what to expect, when transforming the ACCEPTed input +Tell GIE what to expect, when transforming the ACCEPTed input ******************************************************************************/ PJ_COORD ci, co, ce; double d; @@ -737,6 +759,7 @@ static int expect (const char *args) { puts (T.dir== 1? "forward": "reverse"); puts (proj_angular_input (T.P, T.dir)? "angular in": "linear in"); puts (proj_angular_output (T.P, T.dir)? "angular out": "linear out"); + printf ("left: %d right: %d\n", T.P->left, T.P->right); } T.e = parse_coord (args); @@ -753,7 +776,6 @@ static int expect (const char *args) { if (T.verbosity > 3) printf ("ACCEPTS %.4f %.4f %.4f %.4f\n", ci.v[0],ci.v[1],ci.v[2],ci.v[3]); - /* angular output from proj_trans comes in radians */ co = proj_trans (T.P, T.dir, ci); T.b = proj_angular_output (T.P, T.dir)? todeg_coord (co): co; @@ -791,7 +813,7 @@ static int expect (const char *args) { /*****************************************************************************/ static int verbose (const char *args) { /***************************************************************************** - Tell the system how noisy it should be +Tell the system how noisy it should be ******************************************************************************/ int i = (int) proj_atof (args); @@ -806,20 +828,11 @@ static int verbose (const char *args) { return 0; } -/*****************************************************************************/ -static int comment (const char *args) { -/***************************************************************************** - in line comment. Equivalent to # -******************************************************************************/ - (void) args; - return 0; -} - /*****************************************************************************/ static int echo (const char *args) { /***************************************************************************** - Add user defined noise to the output stream +Add user defined noise to the output stream ******************************************************************************/ fprintf (T.fout, "%s\n", args); return 0; @@ -828,46 +841,17 @@ fprintf (T.fout, "%s\n", args); static int dispatch (const char *cmnd, const char *args) { -#if 0 - int last_errno = proj_errno_reset (T.P); -#endif - - if (0==level%2) { - if (0==strcmp (cmnd, "BEGIN") || 0==strcmp (cmnd, "") || 0==strcmp (cmnd, "")) - level++; - return 0; - } - - if (0==strcmp (cmnd, "OPERATION")) return operation ((char *) args); if (0==strcmp (cmnd, "operation")) return operation ((char *) args); - if (0==strcmp (cmnd, "ACCEPT")) return accept (args); if (0==strcmp (cmnd, "accept")) return accept (args); - if (0==strcmp (cmnd, "EXPECT")) return expect (args); if (0==strcmp (cmnd, "expect")) return expect (args); - if (0==strcmp (cmnd, "ROUNDTRIP")) return roundtrip (args); if (0==strcmp (cmnd, "roundtrip")) return roundtrip (args); - if (0==strcmp (cmnd, "BANNER")) return banner (args); if (0==strcmp (cmnd, "banner")) return banner (args); - if (0==strcmp (cmnd, "VERBOSE")) return verbose (args); if (0==strcmp (cmnd, "verbose")) return verbose (args); - if (0==strcmp (cmnd, "DIRECTION")) return direction (args); if (0==strcmp (cmnd, "direction")) return direction (args); - if (0==strcmp (cmnd, "TOLERANCE")) return tolerance (args); if (0==strcmp (cmnd, "tolerance")) return tolerance (args); - if (0==strcmp (cmnd, "BUILTINS")) return builtins (args); if (0==strcmp (cmnd, "builtins")) return builtins (args); - if (0==strcmp (cmnd, "ECHO")) return echo (args); if (0==strcmp (cmnd, "echo")) return echo (args); - if (0==strcmp (cmnd, "END")) return finish_previous_operation (args), level++, 0; - if (0==strcmp (cmnd, "")) return finish_previous_operation (args), level++, 0; - if (0==strcmp (cmnd, "")) return finish_previous_operation (args), level++, 0; - if ('#'==cmnd[0]) return comment (args); - -#if 0 - if (proj_errno(T.P)) - printf ("#####***** ERRNO=%d\n", proj_errno(T.P)); - proj_errno_restore (T.P, last_errno); -#endif + return 0; } @@ -941,7 +925,7 @@ static const struct errno_vs_err_const lookup[] = { static const struct errno_vs_err_const unknown = {"PJD_ERR_UNKNOWN", 9999}; -static void list_err_codes (void) { +static int list_err_codes (void) { int i; const int n = sizeof lookup / sizeof lookup[0]; @@ -950,7 +934,7 @@ static void list_err_codes (void) { break; printf ("%25s (%2.2d): %s\n", lookup[i].the_err_const + 8, lookup[i].the_errno, pj_strerrno(lookup[i].the_errno)); } - exit (0); + return 0; } @@ -966,7 +950,6 @@ static const char *err_const_from_errno (int err) { } - static int errno_from_err_const (const char *err_const) { const size_t n = sizeof lookup / sizeof lookup[0]; size_t i, len; @@ -1006,12 +989,6 @@ static int errno_from_err_const (const char *err_const) { } - - - - - - static int errmsg (int errlev, const char *msg, ...) { va_list args; va_start(args, msg); @@ -1022,105 +999,318 @@ static int errmsg (int errlev, const char *msg, ...) { return errlev; } -#define skipspace(f, c) \ - do { \ - while (isspace (c=fgetc(f)) && !feof(f)){ \ - if ('\n'==c) lineno++; \ - } \ - if (feof(f)) \ - break; \ - } while (ungetc(c, f), 0) - -#define skipline(f, c) \ - do { \ - while ((c=fgetc(f)) && !feof(f)) { \ - if ((c=='\r') || (c=='\n')) \ - break; \ - } \ - skipspace (f, c); \ - } while (0) - - -/* skip whitespace at continuation line */ -#define continuation(f, buf, c) \ - if ((c=='\r')||(c=='\n')) { \ - if (c=='\n') lineno++; \ - next--; \ - while (isspace (c=fgetc(f)) && !feof(f)); \ - } -static int get_inp (FILE *f, char *inp, int size) { - char *next; - int c = 0, esc; - char *endp = inp + size - 2; - - skipspace (f, c); - - for (c = esc = 0, next = inp; !feof(f); ) { - c = fgetc(f); - if (esc) { - continuation (f, next, c); - esc = 0; - /* handle escape sequences here */ - switch (c) { - case '\\': c = '\\'; break; - default: (void) c; - } - } - if (c=='\r') - break; - if (c=='\n') { - lineno++; - break; - } - *next++ = (char) c; - if ('\\'==c) - esc = 1; - if (feof(f) || (next==endp)) - break; + + + + + +/**************************************************************************************** + +FFIO - Flexible format I/O + +FFIO provides functionality for reading proj style instruction strings written +in a less strict format than usual: + +* Whitespace is generally allowed everywhere +* Comments can be written inline, '#' style +* ... or as free format blocks + +The overall mission of FFIO is to facilitate communications of geodetic +parameters and test material in a format that is highly human readable, +and provides ample room for comment, documentation, and test material. + +See the PROJ ".gie" test suites for examples of supported formatting. + +****************************************************************************************/ + +#include +#include +#include + +#include +#include + +#include +#include + + + +static int get_inp (ffio *F); +static int skip_to_next_tag (ffio *F); +static int step_into_gie_block (ffio *F); +static int locate_tag (ffio *F, const char *tag); +static int nextline (ffio *F); +static int at_end_delimiter (ffio *F); +static const char *at_tag (ffio *F); +static int at_decorative_element (ffio *F); +static ffio *ffio_destroy (ffio *F); +static ffio *ffio_create (const char **tags, size_t n_tags, size_t max_record_size); + + + +/***************************************************************************************/ +static ffio *ffio_create (const char **tags, size_t n_tags, size_t max_record_size) { +/**************************************************************************************** +Constructor for the ffio object. +****************************************************************************************/ + ffio *G = calloc (1, sizeof (ffio)); + if (0==G) + return 0; + + if (0==max_record_size) + max_record_size = 1000; + + G->args = calloc (1, 5*max_record_size); + if (0==G->args) { + free (G); + return 0; } - *(next) = 0; - return (int) strlen(inp); + + G->next_args = calloc (1, max_record_size); + if (0==G->args) { + free (G->args); + free (G); + return 0; + } + + G->args_size = 5*max_record_size; + G->next_args_size = max_record_size; + + G->tags = tags; + G->n_tags = n_tags; + return G; } -static int get_cmnd (const char *inp, char *cmnd, int len) { - cmnd[0] = 0; - while (isspace(*inp++)); - inp--; - while (len-- && !isspace(*inp) && *inp) - *cmnd++ = *inp++; - *cmnd = 0; - return len; + + +/***************************************************************************************/ +static ffio *ffio_destroy (ffio *G) { +/**************************************************************************************** +Free all allocated associated memory, then free G itself. For extra RAII compliancy, +the file object should also be closed if still open, but this will require additional +control logic, and ffio is a gie tool specific package, so we fall back to asserting that +fclose has been called prior to ffio_destroy. +****************************************************************************************/ + free (G->args); + free (G->next_args); + free (G); + return 0; } -static const char *get_args (const char *inp) { - const char *args = inp; - while (isspace(*args++)) - if (0==*args) - return args; - while (!isspace(*++args)) - if (0==*args) - return args; - while (isspace(*args++)) - if (0==*args) - return args; - return --args; + + +/***************************************************************************************/ +static int at_decorative_element (ffio *G) { +/**************************************************************************************** +A decorative element consists of a line of at least 5 consecutive identical chars, +starting at buffer position 0: +"-----", "=====", "*****", etc. + +A decorative element serves as a end delimiter for the current element, and +continues until a gie command verb is found at the start of a line +****************************************************************************************/ + int i; + char *c; + if (0==G) + return 0; + c = G->next_args; + if (0==c) + return 0; + if (0==c[0]) + return 0; + for (i = 1; i < 5; i++) + if (c[i]!=c[0]) + return 0; + return 1; +} + + + +/***************************************************************************************/ +static const char *at_tag (ffio *G) { +/**************************************************************************************** +A start of a new command serves as an end delimiter for the current command +****************************************************************************************/ + size_t j; + for (j = 0; j < G->n_tags; j++) + if (strncmp (G->next_args, G->tags[j], strlen(G->tags[j]))==0) + return G->tags[j]; + return 0; } +/***************************************************************************************/ +static int at_end_delimiter (ffio *G) { +/**************************************************************************************** +An instruction consists of everything from its introductory tag to its end +delimiter. An end delimiter can be either the introductory tag of the next +instruction, or a "decorative element", i.e. one of the "ascii art" style +block delimiters typically used to mark up block comments in a free format +file. +****************************************************************************************/ + if (G==0) + return 0; + if (at_decorative_element (G)) + return 1; + if (at_tag (G)) + return 1; + return 0; +} +/***************************************************************************************/ +static int nextline (ffio *G) { +/**************************************************************************************** +Read next line of input file. Returns 1 on success, 0 on failure. +****************************************************************************************/ + G->next_args[0] = 0; + if (0==fgets (G->next_args, (int) G->next_args_size - 1, G->f)) + return 0; + if (feof (G->f)) + return 0; + pj_chomp (G->next_args); + G->next_lineno++; + return 1; +} +/***************************************************************************************/ +static int locate_tag (ffio *G, const char *tag) { +/**************************************************************************************** +Find start-of-line tag (currently only used to search for for , but any tag +valid). + +Returns 1 on success, 0 on failure. +****************************************************************************************/ + size_t n = strlen (tag); + while (0!=strncmp (tag, G->next_args, n)) + if (0==nextline (G)) + return 0; + return 1; +} + +/***************************************************************************************/ +static int step_into_gie_block (ffio *G) { +/**************************************************************************************** +Make sure we're inside a -block. Return 1 on success, 0 otherwise. +****************************************************************************************/ + /* Already inside */ + if (G->level % 2) + return 1; + if (0==locate_tag (G, "")) + return 0; + while (0!=strncmp ("", G->next_args, 5)) { + G->next_args[0] = 0; + if (feof (G->f)) + return 0; + if (0==fgets (G->next_args, (int) G->next_args_size - 1, G->f)) + return 0; + pj_chomp (G->next_args); + G->next_lineno++; + } + G->level++; + /* We're ready at the start - now step into the block */ + return nextline (G); +} + + + +/***************************************************************************************/ +static int skip_to_next_tag (ffio *G) { +/**************************************************************************************** +Skip forward to the next command tag. Return 1 on success, 0 otherwise. +****************************************************************************************/ + const char *c; + if (0==step_into_gie_block (G)) + return 0; + + c = at_tag (G); + + /* If not already there - get there */ + while (!c) { + if (0==nextline (G)) + return 0; + c = at_tag (G); + } + + /* If we reached the end of a block, locate the next and retry */ + if (0==strcmp (c, "")) { + G->level++; + if (feof (G->f)) + return 0; + if (0==step_into_gie_block (G)) + return 0; + G->args[0] = 0; + return skip_to_next_tag (G); + } + G->lineno = G->next_lineno; + + return 1; +} + +/* Add the most recently read line of input to the block already stored. */ +static int append_args (ffio *G) { + size_t skip_chars = 0; + size_t next_len = strlen (G->next_args); + size_t args_len = strlen (G->args); + const char *tag = at_tag (G); + + if (tag) + skip_chars = strlen (tag); + + if (G->args_size < args_len + next_len - skip_chars + 1) { + void *p = realloc (G->args, 2 * G->args_size); + if (0==p) + return 0; + G->args = p; + G->args_size = 2 * G->args_size; + } + + G->args[args_len] = ' '; + strcpy (G->args + args_len + 1, G->next_args + skip_chars); + + G->next_args[0] = 0; + return 1; +} + + + + + +/***************************************************************************************/ +static int get_inp (ffio *G) { +/**************************************************************************************** +The primary command reader for gie. Reads a block of gie input, cleans up repeated +whitespace etc. The block is stored in G->args. Returns 1 on success, 0 otherwise. +****************************************************************************************/ + G->args[0] = 0; + + if (0==skip_to_next_tag (G)) + return 0; + G->tag = at_tag (G); + + if (0==G->tag) + return 0; + + do { + append_args (G); + if (0==nextline (G)) + return 0; + } while (!at_end_delimiter (G)); + + pj_shrink (G->args); + return 1; +} @@ -1171,6 +1361,7 @@ static int pj_horner_selftest (void) { dist = proj_roundtrip (P, PJ_FWD, 1, &c); if (dist > 0.01) return 1; + proj_destroy(P); /* The complex polynomial transformation between the "System Storebaelt" and utm32/ed50 */ P = proj_create (PJ_DEFAULT_CTX, sb_utm32); @@ -1239,7 +1430,7 @@ static int pj_cart_selftest (void) { size_t n, sz; double dist, h, t; char *args[3] = {"proj=utm", "zone=32", "ellps=GRS80"}; - char *arg = {"+proj=utm +zone=32 +ellps=GRS80"}; + const char *arg = {"+proj=utm +zone=32 +ellps=GRS80"}; char buf[40]; /* An utm projection on the GRS80 ellipsoid */ @@ -1279,7 +1470,7 @@ static int pj_cart_selftest (void) { return 3; /* Clear any previous error */ - proj_errno_set (P, 0); + proj_errno_reset (P); /* Invalid projection */ a = proj_trans (P, 42, a); @@ -1290,7 +1481,7 @@ static int pj_cart_selftest (void) { return 5; /* Clear error again */ - proj_errno_set (P, 0); + proj_errno_reset (P); /* Clean up */ proj_destroy (P); @@ -1310,9 +1501,9 @@ static int pj_cart_selftest (void) { b = proj_trans (P, PJ_FWD, a); /* Check roundtrip precision for 10000 iterations each way */ - dist = proj_roundtrip (P, PJ_FWD, 10000, &a); - dist = proj_roundtrip (P, PJ_INV, 10000, &b); - if (dist > 2e-9) + dist = proj_roundtrip (P, PJ_FWD, 10000, &a); + dist += proj_roundtrip (P, PJ_INV, 10000, &b); + if (dist > 4e-9) return 7; @@ -1463,6 +1654,7 @@ static int pj_cart_selftest (void) { /* proj_info() */ /* this one is difficult to test, since the output changes with the setup */ info = proj_info(); + if (info.version[0] != '\0' ) { char tmpstr[64]; sprintf(tmpstr, "%d.%d.%d", info.major, info.minor, info.patch); @@ -1481,6 +1673,7 @@ static int pj_cart_selftest (void) { if ( !pj_info.has_inverse ) { proj_destroy(P); return 61; } if ( strcmp(pj_info.definition, arg) ) { proj_destroy(P); return 62; } if ( strcmp(pj_info.id, "utm") ) { proj_destroy(P); return 63; } + proj_destroy(P); /* proj_grid_info() */ @@ -1500,7 +1693,6 @@ static int pj_cart_selftest (void) { if ( strcmp(init_info.name, "epsg") ) return 68; - /* test proj_rtodms() and proj_dmstor() */ if (strcmp("180dN", proj_rtodms(buf, M_PI, 'N', 'S'))) return 70; @@ -1616,14 +1808,6 @@ static int pj_cart_selftest (void) { - - - - - - - - static int test_time(const char* args, double tol, double t_in, double t_exp) { PJ_COORD in, out; PJ *P = proj_create(PJ_DEFAULT_CTX, args); @@ -1706,10 +1890,10 @@ static int pj_unitconvert_selftest (void) { ret = test_time(args3, 1e-6, in3, in3); if (ret) return ret + 30; ret = test_time(args4, 1e-6, in4, exp4); if (ret) return ret + 40; ret = test_xyz (args5, 1e-10, in5, exp5); if (ret) return ret + 50; + ret = test_xyz (args6, 1e-10, in6, in6); if (ret) return ret + 50; ret = test_xyz (args6, 1e-10, in6, in6); if (ret) return ret + 60; ret = test_time(args7, 1e-6, in7, in7); if (ret) return ret + 70; return 0; } - diff --git a/src/makefile.vc b/src/makefile.vc index ef460719..1155035e 100644 --- a/src/makefile.vc +++ b/src/makefile.vc @@ -159,6 +159,8 @@ install: all -mkdir $(INSTDIR)\share -mkdir $(INSTDIR)\lib -mkdir $(INSTDIR)\include + -mkdir $(INSTDIR)\test + -mkdir $(INSTDIR)\test\gie copy *.exe $(INSTDIR)\bin copy *.dll $(INSTDIR)\bin copy *.lib $(INSTDIR)\lib @@ -166,3 +168,4 @@ install: all copy proj_api.h $(INSTDIR)\include copy projects.h $(INSTDIR)\include copy geodesic.h $(INSTDIR)\include + copy ..\test\gie\*.gie $(INSTDIR)\test\gie diff --git a/src/optargpm.h b/src/optargpm.h index acb96583..97755cdb 100644 --- a/src/optargpm.h +++ b/src/optargpm.h @@ -183,15 +183,12 @@ Thomas Knudsen, thokn@sdfe.dk, 2016-05-25/2017-09-10 * DEALINGS IN THE SOFTWARE. ***********************************************************************/ - -#define PJ_LIB__ -#include +#include +#include +#include #include #include -#include #include -#include -#include /**************************************************************************************************/ struct OPTARGS; @@ -219,6 +216,7 @@ struct OPTARGS { FILE *input; int input_index; int record_index; + int free_format; /* plus-style specs replaced by free format */ const char *progname; /* argv[0], stripped from /path/to, if present */ char flaglevel[21]; /* if flag -f is specified n times, its optarg pointer is set to flaglevel + n */ char *optarg[256]; /* optarg[(int) 'f'] holds a pointer to the argument of option "-f" */ @@ -426,6 +424,12 @@ OPTARGS *opt_parse (int argc, char **argv, const char *flags, const char *keys, o->argc = argc; o->argv = argv; o->progname = opt_strip_path (argv[0]); + o->free_format = 0; + + /* Is free format in use, instead of plus-style? */ + for (i = 1; i < argc; i++) + if (0==strcmp ("--", argv[i])) + o->free_format = i; /* Reset all flags */ for (i = 0; i < (int) strlen (flags); i++) @@ -442,7 +446,8 @@ OPTARGS *opt_parse (int argc, char **argv, const char *flags, const char *keys, o->longkeys = longkeys; - /* check aliases, An end user should never experience this, but the developer should make sure that aliases are valid */ + /* check aliases, An end user should never experience this, but */ + /* the developer should make sure that aliases are valid */ for (i = 0; longflags && longflags[i]; i++) { /* Go on if it does not look like an alias */ if (strlen (longflags[i]) < 3) @@ -500,6 +505,7 @@ OPTARGS *opt_parse (int argc, char **argv, const char *flags, const char *keys, if ('-' != argv[i][0]) break; + if (0==o->margv) o->margv = argv + i; o->margc++; @@ -516,7 +522,10 @@ OPTARGS *opt_parse (int argc, char **argv, const char *flags, const char *keys, char *equals; crepr = argv[i] + 2; - /* need to maniplulate a bit to support gnu style --pap=pop syntax */ + /* We need to manipulate a bit to support gnu style --foo=bar syntax. */ + /* NOTE: This will segfault for read-only (const char * style) storage, */ + /* but since the canonical use case, int main (int argc, char **argv), */ + /* is non-const, we ignore this for now */ equals = strchr (crepr, '='); if (equals) *equals = 0; @@ -579,6 +588,14 @@ OPTARGS *opt_parse (int argc, char **argv, const char *flags, const char *keys, /* Process all '+'-style options, starting from where '-'-style processing ended */ o->pargv = argv + i; + if (o->free_format) { + o->pargc = o->free_format - (o->margc + 1); + o->fargc = argc - (o->free_format + 1); + if (0 != o->fargc) + o->fargv = argv + o->free_format + 1; + return o; + } + for (/* empty */; i < argc; i++) { if ('-' == argv[i][0]) { free (o); diff --git a/src/pj_factors.c b/src/pj_factors.c index 31c0e539..6ba993b9 100644 --- a/src/pj_factors.c +++ b/src/pj_factors.c @@ -17,12 +17,19 @@ int pj_factors(LP lp, const PJ *P, double h, struct FACTORS *fac) { PJ_COORD coo = {{0, 0, 0, 0}}; coo.lp = lp; - err = proj_errno_reset (P); + /* Failing the 3 initial checks will most likely be due to */ + /* earlier errors, so we leave errno alone */ + if (0==fac) + return 1; - if (0==fac) { - proj_errno_set (P, ENOMEM); + if (0==P) return 1; - } + + if (HUGE_VAL==lp.lam) + return 1; + + /* But from here, we're ready to make our own mistakes */ + err = proj_errno_reset (P); /* Indicate that all factors are numerical approximations */ fac->code = 0; diff --git a/src/pj_init.c b/src/pj_init.c index 2d588ee4..8f4eb477 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -27,320 +27,352 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ + + #define PJ_LIB__ #include #include #include #include #include +#include #include "proj_internal.h" #include "projects.h" -/* Maximum size of files using the "escape carriage return" feature */ -#define MAX_CR_ESCAPE 65537 -typedef struct { - projCtx ctx; - PAFile fid; - char buffer[MAX_CR_ESCAPE]; - int buffer_filled; - int at_eof; -} pj_read_state; -/************************************************************************/ -/* fill_buffer() */ -/************************************************************************/ -static const char *fill_buffer(pj_read_state *state, const char *last_char) -{ - size_t bytes_read; - size_t char_remaining, char_requested; - char *r, *w; - -/* -------------------------------------------------------------------- */ -/* Don't bother trying to read more if we are at eof, or if the */ -/* buffer is still over half full. */ -/* -------------------------------------------------------------------- */ - if (last_char == NULL) - last_char = state->buffer; - - if (state->at_eof) - return last_char; - - char_remaining = state->buffer_filled - (last_char - state->buffer); - if (char_remaining >= sizeof(state->buffer) / 2) - return last_char; - -/* -------------------------------------------------------------------- */ -/* Move the existing data to the start of the buffer. */ -/* -------------------------------------------------------------------- */ - memmove(state->buffer, last_char, char_remaining); - state->buffer_filled = (int)char_remaining; - last_char = state->buffer; - -/* -------------------------------------------------------------------- */ -/* Refill. */ -/* -------------------------------------------------------------------- */ - char_requested = sizeof(state->buffer) - state->buffer_filled - 1; - bytes_read = pj_ctx_fread( state->ctx, state->buffer + state->buffer_filled, - 1, char_requested, state->fid ); - if (bytes_read < char_requested) - { - state->at_eof = 1; - state->buffer[state->buffer_filled + bytes_read] = '\0'; - } +/**************************************************************************************/ +static paralist *string_to_paralist (PJ_CONTEXT *ctx, char *definition) { +/*************************************************************************************** + Convert a string (presumably originating from get_init_string) to a paralist. +***************************************************************************************/ + char *c = definition; + paralist *first = 0, *next = 0; -/* -------------------------------------------------------------------- */ -/* Line continuations: skip whitespace after escaped newlines */ -/* -------------------------------------------------------------------- */ - r = state->buffer; - w = state->buffer; - while (*r) { - /* Escaped newline? */ - while ((r[0]=='\\') && ((r[1]=='\n') || (r[1]=='\r'))) { - r += 2; - while (isspace (*r)) - r++; - /* we also skip comments immediately after an escaped newline */ - while (*r=='#') { - while( *r && (*r != '\n') ) - r++; - while (isspace (*r)) - r++; - /* Reaching end of buffer while skipping continuation comment is currently an error */ - if (0==*r) { - pj_ctx_set_errno (state->ctx, -2); - pj_log (state->ctx, PJ_LOG_ERROR, "init file too big"); - return 0; - } - } - } - *w++ = *r++; + while (*c) { + /* Find start of next substring */ + while (isspace (*c)) + c++; + + /* Keep a handle to the start of the list, so we have something to return */ + if (0==first) + first = next = pj_mkparam_ws (c); + else + next = next->next = pj_mkparam_ws (c); + if (0==next) + return pj_dealloc_params (ctx, first, ENOMEM); + + /* And skip to the end of the substring */ + while ((!isspace(*c)) && 0!=*c) + c++; } - *w = 0; - state->buffer_filled += (int)(bytes_read - (r-w)); - return last_char; + /* Terminate list and return */ + next->next = 0; + return first; } -/************************************************************************/ -/* get_opt() */ -/************************************************************************/ -static paralist * -get_opt(projCtx ctx, paralist **start, PAFile fid, char *name, paralist *next, - int *found_def) { - pj_read_state *state = (pj_read_state*) calloc(1,sizeof(pj_read_state)); - char sword[MAX_CR_ESCAPE]; - int len; - int in_target = 0; - const char *next_char = NULL; - state->fid = fid; - state->ctx = ctx; - next_char = fill_buffer(state, NULL); - if(found_def) - *found_def = 0; - - len = (int)strlen(name); - *sword = 't'; - - if (0==next_char) + + +/**************************************************************************************/ +static char *get_init_string (PJ_CONTEXT *ctx, char *name) { +/*************************************************************************************** + Read a section of an init file. Return its contents as a plain character string. + It is the duty of the caller to free the memory allocated for the string. +***************************************************************************************/ +#define MAX_LINE_LENGTH 1000 + size_t current_buffer_size = 5 * (MAX_LINE_LENGTH + 1); + char *fname, *section, *key; + char *buffer = 0; + char *line = 0; + PAFile fid; + size_t n; + + + line = pj_malloc (MAX_LINE_LENGTH + 1); + if (0==line) return 0; - /* loop till we find our target keyword */ - while (*next_char) - { - next_char = fill_buffer(state, next_char); + fname = pj_malloc (MAX_PATH_FILENAME+ID_TAG_MAX+3); + if (0==fname) { + pj_dealloc (line); + return 0; + } + + /* Support "init=file:section", "+init=file:section", and "file:section" format */ + key = strstr (name, "init="); + if (0==key) + key = name; + else + key += 5; + if (MAX_PATH_FILENAME + ID_TAG_MAX + 2 < strlen (key)) { + pj_dealloc (fname); + pj_dealloc (line); + return 0; + } + memmove (fname, key, strlen (key) + 1); + + /* Locate the name of the section we search for */ + section = strrchr(fname, ':'); + if (0==section) { + proj_context_errno_set (ctx, PJD_ERR_NO_COLON_IN_INIT_STRING); + pj_dealloc (fname); + pj_dealloc (line); + return 0; + } + *section = 0; + section++; + n = strlen (section); + pj_log (ctx, 3, "get_init_string: searching for section [%s] in init file [%s]\n", section, fname); + + fid = pj_open_lib (ctx, fname, "rt"); + if (0==fid) { + pj_dealloc (fname); + pj_dealloc (line); + proj_context_errno_set (ctx, PJD_ERR_NO_OPTION_IN_INIT_FILE); + return 0; + } - /* Skip white space. */ - while( isspace(*next_char) ) - next_char++; + /* Search for section in init file */ + for (;;) { - next_char = fill_buffer(state, next_char); - if (0==next_char) + /* End of file? */ + if (0==pj_ctx_fgets (ctx, line, MAX_LINE_LENGTH, fid)) { + pj_dealloc (buffer); + pj_dealloc (fname); + pj_dealloc (line); + pj_ctx_fclose (ctx, fid); + proj_context_errno_set (ctx, PJD_ERR_NO_OPTION_IN_INIT_FILE); return 0; + } - /* for comments, skip past end of line. */ - if( *next_char == '#' ) - { - while( *next_char && *next_char != '\n' ) - next_char++; + /* At start of right section? */ + pj_chomp (line); + if ('<'!=line[0]) + continue; + if (strlen (line) < n + 2) + continue; + if (line[n + 1] != '>') + continue; + if (0==strncmp (line + 1, section, n)) + break; + } - next_char = fill_buffer(state, next_char); - if (0==next_char) - return 0; - if (*next_char == '\n') - next_char++; - if (*next_char == '\r') - next_char++; + /* We're at the first line of the right section - copy line to buffer */ + buffer = pj_malloc (current_buffer_size); + if (0==buffer) { + pj_dealloc (fname); + pj_dealloc (line); + pj_ctx_fclose (ctx, fid); + return 0; + } - } + /* Skip the "
" indicator, and copy the rest of the line over */ + strcpy (buffer, line + strlen (section) + 2); - /* Is this our target? */ - else if( *next_char == '<' ) - { - /* terminate processing target on the next block definition */ - if (in_target) - break; + /* Copy the remaining lines of the section to buffer */ + for (;;) { + char *end_i_cator; + size_t next_length, buffer_length; - next_char++; - if (strncmp(name, next_char, len) == 0 - && next_char[len] == '>') - { - /* skip past target word */ - next_char += len + 1; - in_target = 1; - if(found_def) - *found_def = 1; - } - else - { - /* skip past end of line */ - while( *next_char && *next_char != '\n' ) - next_char++; - } + /* Did the section end somewhere in the most recently read line? */ + end_i_cator = strchr (buffer, '<'); + if (end_i_cator) { + *end_i_cator = 0; + break; } - else if (in_target) - { - const char *start_of_word = next_char; - int word_len = 0; - if (*start_of_word == '+') - { - start_of_word++; - next_char++; - } + /* End of file? - done! */ + if (0==pj_ctx_fgets (ctx, line, MAX_LINE_LENGTH, fid)) + break; - /* capture parameter */ - while ( *next_char && !isspace(*next_char) ) - { - next_char++; - word_len++; + /* Otherwise, handle the line. It MAY be the start of the next section, */ + /* but that will be handled at the start of next trip through the loop */ + buffer_length = strlen (buffer); + next_length = strlen (line) + buffer_length + 2; + if (next_length > current_buffer_size) { + char *b = pj_malloc (2 * current_buffer_size); + if (0==b) { + pj_dealloc (buffer); + buffer = 0; + break; } + strcpy (b, buffer); + current_buffer_size *= 2; + pj_dealloc (buffer); + buffer = b; + } + buffer[buffer_length] = ' '; + strcpy (buffer + buffer_length + 1, line); + } - strncpy(sword+1, start_of_word, word_len); - sword[word_len+1] = '\0'; + pj_ctx_fclose (ctx, fid); + pj_dealloc (fname); + pj_dealloc (line); + if (0==buffer) + return 0; + pj_shrink (buffer); + pj_log (ctx, 3, "key=%s, value: [%s]\n", key, buffer); + return buffer; +} - /* do not override existing parameter value of same name */ - if (!pj_param(ctx, *start, sword).i) { - /* don't default ellipse if datum, ellps or any earth model information is set */ - if (0==strncmp(sword,"tellps=", 7)) { - int n = 0; - n += pj_param(ctx, *start, "tdatum").i; - n += pj_param(ctx, *start, "tellps").i; - n += pj_param(ctx, *start, "ta").i; - n += pj_param(ctx, *start, "tb").i; - n += pj_param(ctx, *start, "trf").i; - n += pj_param(ctx, *start, "tf").i; - n += pj_param(ctx, *start, "te").i; - n += pj_param(ctx, *start, "tes").i; +/************************************************************************/ +static paralist *get_init(PJ_CONTEXT *ctx, char *key) { +/************************************************************************* +Expand key from buffer or (if not in buffer) from init file +*************************************************************************/ + char *xkey, *definition; + paralist *init_items = 0; + + /* support "init=file:section", "+init=file:section", and "file:section" format */ + xkey = strstr (key, "init="); + if (0==xkey) + xkey = key; + else + xkey += 5; + pj_log (ctx, 3, "get_init: searching cache for key: [%s]\n", xkey); + + /* Is file/key pair already in cache? */ + init_items = pj_search_initcache (xkey); + if (init_items) + return init_items; + + /* If not, we must read it from file */ + pj_log (ctx, 3, "get_init: searching on in init files for [%s]\n", xkey); + definition = get_init_string (ctx, xkey); + if (0==definition) + return 0; + init_items = string_to_paralist (ctx, definition); + pj_log (ctx, 3, "get_init: got [%s], paralist[0,1]: [%s,%s]\n", definition, init_items->param, init_items->next? init_items->next->param: "(empty)"); + pj_dealloc (definition); + if (0==init_items) + return 0; - if (0==n) - next = next->next = pj_mkparam(sword+1); - } - else - next = next->next = pj_mkparam(sword+1); - } + /* We found it in file - now insert into the cache, before returning */ + pj_insert_initcache (xkey, init_items); + return init_items; +} - } - else - { - /* skip past word */ - while( *next_char && !isspace(*next_char) ) { - next_char++; - } - } - } +static paralist *append_defaults_to_paralist (PJ_CONTEXT *ctx, paralist *start, char *key) { + paralist *defaults, *last = 0; + char keystring[ID_TAG_MAX + 20]; + paralist *next, *proj; + int err; - if (errno == 25) - errno = 0; + if (0==start) + return 0; - free(state); - return next; -} + if (strlen(key) > ID_TAG_MAX) + return 0; -/************************************************************************/ -/* get_defaults() */ -/************************************************************************/ -static paralist *get_defaults(projCtx ctx, paralist **start, paralist *next, char *name) { - PAFile fid; + /* Set defaults, unless inhibited (either explicitly through a "no_defs" token */ + /* or implicitly, because we are initializing a pipeline) */ + if (pj_param_exists (start, "no_defs")) + return start; + proj = pj_param_exists (start, "proj"); + if (0==proj) + return start; + if (strlen (proj->param) < 6) + return start; + if (0==strcmp ("pipeline", proj->param + 5)) + return start; + + err = pj_ctx_get_errno (ctx); + pj_ctx_set_errno (ctx, 0); + + /* Locate end of start-list */ + for (last = start; last->next; last = last->next); + + strcpy (keystring, "proj_def.dat:"); + strcat (keystring, key); + defaults = get_init (ctx, keystring); + + /* Defaults are optional - so we don't care if we cannot open the file */ + pj_ctx_set_errno (ctx, err); + + if (!defaults) + return last; + + /* Loop over all default items */ + for (next = defaults; next; next = next->next) { + + /* Don't override existing parameter value of same name */ + if (pj_param_exists (start, next->param)) + continue; + + /* Don't default ellipse if datum, ellps or any ellipsoid information is set */ + if (0==strncmp(next->param,"ellps=", 6)) { + if (pj_param_exists (start, "datum")) continue; + if (pj_param_exists (start, "ellps")) continue; + if (pj_param_exists (start, "a")) continue; + if (pj_param_exists (start, "b")) continue; + if (pj_param_exists (start, "rf")) continue; + if (pj_param_exists (start, "f")) continue; + if (pj_param_exists (start, "e")) continue; + if (pj_param_exists (start, "es")) continue; + } - if ( (fid = pj_open_lib(ctx,"proj_def.dat", "rt")) != NULL) { - next = get_opt(ctx, start, fid, "general", next, NULL); - pj_ctx_fseek(ctx, fid, 0, SEEK_SET); - next = get_opt(ctx, start, fid, name, next, NULL); - pj_ctx_fclose(ctx, fid); + /* If we're here, it's OK to append the current default item */ + last = last->next = pj_mkparam(next->param); } - if (errno) - errno = 0; /* don't care if can't open file */ - ctx->last_errno = 0; + last->next = 0; - return next; + pj_dealloc_params (ctx, defaults, 0); + return last; } -/************************************************************************/ -/* get_init() */ -/************************************************************************/ -static paralist *get_init(projCtx ctx, paralist **start, paralist *next, char *name, int *found_def) { - char fname[MAX_PATH_FILENAME+ID_TAG_MAX+3], *opt; - PAFile fid; - paralist *init_items = NULL; - const paralist *orig_next = next; +/*****************************************************************************/ +paralist *pj_expand_init(PJ_CONTEXT *ctx, paralist *init) { +/****************************************************************************** +Append expansion of to the paralist . The expansion is appended, +rather than inserted at 's place, since may contain +overrides to the expansion. These must take precedence, and hence come first +in the expanded list. - (void)strncpy(fname, name, sizeof(fname)-2); - fname[sizeof(fname)-2] = '\0'; +Consider e.g. the key 'foo:bar' which (hypothetically) expands to 'proj=utm +zone=32 ellps=GRS80', i.e. a UTM projection on the GRS80 ellipsoid. - /* - ** Search for file/key pair in cache - */ +The expression 'init=foo:bar ellps=intl' will then expand to: - init_items = pj_search_initcache( name ); - if( init_items != NULL ) - { - next->next = init_items; - while( next->next != NULL ) - next = next->next; - *found_def = 1; - return next; - } + 'init=foo:bar ellps=intl proj=utm zone=32 ellps=GRS80', - /* - ** Otherwise we try to open the file and search for it. - */ - if ((opt = strrchr(fname, ':')) != NULL) - *opt++ = '\0'; - else { pj_ctx_set_errno(ctx,-3); return NULL; } +where 'ellps=intl' precedes 'ellps=GRS80', and hence takes precedence, +turning the expansion into an UTM projection on the Hayford ellipsoid. - if ( (fid = pj_open_lib(ctx,fname, "rt")) != NULL) - next = get_opt(ctx, start, fid, opt, next, found_def); - else - return NULL; +Note that 'init=foo:bar' stays in the list. It is ignored after expansion. +******************************************************************************/ + paralist *last; + paralist *expn; - pj_ctx_fclose(ctx, fid); - if (errno == 25) - errno = 0; /* unknown problem with some sys errno<-25 */ + /* Nowhere to start? */ + if (0==init) + return 0; - /* - ** If we seem to have gotten a result, insert it into the - ** init file cache. - */ - if( next != NULL && next != orig_next ) - pj_insert_initcache( name, orig_next->next ); + expn = get_init(ctx, init->param); - return next; -} + /* Nothing in expansion? */ + if (0==expn) + return 0; -paralist * pj_get_init(projCtx ctx, paralist **start, paralist *next, char *name, int *found_def) { - return get_init(ctx, start, next, name, found_def); + /* Locate the end of the list */ + for (last = init; last && last->next; last = last->next); + + /* Then append and return */ + last->next = expn; + return init; } + + /************************************************************************/ /* pj_init_plus() */ /* */ /* Same as pj_init() except it takes one argument string with */ -/* individual arguments preceded by '+', such as "+proj=utm */ +/* individual arguments preceded by '+', such as "+proj=utm */ /* +zone=11 +ellps=WGS84". */ /************************************************************************/ @@ -434,15 +466,27 @@ pj_init(int argc, char **argv) { return pj_init_ctx( pj_get_default_ctx(), argc, argv ); } + +typedef PJ *(constructor)(PJ *); +typedef constructor *(*function_returning_constructor)(const char *); + +static constructor *pj_constructor (const char *name) { + int i; + char *s; + for (i = 0; (s = pj_list[i].id) && strcmp(name, s) ; ++i) ; + if (0==s) + return 0; + return (constructor *) pj_list[i].proj; +} + + PJ * pj_init_ctx(projCtx ctx, int argc, char **argv) { char *s, *name; - paralist *start = NULL; - PJ *(*proj)(PJ *); - paralist *curr; + constructor *proj; + paralist *curr, *init, *start; int i; int err; - int found_def = 0; PJ *PIN = 0; int n_pipelines = 0; int n_inits = 0; @@ -451,7 +495,6 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { ctx = pj_get_default_ctx (); ctx->last_errno = 0; - start = NULL; if (argc <= 0) { pj_ctx_set_errno (ctx, PJD_ERR_NO_ARGS); @@ -478,6 +521,7 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { return 0; } + /* put arguments into internal linked list */ start = curr = pj_mkparam(argv[0]); if (!curr) @@ -490,41 +534,45 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { curr = curr->next; } - /* Only expand +init's in non-pipeline operations. +init's in pipelines are */ - /* expanded in the individual pipeline steps during pipeline initialization. */ - /* Potentially this leads to many nested pipelines, which shouldn't be a */ - /* problem when +inits are expanded as late as possible. */ - if (pj_param(ctx, start, "tinit").i && n_pipelines == 0) { - found_def = 0; - curr = get_init(ctx, &start, curr, pj_param(ctx, start, "sinit").s, &found_def); - if (!curr) + + /* Only expand '+init's in non-pipeline operations. '+init's in pipelines are */ + /* expanded in the individual pipeline steps during pipeline initialization. */ + /* Potentially this leads to many nested pipelines, which shouldn't be a */ + /* problem when '+init's are expanded as late as possible. */ + init = pj_param_exists (start, "init"); + if (init && n_pipelines == 0) { + init = pj_expand_init (ctx, init); + if (!init) return pj_dealloc_params (ctx, start, PJD_ERR_NO_ARGS); - if (!found_def) - return pj_dealloc_params (ctx, start, PJD_ERR_NO_OPTION_IN_INIT_FILE); } - if (ctx->last_errno) return pj_dealloc_params (ctx, start, ctx->last_errno); - /* find projection selection */ - if (!(name = pj_param(ctx, start, "sproj").s)) + /* Find projection selection */ + curr = pj_param_exists (start, "proj"); + if (0==curr) return pj_dealloc_params (ctx, start, PJD_ERR_PROJ_NOT_NAMED); - for (i = 0; (s = pj_list[i].id) && strcmp(name, s) ; ++i) ; + name = curr->param; + if (strlen (name) < 6) + return pj_dealloc_params (ctx, start, PJD_ERR_PROJ_NOT_NAMED); + name += 5; - if (!s) + proj = pj_constructor (name); + if (0==proj) return pj_dealloc_params (ctx, start, PJD_ERR_UNKNOWN_PROJECTION_ID); - /* set defaults, unless inhibited or we are initializing a pipeline */ - if (!(pj_param(ctx, start, "bno_defs").i) && n_pipelines == 0) - curr = get_defaults(ctx,&start, curr, name); - proj = (PJ *(*)(PJ *)) pj_list[i].proj; + /* Append general and projection specific defaults to the definition list */ + append_defaults_to_paralist (ctx, start, "general"); + append_defaults_to_paralist (ctx, start, name); + - /* allocate projection structure */ + /* Allocate projection structure */ PIN = proj(0); if (0==PIN) return pj_dealloc_params (ctx, start, ENOMEM); + PIN->ctx = ctx; PIN->params = start; PIN->is_latlong = 0; @@ -539,7 +587,7 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { PIN->vgridlist_geoid = NULL; PIN->vgridlist_geoid_count = 0; - /* set datum parameters */ + /* Set datum parameters */ if (pj_datum_set(ctx, start, PIN)) return pj_default_destructor (PIN, proj_errno(PIN)); @@ -566,18 +614,18 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { PIN->datum_type = PJD_WGS84; } - /* set PIN->geoc coordinate system */ + /* Set PIN->geoc coordinate system */ PIN->geoc = (PIN->es != 0.0 && pj_param(ctx, start, "bgeoc").i); - /* over-ranging flag */ + /* Over-ranging flag */ PIN->over = pj_param(ctx, start, "bover").i; - /* vertical datum geoid grids */ + /* Vertical datum geoid grids */ PIN->has_geoid_vgrids = pj_param(ctx, start, "tgeoidgrids").i; if( PIN->has_geoid_vgrids ) /* we need to mark it as used. */ pj_param(ctx, start, "sgeoidgrids"); - /* longitude center for wrapping */ + /* Longitude center for wrapping */ PIN->is_long_wrap_set = pj_param(ctx, start, "tlon_wrap").i; if (PIN->is_long_wrap_set) { PIN->long_wrap_center = pj_param(ctx, start, "rlon_wrap").f; @@ -588,7 +636,7 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { return pj_default_destructor (PIN, PJD_ERR_LAT_OR_LON_EXCEED_LIMIT); } - /* axis orientation */ + /* Axis orientation */ if( (pj_param(ctx, start,"saxis").s) != NULL ) { static const char *axis_legal = "ewnsud"; @@ -601,23 +649,23 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { || strchr( axis_legal, axis_arg[2] ) == NULL) return pj_default_destructor (PIN, PJD_ERR_AXIS); - /* it would be nice to validate we don't have on axis repeated */ + /* TODO: it would be nice to validate we don't have on axis repeated */ strcpy( PIN->axis, axis_arg ); } - /* central meridian */ + /* Central meridian */ PIN->lam0=pj_param(ctx, start, "rlon_0").f; - /* central latitude */ + /* Central latitude */ PIN->phi0 = pj_param(ctx, start, "rlat_0").f; - /* false easting and northing */ + /* False easting and northing */ PIN->x0 = pj_param(ctx, start, "dx_0").f; PIN->y0 = pj_param(ctx, start, "dy_0").f; PIN->z0 = pj_param(ctx, start, "dz_0").f; PIN->t0 = pj_param(ctx, start, "dt_0").f; - /* general scaling factor */ + /* General scaling factor */ if (pj_param(ctx, start, "tk_0").i) PIN->k0 = pj_param(ctx, start, "dk_0").f; else if (pj_param(ctx, start, "tk").i) @@ -627,7 +675,7 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { if (PIN->k0 <= 0.) return pj_default_destructor (PIN, PJD_ERR_K_LESS_THAN_ZERO); - /* set units */ + /* Set units */ s = 0; if ((name = pj_param(ctx, start, "sunits").s) != NULL) { for (i = 0; (s = pj_units[i].id) && strcmp(name, s) ; ++i) ; @@ -655,7 +703,7 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { } else PIN->to_meter = PIN->fr_meter = 1.; - /* set vertical units */ + /* Set vertical units */ s = 0; if ((name = pj_param(ctx, start, "svunits").s) != NULL) { for (i = 0; (s = pj_units[i].id) && strcmp(name, s) ; ++i) ; @@ -675,7 +723,7 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { PIN->vfr_meter = PIN->fr_meter; } - /* prime meridian */ + /* Prime meridian */ s = 0; if ((name = pj_param(ctx, start, "spm").s) != NULL) { const char *value = NULL; @@ -708,7 +756,7 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { return pj_default_destructor (PIN, ENOMEM); geod_init(PIN->geod, PIN->a, (1 - sqrt (1 - PIN->es))); - /* projection specific initialization */ + /* Projection specific initialization */ err = proj_errno_reset (PIN); PIN = proj(PIN); if (proj_errno (PIN)) { @@ -719,6 +767,8 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { return PIN; } + + /************************************************************************/ /* pj_free() */ /* */ diff --git a/src/pj_internal.c b/src/pj_internal.c index 8a5d2d15..7bfd192b 100644 --- a/src/pj_internal.c +++ b/src/pj_internal.c @@ -33,6 +33,7 @@ #include "projects.h" #include +#include #include #include #include @@ -114,14 +115,15 @@ void proj_context_inherit (PJ *parent, PJ *child) { -size_t pj_strlcpy(char *dst, const char *src, size_t siz) { -/******************************************************************* +/**************************************************************************************/ +size_t pj_strlcpy(char *dst, const char *src, size_t dsize) { +/*************************************************************************************** Copy src to string dst of size siz. At most siz-1 characters will be copied. Always NUL terminates (unless siz == 0). Returns strlen(src); if retval >= siz, truncation occurred. - - * Copyright (c) 1998 Todd C. Miller + * + * Copyright (c) 1998, 2015 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -134,40 +136,243 @@ size_t pj_strlcpy(char *dst, const char *src, size_t siz) { * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * - Source: http://www.i-pi.com/Training/EthicalHacking/Solutions/strlcpy.c + Source: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/string/strlcpy.c -********************************************************************/ - register char *d = dst; - register const char *s = src; - register size_t n = siz; +***************************************************************************************/ + const char *osrc = src; + size_t nleft = dsize; - /* Copy as many bytes as will fit */ - if (n != 0 && --n != 0) { - do { - if ((*d++ = *s++) == 0) + /* Copy as many bytes as will fit. */ + if (nleft != 0) { + while (--nleft != 0) { + if ((*dst++ = *src++) == '\0') break; - } while (--n != 0); + } } - /* Not enough room in dst, add NUL and traverse rest of src */ - if (n == 0) { - if (siz != 0) - *d = '\0'; /* NUL-terminate dst */ - while (*s++) + /* Not enough room in dst, add NUL and traverse rest of src. */ + if (nleft == 0) { + if (dsize != 0) + *dst = '\0'; /* NUL-terminate dst */ + while (*src++) ; } - return(s - src - 1); /* count does not include NUL */ + return(src - osrc - 1); /* count does not include NUL */ } -/* stuff below is *not* considered API, and will be moved to an "internal plumbing toolset" */ +/*****************************************************************************/ +char *pj_chomp (char *c) { +/****************************************************************************** +Strip pre- and postfix whitespace. Inline comments (indicated by '#') are +considered whitespace. +******************************************************************************/ + size_t i, n; + char *comment; + char *start = c; + + if (0==c) + return 0; + + comment = strchr (c, '#'); + if (comment) + *comment = 0; + + n = strlen (c); + if (0==n) + return c; + + /* Eliminate postfix whitespace */ + for (i = n - 1; (i > 0) && (isspace (c[i]) || ';'==c[i]); i--) + c[i] = 0; + + /* Find start of non-whitespace */ + while (0 != *start && (';'==*start || isspace (*start))) + start++; + + n = strlen (start); + if (0==n) { + c[0] = 0; + return c; + } + + memmove (c, start, n + 1); + return c; +} +/*****************************************************************************/ +char *pj_shrink (char *c) { +/****************************************************************************** +Collapse repeated whitespace. Remove '+' and ';'. Make ',' and '=' greedy, +consuming their surrounding whitespace. +******************************************************************************/ + size_t i, j, n; + + /* Flag showing that a whitespace (ws) has been written after last non-ws */ + size_t ws; + + if (0==c) + return 0; + + pj_chomp (c); + n = strlen (c); + + /* First collapse repeated whitespace (including +/;) */ + for (i = j = 0, ws = 0; j < n; j++) { + + /* Eliminate prefix '+', only if preceeded by whitespace */ + /* (i.e. keep it in 1.23e+08) */ + if ((i > 0) && ('+'==c[j]) && isspace (c[i])) + c[j] = ' '; + + if (isspace (c[j]) || ';'==c[j]) { + if (0==ws && (i > 0)) + c[i++] = ' '; + ws = 1; + continue; + } + else { + ws = 0; + c[i++] = c[j]; + } + } + c[i] = 0; + n = strlen(c); + + /* Then make ',' and '=' greedy */ + for (i = j = 0; j < n; j++) { + if (i==0) { + c[i++] = c[j]; + continue; + } + + /* Skip space before '='/',' */ + if ('='==c[j] || ','==c[j]) { + if (c[i - 1]==' ') + c[i - 1] = c[j]; + else + c[i++] = c[j]; + continue; + } + + if (' '==c[j] && ('='==c[i - 1] || ','==c[i - 1]) ) + continue; + + c[i++] = c[j]; + } + c[i] = 0; + return c; +} + + + +/*****************************************************************************/ +size_t pj_trim_argc (char *args) { +/****************************************************************************** +Trim all unnecessary whitespace (and non-essential syntactic tokens) from the +argument string, args, and count its number of elements. +******************************************************************************/ + size_t i, m, n; + pj_shrink (args); + n = strlen (args); + if (n==0) + return 0; + for (i = m = 0; i < n; i++) { + if (' '==args[i]) { + args[i] = 0; + m++; + } + } + return m + 1; +} + + + +/*****************************************************************************/ +char **pj_trim_argv (size_t argc, char *args) { +/****************************************************************************** +Create an argv-style array from elements placed in the argument string, args. + +args is a trimmed string as returned by pj_trim_argc(), and argc is the number +of trimmed strings found (i.e. the return value of pj_trim_args()). Hence, + int argc = pj_trim_argc (args); + char **argv = pj_trim_argv (argc, args); +will produce a classic style (argc, argv) pair from a string of whitespace +separated args. No new memory is allocated for storing the individual args +(they stay in the args string), but for the pointers to the args a new array +is allocated and returned. + +It is the duty of the caller to free this array. +******************************************************************************/ + size_t i, j; + char **argv; + + if (0==args) + return 0; + if (0==argc) + return 0; + + + /* turn the input string into an array of strings */ + argv = (char **) calloc (argc, sizeof (char *)); + if (0==argv) + return 0; + argv[0] = args; + for (i = 0, j = 1; ; i++) { + if (0==args[i]) { + argv[j++] = args + (i + 1); + } + if (j==argc) + break; + } + return argv; +} + + + +/*****************************************************************************/ +char *pj_make_args (size_t argc, char **argv) { +/****************************************************************************** +pj_make_args is the inverse of the pj_trim_argc/pj_trim_argv combo: It +converts free format command line input to something proj_create can consume. + +Allocates, and returns, an array of char, large enough to hold a whitespace +separated copy of the args in argv. It is the duty of the caller to free this +array. +******************************************************************************/ + size_t i, n; + char *p; + + for (i = n = 0; i < argc; i++) + n += strlen (argv[i]); + + p = pj_calloc (n + argc + 1, sizeof (char)); + if (0==p) + return 0; + if (0==argc) + return p; + + for (i = n = 0; i < argc; i++) { + strcat (p, argv[i]); + strcat (p, " "); + } + return pj_shrink (p); +} + + + +/*****************************************************************************/ void proj_context_errno_set (PJ_CONTEXT *ctx, int err) { +/****************************************************************************** +Raise an error directly on a context, without going through a PJ belonging +to that context. +******************************************************************************/ if (0==ctx) ctx = pj_get_default_ctx(); pj_ctx_set_errno (ctx, err); @@ -176,8 +381,20 @@ void proj_context_errno_set (PJ_CONTEXT *ctx, int err) { -/* Set logging level 0-3. Higher number means more debug info. 0 turns it off */ + + + +/* logging */ + +/* pj_vlog resides in pj_log.c and relates to pj_log as vsprintf relates to sprintf */ +void pj_vlog( projCtx ctx, int level, const char *fmt, va_list args ); + + +/***************************************************************************************/ enum proj_log_level proj_log_level (PJ_CONTEXT *ctx, enum proj_log_level log_level) { +/**************************************************************************************** + Set logging level 0-3. Higher number means more debug info. 0 turns it off +****************************************************************************************/ enum proj_log_level previous; if (0==ctx) ctx = pj_get_default_ctx(); @@ -191,35 +408,48 @@ enum proj_log_level proj_log_level (PJ_CONTEXT *ctx, enum proj_log_level log_lev } - -/* logging */ - -/* pj_vlog resides in pj_log.c and relates to pj_log as vsprintf relates to sprintf */ -void pj_vlog( projCtx ctx, int level, const char *fmt, va_list args ); - +/*****************************************************************************/ void proj_log_error (PJ *P, const char *fmt, ...) { +/****************************************************************************** + For reporting the most severe events. +******************************************************************************/ va_list args; va_start( args, fmt ); pj_vlog (pj_get_ctx (P), PJ_LOG_ERROR , fmt, args); va_end( args ); } + +/*****************************************************************************/ void proj_log_debug (PJ *P, const char *fmt, ...) { +/****************************************************************************** + For reporting debugging information. +******************************************************************************/ va_list args; va_start( args, fmt ); pj_vlog (pj_get_ctx (P), PJ_LOG_DEBUG_MAJOR , fmt, args); va_end( args ); } + +/*****************************************************************************/ void proj_log_trace (PJ *P, const char *fmt, ...) { +/****************************************************************************** + For reporting embarrasingly detailed debugging information. +******************************************************************************/ va_list args; va_start( args, fmt ); pj_vlog (pj_get_ctx (P), PJ_LOG_DEBUG_MINOR , fmt, args); va_end( args ); } -/* Put a new logging function into P's context. The opaque object app_data is passed as first arg at each call to the logger */ + +/*****************************************************************************/ void proj_log_func (PJ_CONTEXT *ctx, void *app_data, PJ_LOG_FUNCTION log) { +/****************************************************************************** + Put a new logging function into P's context. The opaque object app_data is + passed as first arg at each call to the logger +******************************************************************************/ if (0==ctx) pj_get_default_ctx (); if (0==ctx) diff --git a/src/pj_malloc.c b/src/pj_malloc.c index c9275074..63278a56 100644 --- a/src/pj_malloc.c +++ b/src/pj_malloc.c @@ -40,6 +40,7 @@ ** projection system memory allocation/deallocation call with custom ** application procedures. */ +#include #include "projects.h" #include @@ -143,7 +144,7 @@ char *pj_strdup(const char *str) /*****************************************************************************/ -void *pj_dealloc_params (projCtx ctx, paralist *start, int errlev) { +void *pj_dealloc_params (PJ_CONTEXT *ctx, paralist *start, int errlev) { /***************************************************************************** Companion to pj_default_destructor (below). Deallocates a linked list of "+proj=xxx" initialization parameters. diff --git a/src/pj_param.c b/src/pj_param.c index ee952eca..5024346d 100644 --- a/src/pj_param.c +++ b/src/pj_param.c @@ -1,20 +1,79 @@ /* put parameters in linked list and retrieve */ -#include +#include #include #include +#include "projects.h" + /* create parameter list entry */ paralist *pj_mkparam(char *str) { - paralist *newitem; - - if((newitem = (paralist *)pj_malloc(sizeof(paralist) + strlen(str))) != NULL) { - newitem->used = 0; - newitem->next = 0; - if (*str == '+') - ++str; - (void)strcpy(newitem->param, str); - } - return newitem; + paralist *newitem; + + if((newitem = (paralist *)pj_malloc(sizeof(paralist) + strlen(str))) != NULL) { + newitem->used = 0; + newitem->next = 0; + if (*str == '+') + ++str; + (void)strcpy(newitem->param, str); + } + return newitem; +} + + +/* As pj_mkparam, but payload ends at first whitespace, rather than at end of */ +paralist *pj_mkparam_ws (char *str) { + paralist *newitem; + size_t len = 0; + + if (0==str) + return 0; + + /* Find start and length of string */ + while (isspace (*str)) + str++; + while ((!isspace(str[len])) && 0!=str[len]) + len++; + if (*str == '+') { + str++; + len--; + } + + /* Use calloc to automagically 0-terminate the copy */ + newitem = (paralist *) pj_calloc (1, sizeof(paralist) + len); + if (0==newitem) + return 0; + memmove(newitem->param, str, len); + + newitem->used = 0; + newitem->next = 0; + + return newitem; +} + +/**************************************************************************************/ +paralist *pj_param_exists (paralist *list, const char *parameter) { +/*************************************************************************************** + Determine whether a given parameter exists in a paralist. If it does, return + a pointer to the corresponding list element - otherwise return 0. + + This function is equivalent to the pj_param (...) call with the "opt" argument + set to the parameter name preceeeded by a 't'. But by using this one, one avoids + writing the code allocating memory for a new copy of parameter name, and prepending + the t (for compile time known names, this is obviously not an issue). +***************************************************************************************/ + paralist *next = list; + char *c = strchr (parameter, '='); + size_t len = strlen (parameter); + if (c) + len = c - parameter; + if (list==0) + return 0; + + for (next = list; next; next = next->next) + if (0==strncmp (parameter, next->param, len) && (next->param[len]=='=' || next->param[len]==0)) + return next; + + return 0; } @@ -35,76 +94,76 @@ paralist *pj_mkparam(char *str) { /* */ /************************************************************************/ - PROJVALUE /* test for presence or get parameter value */ + PROJVALUE /* test for presence or get parameter value */ pj_param(projCtx ctx, paralist *pl, const char *opt) { - int type; - unsigned l; - PROJVALUE value; - - if( ctx == NULL ) - ctx = pj_get_default_ctx(); - - type = *opt++; - /* simple linear lookup */ - l = (int)strlen(opt); - while (pl && !(!strncmp(pl->param, opt, l) && - (!pl->param[l] || pl->param[l] == '='))) - pl = pl->next; - if (type == 't') - value.i = pl != 0; - else if (pl) { - pl->used |= 1; - opt = pl->param + l; - if (*opt == '=') - ++opt; - switch (type) { - case 'i': /* integer input */ - value.i = atoi(opt); - break; - case 'd': /* simple real input */ - value.f = pj_atof(opt); - break; - case 'r': /* degrees input */ - value.f = dmstor_ctx(ctx, opt, 0); - break; - case 's': /* char string */ + int type; + unsigned l; + PROJVALUE value; + + if( ctx == NULL ) + ctx = pj_get_default_ctx(); + + type = *opt++; + /* simple linear lookup */ + l = (int)strlen(opt); + while (pl && !(!strncmp(pl->param, opt, l) && + (!pl->param[l] || pl->param[l] == '='))) + pl = pl->next; + if (type == 't') + value.i = pl != 0; + else if (pl) { + pl->used |= 1; + opt = pl->param + l; + if (*opt == '=') + ++opt; + switch (type) { + case 'i': /* integer input */ + value.i = atoi(opt); + break; + case 'd': /* simple real input */ + value.f = pj_atof(opt); + break; + case 'r': /* degrees input */ + value.f = dmstor_ctx(ctx, opt, 0); + break; + case 's': /* char string */ value.s = (char *) opt; - break; - case 'b': /* boolean */ - switch (*opt) { - case 'F': case 'f': - value.i = 0; - break; - case '\0': case 'T': case 't': - value.i = 1; - break; - default: - pj_ctx_set_errno(ctx, -8); - value.i = 0; - break; - } - break; - default: + break; + case 'b': /* boolean */ + switch (*opt) { + case 'F': case 'f': + value.i = 0; + break; + case '\0': case 'T': case 't': + value.i = 1; + break; + default: + pj_ctx_set_errno(ctx, -8); + value.i = 0; + break; + } + break; + default: bum_type: /* note: this is an error in parameter, not a user error */ - fprintf(stderr, "invalid request to pj_param, fatal\n"); - exit(1); - } - } else /* not given */ - switch (type) { - case 'b': - case 'i': - value.i = 0; - break; - case 'd': - case 'r': - value.f = 0.; - break; - case 's': - value.s = 0; - break; - default: - goto bum_type; - } - return value; + fprintf(stderr, "invalid request to pj_param, fatal\n"); + exit(1); + } + } else /* not given */ + switch (type) { + case 'b': + case 'i': + value.i = 0; + break; + case 'd': + case 'r': + value.f = 0.; + break; + case 's': + value.s = 0; + break; + default: + goto bum_type; + } + return value; } diff --git a/src/proj.def b/src/proj.def index 887f4719..51b79558 100644 --- a/src/proj.def +++ b/src/proj.def @@ -149,3 +149,5 @@ EXPORTS pj_ellipsoid @134 pj_calc_ellipsoid_params @135 + pj_chomp @136 + pj_shrink @137 diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index 5f4bf334..0fba5097 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -28,7 +28,6 @@ *****************************************************************************/ #include #include -#include #include #include "proj_internal.h" #include "projects.h" @@ -81,6 +80,8 @@ double proj_lpz_dist (const PJ *P, LPZ a, LPZ b) { PJ_COORD aa, bb; aa.lpz = a; bb.lpz = b; + if (HUGE_VAL==a.lam || HUGE_VAL==b.lam) + return HUGE_VAL; return hypot (proj_lp_dist (P, aa.lp, bb.lp), a.z - b.z); } @@ -340,7 +341,7 @@ PJ_COORD proj_geoc_lat (const PJ *P, PJ_DIRECTION direction, PJ_COORD coo) { direction = PJ_INV) The conversion involves a call to the tangent function, which goes through the - roof at the poles, so very close (the last few micrometers) to the poles no + roof at the poles, so very close (the last centimeter) to the poles no conversion takes place and the input latitude is copied directly to the output. Fortunately, the geocentric latitude converges to the geographical at the @@ -349,7 +350,7 @@ PJ_COORD proj_geoc_lat (const PJ *P, PJ_DIRECTION direction, PJ_COORD coo) { For the spherical case, the geographical latitude equals the geocentric, and consequently, the input is copied directly to the output. **************************************************************************************/ - const double limit = M_HALFPI - 1e-12; + const double limit = M_HALFPI - 1e-9; PJ_COORD res = coo; if ((coo.lp.phi > limit) || (coo.lp.phi < -limit) || (P->es==0)) return res; @@ -388,76 +389,29 @@ PJ *proj_create (PJ_CONTEXT *ctx, const char *definition) { **************************************************************************************/ PJ *P; char *args, **argv; - int argc, i, j, last, n; + size_t argc, n; if (0==ctx) ctx = pj_get_default_ctx (); /* Make a copy that we can manipulate */ - n = (int) strlen (definition); + n = strlen (definition); args = (char *) malloc (n + 1); if (0==args) return 0; strcpy (args, definition); - /* All-in-one: count args, eliminate superfluous whitespace, 0-terminate substrings */ - for (i = j = argc = last = 0; i < n; ) { - - /* Skip prefix whitespace */ - while (isspace (args[i])) - i++; - - /* Skip at most one prefix '+' */ - if ('+'==args[i]) - i++; - - /* Whitespace after a '+' is a syntax error - but by Postel's prescription, we ignore and go on */ - if (isspace (args[i])) - continue; - - /* Move a whitespace delimited text string to the left, skipping over superfluous whitespace */ - while ((0!=args[i]) && (!isspace (args[i])) && (';'!=args[i])) - args[j++] = args[i++]; - - /* Skip postfix whitespace */ - while (isspace (args[i]) || ';'==args[i]) - i++; - - /* Greedy assignment operator: turn "a = b" into "a=b" */ - if ('='==args[i]) { - args[j++] = '='; - i++; - while (isspace (args[i])) - i++; - while ((0!=args[i]) && (!isspace (args[i])) && (';'!=args[i])) - args[j++] = args[i++]; - while (isspace (args[i]) || ';'==args[i]) - i++; - } - - /* terminate string - if that makes j pass i (often the case for first arg), let i catch up */ - args[j++] = 0; - if (i < j) - i = j; - - /* we finished another arg */ - argc++; + argc = pj_trim_argc (args); + if (argc==0) { + pj_dealloc (args); + return 0; } - /* turn the massaged input into an array of strings */ - argv = (char **) calloc (argc, sizeof (char *)); - if (0==argv) - return pj_dealloc (args); - argv[0] = args; - for (i = 0, j = 1; i < n; i++) { - if (0==args[i]) - argv[j++] = args + (i + 1); - if (j==argc) - break; - } + argv = pj_trim_argv (argc, args); /* ...and let pj_init_ctx do the hard work */ - P = pj_init_ctx (ctx, argc, argv); + P = pj_init_ctx (ctx, (int) argc, argv); + pj_dealloc (argv); pj_dealloc (args); return P; @@ -474,11 +428,22 @@ a null-pointer is returned. The definition arguments may use '+' as argument sta indicator, as in {"+proj=utm", "+zone=32"}, or leave it out, as in {"proj=utm", "zone=32"}. **************************************************************************************/ + PJ *P; + const char *c; + if (0==argv) return 0; if (0==ctx) ctx = pj_get_default_ctx (); - return pj_init_ctx (ctx, argc, argv); + + /* We assume that free format is used, and build a full proj_create compatible string */ + c = pj_make_args (argc, argv); + if (0==c) + return 0; + + P = proj_create (ctx, c); + pj_dealloc ((char *) c); + return P; } @@ -781,6 +746,8 @@ PJ_GRID_INFO proj_grid_info(const char *gridname) { return info; } + + /*****************************************************************************/ PJ_INIT_INFO proj_init_info(const char *initname){ /****************************************************************************** @@ -790,12 +757,14 @@ PJ_INIT_INFO proj_init_info(const char *initname){ Returns PJ_INIT_INFO struct. - If the init file is not found all members of - the return struct are set to 0. If the init file is found, but it the - metadata is missing, the value is set to "Unknown". + If the init file is not found all members of the return struct are set + to the empty string. + + If the init file is found, but the metadata is missing, the value is + set to "Unknown". ******************************************************************************/ - int file_found, def_found=0; + int file_found; char param[80], key[74]; paralist *start, *next; PJ_INIT_INFO info; @@ -819,7 +788,7 @@ PJ_INIT_INFO proj_init_info(const char *initname){ strncat(param, key, 73); start = pj_mkparam(param); - next = pj_get_init(ctx, &start, start, key, &def_found); + pj_expand_init(ctx, start); if (pj_param(ctx, start, "tversion").i) { pj_strlcpy(info.version, pj_param(ctx, start, "sversion").s, sizeof(info.version)); @@ -858,6 +827,9 @@ PJ_FACTORS proj_factors(PJ *P, LP lp) { PJ_FACTORS factors = {0,0,0, 0,0,0, 0,0}; struct FACTORS f; + if (0==P) + return factors; + if (pj_factors(lp, P, 0.0, &f)) return factors; diff --git a/src/proj_internal.h b/src/proj_internal.h index 4e70e690..6571bce9 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -57,6 +57,7 @@ extern "C" { #define PJ_TORAD(deg) ((deg)*M_PI/180.0) #endif + /* This enum is also conditionally defined in projects.h - but we need it here */ /* for the pj_left/right prototypes, and enums cannot be forward declared */ enum pj_io_units { @@ -109,6 +110,12 @@ void pj_inherit_ellipsoid_def (const PJ *src, PJ *dst); void pj_erase_ellipsoid_def (PJ *P); int pj_calc_ellipsoid_params (PJ *P, double a, double es); +char *pj_chomp (char *c); +char *pj_shrink (char *c); +size_t pj_trim_argc (char *args); +char **pj_trim_argv (size_t argc, char *args); +char *pj_make_args (size_t argc, char **argv); + /* Lowest level: Minimum support for fileapi */ void proj_fileapi_set (PJ *P, void *fileapi); diff --git a/src/projects.h b/src/projects.h index 8c0f81fa..ca2cdbe3 100644 --- a/src/projects.h +++ b/src/projects.h @@ -683,7 +683,10 @@ double adjlon(double); double aacos(projCtx,double), aasin(projCtx,double), asqrt(double), aatan2(double, double); PROJVALUE pj_param(projCtx ctx, paralist *, const char *); +paralist *pj_param_exists (paralist *list, const char *parameter); paralist *pj_mkparam(char *); +paralist *pj_mkparam_ws (char *str); + int pj_ellipsoid (PJ *); int pj_ell_set(projCtx ctx, paralist *, double *, double *); @@ -694,7 +697,8 @@ int pj_angular_units_set(paralist *, PJ *); paralist *pj_clone_paralist( const paralist* ); paralist *pj_search_initcache( const char *filekey ); void pj_insert_initcache( const char *filekey, const paralist *list); -paralist *pj_get_init(projCtx ctx, paralist **start, paralist *next, char *name, int *found_def); +paralist *pj_expand_init(projCtx ctx, paralist *init); + void *pj_dealloc_params (projCtx ctx, paralist *start, int errlev); diff --git a/test/gie/GDA.gie b/test/gie/GDA.gie index 423443a6..b77ca934 100644 --- a/test/gie/GDA.gie +++ b/test/gie/GDA.gie @@ -13,58 +13,64 @@ Which is distributed under Creative Commons CC-BY 4.0 These tests will probably be useful as a template for an AU setup file, defining transformations for Australian systems, but I'm reluctant to provide such a file -directly - I believe it should come from official AU sources. +myself - it probably should come from official AU sources. Thomas Knudsen, thokn@sdfe.dk, 2017-11-27 ----------------------------------------------------------------------------------- + ----------------------------------------------------------------------------------- GDA94 to GDA2020 ----------------------------------------------------------------------------------- Just the Helmert transformation, to verify that we are within 100 um ----------------------------------------------------------------------------------- -operation proj=helmert x=0.06155 y=-0.01087 z=-0.04019 s=-0.009994 \ - rx=-0.0394924 ry=-0.0327221 rz=-0.0328979 +operation proj=helmert + x = 0.06155 rx = -0.0394924 + y = -0.01087 ry = -0.0327221 + z = -0.04019 rz = -0.0328979 s = -0.009994 + ----------------------------------------------------------------------------------- tolerance 75 um accept -4052051.7643 4212836.2017 -2545106.0245 expect -4052052.7379 4212835.9897 -2545104.5898 +------------------------------------------------------------------------------- ----------------------------------------------------------------------------------- GDA94 to GDA2020 ----------------------------------------------------------------------------------- -All the way from geographic-to-geographic +All the way from geographic-to-cartesian-and-back-to-geographic ----------------------------------------------------------------------------------- -operation proj=pipeline ellps=GRS80 \ - step proj=cart \ - step proj=helmert x=0.06155 y=-0.01087 z=-0.04019 s=-0.009994 \ - rx=-0.0394924 ry=-0.0327221 rz=-0.0328979 \ - step proj=cart inv +operation proj = pipeline ellps=GRS80; + step proj = cart; + step proj = helmert + x = 0.06155; rx = -0.0394924; + y = -0.01087; ry = -0.0327221; + z = -0.04019; rz = -0.0328979; s = -0.009994; + step proj = cart inv; ----------------------------------------------------------------------------------- accept 133.88551329 -23.67012389 603.3466 0 # Alice Springs GDA94 expect 133.8855216 -23.67011014 603.2489 0 # Alice Springs GDA2020 +------------------------------------------------------------------------------- ----------------------------------------------------------------------------------- -ITRF2014@2018 to GDA2020 +ITRF2014@2018 to GDA2020 - Test point ALIC (Alice Springs) ----------------------------------------------------------------------------------- Just the Helmert transformation, to verify that we are within 100 um ----------------------------------------------------------------------------------- -operation proj = helmert; \ - x = 0; rx = 0; dx = 0; drx = 0.00150379; \ - y = 0; ry = 0; dy = 0; dry = 0.00118346; \ - z = 0; rz = 0; dz = 0; drz = 0.00120716; \ - \ - ds = 0; t_epoch=2020.0; ------------------------------------------------------------------------------------ -tolerance 50 um +operation proj = helmert ellps=GRS80 exact - # Alice Springs ITRF2014@2018.0 -accept -4052052.6588 4212835.9938 -2545104.6946 2018.0 + x = 0 rx = 0 dx = 0 drx = 0.00150379 + y = 0 ry = 0 dy = 0 dry = 0.00118346 + z = 0 rz = 0 dz = 0 drz = 0.00120716 - # Alice Springs GDA2020 -expect -4052052.7373 4212835.9835 -2545104.5867 + s = 0 ds = 0 t_epoch=2020.0 +----------------------------------------------------------------------------------- +tolerance 40 um +accept -4052052.6588 4212835.9938 -2545104.6946 2018.0 # ITRF2014@2018.0 +expect -4052052.7373 4212835.9835 -2545104.5867 # GDA2020 +----------------------------------------------------------------------------------- diff --git a/test/gie/axisswap.gie b/test/gie/axisswap.gie index b9281ef7..7f0c366c 100644 --- a/test/gie/axisswap.gie +++ b/test/gie/axisswap.gie @@ -2,73 +2,75 @@ Tests for the axisswap operation ------------------------------------------------------------------------------- -BEGIN + -OPERATION +proj=axisswap +order=1,2,3,4 -TOLERANCE 0.000001 m -ACCEPT 1 2 3 4 -EXPECT 1 2 3 4 -ROUNDTRIP 100 +operation proj=axisswap order=1,2,3,4 +tolerance 0.000001 m +accept 1 2 3 4 +expect 1 2 3 4 +roundtrip 100 -OPERATION +proj=axisswap +order=4,3,2,1 -TOLERANCE 0.000001 m -ACCEPT 1 2 3 4 -EXPECT 4 3 2 1 -ROUNDTRIP 100 +operation proj=axisswap order=4,3,2,1 +tolerance 0.000001 m +accept 1 2 3 4 +expect 4 3 2 1 +roundtrip 100 -OPERATION +proj=axisswap +order=-1,-2,-3,-4 -TOLERANCE 0.000001 m -ACCEPT 1 2 3 4 -EXPECT -1 -2 -3 -4 -ROUNDTRIP 100 +operation proj=axisswap order=-1,-2,-3,-4 +tolerance 0.000001 m +accept 1 2 3 4 +expect -1 -2 -3 -4 +roundtrip 100 -OPERATION +proj=axisswap +order=1,2,-3,4 -TOLERANCE 0.000001 m -ACCEPT 1 2 3 4 -EXPECT 1 2 -3 4 -ROUNDTRIP 100 +operation proj=axisswap order=1,2,-3,4 +tolerance 0.000001 m +accept 1 2 3 4 +expect 1 2 -3 4 +roundtrip 100 -OPERATION +proj=axisswap +order=-1,2,3,4 -TOLERANCE 0.000001 m -ACCEPT 1 2 3 4 -EXPECT -1 2 3 4 -ROUNDTRIP 100 +operation proj=axisswap order=-1,2,3,4 +tolerance 0.000001 m +accept 1 2 3 4 +expect -1 2 3 4 +roundtrip 100 -OPERATION +proj=axisswap +order=1,2,3,-4 -TOLERANCE 0.000001 m -ACCEPT 1 2 3 4 -EXPECT 1 2 3 -4 -ROUNDTRIP 100 +operation proj=axisswap order=1,2,3,-4 +tolerance 0.000001 m +accept 1 2 3 4 +expect 1 2 3 -4 +roundtrip 100 -OPERATION +proj=axisswap +order=-2,1 -TOLERANCE 0.000001 m -ACCEPT 1 2 3 4 -EXPECT -2 1 3 4 -ROUNDTRIP 100 -$ -OPERATION +proj=axisswap +order=3,-2,1 -TOLERANCE 0.000001 m -ACCEPT 1 2 3 4 -EXPECT 3 -2 1 4 -ROUNDTRIP 100 +operation proj=axisswap order=-2,1 +tolerance 0.000001 m +accept 1 2 3 4 +expect -2 1 3 4 +roundtrip 100 +operation proj=axisswap order=3,-2,1 +tolerance 0.000001 m +accept 1 2 3 4 +expect 3 -2 1 4 +roundtrip 100 -OPERATION proj=pipeline step proj=latlong step proj=axisswap order=1,2,3,4 angularunits -TOLERANCE 0.00001 m -ACCEPT 12 55 0 0 -EXPECT 12 55 0 0 -OPERATION +proj=pipeline +step +proj=latlong +step +proj=axisswap +order=-2,-1,3,4 +angularunits -TOLERANCE 0.00001 m -ACCEPT 12 55 0 0 -EXPECT -55 -12 0 0 +operation proj=pipeline + step proj=latlong + step proj=axisswap + order=1,2,3,4 + angularunits -------------------------------------------------------------------------------- -operation +proj=aea +ellps=GRS80 +lat_1=0 +lat_2=2 -------------------------------------------------------------------------------- -tolerance 0.00010 mm -accept 2 1 -expect 222571.608757106 110653.326743030 -ROUNDTRIP 100 +tolerance 0.00001 m +accept 12 55 0 0 +expect 12 55 0 0 + +operation proj=pipeline + step proj=latlong + step proj=axisswap + order=-2,-1,3,4 + angularunits + +tolerance 0.00001 m +accept 12 55 0 0 +expect -55 -12 0 0 -END + diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index 6b820c01..a9acf4f9 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -10,7 +10,7 @@ See more_builtins.gie for some test cases with a more human touch. =============================================================================== -BEGIN + =============================================================================== Albers Equal Area @@ -505,7 +505,7 @@ expect -0.001790493 -0.000895247 =============================================================================== Central Conic Sph - lat_1 + lat_1 =============================================================================== ------------------------------------------------------------------------------- @@ -4716,6 +4716,5 @@ accept -200 100 expect -0.001790493 0.000895247 accept -200 -100 expect -0.001790493 -0.000895247 -Internal regression tests done. [Stubs: 0] Total: 151. Failure: 0. Success: 151 -END + diff --git a/test/gie/deformation.gie b/test/gie/deformation.gie index 07a8b45e..029387c4 100644 --- a/test/gie/deformation.gie +++ b/test/gie/deformation.gie @@ -9,27 +9,28 @@ The input coordinate is located at lon=60, lam=-160 - somewhere in Alaska. =============================================================================== -BEGIN + ------------------------------------------------------------------------------- Test using both horizontal and vertical grids as well as the +tobs parameter ------------------------------------------------------------------------------- -OPERATION +proj=deformation +xy_grids=alaska +z_grids=egm96_15.gtx +t_epoch=2016.0 +t_obs=2000.0 +ellps=GRS80 +operation +proj=deformation +xy_grids=alaska +z_grids=egm96_15.gtx + +t_epoch=2016.0 +t_obs=2000.0 +ellps=GRS80 ------------------------------------------------------------------------------- -TOLERANCE 0.1 mm -ACCEPT -3004295.5882503074 -1093474.1690603832 5500477.1338251457 -EXPECT -3004295.7025 -1093474.2106 5500477.3444 -ROUNDTRIP 5 +tolerance 0.1 mm +accept -3004295.5882503074 -1093474.1690603832 5500477.1338251457 +expect -3004295.7025 -1093474.2106 5500477.3444 +roundtrip 5 ------------------------------------------------------------------------------- Test using both horizontal and vertical grids ------------------------------------------------------------------------------- -OPERATION +proj=deformation +xy_grids=alaska +z_grids=egm96_15.gtx +t_epoch=2016.0 +ellps=GRS80 +operation +proj=deformation + +xy_grids=alaska +z_grids=egm96_15.gtx +t_epoch=2016.0 +ellps=GRS80 ------------------------------------------------------------------------------- -TOLERANCE 0.1 mm -ACCEPT -3004295.5882503074 -1093474.1690603832 5500477.1338251457 2000.0 -EXPECT -3004295.7025 -1093474.2106 5500477.3444 2000.0 -ROUNDTRIP 5 +tolerance 0.1 mm +accept -3004295.5882503074 -1093474.1690603832 5500477.1338251457 2000.0 +expect -3004295.7025 -1093474.2106 5500477.3444 2000.0 +roundtrip 5 - -END + diff --git a/test/gie/ellipsoid.gie b/test/gie/ellipsoid.gie index 65101f6c..81208bc1 100644 --- a/test/gie/ellipsoid.gie +++ b/test/gie/ellipsoid.gie @@ -5,7 +5,7 @@ Test pj_ellipsoid, the reimplementation of pj_ell_set =============================================================================== -BEGIN + ------------------------------------------------------------------------------- First a spherical example @@ -56,7 +56,8 @@ operation proj=merc ellps=GRS80000000000 expect failure errno unknown_ellp_param operation proj=merc +a=-1 expect failure errno major_axis_not_given -operation proj=merc +no_defs + +operation proj=merc no_defs expect failure errno major_axis_not_given # This one should succeed due to ellps=WGS84 in proj_def.dat @@ -158,4 +159,4 @@ accept 12 55 expect 700416.5900 5669475.8884 ------------------------------------------------------------------------------- -END + diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index 501406ae..2d558f88 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -8,7 +8,7 @@ intends to exercise corner cases. =============================================================================== -BEGIN + ------------------------------------------------------------------------------- Two ob_tran tests from nad/testvarious @@ -34,8 +34,8 @@ expect -1384841.18787 7581707.88240 0 0 ------------------------------------------------------------------------------- Two tests from PJ_molodensky.c ------------------------------------------------------------------------------- -operation proj=molodensky a=6378160 rf=298.25 \ - da=-23 df=-8.120449e-8 dx=-134 dy=-48 dz=149 \ +operation proj=molodensky a=6378160 rf=298.25 + da=-23 df=-8.120449e-8 dx=-134 dy=-48 dz=149 abridged ------------------------------------------------------------------------------- tolerance 2 m @@ -47,7 +47,7 @@ roundtrip 100 1 m ------------------------------------------------------------------------------- Same thing once more, but this time unabridged ------------------------------------------------------------------------------- -operation proj=molodensky a=6378160 rf=298.25 \ +operation proj=molodensky a=6378160 rf=298.25 da=-23 df=-8.120449e-8 dx=-134 dy=-48 dz=149 ------------------------------------------------------------------------------- tolerance 2 m @@ -67,8 +67,8 @@ Some tests from PJ_pipeline.c ------------------------------------------------------------------------------- Forward-reverse geo->utm->geo ------------------------------------------------------------------------------- -operation proj=pipeline zone=32 step \ - proj=utm ellps=GRS80 step \ +operation proj=pipeline zone=32 step + proj=utm ellps=GRS80 step proj=utm ellps=GRS80 inv ------------------------------------------------------------------------------- tolerance 0.1 mm @@ -83,8 +83,8 @@ expect 12 55 0 0 ------------------------------------------------------------------------------- And now the back-to-back situation utm->geo->utm ------------------------------------------------------------------------------- -operation proj=pipeline zone=32 ellps=GRS80 step \ - proj=utm inv step \ +operation proj=pipeline zone=32 ellps=GRS80 step + proj=utm inv step proj=utm ------------------------------------------------------------------------------- accept 691875.63214 6098907.82501 0 0 @@ -104,10 +104,10 @@ expect 12 55 0 0 ------------------------------------------------------------------------------- Finally test a pipeline with more than one init step ------------------------------------------------------------------------------- -operation proj=pipeline step \ - init=epsg:25832 inv step \ - init=epsg:25833 step \ - init=epsg:25833 inv step \ +operation proj=pipeline step + init=epsg:25832 inv step + init=epsg:25833 step + init=epsg:25833 inv step init=epsg:25832 ------------------------------------------------------------------------------- accept 691875.63214 6098907.82501 0 0 @@ -131,7 +131,7 @@ N(12.5, 55.5) = -36.021305084228515625 (download.osgeo.org) N(12.5, 55.5) = -35.880001068115234000 (OSGeo4W) This is annoying, but must be handled elsewhere. We jump through the hoop by setting a very lax tolerance. - +------------------------------------------------------------------------------- tolerance 15 cm accept 12.5 55.5 0 0 expect 12.5 55.5 -36.021305084228516 0 @@ -145,6 +145,7 @@ expect failure errno no_args Fail on purpose: open non-existing grid operation proj=vgridshift grids=nonexistinggrid.gtx expect failure errno failed_to_load_grid +------------------------------------------------------------------------------- @@ -164,13 +165,14 @@ direction inverse accept 172.999892181021551 -45.001620431954613 0 0 expect 173 -45 0 0 ------------------------------------------------------------------------------- -Fail on purpose: +grids parameter is mandatory: -operation proj=hgridshift -expect failure errno no_args -Fail on purpose: open non-existing grid: +# Fail on purpose: open non-existing grid: operation proj=hgridshift grids=@nonexistinggrid.gsb,anothernonexistinggrid.gsb expect failure errno failed_to_load_grid + +# Fail on purpose: +grids parameter is mandatory: +operation proj=hgridshift +expect failure errno no_args ------------------------------------------------------------------------------- @@ -178,27 +180,37 @@ expect failure errno failed_to_load_grid ------------------------------------------------------------------------------- A number of tests from PJ_helmert.c +------------------------------------------------------------------------------- + + ------------------------------------------------------------------------------- This example is from Lotti Jivall: "Simplified transformations from ITRF2008/IGS08 to ETRS89 for maritime applications" ------------------------------------------------------------------------------- -operation proj=helmert ellps=GRS80 \ - x=0.67678 y=0.65495 z=-0.52827 \ +operation proj=helmert ellps=GRS80 + x=0.67678 y=0.65495 z=-0.52827 rx=-0.022742 ry=0.012667 rz=0.022704 s=-0.01070 ------------------------------------------------------------------------------- tolerance 1 um accept 3565285.00000000 855949.00000000 5201383.00000000 expect 3565285.41342351 855948.67986759 5201382.72939791 +------------------------------------------------------------------------------- + + ------------------------------------------------------------------------------- This example is a random point, transformed from ED50 to ETRS89 using KMStrans2 ------------------------------------------------------------------------------- -operation proj=helmert ellps=GRS80 exact \ - x=-81.0703 y=-89.3603 z=-115.7526 \ - rx=-0.48488 ry=-0.02436 rz=-0.41321 s=-0.540645 +operation proj=helmert ellps=GRS80 exact + x=-081.0703 rx=-0.48488 + y=-089.3603 ry=-0.02436 + z=-115.7526 rz=-0.41321 s=-0.540645 ------------------------------------------------------------------------------- tolerance 1 um accept 3494994.30120000 1056601.97250000 5212382.16660000 expect 3494909.84026368 1056506.78938633 5212265.66699761 +------------------------------------------------------------------------------- + + ------------------------------------------------------------------------------- This example is a coordinate from the geodetic observatory in Onsala, Sweden transformed from ITRF2000 @ 2017.0 to ITRF93 @ 2017.0. @@ -206,16 +218,19 @@ Sweden transformed from ITRF2000 @ 2017.0 to ITRF93 @ 2017.0. The test coordinate was transformed using GNSStrans, using transformation parameters published by ITRF: ftp://itrf.ensg.ign.fr/pub/itrf/ITRF.TP ------------------------------------------------------------------------------- -operation proj=helmert ellps=GRS80 \ - x=0.0127 y=0.0065 z=-0.0209 s=0.00195 \ - dx=-0.0029 dy=-0.0002 dz=-0.0006 ds=0.00001 \ - rx=-0.00039 ry=0.00080 rz=-0.00114 \ - drx=-0.00011 dry=-0.00019 drz=0.00007 \ - t_epoch=1988.0 t_obs=2017.0 transpose +operation proj=helmert ellps=GRS80 transpose + x = 0.0127 dx = -0.0029 rx = -0.00039 drx = -0.00011 + y = 0.0065 dy = -0.0002 ry = 0.00080 dry = -0.00019 + z = -0.0209 dz = -0.0006 rz = -0.00114 drz = 0.00007 + + s = 0.00195 ds = 0.00001 t_epoch = 1988.0 ------------------------------------------------------------------------------- tolerance 0.03 mm accept 3370658.37800 711877.31400 5349787.08600 2017.0 # ITRF2000@2017.0 expect 3370658.18890 711877.42370 5349787.12430 2017.0 # ITRF93@2017.0 +------------------------------------------------------------------------------- + + ------------------------------------------------------------------------------- This example is from "A mathematical relationship between NAD27 and NAD83 (91) State Plane coordinates in Southeastern Wisconsin": @@ -225,25 +240,28 @@ The test data is taken from p. 29. Here we are using point 203 and converting it from NAD27 (ft) -> NAD83 (m). The paper reports a difference of 0.0014 m from measured to computed coordinates, hence the test tolerance is set accordingly. ------------------------------------------------------------------------------- -operation proj=helmert ellps=GRS80 \ - x=-9597.3572 y=.6112 \ +operation proj=helmert ellps=GRS80 + x=-9597.3572 y=.6112 s=0.304794780637 theta=-1.244048 ------------------------------------------------------------------------------- tolerance 1 mm accept 2546506.957 542256.609 0 expect 766563.675 165282.277 0 +------------------------------------------------------------------------------- + + ------------------------------------------------------------------------------- Finally test the 4D-capabilities of the proj.h API, especially that the rotation matrix is updated when necessary. Test coordinates from GNSStrans. ------------------------------------------------------------------------------- -operation proj=helmert ellps=GRS80 \ - x=0.01270 y=0.00650 z=-0.0209 s=0.00195 \ - dx=-0.0029 dy=-0.0002 dz=-0.0006 ds=0.00001 \ - rx=-0.00039 ry=0.00080 rz=-0.00114 \ - drx=-0.00011 dry=-0.00019 drz=0.00007 \ - t_epoch=1988.0 transpose +operation proj=helmert ellps=GRS80 transpose + x = 0.01270 dx =-0.0029 rx =-0.00039 drx =-0.00011 + y = 0.00650 dy =-0.0002 ry = 0.00080 dry =-0.00019 + z =-0.0209 dz =-0.0006 rz =-0.00114 drz = 0.00007 + s = 0.00195 ds = 0.00001 + t_epoch=1988.0 ------------------------------------------------------------------------------- tolerance 0.1 mm accept 3370658.378 711877.314 5349787.086 2017.0 @@ -293,4 +311,4 @@ to express in the gie command set builtins ------------------------------------------------------------------------------- -END + diff --git a/test/gie/pip.gie b/test/gie/pip.gie new file mode 100644 index 00000000..0cb54614 --- /dev/null +++ b/test/gie/pip.gie @@ -0,0 +1,41 @@ +These two tests have occasionally been causing segfaults from gie, but +only at low PROJ_DEBUG levels. + + +------------------------------------------------------------------------------- +Finally test a pipeline with more than one init step +------------------------------------------------------------------------------- +operation proj=pipeline step + init=epsg:25832 inv step + init=epsg:25833 step + init=epsg:25833 inv step + init=epsg:25832 +------------------------------------------------------------------------------- +accept 691875.63214 6098907.82501 0 0 +expect 691875.63214 6098907.82501 0 0 +direction inverse +accept 12 55 0 0 +expect 12 55 0 0 +------------------------------------------------------------------------------- + + + +------------------------------------------------------------------------------- +This example is a coordinate from the geodetic observatory in Onsala, +Sweden transformed from ITRF2000 @ 2017.0 to ITRF93 @ 2017.0. + +The test coordinate was transformed using GNSStrans, using transformation +parameters published by ITRF: ftp://itrf.ensg.ign.fr/pub/itrf/ITRF.TP +------------------------------------------------------------------------------- +operation proj=helmert ellps=GRS80 transpose + x = 0.0127 dx = -0.0029 rx = -0.00039 drx = -0.00011 + y = 0.0065 dy = -0.0002 ry = 0.00080 dry = -0.00019 + z = -0.0209 dz = -0.0006 rz = -0.00114 drz = 0.00007 + + s = 0.00195 ds = 0.00001 t_epoch = 1988.0 +------------------------------------------------------------------------------- +tolerance 0.03 mm +accept 3370658.37800 711877.31400 5349787.08600 2017.0 # ITRF2000@2017.0 +expect 3370658.18890 711877.42370 5349787.12430 2017.0 # ITRF93@2017.0 +------------------------------------------------------------------------------- + diff --git a/travis/install.sh b/travis/install.sh index 8126182b..0066c6b7 100755 --- a/travis/install.sh +++ b/travis/install.sh @@ -81,7 +81,7 @@ if [ $TRAVIS_OS_NAME == "osx" ]; then make -j3 make check PROJ_LIB=$GRIDDIR ./src/gie ./test/gie/builtins.gie -PROJ_LIB=$GRIDDIR ./src/gie ./test/gie/more_builtins.gie +PROJ_LIB=$GRIDDIR ./src/gie -vvvvv ./test/gie/more_builtins.gie PROJ_LIB=$GRIDDIR ./src/gie ./test/gie/deformation.gie PROJ_LIB=$GRIDDIR ./src/gie ./test/gie/axisswap.gie PROJ_LIB=$GRIDDIR ./src/gie ./test/gie/ellipsoid.gie -- cgit v1.2.3 From 6cd160fe5c96559a7c388647244f8cfa16426b3d Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Sun, 17 Dec 2017 17:22:00 +0100 Subject: Normalize whitespace in multistresstest.c --- src/multistresstest.c | 104 +++++++++++++++++++++++++------------------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/src/multistresstest.c b/src/multistresstest.c index ddbbb033..c9c11c6d 100644 --- a/src/multistresstest.c +++ b/src/multistresstest.c @@ -32,10 +32,10 @@ #include "proj_api.h" #ifdef _WIN32 - #include + #include #else - #include - #include + #include + #include #endif #define num_threads 10 @@ -49,10 +49,10 @@ typedef struct { double src_x, src_y, src_z; double dst_x, dst_y, dst_z; - + int dst_error; int skip; -} TestItem; +} TestItem; TestItem test_list[] = { { @@ -192,7 +192,7 @@ static projPJ* custom_pj_init_plus_ctx(projCtx ctx, const char* def) static void TestThread() { - int i, test_count = sizeof(test_list) / sizeof(TestItem); + int i, test_count = sizeof(test_list) / sizeof(TestItem); int repeat_count = num_iterations; int i_iter; @@ -202,10 +202,10 @@ static void TestThread() projPJ *src_pj_list, *dst_pj_list; projCtx ctx = pj_ctx_alloc(); // projCtx ctx = pj_get_default_ctx(); - + src_pj_list = (projPJ *) calloc(test_count,sizeof(projPJ)); dst_pj_list = (projPJ *) calloc(test_count,sizeof(projPJ)); - + if(!reinit_every_iteration) { for( i = 0; i < test_count; i++ ) @@ -216,11 +216,11 @@ static void TestThread() dst_pj_list[i] = custom_pj_init_plus_ctx( ctx, test->dst_def ); } } - + /* -------------------------------------------------------------------- */ /* Perform tests - over and over. */ /* -------------------------------------------------------------------- */ - + for( i_iter = 0; i_iter < repeat_count; i_iter++ ) { for( i = 0; i < test_count; i++ ) @@ -240,7 +240,7 @@ static void TestThread() { int skipTest = (src_pj_list[i] == NULL || dst_pj_list[i] == NULL); - + if ( skipTest != test->skip ) fprintf( stderr, "Threaded projection initialization does not match unthreaded initialization\n" ); @@ -256,23 +256,23 @@ static void TestThread() if ( test->skip ) continue; - error = pj_transform( src_pj_list[i], dst_pj_list[i], 1, 0, + error = pj_transform( src_pj_list[i], dst_pj_list[i], 1, 0, &x, &y, &z ); - + if( error != test->dst_error ) { - fprintf( stderr, "Got error %d, expected %d\n", + fprintf( stderr, "Got error %d, expected %d\n", error, test->dst_error ); } if( x != test->dst_x || y != test->dst_y || z != test->dst_z ) { - fprintf( stderr, + fprintf( stderr, "Got %.15g,%.15g,%.15g\n" "Expected %.15g,%.15g,%.15g\n" "Diff %.15g,%.15g,%.15g\n", - x, y, z, + x, y, z, test->dst_x, test->dst_y, test->dst_z, x-test->dst_x, y-test->dst_y, z-test->dst_z); } @@ -296,13 +296,13 @@ static void TestThread() pj_free( dst_pj_list[i] ); } } - + free( src_pj_list ); free( dst_pj_list ); pj_ctx_free( ctx ); - printf( "%d iterations of the %d tests complete in thread X\n", + printf( "%d iterations of the %d tests complete in thread X\n", repeat_count, test_count ); active_thread_count--; @@ -348,7 +348,7 @@ static int do_main(void) /* Our first pass is to establish the correct answers for all */ /* the tests. */ /* -------------------------------------------------------------------- */ - int i, test_count = sizeof(test_list) / sizeof(TestItem); + int i, test_count = sizeof(test_list) / sizeof(TestItem); for( i = 0; i < test_count; i++ ) { @@ -374,16 +374,16 @@ static int do_main(void) pj_free (src_pj); continue; } - + test->dst_x = test->src_x; test->dst_y = test->src_y; test->dst_z = test->src_z; - test->dst_error = pj_transform( src_pj, dst_pj, 1, 0, - &(test->dst_x), + test->dst_error = pj_transform( src_pj, dst_pj, 1, 0, + &(test->dst_x), &(test->dst_y), &(test->dst_z) ); - + pj_free( src_pj ); pj_free( dst_pj ); @@ -401,47 +401,47 @@ static int do_main(void) /* -------------------------------------------------------------------- */ #ifdef _WIN32 - { //Scoped to workaround lack of c99 support in VS - HANDLE ahThread[num_threads]; + { //Scoped to workaround lack of c99 support in VS + HANDLE ahThread[num_threads]; - for( i = 0; i < num_threads; i++ ) - { - active_thread_count++; + for( i = 0; i < num_threads; i++ ) + { + active_thread_count++; - ahThread[i] = CreateThread(NULL, 0, WinTestThread, NULL, 0, NULL); - - if (ahThread[i] == 0) - { - printf( "Thread creation failed."); - return 1; - } - } + ahThread[i] = CreateThread(NULL, 0, WinTestThread, NULL, 0, NULL); - printf( "%d test threads launched.\n", num_threads ); + if (ahThread[i] == 0) + { + printf( "Thread creation failed."); + return 1; + } + } - WaitForMultipleObjects(num_threads, ahThread, TRUE, INFINITE); - } + printf( "%d test threads launched.\n", num_threads ); + + WaitForMultipleObjects(num_threads, ahThread, TRUE, INFINITE); + } #else { - pthread_t ahThread[num_threads]; - pthread_attr_t hThreadAttr; + pthread_t ahThread[num_threads]; + pthread_attr_t hThreadAttr; - pthread_attr_init( &hThreadAttr ); - pthread_attr_setdetachstate( &hThreadAttr, PTHREAD_CREATE_DETACHED ); + pthread_attr_init( &hThreadAttr ); + pthread_attr_setdetachstate( &hThreadAttr, PTHREAD_CREATE_DETACHED ); - for( i = 0; i < num_threads; i++ ) - { - active_thread_count++; + for( i = 0; i < num_threads; i++ ) + { + active_thread_count++; - pthread_create( &(ahThread[i]), &hThreadAttr, - PosixTestThread, NULL ); - } + pthread_create( &(ahThread[i]), &hThreadAttr, + PosixTestThread, NULL ); + } - printf( "%d test threads launched.\n", num_threads ); + printf( "%d test threads launched.\n", num_threads ); - while( active_thread_count > 0 ) - sleep( 1 ); + while( active_thread_count > 0 ) + sleep( 1 ); } #endif -- cgit v1.2.3 From 80a5172acd1d75b35727132a95151c9ecbbe6899 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Sun, 17 Dec 2017 15:54:39 +0100 Subject: Add -std=c89 to travis targets. The multistresstest code has been made C89 compliant in the process. --- src/multistresstest.c | 3 +-- travis/linux_clang/install.sh | 2 +- travis/linux_gcc/install.sh | 2 +- travis/osx/install.sh | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/multistresstest.c b/src/multistresstest.c index c9c11c6d..8e7517ec 100644 --- a/src/multistresstest.c +++ b/src/multistresstest.c @@ -161,7 +161,7 @@ TestItem test_list[] = { 0, 0 }, { - //Bad projection (invalid ellipsoid parameter +R_A=0) + /* Bad projection (invalid ellipsoid parameter +R_A=0) */ "+proj=utm +zone=11 +datum=WGS84", "+proj=merc +datum=potsdam +R_A=0", 150000.0, 3000000.0, 0.0, @@ -201,7 +201,6 @@ static void TestThread() /* -------------------------------------------------------------------- */ projPJ *src_pj_list, *dst_pj_list; projCtx ctx = pj_ctx_alloc(); -// projCtx ctx = pj_get_default_ctx(); src_pj_list = (projPJ *) calloc(test_count,sizeof(projPJ)); dst_pj_list = (projPJ *) calloc(test_count,sizeof(projPJ)); diff --git a/travis/linux_clang/install.sh b/travis/linux_clang/install.sh index a0dd9353..cacb3f85 100755 --- a/travis/linux_clang/install.sh +++ b/travis/linux_clang/install.sh @@ -4,4 +4,4 @@ set -e export CCACHE_CPP2=yes -CC="ccache clang" CFLAGS="-g -Wall -Wextra -Werror -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wshadow -Wfloat-conversion -fsanitize=address -O2" ./travis/install.sh +CC="ccache clang" CFLAGS="-std=c89 -g -Wall -Wextra -Werror -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wshadow -Wfloat-conversion -fsanitize=address -O2" ./travis/install.sh diff --git a/travis/linux_gcc/install.sh b/travis/linux_gcc/install.sh index 571e02b7..6910322c 100755 --- a/travis/linux_gcc/install.sh +++ b/travis/linux_gcc/install.sh @@ -5,4 +5,4 @@ set -e export CCACHE_CPP2=yes # -Wfloat-conversion not available for gcc 4.8 -CC="ccache gcc" CFLAGS="-g -Wall -Wextra -Werror -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wshadow -O2" ./travis/install.sh +CC="ccache gcc" CFLAGS="-std=c89 -g -Wall -Wextra -Werror -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wshadow -O2" ./travis/install.sh diff --git a/travis/osx/install.sh b/travis/osx/install.sh index 56e16ce6..8c25e1f1 100755 --- a/travis/osx/install.sh +++ b/travis/osx/install.sh @@ -4,4 +4,4 @@ set -e export CCACHE_CPP2=yes -CC="ccache clang" CFLAGS="-g -Wall -Wextra -Werror -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wshadow -Wfloat-conversion -O2" ./travis/install.sh +CC="ccache clang" CFLAGS="-std=c89 -g -Wall -Wextra -Werror -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wshadow -Wfloat-conversion -O2" ./travis/install.sh -- cgit v1.2.3 From a07501a165e6f2521c9aa13fa63fab33cf67d876 Mon Sep 17 00:00:00 2001 From: Aaron Puchert Date: Fri, 17 Nov 2017 17:46:34 +0100 Subject: Declare non-local variables as const where possible Having non-const variables of static lifetime or even global scope is usually a bad idea. These variables are inherently constants, and this should be enforced. This required marking some functions as not modifying input parameters and marking some pointers as pointers to const. One advantage is that the compiler usually puts const static variables in a read-only code segment, so they can't be modified physically. This can be verified with `nm` (on POSIX systems). To avoid changes to the public API, functions returning non-const pointers to data tables were left intact, but the returned data may not be modified. Internally we prefer using the proj_list_* functions over the pj_get_*_ref functions, because the former return const pointers. --- src/PJ_healpix.c | 10 +++++----- src/PJ_isea.c | 4 ++-- src/PJ_mod_ster.c | 16 ++++++++-------- src/PJ_nzmg.c | 17 +++++++++-------- src/PJ_pipeline.c | 4 ++-- src/PJ_unitconvert.c | 2 +- src/cs2cs.c | 23 ++++++++++++----------- src/emess.c | 2 +- src/emess.h | 2 +- src/geod.c | 10 ++++++---- src/geod_set.c | 3 ++- src/geodtest.c | 6 +++--- src/gie.c | 6 ++---- src/multistresstest.c | 2 +- src/nad2bin.c | 4 ++-- src/nad_init.c | 4 ++-- src/pj_datums.c | 15 +++++++++------ src/pj_ell_set.c | 6 +++--- src/pj_ellps.c | 9 ++++++++- src/pj_gauss.c | 4 ++-- src/pj_gc_reader.c | 2 +- src/pj_gridinfo.c | 4 ++-- src/pj_init.c | 2 +- src/pj_list.c | 11 +++++++++-- src/pj_open_lib.c | 6 +++--- src/pj_strerrno.c | 4 ++-- src/pj_units.c | 10 +++++++++- src/pj_zpoly1.c | 4 ++-- src/proj.c | 22 ++++++++++++---------- src/proj_4D_api.c | 19 +------------------ src/proj_internal.h | 2 +- src/proj_mdist.c | 4 ++-- src/projects.h | 4 ++-- src/test228.c | 4 ++-- 34 files changed, 130 insertions(+), 117 deletions(-) diff --git a/src/PJ_healpix.c b/src/PJ_healpix.c index 41f62ee4..2d62050c 100644 --- a/src/PJ_healpix.c +++ b/src/PJ_healpix.c @@ -64,7 +64,7 @@ typedef struct { enum Region {north, south, equatorial} region; } CapMap; -double rot[7][2][2] = ROT; +static const double rot[7][2][2] = ROT; /** * Returns the sign of the double. @@ -310,7 +310,7 @@ static LP healpix_sphere_inverse(XY xy) { * Return the vector sum a + b, where a and b are 2-dimensional vectors. * @param ret holds a + b. **/ -static void vector_add(double a[2], double b[2], double *ret) { +static void vector_add(const double a[2], const double b[2], double *ret) { int i; for(i = 0; i < 2; i++) { ret[i] = a[i] + b[i]; @@ -322,7 +322,7 @@ static void vector_add(double a[2], double b[2], double *ret) { * Return the vector difference a - b, where a and b are 2-dimensional vectors. * @param ret holds a - b. **/ -static void vector_sub(double a[2], double b[2], double*ret) { +static void vector_sub(const double a[2], const double b[2], double*ret) { int i; for(i = 0; i < 2; i++) { ret[i] = a[i] - b[i]; @@ -335,7 +335,7 @@ static void vector_sub(double a[2], double b[2], double*ret) { * b is a 2 x 1 matrix. * @param ret holds a*b. **/ -static void dot_product(double a[2][2], double b[2], double *ret) { +static void dot_product(const double a[2][2], const double b[2], double *ret) { int i, j; int length = 2; for(i = 0; i < length; i++) { @@ -453,7 +453,7 @@ static XY combine_caps(double x, double y, int north_square, int south_square, double vector[2]; double v_min_c[2]; double ret_dot[2]; - double (*tmpRot)[2]; + const double (*tmpRot)[2]; int pole = 0; CapMap capmap = get_cap(x, y, north_square, south_square, inverse); diff --git a/src/PJ_isea.c b/src/PJ_isea.c index bf006a62..9baea8b5 100644 --- a/src/PJ_isea.c +++ b/src/PJ_isea.c @@ -159,7 +159,7 @@ struct snyder_constants { }; /* TODO put these in radians to avoid a later conversion */ -ISEA_STATIC +ISEA_STATIC const struct snyder_constants constants[] = { {23.80018260, 62.15458023, 60.0, 3.75, 1.033, 0.968, 5.09, 1.195, 1.0}, {20.07675127, 55.69063953, 54.0, 2.65, 1.030, 0.983, 3.59, 1.141, 1.027}, @@ -217,7 +217,7 @@ static int tri_v1[] = {0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 10, 2, 3, 4, 5, 1, 11, #define F_RAD 0.18871053072122403508 /* triangle Centers */ -struct isea_geo icostriangles[] = { +static const struct isea_geo icostriangles[] = { {0.0, 0.0}, {-DEG144, E_RAD}, {-DEG72, E_RAD}, diff --git a/src/PJ_mod_ster.c b/src/PJ_mod_ster.c index c8e4c6b8..d807660c 100644 --- a/src/PJ_mod_ster.c +++ b/src/PJ_mod_ster.c @@ -12,7 +12,7 @@ PROJ_HEAD(gs50, "Mod. Stereographic of 50 U.S.") "\n\tAzi(mod)"; #define EPSLN 1e-12 struct pj_opaque { - COMPLEX *zcoeff; \ + const COMPLEX *zcoeff; \ double cchio, schio; \ int n; }; @@ -120,7 +120,7 @@ static PJ *setup(PJ *P) { /* general initialization */ /* Miller Oblated Stereographic */ PJ *PROJECTION(mil_os) { - static COMPLEX AB[] = { + static const COMPLEX AB[] = { {0.924500, 0.}, {0., 0.}, {0.019430, 0.} @@ -143,7 +143,7 @@ PJ *PROJECTION(mil_os) { /* Lee Oblated Stereographic */ PJ *PROJECTION(lee_os) { - static COMPLEX AB[] = { + static const COMPLEX AB[] = { {0.721316, 0.}, {0., 0.}, {-0.0088162, -0.00617325} @@ -165,7 +165,7 @@ PJ *PROJECTION(lee_os) { PJ *PROJECTION(gs48) { - static COMPLEX /* 48 United States */ + static const COMPLEX /* 48 United States */ AB[] = { {0.98879, 0.}, {0., 0.}, @@ -191,7 +191,7 @@ PJ *PROJECTION(gs48) { PJ *PROJECTION(alsk) { - static COMPLEX ABe[] = { /* Alaska ellipsoid */ + static const COMPLEX ABe[] = { /* Alaska ellipsoid */ { .9945303, 0.}, { .0052083, -.0027404}, { .0072721, .0048181}, @@ -200,7 +200,7 @@ PJ *PROJECTION(alsk) { { .3582802, -.2884586}, }; - static COMPLEX ABs[] = { /* Alaska sphere */ + static const COMPLEX ABs[] = { /* Alaska sphere */ { .9972523, 0.}, { .0052513, -.0041175}, { .0074606, .0048125}, @@ -231,7 +231,7 @@ PJ *PROJECTION(alsk) { PJ *PROJECTION(gs50) { - static COMPLEX ABe[] = { /* GS50 ellipsoid */ + static const COMPLEX ABe[] = { /* GS50 ellipsoid */ { .9827497, 0.}, { .0210669, .0053804}, {-.1031415, -.0571664}, @@ -244,7 +244,7 @@ PJ *PROJECTION(gs50) { {-.0210072, .0834037} }; - static COMPLEX ABs[] = { /* GS50 sphere */ + static const COMPLEX ABs[] = { /* GS50 sphere */ { .9842990, 0.}, { .0211642, .0037608}, {-.1036018, -.0575102}, diff --git a/src/PJ_nzmg.c b/src/PJ_nzmg.c index 2d65a6e1..b30deabf 100644 --- a/src/PJ_nzmg.c +++ b/src/PJ_nzmg.c @@ -34,7 +34,7 @@ PROJ_HEAD(nzmg, "New Zealand Map Grid") "\n\tfixed Earth"; #define SEC5_TO_RAD 0.4848136811095359935899141023 #define RAD_TO_SEC5 2.062648062470963551564733573 -static COMPLEX bf[] = { +static const COMPLEX bf[] = { { .7557853228, 0.0}, { .249204646, 0.003371507}, {-.001541739, 0.041058560}, @@ -42,12 +42,12 @@ static COMPLEX bf[] = { {-.26623489, -0.36249218}, {-.6870983, -1.1651967} }; -static double tphi[] = { 1.5627014243, .5185406398, -.03333098, - -.1052906, -.0368594, .007317, - .01220, .00394, -.0013 }; +static const double tphi[] = { 1.5627014243, .5185406398, -.03333098, + -.1052906, -.0368594, .007317, + .01220, .00394, -.0013 }; -static double tpsi[] = { .6399175073, -.1358797613, .063294409, -.02526853, .0117879, - -.0055161, .0026906, -.001333, .00067, -.00034 }; +static const double tpsi[] = { .6399175073, -.1358797613, .063294409, -.02526853, .0117879, + -.0055161, .0026906, -.001333, .00067, -.00034 }; #define Nbf 5 #define Ntpsi 9 @@ -57,7 +57,7 @@ static double tpsi[] = { .6399175073, -.1358797613, .063294409, -.02526853, .011 static XY e_forward (LP lp, PJ *P) { /* Ellipsoidal, forward */ XY xy = {0.0,0.0}; COMPLEX p; - double *C; + const double *C; int i; lp.phi = (lp.phi - P->phi0) * RAD_TO_SEC5; @@ -77,7 +77,8 @@ static LP e_inverse (XY xy, PJ *P) { /* Ellipsoidal, inverse */ LP lp = {0.0,0.0}; int nn, i; COMPLEX p, f, fp, dp; - double den, *C; + double den; + const double *C; p.r = xy.y; p.i = xy.x; diff --git a/src/PJ_pipeline.c b/src/PJ_pipeline.c index a0ef7c1e..2b012193 100644 --- a/src/PJ_pipeline.c +++ b/src/PJ_pipeline.c @@ -273,7 +273,7 @@ static size_t argc_params (paralist *params) { } /* Sentinel for argument list */ -static char argv_sentinel[] = "step"; +static char *argv_sentinel = "step"; /* turn paralist into argc/argv style argument list */ static char **argv_params (paralist *params, size_t argc) { @@ -363,7 +363,7 @@ PJ *OPERATION(pipeline,0) { /* Do some syntactical sanity checking */ for (i = 0; i < argc; i++) { - if (0==strcmp ("step", argv[i])) { + if (0==strcmp (argv_sentinel, argv[i])) { if (-1==i_pipeline) { proj_log_error (P, "Pipeline: +step before +proj=pipeline"); return destructor (P, PJD_ERR_MALFORMED_PIPELINE); diff --git a/src/PJ_unitconvert.c b/src/PJ_unitconvert.c index fc90821b..106caabf 100644 --- a/src/PJ_unitconvert.c +++ b/src/PJ_unitconvert.c @@ -256,7 +256,7 @@ static double mjd_to_yyyymmdd(double mjd) { } -struct TIME_UNITS time_units[] = { +static const struct TIME_UNITS time_units[] = { {"mjd", mjd_to_mjd, mjd_to_mjd, "Modified julian date"}, {"decimalyear", decimalyear_to_mjd, mjd_to_decimalyear, "Decimal year"}, {"gps_week", gps_week_to_mjd, mjd_to_gps_week, "GPS Week"}, diff --git a/src/cs2cs.c b/src/cs2cs.c index 7afeea73..730d37ee 100644 --- a/src/cs2cs.c +++ b/src/cs2cs.c @@ -26,6 +26,7 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ +#include "proj.h" #include "projects.h" #include #include @@ -206,11 +207,11 @@ int main(int argc, char **argv) case 'l': /* list projections, ellipses or units */ if (!arg[1] || arg[1] == 'p' || arg[1] == 'P') { /* list projections */ - struct PJ_LIST *lp; + const struct PJ_LIST *lp; int do_long = arg[1] == 'P', c; char *str; - for (lp = pj_get_list_ref() ; lp->id ; ++lp) { + for (lp = proj_list_operations() ; lp->id ; ++lp) { (void)printf("%s : ", lp->id); if (do_long) /* possibly multiline description */ (void)puts(*lp->descr); @@ -222,28 +223,28 @@ int main(int argc, char **argv) } } } else if (arg[1] == '=') { /* list projection 'descr' */ - struct PJ_LIST *lp; + const struct PJ_LIST *lp; arg += 2; - for (lp = pj_get_list_ref() ; lp->id ; ++lp) + for (lp = proj_list_operations() ; lp->id ; ++lp) if (!strcmp(lp->id, arg)) { (void)printf("%9s : %s\n", lp->id, *lp->descr); break; } } else if (arg[1] == 'e') { /* list ellipses */ - struct PJ_ELLPS *le; + const struct PJ_ELLPS *le; - for (le = pj_get_ellps_ref(); le->id ; ++le) + for (le = proj_list_ellps(); le->id ; ++le) (void)printf("%9s %-16s %-16s %s\n", le->id, le->major, le->ell, le->name); } else if (arg[1] == 'u') { /* list units */ - struct PJ_UNITS *lu; + const struct PJ_UNITS *lu; - for (lu = pj_get_units_ref(); lu->id ; ++lu) + for (lu = proj_list_units(); lu->id ; ++lu) (void)printf("%12s %-20s %s\n", lu->id, lu->to_meter, lu->name); } else if (arg[1] == 'd') { /* list datums */ - struct PJ_DATUMS *ld; + const struct PJ_DATUMS *ld; printf("__datum_id__ __ellipse___ __definition/comments______________________________\n" ); for (ld = pj_get_datums_ref(); ld->id ; ++ld) @@ -254,9 +255,9 @@ int main(int argc, char **argv) printf( "%25s %s\n", " ", ld->comments ); } } else if( arg[1] == 'm') { /* list prime meridians */ - struct PJ_PRIME_MERIDIANS *lpm; + const struct PJ_PRIME_MERIDIANS *lpm; - for (lpm = pj_get_prime_meridians_ref(); lpm->id ; ++lpm) + for (lpm = proj_list_prime_meridians(); lpm->id ; ++lpm) (void)printf("%12s %-30s\n", lpm->id, lpm->defn); } else diff --git a/src/emess.c b/src/emess.c index 7b6ebf75..dc4cb824 100644 --- a/src/emess.c +++ b/src/emess.c @@ -18,7 +18,7 @@ #define EMESS_ROUTINE #include "emess.h" void -emess(int code, char *fmt, ...) { +emess(int code, const char *fmt, ...) { va_list args; va_start(args, fmt); diff --git a/src/emess.h b/src/emess.h index b694d61e..4a6f7587 100644 --- a/src/emess.h +++ b/src/emess.h @@ -24,6 +24,6 @@ extern struct EMESS emess_dat; #endif /* use type */ -void emess(int, char *, ...); +void emess(int, const char *, ...); #endif /* end EMESS_H */ diff --git a/src/geod.c b/src/geod.c index 755afbd7..e90d71b5 100644 --- a/src/geod.c +++ b/src/geod.c @@ -1,4 +1,6 @@ /* <<<< Geodesic filter program >>>> */ + +#include "proj.h" # include "projects.h" # include "geod_interface.h" # include "emess.h" @@ -175,15 +177,15 @@ noargument: emess(1,"missing argument for -%c",*arg); continue; case 'l': if (!arg[1] || arg[1] == 'e') { /* list of ellipsoids */ - struct PJ_ELLPS *le; + const struct PJ_ELLPS *le; - for (le=pj_get_ellps_ref(); le->id ; ++le) + for (le=proj_list_ellps(); le->id ; ++le) (void)printf("%9s %-16s %-16s %s\n", le->id, le->major, le->ell, le->name); } else if (arg[1] == 'u') { /* list of units */ - struct PJ_UNITS *lu; + const struct PJ_UNITS *lu; - for (lu = pj_get_units_ref();lu->id ; ++lu) + for (lu = proj_list_units();lu->id ; ++lu) (void)printf("%12s %-20s %s\n", lu->id, lu->to_meter, lu->name); } else diff --git a/src/geod_set.c b/src/geod_set.c index 16396a90..26a86b61 100644 --- a/src/geod_set.c +++ b/src/geod_set.c @@ -2,6 +2,7 @@ #define _IN_GEOD_SET #include +#include "proj.h" #include "projects.h" #include "geod_interface.h" #include "emess.h" @@ -29,7 +30,7 @@ geod_set(int argc, char **argv) { /* set units */ if ((name = pj_param(NULL,start, "sunits").s) != NULL) { char *s; - struct PJ_UNITS *unit_list = pj_get_units_ref(); + const struct PJ_UNITS *unit_list = proj_list_units(); for (i = 0; (s = unit_list[i].id) && strcmp(name, s) ; ++i) ; if (!s) emess(1,"%s unknown unit conversion id", name); diff --git a/src/geodtest.c b/src/geodtest.c index 6899436c..5b41b72c 100644 --- a/src/geodtest.c +++ b/src/geodtest.c @@ -20,7 +20,7 @@ # pragma warning (disable: 4706) #endif -double wgs84_a = 6378137, wgs84_f = 1/298.257223563; /* WGS84 */ +static const double wgs84_a = 6378137, wgs84_f = 1/298.257223563; /* WGS84 */ static int assertEquals(double x, double y, double d) { if (fabs(x - y) <= d) @@ -29,8 +29,8 @@ static int assertEquals(double x, double y, double d) { return 1; } -const int ncases = 20; -double testcases[20][12] = { +static const int ncases = 20; +static const double testcases[20][12] = { {35.60777, -139.44815, 111.098748429560326, -11.17491, -69.95921, 129.289270889708762, 8935244.5604818305, 80.50729714281974, 6273170.2055303837, diff --git a/src/gie.c b/src/gie.c index e23ca92b..2ae2ddee 100644 --- a/src/gie.c +++ b/src/gie.c @@ -199,8 +199,6 @@ static const char delim[] = {"-------------------------------------------------- #define CMDLEN 250000 -int nfiles = 0; - static const char usage[] = { "--------------------------------------------------------------------------------\n" @@ -1316,7 +1314,7 @@ whitespace etc. The block is stored in G->args. Returns 1 on success, 0 otherwis -char tc32_utm32[] = { +static const char tc32_utm32[] = { " +proj=horner" " +ellps=intl" " +range=500000" @@ -1330,7 +1328,7 @@ char tc32_utm32[] = { }; -char sb_utm32[] = { +static const char sb_utm32[] = { " +proj=horner" " +ellps=intl" " +range=500000" diff --git a/src/multistresstest.c b/src/multistresstest.c index 8e7517ec..e32c7ae4 100644 --- a/src/multistresstest.c +++ b/src/multistresstest.c @@ -54,7 +54,7 @@ typedef struct { int skip; } TestItem; -TestItem test_list[] = { +static TestItem test_list[] = { { "+proj=utm +zone=11 +datum=WGS84", "+proj=latlong +datum=WGS84", diff --git a/src/nad2bin.c b/src/nad2bin.c index 8401df79..03a55326 100644 --- a/src/nad2bin.c +++ b/src/nad2bin.c @@ -13,8 +13,8 @@ /* Convert the byte order of the given word(s) in place. */ /************************************************************************/ -static int byte_order_test = 1; -#define IS_LSB (((unsigned char *) (&byte_order_test))[0] == 1) +static const int byte_order_test = 1; +#define IS_LSB (((const unsigned char *) (&byte_order_test))[0] == 1) static void swap_words( void *data_in, int word_size, int word_count ) diff --git a/src/nad_init.c b/src/nad_init.c index 99342aa5..04177a44 100644 --- a/src/nad_init.c +++ b/src/nad_init.c @@ -38,8 +38,8 @@ /* Convert the byte order of the given word(s) in place. */ /************************************************************************/ -static int byte_order_test = 1; -#define IS_LSB (((unsigned char *) (&byte_order_test))[0] == 1) +static const int byte_order_test = 1; +#define IS_LSB (((const unsigned char *) (&byte_order_test))[0] == 1) static void swap_words( void *data_in, int word_size, int word_count ) diff --git a/src/pj_datums.c b/src/pj_datums.c index c9655cd6..834ce724 100644 --- a/src/pj_datums.c +++ b/src/pj_datums.c @@ -25,8 +25,9 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ -#define PJ_DATUMS__ +#include "proj.h" +#define PJ_DATUMS__ #include /* @@ -35,7 +36,7 @@ * datum name for the comments if available. */ -C_NAMESPACE_VAR struct PJ_DATUMS pj_datums[] = { +C_NAMESPACE_VAR const struct PJ_DATUMS pj_datums[] = { /* id definition ellipse comments */ /* -- ---------- ------- -------- */ {"WGS84", "towgs84=0,0,0", "WGS84", ""}, @@ -65,12 +66,11 @@ C_NAMESPACE_VAR struct PJ_DATUMS pj_datums[] = { }; struct PJ_DATUMS *pj_get_datums_ref() - { - return pj_datums; + return (struct PJ_DATUMS *)pj_datums; } -C_NAMESPACE_VAR struct PJ_PRIME_MERIDIANS pj_prime_meridians[] = { +C_NAMESPACE_VAR const struct PJ_PRIME_MERIDIANS pj_prime_meridians[] = { /* id definition */ /* -- ---------- */ {"greenwich", "0dE"}, @@ -90,8 +90,11 @@ C_NAMESPACE_VAR struct PJ_PRIME_MERIDIANS pj_prime_meridians[] = { }; struct PJ_PRIME_MERIDIANS *pj_get_prime_meridians_ref() +{ + return (struct PJ_PRIME_MERIDIANS *)pj_prime_meridians; +} +const PJ_PRIME_MERIDIANS *proj_list_prime_meridians(void) { return pj_prime_meridians; } - diff --git a/src/pj_ell_set.c b/src/pj_ell_set.c index d21122e3..ab2fa818 100644 --- a/src/pj_ell_set.c +++ b/src/pj_ell_set.c @@ -14,7 +14,7 @@ static int ellps_spherification (PJ *P); static paralist *pj_get_param (paralist *list, char *key); static char *pj_param_value (paralist *list); -static PJ_ELLPS *pj_find_ellps (char *name); +static const PJ_ELLPS *pj_find_ellps (char *name); /***************************************************************************************/ @@ -125,7 +125,7 @@ int pj_ellipsoid (PJ *P) { static int ellps_ellps (PJ *P) { /***************************************************************************************/ PJ B; - PJ_ELLPS *ellps; + const PJ_ELLPS *ellps; paralist *par = 0; char *name; int err; @@ -419,7 +419,7 @@ static char *pj_param_value (paralist *list) { } -static PJ_ELLPS *pj_find_ellps (char *name) { +static const PJ_ELLPS *pj_find_ellps (char *name) { int i; char *s; if (0==name) diff --git a/src/pj_ellps.c b/src/pj_ellps.c index 2a2c5d3b..af5990dd 100644 --- a/src/pj_ellps.c +++ b/src/pj_ellps.c @@ -1,8 +1,11 @@ /* definition of standard geoids */ + +#include "proj.h" + #define PJ_ELLPS__ #include "projects.h" -C_NAMESPACE_VAR struct PJ_ELLPS +C_NAMESPACE_VAR const struct PJ_ELLPS pj_ellps[] = { {"MERIT", "a=6378137.0", "rf=298.257", "MERIT 1983"}, {"SGS85", "a=6378136.0", "rf=298.257", "Soviet Geodetic System 85"}, @@ -53,7 +56,11 @@ pj_ellps[] = { }; struct PJ_ELLPS *pj_get_ellps_ref() +{ + return (struct PJ_ELLPS *)pj_ellps; +} +const PJ_ELLPS *proj_list_ellps(void) { return pj_ellps; } diff --git a/src/pj_gauss.c b/src/pj_gauss.c index 41ee8abf..bd49b6c2 100644 --- a/src/pj_gauss.c +++ b/src/pj_gauss.c @@ -65,7 +65,7 @@ void *pj_gauss_ini(double e, double phi0, double *chi, double *rc) { } LP pj_gauss(projCtx ctx, LP elp, const void *data) { - struct GAUSS *en = (struct GAUSS *)data; + const struct GAUSS *en = (const struct GAUSS *)data; LP slp; (void) ctx; @@ -77,7 +77,7 @@ LP pj_gauss(projCtx ctx, LP elp, const void *data) { } LP pj_inv_gauss(projCtx ctx, LP slp, const void *data) { - struct GAUSS *en = (struct GAUSS *)data; + const struct GAUSS *en = (const struct GAUSS *)data; LP elp; double num; int i; diff --git a/src/pj_gc_reader.c b/src/pj_gc_reader.c index e49e56a4..90610a17 100644 --- a/src/pj_gc_reader.c +++ b/src/pj_gc_reader.c @@ -47,7 +47,7 @@ PJ_GridCatalog *pj_gc_readcatalog( projCtx ctx, const char *catalog_name ) int entry_max; char line[302]; - fid = pj_open_lib( ctx, (char *) catalog_name, "r" ); + fid = pj_open_lib( ctx, catalog_name, "r" ); if (fid == NULL) return NULL; diff --git a/src/pj_gridinfo.c b/src/pj_gridinfo.c index 9b9a8d82..b1b39e01 100644 --- a/src/pj_gridinfo.c +++ b/src/pj_gridinfo.c @@ -40,8 +40,8 @@ /* Convert the byte order of the given word(s) in place. */ /************************************************************************/ -static int byte_order_test = 1; -#define IS_LSB (1 == ((unsigned char *) (&byte_order_test))[0]) +static const int byte_order_test = 1; +#define IS_LSB (1 == ((const unsigned char *) (&byte_order_test))[0]) static void swap_words( unsigned char *data, int word_size, int word_count ) diff --git a/src/pj_init.c b/src/pj_init.c index 8f4eb477..7e885575 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -639,7 +639,7 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { /* Axis orientation */ if( (pj_param(ctx, start,"saxis").s) != NULL ) { - static const char *axis_legal = "ewnsud"; + const char *axis_legal = "ewnsud"; const char *axis_arg = pj_param(ctx, start,"saxis").s; if( strlen(axis_arg) != 3 ) return pj_default_destructor (PIN, PJD_ERR_AXIS); diff --git a/src/pj_list.c b/src/pj_list.c index 2bdd3053..d34e055d 100644 --- a/src/pj_list.c +++ b/src/pj_list.c @@ -2,6 +2,8 @@ ** Use local definition of PJ_LIST_H for subset. */ +#include "proj.h" + #define USE_PJ_LIST_H 1 #include "projects.h" @@ -18,13 +20,18 @@ /* Generate the null-terminated list of projection functions with associated mnemonics and descriptions */ #define PROJ_HEAD(id, name) {#id, pj_##id, &pj_s_##id}, -struct PJ_LIST pj_list[] = { +const struct PJ_LIST pj_list[] = { #include "pj_list.h" {0, 0, 0}, }; #undef PROJ_HEAD -struct PJ_LIST *pj_get_list_ref (void) { +struct PJ_LIST *pj_get_list_ref() +{ + return (struct PJ_LIST *)pj_list; +} + +const PJ_OPERATIONS *proj_list_operations(void) { return pj_list; } diff --git a/src/pj_open_lib.c b/src/pj_open_lib.c index 08532beb..4eaefba1 100644 --- a/src/pj_open_lib.c +++ b/src/pj_open_lib.c @@ -38,7 +38,7 @@ static const char *(*pj_finder)(const char *) = NULL; static int path_count = 0; static char **search_path = NULL; -static char * proj_lib_name = +static const char * proj_lib_name = #ifdef PROJ_LIB PROJ_LIB; #else @@ -93,8 +93,8 @@ void pj_set_searchpath ( int count, const char **path ) /* just a couple of helper functions that lets other functions access the otherwise private search path */ -const char **proj_get_searchpath(void) { - return (const char **)search_path; +const char * const *proj_get_searchpath(void) { + return (const char * const *)search_path; } int proj_get_path_count(void) { diff --git a/src/pj_strerrno.c b/src/pj_strerrno.c index 3e726895..c2221e58 100644 --- a/src/pj_strerrno.c +++ b/src/pj_strerrno.c @@ -4,7 +4,7 @@ #include #include - static char * + static const char * const pj_err_list[] = { "no arguments in initialization list", /* -1 */ "no options found in 'init' file", /* -2 */ @@ -91,7 +91,7 @@ char *pj_strerrno(int err) { /* PROJ.4 error codes are negative */ adjusted_err = - err - 1; if (adjusted_err < (sizeof(pj_err_list) / sizeof(char *))) - return(pj_err_list[adjusted_err]); + return (char *)pj_err_list[adjusted_err]; sprintf( note, "invalid projection system error (%d)", (err > -9999)? err: -9999); return note; diff --git a/src/pj_units.c b/src/pj_units.c index 7dbae34c..fe4ad453 100644 --- a/src/pj_units.c +++ b/src/pj_units.c @@ -1,10 +1,14 @@ /* definition of standard cartesian units */ + +#include "proj.h" + #define PJ_UNITS__ #include + /* Field 2 that contains the multiplier to convert named units to meters ** may be expressed by either a simple floating point constant or a ** numerator/denomenator values (e.g. 1/1000) */ -C_NAMESPACE_VAR struct PJ_UNITS +C_NAMESPACE_VAR const struct PJ_UNITS pj_units[] = { {"km", "1000.", "Kilometer", 1000.0}, {"m", "1.", "Meter", 1.0}, @@ -31,7 +35,11 @@ pj_units[] = { }; struct PJ_UNITS *pj_get_units_ref() +{ + return (struct PJ_UNITS *)pj_units; +} +const PJ_UNITS *proj_list_units() { return pj_units; } diff --git a/src/pj_zpoly1.c b/src/pj_zpoly1.c index 3d6418bb..626a1fed 100644 --- a/src/pj_zpoly1.c +++ b/src/pj_zpoly1.c @@ -5,7 +5,7 @@ ** n should always be >= 1 though no checks are made */ COMPLEX -pj_zpoly1(COMPLEX z, COMPLEX *C, int n) { +pj_zpoly1(COMPLEX z, const COMPLEX *C, int n) { COMPLEX a; double t; @@ -20,7 +20,7 @@ pj_zpoly1(COMPLEX z, COMPLEX *C, int n) { } /* evaluate complex polynomial and derivative */ COMPLEX -pj_zpolyd1(COMPLEX z, COMPLEX *C, int n, COMPLEX *der) { +pj_zpolyd1(COMPLEX z, const COMPLEX *C, int n, COMPLEX *der) { COMPLEX a, b; double t; int first = 1; diff --git a/src/proj.c b/src/proj.c index 7922a5ac..1d702ea4 100644 --- a/src/proj.c +++ b/src/proj.c @@ -45,7 +45,9 @@ static int static char *cheby_str, /* string controlling Chebychev evaluation */ - *oform = (char *)0, /* output format for x-y or decimal degrees */ + *oform = (char *)0; /* output format for x-y or decimal degrees */ + +static const char *oterr = "*\t*", /* output line for unprojectable input */ *usage = "%s\nusage: %s [ -beEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]\n"; @@ -356,11 +358,11 @@ int main(int argc, char **argv) { case 'l': /* list projections, ellipses or units */ if (!arg[1] || arg[1] == 'p' || arg[1] == 'P') { /* list projections */ - struct PJ_LIST *lp; + const struct PJ_LIST *lp; int do_long = arg[1] == 'P', c; char *str; - for (lp = pj_get_list_ref() ; lp->id ; ++lp) { + for (lp = proj_list_operations() ; lp->id ; ++lp) { if( strcmp(lp->id,"latlong") == 0 || strcmp(lp->id,"longlat") == 0 || strcmp(lp->id,"geocent") == 0 ) @@ -377,28 +379,28 @@ int main(int argc, char **argv) { } } } else if (arg[1] == '=') { /* list projection 'descr' */ - struct PJ_LIST *lp; + const struct PJ_LIST *lp; arg += 2; - for (lp = pj_get_list_ref(); lp->id ; ++lp) + for (lp = proj_list_operations(); lp->id ; ++lp) if (!strcmp(lp->id, arg)) { (void)printf("%9s : %s\n", lp->id, *lp->descr); break; } } else if (arg[1] == 'e') { /* list ellipses */ - struct PJ_ELLPS *le; + const struct PJ_ELLPS *le; - for (le = pj_get_ellps_ref(); le->id ; ++le) + for (le = proj_list_ellps(); le->id ; ++le) (void)printf("%9s %-16s %-16s %s\n", le->id, le->major, le->ell, le->name); } else if (arg[1] == 'u') { /* list units */ - struct PJ_UNITS *lu; + const struct PJ_UNITS *lu; - for (lu = pj_get_units_ref(); lu->id ; ++lu) + for (lu = proj_list_units(); lu->id ; ++lu) (void)printf("%12s %-20s %s\n", lu->id, lu->to_meter, lu->name); } else if (arg[1] == 'd') { /* list datums */ - struct PJ_DATUMS *ld; + const struct PJ_DATUMS *ld; printf("__datum_id__ __ellipse___ __definition/comments______________________________\n" ); for (ld = pj_get_datums_ref(); ld->id ; ++ld) diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index 0fba5097..a0550727 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -597,7 +597,7 @@ PJ_INFO proj_info(void) { ******************************************************************************/ PJ_INFO info; - const char **paths; + const char * const *paths; char *tmpstr; int i, n; size_t len = 0; @@ -847,20 +847,3 @@ PJ_FACTORS proj_factors(PJ *P, LP lp) { return factors; } - -const PJ_ELLPS *proj_list_ellps(void) { - return pj_get_ellps_ref(); -} - -const PJ_UNITS *proj_list_units(void) { - return pj_get_units_ref(); -} - -const PJ_OPERATIONS *proj_list_operations(void) { - return pj_get_list_ref(); -} - -const PJ_PRIME_MERIDIANS *proj_list_prime_meridians(void) { - return pj_get_prime_meridians_ref(); -} - diff --git a/src/proj_internal.h b/src/proj_internal.h index 6571bce9..13a1cac6 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -119,7 +119,7 @@ char *pj_make_args (size_t argc, char **argv); /* Lowest level: Minimum support for fileapi */ void proj_fileapi_set (PJ *P, void *fileapi); -const char **proj_get_searchpath(void); +const char * const *proj_get_searchpath(void); int proj_get_path_count(void); size_t pj_strlcpy(char *dst, const char *src, size_t siz); diff --git a/src/proj_mdist.c b/src/proj_mdist.c index 244cf199..5f7458b5 100644 --- a/src/proj_mdist.c +++ b/src/proj_mdist.c @@ -88,7 +88,7 @@ proj_mdist_ini(double es) { } double proj_mdist(double phi, double sphi, double cphi, const void *data) { - struct MDIST *b = (struct MDIST *)data; + const struct MDIST *b = (const struct MDIST *)data; double sc, sum, sphi2, D; int i; @@ -101,7 +101,7 @@ proj_mdist(double phi, double sphi, double cphi, const void *data) { } double proj_inv_mdist(projCtx ctx, double dist, const void *data) { - struct MDIST *b = (struct MDIST *)data; + const struct MDIST *b = (const struct MDIST *)data; double s, t, phi, k; int i; diff --git a/src/projects.h b/src/projects.h index ca2cdbe3..63ea44da 100644 --- a/src/projects.h +++ b/src/projects.h @@ -713,8 +713,8 @@ double pj_qsfn_(double, PJ *); double *pj_authset(double); double pj_authlat(double, double *); -COMPLEX pj_zpoly1(COMPLEX, COMPLEX *, int); -COMPLEX pj_zpolyd1(COMPLEX, COMPLEX *, int, COMPLEX *); +COMPLEX pj_zpoly1(COMPLEX, const COMPLEX *, int); +COMPLEX pj_zpolyd1(COMPLEX, const COMPLEX *, int, COMPLEX *); int pj_deriv(LP, double, const PJ *, struct DERIVS *); int pj_factors(LP, const PJ *, double, struct FACTORS *); diff --git a/src/test228.c b/src/test228.c index 94f0ec08..57952468 100644 --- a/src/test228.c +++ b/src/test228.c @@ -17,8 +17,8 @@ int main(int argc, char* argv[]) #include #include -volatile int run = 0; -volatile int started = 0; +static volatile int run = 0; +static volatile int started = 0; static void* thread_main(void* unused) { -- cgit v1.2.3 From e073e13b4d7c830d1e7144c22a1ab1c225f47a39 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Mon, 18 Dec 2017 12:35:06 +0100 Subject: Enable wildcard globbing for MSVC builds (#714) * Enable wildcard globbing for MSVC builds * Use globbing to run all gie tests * Despite merge title: Also use wildcards on gie tests when using GNU compilers --- appveyor.yml | 7 +------ src/CMakeLists.txt | 9 +++++++++ src/makefile.vc | 12 ++++++------ travis/install.sh | 7 +------ 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 92740d7e..292d896d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -60,12 +60,7 @@ test_script: - dir - echo "Contents of ..\test\gie:" - dir ..\test\gie - - gie.exe ..\test\gie\builtins.gie - - gie.exe ..\test\gie\deformation.gie - - gie.exe ..\test\gie\axisswap.gie - - gie.exe ..\test\gie\ellipsoid.gie - - gie.exe -vvvvv ..\test\gie\more_builtins.gie - - gie.exe ..\test\gie\GDA.gie + - gie.exe ..\test\gie\*.gie deploy: off diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 494eef9b..c4f4dd20 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,6 +11,7 @@ option(BUILD_NAD2BIN "Build nad2bin (format conversion tool)" ON) option(BUILD_PROJ "Build proj (cartographic projection tool : latlong <-> projected coordinates)" ON) if(NOT MSVC) + if (NOT APPLE) # Use relative path so that package is relocatable set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${LIBDIR}") @@ -22,6 +23,14 @@ if(NOT MSVC) # (2) setting the INSTALL_RPATH property on the executables to # "@loader_path/../${LIBDIR}" endif () + +else () + + # Linking to setargv.obj enables wildcard globbing for the + # command line utilities, when compiling with MSVC + # https://docs.microsoft.com/da-dk/cpp/c-language/expanding-wildcard-arguments + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} setargv.obj") + endif () if(BUILD_CCT) diff --git a/src/makefile.vc b/src/makefile.vc index 1155035e..c9ebd24c 100644 --- a/src/makefile.vc +++ b/src/makefile.vc @@ -102,27 +102,27 @@ proj_i.lib: $(LIBOBJ) if exist $(PROJ_DLL).manifest mt -manifest $(PROJ_DLL).manifest -outputresource:$(PROJ_DLL);2 $(PROJ_EXE): $(PROJEXE_OBJ) $(EXE_PROJ) - cl $(PROJEXE_OBJ) $(EXE_PROJ) + cl $(PROJEXE_OBJ) $(EXE_PROJ) /link setargv.obj if exist $(PROJ_EXE).manifest mt -manifest $(PROJ_EXE).manifest -outputresource:$(PROJ_EXE);1 $(CS2CS_EXE): $(CS2CSEXE_OBJ) $(EXE_PROJ) - cl $(CS2CSEXE_OBJ) $(EXE_PROJ) + cl $(CS2CSEXE_OBJ) $(EXE_PROJ) /link setargv.obj if exist $(CS2CS_EXE).manifest mt -manifest $(CS2CS_EXE).manifest -outputresource:$(CS2CS_EXE);1 $(GEOD_EXE): $(GEODEXE_OBJ) $(EXE_PROJ) - cl $(GEODEXE_OBJ) $(EXE_PROJ) + cl $(GEODEXE_OBJ) $(EXE_PROJ) /link setargv.obj if exist $(GEOD_EXE).manifest mt -manifest $(GEOD_EXE).manifest -outputresource:$(GEOD_EXE);1 $(CCT_EXE): $(CCTEXE_OBJ) $(EXE_PROJ) - cl $(CCTEXE_OBJ) $(EXE_PROJ) + cl $(CCTEXE_OBJ) $(EXE_PROJ) /link setargv.obj if exist $(CCT_EXE).manifest mt -manifest $(CCT_EXE).manifest -outputresource:$(CCT_EXE);1 $(GIE_EXE): $(GIEEXE_OBJ) $(EXE_PROJ) - cl $(GIEEXE_OBJ) $(EXE_PROJ) + cl $(GIEEXE_OBJ) $(EXE_PROJ) /link setargv.obj if exist $(GIE_EXE).manifest mt -manifest $(GIE_EXE).manifest -outputresource:$(GIE_EXE);1 $(NAD2BIN_EXE): nad2bin.obj emess.obj $(EXE_PROJ) - cl nad2bin.obj emess.obj $(EXE_PROJ) + cl nad2bin.obj emess.obj $(EXE_PROJ) /link setargv.obj $(MULTISTRESSTEST_EXE): $(MULTISTRESSTEST_OBJ) cl $(MULTISTRESSTEST_OBJ) $(EXE_PROJ) diff --git a/travis/install.sh b/travis/install.sh index 0066c6b7..5be36eb1 100755 --- a/travis/install.sh +++ b/travis/install.sh @@ -80,12 +80,7 @@ if [ $TRAVIS_OS_NAME == "osx" ]; then fi make -j3 make check -PROJ_LIB=$GRIDDIR ./src/gie ./test/gie/builtins.gie -PROJ_LIB=$GRIDDIR ./src/gie -vvvvv ./test/gie/more_builtins.gie -PROJ_LIB=$GRIDDIR ./src/gie ./test/gie/deformation.gie -PROJ_LIB=$GRIDDIR ./src/gie ./test/gie/axisswap.gie -PROJ_LIB=$GRIDDIR ./src/gie ./test/gie/ellipsoid.gie -PROJ_LIB=$GRIDDIR ./src/gie ./test/gie/GDA.gie +PROJ_LIB=$GRIDDIR ./src/gie ./test/gie/*.gie # install & run the working GIGS test # create locations that pyproj understands -- cgit v1.2.3 From 9eb17155ba7fe7d11110ae7e20416af0b5016750 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Mon, 18 Dec 2017 16:37:44 +0100 Subject: Remove superfluous element free_format from OPTARGPM object (#716) Fixes #699 --- src/optargpm.h | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/optargpm.h b/src/optargpm.h index 97755cdb..d464b5a9 100644 --- a/src/optargpm.h +++ b/src/optargpm.h @@ -216,7 +216,6 @@ struct OPTARGS { FILE *input; int input_index; int record_index; - int free_format; /* plus-style specs replaced by free format */ const char *progname; /* argv[0], stripped from /path/to, if present */ char flaglevel[21]; /* if flag -f is specified n times, its optarg pointer is set to flaglevel + n */ char *optarg[256]; /* optarg[(int) 'f'] holds a pointer to the argument of option "-f" */ @@ -415,6 +414,7 @@ const char *opt_strip_path (const char *full_name) { /* split command line options into options/flags ("-" style), projdefs ("+" style) and input file args */ OPTARGS *opt_parse (int argc, char **argv, const char *flags, const char *keys, const char **longflags, const char **longkeys) { int i, j; + int free_format; OPTARGS *o; o = (OPTARGS *) calloc (1, sizeof(OPTARGS)); @@ -424,12 +424,6 @@ OPTARGS *opt_parse (int argc, char **argv, const char *flags, const char *keys, o->argc = argc; o->argv = argv; o->progname = opt_strip_path (argv[0]); - o->free_format = 0; - - /* Is free format in use, instead of plus-style? */ - for (i = 1; i < argc; i++) - if (0==strcmp ("--", argv[i])) - o->free_format = i; /* Reset all flags */ for (i = 0; i < (int) strlen (flags); i++) @@ -588,11 +582,20 @@ OPTARGS *opt_parse (int argc, char **argv, const char *flags, const char *keys, /* Process all '+'-style options, starting from where '-'-style processing ended */ o->pargv = argv + i; - if (o->free_format) { - o->pargc = o->free_format - (o->margc + 1); - o->fargc = argc - (o->free_format + 1); + + /* Is free format in use, instead of plus-style? */ + for (free_format = 0, j = 1; j < argc; j++) { + if (0==strcmp ("--", argv[j])) { + free_format = j; + break; + } + } + + if (free_format) { + o->pargc = free_format - (o->margc + 1); + o->fargc = argc - (free_format + 1); if (0 != o->fargc) - o->fargv = argv + o->free_format + 1; + o->fargv = argv + free_format + 1; return o; } -- cgit v1.2.3 From e662d37458d662df0ba571b6d6a936a500d278b5 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Mon, 18 Dec 2017 19:47:02 +0100 Subject: Test deformation initialization errors. --- test/gie/deformation.gie | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/gie/deformation.gie b/test/gie/deformation.gie index 029387c4..af053f85 100644 --- a/test/gie/deformation.gie +++ b/test/gie/deformation.gie @@ -33,4 +33,23 @@ accept -3004295.5882503074 -1093474.1690603832 5500477.1338251457 2000.0 expect -3004295.7025 -1093474.2106 5500477.3444 2000.0 roundtrip 5 +------------------------------------------------------------------------------- +operation proj=deformation xy_grids=alaska t_epoch=2016.0 t_obs=2017.0 + ellps=GRS80 +expect failure pjd_err_no_args + +operation proj=deformation z_grids=egm96_15.gtx t_epoch=2016.0 t_obs=2017.0 + ellps=GRS80 +expect failure pjd_err_no_args + +operation proj=deformation xy_grids=nonexisting z_grids=egm96_15.gtx + t_epoch=2016.0 t_obs=2017.0 ellps=GRS80 +expect failure pjd_err_failed_to_load_grid + +operation proj=deformation xy_grids=alask z_grids=nonexisting + t_epoch=2016.0 t_obs=2017.0 ellps=GRS80 +expect failure pjd_err_failed_to_load_grid + +operation proj=deformation xy_grids=alask z_grids=nonexisting ellps=GRS80 +expect failure pjd_err_missing_args -- cgit v1.2.3 From ca9a448edc35149c1bdb5d90ffbdae88b43dadb1 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Mon, 18 Dec 2017 20:57:18 +0100 Subject: fix spelling mistakes in previous commit --- test/gie/deformation.gie | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/gie/deformation.gie b/test/gie/deformation.gie index af053f85..8f0f0caf 100644 --- a/test/gie/deformation.gie +++ b/test/gie/deformation.gie @@ -46,10 +46,10 @@ operation proj=deformation xy_grids=nonexisting z_grids=egm96_15.gtx t_epoch=2016.0 t_obs=2017.0 ellps=GRS80 expect failure pjd_err_failed_to_load_grid -operation proj=deformation xy_grids=alask z_grids=nonexisting +operation proj=deformation xy_grids=alaska z_grids=nonexisting t_epoch=2016.0 t_obs=2017.0 ellps=GRS80 expect failure pjd_err_failed_to_load_grid -operation proj=deformation xy_grids=alask z_grids=nonexisting ellps=GRS80 +operation proj=deformation xy_grids=alaska z_grids=nonexisting ellps=GRS80 expect failure pjd_err_missing_args -- cgit v1.2.3 From 2162ad57c190f5c924eb61fa47325c48fd894832 Mon Sep 17 00:00:00 2001 From: Charles Karney Date: Mon, 18 Dec 2017 17:56:24 -0500 Subject: Fix issue #715. Merge 1.49.1 of geodesic library (tagged as v1.49.1-c in GeographicLib). Details: Workaround bugs in handling of -0.0 in fmod and sin in Visual Studio 10, 11, and 12. Relax unrealistically strict delta for GeodSolve59 in geodtest. --- src/geodesic.c | 25 +++++++++++++++++++++++-- src/geodesic.h | 2 +- src/geodtest.c | 2 +- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/geodesic.c b/src/geodesic.c index 84951d7f..233dc34c 100644 --- a/src/geodesic.c +++ b/src/geodesic.c @@ -185,8 +185,18 @@ static real AngNormalize(real x) { x = remainder(x, (real)(360)); return x != -180 ? x : 180; #else - x = fmod(x, (real)(360)); - return x <= -180 ? x + 360 : (x <= 180 ? x : x - 360); + real y = fmod(x, (real)(360)); +#if defined(_MSC_VER) && _MSC_VER < 1900 + /* + Before version 14 (2015), Visual Studio had problems dealing + with -0.0. Specifically + VC 10,11,12 and 32-bit compile: fmod(-0.0, 360.0) -> +0.0 + sincosdx has a similar fix. + python 2.7 on Windows 32-bit machines has the same problem. + */ + if (x == 0) y = x; +#endif + return y <= -180 ? y + 360 : (y <= 180 ? y : y - 360); #endif } @@ -231,6 +241,17 @@ static void sincosdx(real x, real* sinx, real* cosx) { r *= degree; /* Possibly could call the gnu extension sincos */ s = sin(r); c = cos(r); +#if defined(_MSC_VER) && _MSC_VER < 1900 + /* + Before version 14 (2015), Visual Studio had problems dealing + with -0.0. Specifically + VC 10,11,12 and 32-bit compile: fmod(-0.0, 360.0) -> +0.0 + VC 12 and 64-bit compile: sin(-0.0) -> +0.0 + AngNormalize has a similar fix. + python 2.7 on Windows 32-bit machines has the same problem. + */ + if (x == 0) s = x; +#endif switch ((unsigned)q & 3U) { case 0U: *sinx = s; *cosx = c; break; case 1U: *sinx = c; *cosx = -s; break; diff --git a/src/geodesic.h b/src/geodesic.h index ab18a01f..43fd0d1f 100644 --- a/src/geodesic.h +++ b/src/geodesic.h @@ -132,7 +132,7 @@ * The patch level of the geodesic library. (This tracks the version of * GeographicLib.) **********************************************************************/ -#define GEODESIC_VERSION_PATCH 0 +#define GEODESIC_VERSION_PATCH 1 /** * Pack the version components into a single integer. Users should not rely on diff --git a/src/geodtest.c b/src/geodtest.c index 5b41b72c..0f2c0ac2 100644 --- a/src/geodtest.c +++ b/src/geodtest.c @@ -505,7 +505,7 @@ static int GeodSolve59() { geod_inverse(&g, 5, 0.00000000000001, 10, 180, &s12, &azi1, &azi2); result += assertEquals(azi1, 0.000000000000035, 1.5e-14); result += assertEquals(azi2, 179.99999999999996, 1.5e-14); - result += assertEquals(s12, 18345191.174332713, 2.5e-9); + result += assertEquals(s12, 18345191.174332713, 5e-9); return result; } -- cgit v1.2.3 From a885fbb2f1f285c2cdadacdaa4616bf60184f925 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Tue, 19 Dec 2017 10:28:16 +0100 Subject: Some corrections in response to a review by Kristian Evers (#718) * Some corrections in response to a review by Kristian Evers --- examples/val_def.demo | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++ nad/val_def.demo | 83 ------------------------------------------------- src/gie.c | 1 - src/pj_init.c | 1 + test/gie/pip.gie | 41 ------------------------- 5 files changed, 86 insertions(+), 125 deletions(-) create mode 100644 examples/val_def.demo delete mode 100644 nad/val_def.demo delete mode 100644 test/gie/pip.gie diff --git a/examples/val_def.demo b/examples/val_def.demo new file mode 100644 index 00000000..315219fd --- /dev/null +++ b/examples/val_def.demo @@ -0,0 +1,85 @@ + +----------------------------------------------------------------------- + + INTEGRATING DEFINITION AND VALIDATION OF GEODETIC SYSTEMS + +----------------------------------------------------------------------- + Thomas Knudsen, thokn@sdfe.dk, 2017-12-06 +----------------------------------------------------------------------- + +This demo shows how to use the free format definition strings, +introduced in PROJ version 5.0.0, to integrate system definition +information with system validation data. + +The system definition parts are used when doing actual transformations, +e.g. using the cct 4D transformation program: + + echo 9 55 0 0 | cct +init=val_def.demo:DKTM1 + +The system validation parts are used when validating the systems +defined in the file. This is done using the gie test program: +Place val_def.demo in your PROJ_LIB directory +(or set PROJ_LIB=) and say: + + gie val_def.demo + +This will result in a report detailing how many tests succeeded, +resp. failed. + +The syntax of proj init files is orthogonal to the syntax of gie +integrity evaluation files. This makes it possible to interleave +init and gie blocks in the same file. + +#----------------------------------------------------------------------- + + + +#----------------------------------------------------------------------- +# Danish Transverse Mercator, zone 1 +#----------------------------------------------------------------------- + proj = etmerc + lat_0 = 0 lon_0 = 9 + x_0 = 200000 y_0 = -5000000 + + k = 0.99998 + + ellps = GRS80 + units = m + + no_defs +#----------------------------------------------------------------------- + +operation init = val_def.demo:DKTM1 +tolerance 100 um +accept 9 55 +expect 200000.0000 1097108.3684 +roundtrip 1000 1 nm + +#----------------------------------------------------------------------- + + + +#----------------------------------------------------------------------- +# Danish Transverse Mercator, zone 2 +#----------------------------------------------------------------------- + proj = etmerc + lat_0 = 0 lon_0 = 10 + x_0 = 400000 y_0 = -5000000 + + k = 0.99998 + + ellps = GRS80 + units = m + + no_defs +#----------------------------------------------------------------------- + +operation init = val_def.demo:DKTM2 +tolerance 100 um +accept 10 55 +expect 400000.0000 1097108.3684 +accept 10.5 55.5 +expect 431597.1668 1152884.9398 +roundtrip 1000 100 um + +#----------------------------------------------------------------------- diff --git a/nad/val_def.demo b/nad/val_def.demo deleted file mode 100644 index 87777b9d..00000000 --- a/nad/val_def.demo +++ /dev/null @@ -1,83 +0,0 @@ - ------------------------------------------------------------------------ - - INTEGRATING DEFINITION AND VALIDATION OF GEODETIC SYSTEMS - ------------------------------------------------------------------------ - Thomas Knudsen, thokn@sdfe.dk, 2017-12-06 ------------------------------------------------------------------------ - -This demo shows how to use the free format definition strings, -introduced in PROJ version 5.0.0, to integrate system definition -information with system validation data. - -The system definition parts are used when doing actual transformations, -e.g. using the cct 4D transformation program: - - echo 9 55 0 0 | cct +init=val_def.demo:DKTM1 - -The system validation parts are used when validating the systems -defined in the file. This is done using the gie test program: - - gie val_def.demo - -Which will respond with a report detailing how many tests succeeded, -resp. failed. - -The syntax of proj init files is orthogonal to the syntax of gie -integrity evaluation files. This makes it possible to interleave -init and gie blocks in the same file. - -#----------------------------------------------------------------------- - - - -#----------------------------------------------------------------------- -# Danish Transverse Mercator, zone 1 -#----------------------------------------------------------------------- - proj = etmerc - lat_0 = 0 lon_0 = 9 - x_0 = 200000 y_0 = -5000000 - - k = 0.99998 - - ellps = GRS80 - units = m - - no_defs -#----------------------------------------------------------------------- - -operation init = val_def.demo:DKTM1 -tolerance 100 um -accept 9 55 -expect 200000.0000 1097108.3684 -roundtrip 1000 1 nm - -#----------------------------------------------------------------------- - - - -#----------------------------------------------------------------------- -# Danish Transverse Mercator, zone 2 -#----------------------------------------------------------------------- - proj = etmerc - lat_0 = 0 lon_0 = 10 - x_0 = 400000 y_0 = -5000000 - - k = 0.99998 - - ellps = GRS80 - units = m - - no_defs -#----------------------------------------------------------------------- - -operation init = val_def.demo:DKTM2 -tolerance 100 um -accept 10 55 -expect 400000.0000 1097108.3684 -accept 10.5 55.5 -expect 431597.1668 1152884.9398 -roundtrip 1000 100 um - -#----------------------------------------------------------------------- diff --git a/src/gie.c b/src/gie.c index 2ae2ddee..8a1d356e 100644 --- a/src/gie.c +++ b/src/gie.c @@ -1888,7 +1888,6 @@ static int pj_unitconvert_selftest (void) { ret = test_time(args3, 1e-6, in3, in3); if (ret) return ret + 30; ret = test_time(args4, 1e-6, in4, exp4); if (ret) return ret + 40; ret = test_xyz (args5, 1e-10, in5, exp5); if (ret) return ret + 50; - ret = test_xyz (args6, 1e-10, in6, in6); if (ret) return ret + 50; ret = test_xyz (args6, 1e-10, in6, in6); if (ret) return ret + 60; ret = test_time(args7, 1e-6, in7, in7); if (ret) return ret + 70; diff --git a/src/pj_init.c b/src/pj_init.c index 7e885575..1b0f479f 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -344,6 +344,7 @@ where 'ellps=intl' precedes 'ellps=GRS80', and hence takes precedence, turning the expansion into an UTM projection on the Hayford ellipsoid. Note that 'init=foo:bar' stays in the list. It is ignored after expansion. + ******************************************************************************/ paralist *last; paralist *expn; diff --git a/test/gie/pip.gie b/test/gie/pip.gie deleted file mode 100644 index 0cb54614..00000000 --- a/test/gie/pip.gie +++ /dev/null @@ -1,41 +0,0 @@ -These two tests have occasionally been causing segfaults from gie, but -only at low PROJ_DEBUG levels. - - -------------------------------------------------------------------------------- -Finally test a pipeline with more than one init step -------------------------------------------------------------------------------- -operation proj=pipeline step - init=epsg:25832 inv step - init=epsg:25833 step - init=epsg:25833 inv step - init=epsg:25832 -------------------------------------------------------------------------------- -accept 691875.63214 6098907.82501 0 0 -expect 691875.63214 6098907.82501 0 0 -direction inverse -accept 12 55 0 0 -expect 12 55 0 0 -------------------------------------------------------------------------------- - - - -------------------------------------------------------------------------------- -This example is a coordinate from the geodetic observatory in Onsala, -Sweden transformed from ITRF2000 @ 2017.0 to ITRF93 @ 2017.0. - -The test coordinate was transformed using GNSStrans, using transformation -parameters published by ITRF: ftp://itrf.ensg.ign.fr/pub/itrf/ITRF.TP -------------------------------------------------------------------------------- -operation proj=helmert ellps=GRS80 transpose - x = 0.0127 dx = -0.0029 rx = -0.00039 drx = -0.00011 - y = 0.0065 dy = -0.0002 ry = 0.00080 dry = -0.00019 - z = -0.0209 dz = -0.0006 rz = -0.00114 drz = 0.00007 - - s = 0.00195 ds = 0.00001 t_epoch = 1988.0 -------------------------------------------------------------------------------- -tolerance 0.03 mm -accept 3370658.37800 711877.31400 5349787.08600 2017.0 # ITRF2000@2017.0 -expect 3370658.18890 711877.42370 5349787.12430 2017.0 # ITRF93@2017.0 -------------------------------------------------------------------------------- - -- cgit v1.2.3 From a70e8a3579064e80f65b1ae118ae90588142886f Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Tue, 19 Dec 2017 12:58:14 +0100 Subject: Add missing call to pj_chomp, in order to remove inline comments (#720) Previously, when expanding init=foo.bar calls, pj_chomp was first called after collecting all lines, effectively discarding everything after the start of the first comment --- src/pj_init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pj_init.c b/src/pj_init.c index 1b0f479f..310206f7 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -189,6 +189,7 @@ static char *get_init_string (PJ_CONTEXT *ctx, char *name) { /* Otherwise, handle the line. It MAY be the start of the next section, */ /* but that will be handled at the start of next trip through the loop */ buffer_length = strlen (buffer); + pj_chomp (line); /* Remove '#' style comments */ next_length = strlen (line) + buffer_length + 2; if (next_length > current_buffer_size) { char *b = pj_malloc (2 * current_buffer_size); -- cgit v1.2.3 From eadbf1520c493d7c62d62b5f0e54c3fdc26c791a Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Tue, 19 Dec 2017 16:37:10 +0100 Subject: Danish (Andrae) ellipsoid, and Copenhagen meridian introduced in support of the Reykjavik 1900 datum (Iceland) --- src/pj_datums.c | 7 ++++--- src/pj_ellps.c | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pj_datums.c b/src/pj_datums.c index 834ce724..48c77c69 100644 --- a/src/pj_datums.c +++ b/src/pj_datums.c @@ -30,10 +30,10 @@ #define PJ_DATUMS__ #include -/* +/* * The ellipse code must match one from pj_ellps.c. The datum id should - * be kept to 12 characters or less if possible. Use the official OGC - * datum name for the comments if available. + * be kept to 12 characters or less if possible. Use the official OGC + * datum name for the comments if available. */ C_NAMESPACE_VAR const struct PJ_DATUMS pj_datums[] = { @@ -86,6 +86,7 @@ C_NAMESPACE_VAR const struct PJ_PRIME_MERIDIANS pj_prime_meridians[] = { {"stockholm", "18d3'29.8\"E"}, {"athens", "23d42'58.815\"E"}, {"oslo", "10d43'22.5\"E"}, + {"copenhagen","12d34'40.35\"E"}, {NULL, NULL} }; diff --git a/src/pj_ellps.c b/src/pj_ellps.c index af5990dd..4005d1ce 100644 --- a/src/pj_ellps.c +++ b/src/pj_ellps.c @@ -16,6 +16,7 @@ pj_ellps[] = { {"NWL9D", "a=6378145.0.", "rf=298.25", "Naval Weapons Lab., 1965"}, {"mod_airy", "a=6377340.189", "b=6356034.446", "Modified Airy"}, {"andrae", "a=6377104.43", "rf=300.0", "Andrae 1876 (Den., Iclnd.)"}, +{"danish", "a=6377019.2563", "rf=300.0", "Andrae 1876 (Denmark, Iceland)"}, {"aust_SA", "a=6378160.0", "rf=298.25", "Australian Natl & S. Amer. 1969"}, {"GRS67", "a=6378160.0", "rf=298.2471674270", "GRS 67(IUGG 1967)"}, {"GSK2011", "a=6378136.5", "rf=298.2564151", "GSK-2011"}, -- cgit v1.2.3 From 15e5a2cafccca560b322dbbe93fe9e56dc94bc1d Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Wed, 20 Dec 2017 10:19:27 +0100 Subject: Avoid zero-division in ccon. Credit to OSS-Fuzz. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4695 --- src/PJ_ccon.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/PJ_ccon.c b/src/PJ_ccon.c index cf8a9f68..a8c178dd 100644 --- a/src/PJ_ccon.c +++ b/src/PJ_ccon.c @@ -25,12 +25,14 @@ #include #include "projects.h" +#define EPS10 1e-10 + struct pj_opaque { double phi1; double ctgphi1; double sinphi1; double cosphi1; - double *en; + double *en; }; PROJ_HEAD(ccon, "Central Conic") @@ -38,20 +40,20 @@ PROJ_HEAD(ccon, "Central Conic") -static XY forward (LP lp, PJ *P) { +static XY forward (LP lp, PJ *P) { XY xy = {0.0,0.0}; struct pj_opaque *Q = P->opaque; double r; r = Q->ctgphi1 - tan(lp.phi - Q->phi1); xy.x = r * sin(lp.lam * Q->sinphi1); - xy.y = Q->ctgphi1 - r * cos(lp.lam * Q->sinphi1); + xy.y = Q->ctgphi1 - r * cos(lp.lam * Q->sinphi1); return xy; } -static LP inverse (XY xy, PJ *P) { +static LP inverse (XY xy, PJ *P) { LP lp = {0.0,0.0}; struct pj_opaque *Q = P->opaque; @@ -63,7 +65,7 @@ static LP inverse (XY xy, PJ *P) { } -static void *destructor (PJ *P, int errlev) { +static void *destructor (PJ *P, int errlev) { if (0==P) return 0; @@ -84,9 +86,11 @@ PJ *PROJECTION(ccon) { P->destructor = destructor; Q->phi1 = pj_param(P->ctx, P->params, "rlat_1").f; + if (fabs(Q->phi1) < EPS10) + return destructor (P, PJD_ERR_LAT1_IS_ZERO); if (!(Q->en = pj_enfn(P->es))) - return pj_default_destructor(P, ENOMEM); + return destructor(P, ENOMEM); Q->sinphi1 = sin(Q->phi1); Q->cosphi1 = cos(Q->phi1); @@ -95,7 +99,7 @@ PJ *PROJECTION(ccon) { P->inv = inverse; P->fwd = forward; - + return P; } -- cgit v1.2.3 From 345af3c92c3ecb6d2810d09be85e3381ef66083e Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Wed, 20 Dec 2017 16:28:40 +0100 Subject: Repair column selector bug --- src/cct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cct.c b/src/cct.c index eae815e9..f315ae1a 100644 --- a/src/cct.c +++ b/src/cct.c @@ -196,7 +196,7 @@ int main(int argc, char **argv) { } if (opt_given (o, "c")) { - int ncols = sscanf (opt_arg (o, "c"), "%d,%d,%d,%d", columns_xyzt, columns_xyzt+1, columns_xyzt+3, columns_xyzt+3); + int ncols = sscanf (opt_arg (o, "c"), "%d,%d,%d,%d", columns_xyzt, columns_xyzt+1, columns_xyzt+2, columns_xyzt+3); if (ncols != nfields) { fprintf (stderr, "%s: Too few input columns given: '%s'\n", o->progname, opt_arg (o, "c")); free (o); -- cgit v1.2.3 From 403f930355926aced5caba5bfbcc230ad152cf86 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Wed, 3 Jan 2018 12:07:20 +0100 Subject: Add plate motion model parameters to ITRF init-files. Parameters for the plate motion models (PMM) for ITRF2008 and ITRF2014 are added to the ITRF2008/2014 init-files. The PMMs allow coordinates to be moved back and forward in time in plate fixed reference frames such as GR96 in Greenland which is defined as ITRF94@1996.623. Transforming an ITRF2014-coordinate to GR96 is done with: +proj=pipeline +step +init=ITRF2014:NOAM +t_epoch=1996.623 +t_obs=2017.584 +step +init=ITRF2014:ITRF94 +t_obs=1996.623 where the first step transforms the coordinate back in time to ITRF2014@1996.632 by using the ITRF2014 PMM. The second step transforms the ITRF2014 coordinate to ITRF94. --- nad/ITRF2008 | 37 +++++++++++++++++++++++++++++++++++++ nad/ITRF2014 | 29 +++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/nad/ITRF2008 b/nad/ITRF2008 index 7baa48c7..2d730d6e 100644 --- a/nad/ITRF2008 +++ b/nad/ITRF2008 @@ -22,3 +22,40 @@ +proj=helmert +x=0.0278 +y=0.0386 +z=-0.1012 +s=0.00731 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +transpose +proj=helmert +x=0.0228 +y=0.0026 +z=-0.1252 +s=0.01041 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +transpose + + +# ITRF2008 Plate Motion Model parameters +# +# As described in +# +# Altamimi, Z., L. Métivier, and X. Collilieux (2012), ITRF2008 plate motion model, +# J. Geophys. Res., 117, B07402, doi:10.1029/2011JB008930. + + + +proj=helmert +drx=-0.000190 +dry=-0.000442 +drz=0.000915 + + +proj=helmert +drx=-0.000252 +dry=-0.000302 +drz=0.000643 + + +proj=helmert +drx=0.001202 +dry=-0.000054 +drz=0.001485 + + +proj=helmert +drx=0.001504 +dry=0.001172 +drz=0.001228 + + +proj=helmert +drx=0.000049 +dry=-0.001088 +drz=0.000664 + + +proj=helmert +drx=-0.000083 +dry=0.000534 +drz=0.000750 + + +proj=helmert +drx=0.001232 +dry=0.000303 +drz=0.001540 + + +proj=helmert +drx=-0.000330 +dry=-0.001551 +drz=0.001625 + + +proj=helmert +drx=0.000035 +dry=-0.000662 +drz=0.0001 + + +proj=helmert +drx=0.000095 +dry=-0.000598 +drz=0.000723 + + +proj=helmert +drx=0.000411 +dry=0.001036 +drz=-0.002166 + + +proj=helmert +drx=-0.000243 +dry=-0.000311 +drz=-0.000154 + + +proj=helmert +drx=-0.000080 +dry=-0.000745 +drz=0.000897 + + +proj=helmert +drx=0.000047 +dry=-0.001 +drz=0.000975 diff --git a/nad/ITRF2014 b/nad/ITRF2014 index 3c6239bd..3465ec78 100644 --- a/nad/ITRF2014 +++ b/nad/ITRF2014 @@ -24,3 +24,32 @@ +proj=helmert +x=0.0304 +y=0.0355 +z=-0.1308 +s=0.00819 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +transpose +proj=helmert +x=0.0254 +y=-0.0005 +z=-0.1548 +s=0.01129 +rx=0.0001 +rz= +dx=0.00026 +dy=0.0001 +dx=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +transpose + +# ITRF2014 Plate Motion Model parameters +# +# As described in +# +# Z. Altamimi et al, 2017, ITRF2014 plate motion model, +# doi: 10.1093/gji/ggx136 + + +proj=helmert +drx=−0.000248 +dry=−0.000324 +drz=0.000675 + + +proj=helmert +drx=0.001154 +dry=−0.000136 +drz=0.001444 + + +proj=helmert +drx=0.001510 +dry=0.001182 +drz=0.001215 + + +proj=helmert +drx=−0.000085 +dry=−0.000531 +drz=0.000770 + + +proj=helmert +drx=0.001154 +dry=−0.000005 +drz=0.001454 + + +proj=helmert +drx=−0.000333 +dry=−0.001544 +drz=0.001623 + + +proj=helmert +drx=0.000024 +dry=-0.000694 +drz=-0.000063 + + +proj=helmert +drx=0.000099 +dry=−0.000614 +drz=0.000733 + + +proj=helmert +drx=−0.000409 +dry=0.001047 +drz=-0.002169 + + +proj=helmert +drx=−0.000270 +dry=−0.000301 +drz=−0.000140 + + +proj=helmert +drx=−0.000121 +dry=−0.000794 +drz=0.000884 -- cgit v1.2.3 From a3a67fb366e4628e5bda9e30b93b73648665e4d3 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Wed, 3 Jan 2018 21:06:58 +0100 Subject: Introduce preparation/finalization steps in fwd/inv subsystem, supporting arbitrary dimensionality in test code * Call trans func of same dimensionality as input in gie * Refactor prep/fin code for pj_fwd/pj_inv 2D,3D,4D * Remove prime meridian handling from pj_transform (now handled in pj_fwd_prepare/pj_inv_finalize) * Introduce prep/fin skips, mostly in support of axisswap and pipeline drivers * Refactor fwd/inv subsystem * pj_transform: Let pj_fwd/inv handle scaling * Let pj_fwd/inv3d fall back to 2D eventually --- src/Makefile.am | 2 +- src/PJ_axisswap.c | 10 +++ src/PJ_latlong.c | 99 +++++++++++----------- src/PJ_ob_tran.c | 11 +-- src/PJ_pipeline.c | 110 ++++++++++++------------- src/gie.c | 24 +++++- src/lib_proj.cmake | 2 - src/makefile.vc | 1 - src/pj_fwd.c | 200 +++++++++++++++++++++++++++++++++++---------- src/pj_fwd3d.c | 61 -------------- src/pj_internal.c | 76 +++++++++++------ src/pj_inv.c | 191 +++++++++++++++++++++++++++++++++---------- src/pj_inv3d.c | 60 -------------- src/pj_transform.c | 28 ++----- src/proj.def | 3 + src/proj_4D_api.c | 9 +- src/proj_internal.h | 11 +++ src/projects.h | 9 +- test/gie/builtins.gie | 4 +- test/gie/more_builtins.gie | 8 +- 20 files changed, 539 insertions(+), 380 deletions(-) delete mode 100644 src/pj_fwd3d.c delete mode 100644 src/pj_inv3d.c diff --git a/src/Makefile.am b/src/Makefile.am index 096cc672..e7e53394 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -70,7 +70,7 @@ libproj_la_SOURCES = \ aasincos.c adjlon.c bch2bps.c bchgen.c \ biveval.c dmstor.c mk_cheby.c pj_auth.c \ pj_deriv.c pj_ell_set.c pj_ellps.c pj_errno.c \ - pj_factors.c pj_fwd.c pj_init.c pj_inv.c pj_fwd3d.c pj_inv3d.c\ + pj_factors.c pj_fwd.c pj_init.c pj_inv.c \ pj_list.c pj_malloc.c pj_mlfn.c pj_msfn.c proj_mdist.c \ pj_open_lib.c pj_param.c pj_phi2.c pj_pr_list.c \ pj_qsfn.c pj_strerrno.c \ diff --git a/src/PJ_axisswap.c b/src/PJ_axisswap.c index f8f17380..aee3c56e 100644 --- a/src/PJ_axisswap.c +++ b/src/PJ_axisswap.c @@ -173,6 +173,16 @@ PJ *CONVERSION(axisswap,0) { return pj_default_destructor(P, PJD_ERR_MISSING_ARGS); } + /* Preparation and finalization steps are skipped, since the raison */ + /* d'etre of axisswap is to bring input coordinates in line with the */ + /* the internally expected order (ENU), such that handling of offsets */ + /* etc. can be done correctly in a later step of a pipeline */ + P->skip_fwd_prepare = 1; + P->skip_fwd_finalize = 1; + P->skip_inv_prepare = 1; + P->skip_inv_finalize = 1; + + /* fill axis list with indices from 4-7 to simplify duplicate search further down */ for (i=0; i<4; i++) Q->axis[i] = i+4; diff --git a/src/PJ_latlong.c b/src/PJ_latlong.c index 5919023a..b1909954 100644 --- a/src/PJ_latlong.c +++ b/src/PJ_latlong.c @@ -30,7 +30,6 @@ /* very loosely based upon DMA code by Bradford W. Drew */ #define PJ_LIB__ #include "proj_internal.h" -#include #include "projects.h" PROJ_HEAD(lonlat, "Lat/long (Geodetic)") "\n\t"; @@ -39,87 +38,87 @@ PROJ_HEAD(latlong, "Lat/long (Geodetic alias)") "\n\t"; PROJ_HEAD(longlat, "Lat/long (Geodetic alias)") "\n\t"; - static XY forward(LP lp, PJ *P) { + static XY latlong_forward(LP lp, PJ *P) { XY xy = {0.0,0.0}; - xy.x = lp.lam / P->a; - xy.y = lp.phi / P->a; + (void) P; + xy.x = lp.lam; + xy.y = lp.phi; return xy; } -static LP inverse(XY xy, PJ *P) { +static LP latlong_inverse(XY xy, PJ *P) { LP lp = {0.0,0.0}; - lp.phi = xy.y * P->a; - lp.lam = xy.x * P->a; + (void) P; + lp.phi = xy.y; + lp.lam = xy.x; return lp; } -static PJ_COORD forward_4d(PJ_COORD obs, PJ *P) { + + static XYZ latlong_forward_3d (LPZ lpz, PJ *P) { + XYZ xyz = {0,0,0}; + (void) P; + xyz.x = lpz.lam; + xyz.y = lpz.phi; + xyz.z = lpz.z; + return xyz; +} + + +static LPZ latlong_inverse_3d (XYZ xyz, PJ *P) { + LPZ lpz = {0,0,0}; + (void) P; + lpz.lam = xyz.x; + lpz.phi = xyz.y; + lpz.z = xyz.z; + return lpz; +} + +static PJ_COORD latlong_forward_4d (PJ_COORD obs, PJ *P) { (void) P; return obs; } -static PJ_COORD inverse_4d(PJ_COORD obs, PJ *P) { + +static PJ_COORD latlong_inverse_4d (PJ_COORD obs, PJ *P) { (void) P; return obs; } -PJ *PROJECTION(latlong) { + + +static PJ *latlong_setup (PJ *P) { P->is_latlong = 1; - P->x0 = 0.0; - P->y0 = 0.0; - P->inv = inverse; - P->fwd = forward; - P->inv4d = inverse_4d; - P->fwd4d = forward_4d; + P->x0 = 0; + P->y0 = 0; + P->inv = latlong_inverse; + P->fwd = latlong_forward; + P->inv3d = latlong_inverse_3d; + P->fwd3d = latlong_forward_3d; + P->inv4d = latlong_inverse_4d; + P->fwd4d = latlong_forward_4d; P->left = PJ_IO_UNITS_RADIANS; P->right = PJ_IO_UNITS_RADIANS; - return P; } +PJ *PROJECTION(latlong) { + return latlong_setup (P); +} -PJ *PROJECTION(longlat) { - P->is_latlong = 1; - P->x0 = 0.0; - P->y0 = 0.0; - P->inv = inverse; - P->fwd = forward; - P->inv4d = inverse_4d; - P->fwd4d = forward_4d; - P->left = PJ_IO_UNITS_RADIANS; - P->right = PJ_IO_UNITS_RADIANS; - return P; +PJ *PROJECTION(longlat) { + return latlong_setup (P); } PJ *PROJECTION(latlon) { - P->is_latlong = 1; - P->x0 = 0.0; - P->y0 = 0.0; - P->inv = inverse; - P->fwd = forward; - P->inv4d = inverse_4d; - P->fwd4d = forward_4d; - P->left = PJ_IO_UNITS_RADIANS; - P->right = PJ_IO_UNITS_RADIANS; - - return P; + return latlong_setup (P); } PJ *PROJECTION(lonlat) { - P->is_latlong = 1; - P->x0 = 0.0; - P->y0 = 0.0; - P->inv = inverse; - P->fwd = forward; - P->inv4d = inverse_4d; - P->fwd4d = forward_4d; - P->left = PJ_IO_UNITS_RADIANS; - P->right = PJ_IO_UNITS_RADIANS; - - return P; + return latlong_setup (P); } diff --git a/src/PJ_ob_tran.c b/src/PJ_ob_tran.c index 4ce4bd4d..43211fe7 100644 --- a/src/PJ_ob_tran.c +++ b/src/PJ_ob_tran.c @@ -170,11 +170,6 @@ PJ *PROJECTION(ob_tran) { P->opaque = Q; P->destructor = destructor; -#if 0 - if (0 != P->es) - return destructor(P, PJD_ERR_ELLIPSOIDAL_UNSUPPORTED); -#endif - /* get name of projection to be translated */ if (!(name = pj_param(P->ctx, P->params, "so_proj").s)) return destructor(P, PJD_ERR_NO_ROTATION_PROJ); @@ -235,6 +230,12 @@ PJ *PROJECTION(ob_tran) { P->inv = Q->link->inv ? t_inverse : 0; } + /* Support some rather speculative test cases, where the rotated projection */ + /* is actually latlong. We do not want scaling in that case... */ + if (Q->link->right==PJ_IO_UNITS_RADIANS) + P->right = PJ_IO_UNITS_METERS; + + return P; } diff --git a/src/PJ_pipeline.c b/src/PJ_pipeline.c index 2b012193..af9c5394 100644 --- a/src/PJ_pipeline.c +++ b/src/PJ_pipeline.c @@ -72,7 +72,7 @@ Thomas Knudsen, thokn@sdfe.dk, 2016-05-20 ******************************************************************************** -* Copyright (c) 2016, Thomas Knudsen / SDFE +* Copyright (c) 2016, 2017, 2018 Thomas Knudsen / SDFE * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -96,6 +96,7 @@ Thomas Knudsen, thokn@sdfe.dk, 2016-05-20 #define PJ_LIB__ #include +#include #include "proj_internal.h" #include "projects.h" @@ -107,7 +108,6 @@ PROJ_HEAD(pipeline, "Transformation pipeline manager"); struct pj_opaque { int reversible; int steps; - int verbose; char **argv; char **current_argv; PJ **pipeline; @@ -124,52 +124,6 @@ static LP pipeline_reverse (XY xyz, PJ *P); -/******************************************************************** - - ISOMORPHIC TRANSFORMATIONS - -********************************************************************* - - In this context, an isomorphic transformation is a proj PJ - object returning the same kind of coordinates that it - receives, i.e. a transformation from angular to angular or - linear to linear coordinates. - - The degrees-to-radians operation is an example of the former, - while the latter is typical for most of the datum shift - operations used in geodesy, e.g. the Helmert 7-parameter shift. - - Isomorphic transformations trips up the pj_inv/pj_fwd - functions, which try to check input sanity and scale output to - internal proj units, under the assumption that if input is of - angular type, then output must be of linear (or vice versa). - - Hence, to avoid having pj_inv/pj_fwd stomping on output (or - choking on input), we need a way to tell them that they should - accept whatever is being handed to them. - - The P->left and P->right elements indicate isomorphism. - - For classic proj style projections, P->left has the value - PJ_IO_UNITS_RADIANS, while P->right has the value - PJ_IO_UNITS_CLASSIC, indicating that the forward driver expects - angular input coordinates, and provides linear output coordinates, - scaled by the P->a semimajor axis length. - - Newer projections may set P->left and P->right to either - PJ_IO_UNITS_METERS, PJ_IO_UNITS_RADIANS or PJ_IO_UNITS_ANY, - to indicate their I/O style. - - For the forward driver, left indicates input coordinate - type, while right indicates output coordinate type. - - For the inverse driver, left indicates output coordinate - type, while right indicates input coordinate type. - -*********************************************************************/ - - - static PJ_COORD pipeline_forward_4d (PJ_COORD point, PJ *P) { int i, first_step, last_step; @@ -184,7 +138,6 @@ static PJ_COORD pipeline_forward_4d (PJ_COORD point, PJ *P) { } - static PJ_COORD pipeline_reverse_4d (PJ_COORD point, PJ *P) { int i, first_step, last_step; @@ -198,37 +151,59 @@ static PJ_COORD pipeline_reverse_4d (PJ_COORD point, PJ *P) { } -/* Delegate the work to pipeline_forward_4d() */ + + static XYZ pipeline_forward_3d (LPZ lpz, PJ *P) { PJ_COORD point = {{0,0,0,0}}; + int i; point.lpz = lpz; - point = pipeline_forward_4d (point, P); + + for (i = 1; i <= P->opaque->steps; i++) + point = pj_approx_3D_trans (P->opaque->pipeline[i], 1, point); + return point.xyz; } -/* Delegate the work to pipeline_reverse_4d() */ + static LPZ pipeline_reverse_3d (XYZ xyz, PJ *P) { PJ_COORD point = {{0,0,0,0}}; + int i; point.xyz = xyz; - point = pipeline_reverse_4d (point, P); + + for (i = P->opaque->steps; i > 0 ; i--) + point = pj_approx_3D_trans (P->opaque->pipeline[i], -1, point); + return point.lpz; } + + + static XY pipeline_forward (LP lp, PJ *P) { PJ_COORD point = {{0,0,0,0}}; + int i; point.lp = lp; - point = pipeline_forward_4d (point, P); + + for (i = 1; i <= P->opaque->steps; i++) + point = pj_approx_2D_trans (P->opaque->pipeline[i], 1, point); + return point.xy; } + static LP pipeline_reverse (XY xy, PJ *P) { PJ_COORD point = {{0,0,0,0}}; + int i; point.xy = xy; - point = pipeline_reverse_4d (point, P); + for (i = P->opaque->steps; i > 0 ; i--) + point = pj_approx_2D_trans (P->opaque->pipeline[i], -1, point); + return point.lp; } + + static void *destructor (PJ *P, int errlev) { int i; if (0==P) @@ -240,8 +215,7 @@ static void *destructor (PJ *P, int errlev) { /* Deallocate each pipeine step, then pipeline array */ if (0!=P->opaque->pipeline) for (i = 0; i < P->opaque->steps; i++) - if (0!=P->opaque->pipeline[i+1]) - P->opaque->pipeline[i+1]->destructor (P->opaque->pipeline[i+1], errlev); + proj_destroy (P->opaque->pipeline[i+1]); pj_dealloc (P->opaque->pipeline); pj_dealloc (P->opaque->argv); @@ -264,6 +238,8 @@ static PJ *pj_create_pipeline (PJ *P, size_t steps) { } + + /* count the number of args in pipeline definition */ static size_t argc_params (paralist *params) { size_t argc = 0; @@ -288,6 +264,9 @@ static char **argv_params (paralist *params, size_t argc) { return argv; } + + + /* Being the special operator that the pipeline is, we have to handle the */ /* ellipsoid differently than usual. In general, the pipeline operation does */ /* not need an ellipsoid, but in some cases it is beneficial nonetheless. */ @@ -335,18 +314,29 @@ static void set_ellipsoid(PJ *P) { } + + PJ *OPERATION(pipeline,0) { int i, nsteps = 0, argc; int i_pipeline = -1, i_first_step = -1, i_current_step; char **argv, **current_argv; - P->fwd4d = pipeline_forward_4d; - P->inv4d = pipeline_reverse_4d; + P->fwd4d = pipeline_forward_4d; + P->inv4d = pipeline_reverse_4d; P->fwd3d = pipeline_forward_3d; P->inv3d = pipeline_reverse_3d; P->fwd = pipeline_forward; P->inv = pipeline_reverse; P->destructor = destructor; + P->is_pipeline = 1; + + /* Currently, the pipeline driver is a raw bit mover, enabling other operations */ + /* to collaborate efficiently. All prep/fin stuff is done at the step levels. */ + P->skip_fwd_prepare = 1; + P->skip_fwd_finalize = 1; + P->skip_inv_prepare = 1; + P->skip_inv_finalize = 1; + P->opaque = pj_calloc (1, sizeof(struct pj_opaque)); if (0==P->opaque) @@ -376,7 +366,7 @@ PJ *OPERATION(pipeline,0) { if (0==strcmp ("proj=pipeline", argv[i])) { if (-1 != i_pipeline) { - proj_log_error (P, "Pipeline: Nesting only allowed when child pipelines are wrapped in +init's"); + proj_log_error (P, "Pipeline: Nesting only allowed when child pipelines are wrapped in '+init's"); return destructor (P, PJD_ERR_MALFORMED_PIPELINE); /* ERROR: nested pipelines */ } i_pipeline = i; diff --git a/src/gie.c b/src/gie.c index 8a1d356e..c6440a2d 100644 --- a/src/gie.c +++ b/src/gie.c @@ -184,6 +184,7 @@ typedef struct { int total_ok, total_ko; int grand_ok, grand_ko; size_t operation_lineno; + size_t dimensions_given, dimensions_given_at_last_accept; double tolerance; const char *curr_file; FILE *fout; @@ -581,10 +582,13 @@ Attempt to interpret args as a PJ_COORD. const char *endp, *prev = args; PJ_COORD a = proj_coord (0,0,0,0); - for (i = 0; i < 4; i++) { + for (i = 0, T.dimensions_given = 0; i < 4; i++, T.dimensions_given++) { double d = proj_strtod (prev, (char **) &endp); + + /* Break out if there were no more numerals */ if (prev==endp) return i > 1? a: proj_coord_error (); + a.v[i] = d; prev = endp; } @@ -601,6 +605,7 @@ Read ("ACCEPT") a 2, 3, or 4 dimensional input coordinate. T.a = parse_coord (args); if (T.verbosity > 3) printf ("# %s\n", args); + T.dimensions_given_at_last_accept = T.dimensions_given; return 0; } @@ -693,6 +698,19 @@ static int expect_failure_with_errno_message (int expected, int got) { } +/* For test purposes, we want to call a transformation of the same */ +/* dimensionality as the number of dimensions given in accept */ +static PJ_COORD expect_trans_n_dim (PJ_COORD ci) { + if (4==T.dimensions_given_at_last_accept) + return proj_trans (T.P, T.dir, ci); + + if (3==T.dimensions_given_at_last_accept) + return pj_approx_3D_trans (T.P, T.dir, ci); + + return pj_approx_2D_trans (T.P, T.dir, ci); +} + + /*****************************************************************************/ static int expect (const char *args) { /***************************************************************************** @@ -733,7 +751,7 @@ Tell GIE what to expect, when transforming the ACCEPTed input /* Try to carry out the operation - and expect failure */ ci = proj_angular_input (T.P, T.dir)? torad_coord (T.a): T.a; - co = proj_trans (T.P, T.dir, ci); + co = expect_trans_n_dim (ci); /* Failed to fail? - that's a failure */ if (co.xyz.x!=HUGE_VAL) @@ -775,7 +793,7 @@ Tell GIE what to expect, when transforming the ACCEPTed input printf ("ACCEPTS %.4f %.4f %.4f %.4f\n", ci.v[0],ci.v[1],ci.v[2],ci.v[3]); /* angular output from proj_trans comes in radians */ - co = proj_trans (T.P, T.dir, ci); + co = expect_trans_n_dim (ci); T.b = proj_angular_output (T.P, T.dir)? todeg_coord (co): co; if (T.verbosity > 3) printf ("GOT %.4f %.4f %.4f %.4f\n", ci.v[0],ci.v[1],ci.v[2],ci.v[3]); diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake index 88d88a97..f1337a54 100644 --- a/src/lib_proj.cmake +++ b/src/lib_proj.cmake @@ -185,7 +185,6 @@ SET(SRC_LIBPROJ_CORE pj_errno.c pj_factors.c pj_fwd.c - pj_fwd3d.c pj_gauss.c pj_gc_reader.c pj_geocent.c @@ -196,7 +195,6 @@ SET(SRC_LIBPROJ_CORE pj_init.c pj_initcache.c pj_inv.c - pj_inv3d.c pj_list.c pj_list.h pj_log.c diff --git a/src/makefile.vc b/src/makefile.vc index c9ebd24c..ee89beb3 100644 --- a/src/makefile.vc +++ b/src/makefile.vc @@ -45,7 +45,6 @@ support = \ biveval.obj dmstor.obj mk_cheby.obj pj_auth.obj \ pj_deriv.obj pj_ell_set.obj pj_ellps.obj pj_errno.obj \ pj_factors.obj pj_fwd.obj pj_init.obj pj_inv.obj \ - pj_fwd3d.obj pj_inv3d.obj \ pj_list.obj pj_malloc.obj pj_mlfn.obj pj_msfn.obj \ pj_open_lib.obj pj_param.obj pj_phi2.obj pj_pr_list.obj \ pj_qsfn.obj pj_strerrno.obj pj_tsfn.obj pj_units.obj \ diff --git a/src/pj_fwd.c b/src/pj_fwd.c index e010f6ec..a1025aac 100644 --- a/src/pj_fwd.c +++ b/src/pj_fwd.c @@ -1,58 +1,176 @@ -/* general forward projection */ -#define PJ_LIB__ -#include -#include -# define EPS 1.0e-12 - XY /* forward projection entry */ -pj_fwd(LP lp, PJ *P) { - XY xy; - XY err; - double t; - int last_errno; - - /* cannot const-initialize this due to MSVC's broken (non const) HUGE_VAL */ - err.x = err.y = HUGE_VAL; - - if (0==P->fwd) - return err; - last_errno = proj_errno_reset (P); +/****************************************************************************** + * Project: PROJ.4 + * Purpose: Forward operation invocation + * Author: Thomas Knudsen, thokn@sdfe.dk, 2018-01-02 + * Based on material from Gerald Evenden (original pj_fwd) + * and Piyush Agram (original pj_fwd3d) + * + ****************************************************************************** + * Copyright (c) 2000, Frank Warmerdam + * Copyright (c) 2018, Thomas Knudsen / SDFE + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + *****************************************************************************/ +#include + +#include "proj_internal.h" +#include "projects.h" + +PJ_COORD pj_fwd_prepare (PJ *P, PJ_COORD coo) { + if (HUGE_VAL==coo.v[0]) + return proj_coord_error (); /* Check validity of angular input coordinates */ if (P->left==PJ_IO_UNITS_RADIANS) { + double t; + LP lp = coo.lp; - /* check for forward and latitude or longitude overange */ - t = fabs(lp.phi)-M_HALFPI; - if (t > EPS || fabs(lp.lam) > 10.) { - pj_ctx_set_errno( P->ctx, -14); - return err; + /* check for latitude or longitude over-range */ + t = (lp.phi < 0 ? -lp.phi : lp.phi) - M_HALFPI; + if (t > PJ_EPS_LAT || lp.lam > 10 || lp.lam < -10) { + proj_errno_set (P, PJD_ERR_LAT_OR_LON_EXCEED_LIMIT); + return proj_coord_error (); } /* Clamp latitude to -90..90 degree range */ - if (fabs(t) <= EPS) - lp.phi = lp.phi < 0. ? -M_HALFPI : M_HALFPI; - else if (P->geoc) /* Maybe redundant and never used. */ - lp.phi = atan(P->rone_es * tan(lp.phi)); - lp.lam -= P->lam0; /* compute del lp.lam */ - if (!P->over) - lp.lam = adjlon(lp.lam); /* adjust del longitude */ + if (lp.phi > M_HALFPI) + lp.phi = M_HALFPI; + if (lp.phi < -M_HALFPI) + lp.phi = -M_HALFPI; + + /* If input latitude is geocentrical, convert to geographical */ + if (P->geoc) + coo = proj_geoc_lat (P, PJ_INV, coo); + + /* Distance from central meridian, taking system zero meridian into account */ + lp.lam = (lp.lam - P->from_greenwich) - P->lam0; + + /* Ensure longitude is in the -pi:pi range */ + if (0==P->over) + lp.lam = adjlon(lp.lam); + + coo.lp = lp; } - /* Do the transformation */ - xy = (*P->fwd)(lp, P); - if ( proj_errno (P) ) - return err; + return coo; +} + + +PJ_COORD pj_fwd_finalize (PJ *P, PJ_COORD coo) { /* Classic proj.4 functions return plane coordinates in units of the semimajor axis */ if (P->right==PJ_IO_UNITS_CLASSIC) { - xy.x *= P->a; - xy.y *= P->a; + coo.xy.x *= P->a; + coo.xy.y *= P->a; } /* Handle false eastings/northings and non-metric linear units */ - xy.x = P->fr_meter * (xy.x + P->x0); - xy.y = P->fr_meter * (xy.y + P->y0); - /* z is not scaled since this is handled by vto_meter outside */ + coo.xyz.x = P->fr_meter * (coo.xyz.x + P->x0); + coo.xyz.y = P->fr_meter * (coo.xyz.y + P->y0); + coo.xyz.z = P->vfr_meter * (coo.xyz.z + P->z0); + + return coo; +} + + + +XY pj_fwd(LP lp, PJ *P) { + PJ_COORD coo = {{0,0,0,0}}; + coo.lp = lp; + + if (!P->skip_fwd_prepare) + coo = pj_fwd_prepare (P, coo); + if (HUGE_VAL==coo.v[0]) + return proj_coord_error ().xy; + + /* Do the transformation, using the lowest dimensional transformer available */ + if (P->fwd) + coo.xy = P->fwd(coo.lp, P); + else if (P->fwd3d) + coo.xyz = P->fwd3d (coo.lpz, P); + else if (P->fwd4d) + coo = P->fwd4d (coo, P); + else { + proj_errno_set (P, EINVAL); + return proj_coord_error ().xy; + } + if (HUGE_VAL==coo.v[0]) + return proj_coord_error ().xy; + + if (!P->skip_fwd_finalize) + coo = pj_fwd_finalize (P, coo); + return coo.xy; +} + + + +XYZ pj_fwd3d(LPZ lpz, PJ *P) { + PJ_COORD coo = {{0,0,0,0}}; + coo.lpz = lpz; + + if (!P->skip_fwd_prepare) + coo = pj_fwd_prepare (P, coo); + if (HUGE_VAL==coo.v[0]) + return proj_coord_error ().xyz; + + /* Do the transformation, using the lowest dimensional transformer feasible */ + if (P->fwd3d) + coo.xyz = P->fwd3d(coo.lpz, P); + else if (P->fwd4d) + coo = P->fwd4d (coo, P); + else if (P->fwd) + coo.xy = P->fwd (coo.lp, P); + else { + proj_errno_set (P, EINVAL); + return proj_coord_error ().xyz; + } + if (HUGE_VAL==coo.v[0]) + return proj_coord_error ().xyz; + + if (!P->skip_fwd_finalize) + coo = pj_fwd_finalize (P, coo); + return coo.xyz; +} + + + +PJ_COORD pj_fwd4d (PJ_COORD coo, PJ *P) { + if (!P->skip_fwd_prepare) + coo = pj_fwd_prepare (P, coo); + if (HUGE_VAL==coo.v[0]) + return proj_coord_error (); + + /* Call the highest dimensional converter available */ + if (P->fwd4d) + coo = P->fwd4d (coo, P); + else if (P->fwd3d) + coo.xyz = P->fwd3d (coo.lpz, P); + else if (P->fwd) + coo.xy = P->fwd (coo.lp, P); + else { + proj_errno_set (P, EINVAL); + return proj_coord_error (); + } + if (HUGE_VAL==coo.v[0]) + return proj_coord_error (); - proj_errno_restore (P, last_errno); - return xy; + if (!P->skip_fwd_finalize) + coo = pj_fwd_finalize (P, coo); + return coo; } diff --git a/src/pj_fwd3d.c b/src/pj_fwd3d.c deleted file mode 100644 index d141178f..00000000 --- a/src/pj_fwd3d.c +++ /dev/null @@ -1,61 +0,0 @@ -#define PJ_LIB__ -#include -#include -#include -# define EPS 1.0e-12 - -/* 3D Forward transformation */ - -XYZ pj_fwd3d(LPZ lpz, PJ *P) { - XYZ xyz; - XYZ err; - double t; - int last_errno; - - /* cannot const-initialize this due to MSVC's broken (non const) HUGE_VAL */ - err.x = err.y = err.z = HUGE_VAL; - - if (0==P->fwd3d) - return err; - - last_errno = proj_errno_reset(P); - - /* Check validity of angular input coordinates */ - if (P->left==PJ_IO_UNITS_RADIANS) { - - /* check for forward and latitude or longitude overange */ - t = fabs(lpz.phi)-M_HALFPI; - if (t > EPS || fabs(lpz.lam) > 10.) { - pj_ctx_set_errno( P->ctx, -14); - return err; - } - - /* Clamp latitude to -90..90 degree range */ - if (fabs(t) <= EPS) - lpz.phi = lpz.phi < 0. ? -M_HALFPI : M_HALFPI; - else if (P->geoc) /* Maybe redundant and never used. */ - lpz.phi = atan(P->rone_es * tan(lpz.phi)); - lpz.lam -= P->lam0; /* compute del lp.lam */ - if (!P->over) - lpz.lam = adjlon(lpz.lam); /* adjust del longitude */ - } - - /* Do the transformation */ - xyz = (*P->fwd3d)(lpz, P); - if ( P->ctx->last_errno ) - return err; - - /* Classic proj.4 functions return plane coordinates in units of the semimajor axis */ - if (P->right==PJ_IO_UNITS_CLASSIC) { - xyz.x *= P->a; - xyz.y *= P->a; - } - - /* Handle false eastings/northings and non-metric linear units */ - xyz.x = P->fr_meter * (xyz.x + P->x0); - xyz.y = P->fr_meter * (xyz.y + P->y0); - /* z is not scaled since this is handled by vto_meter outside */ - - proj_errno_restore (P, last_errno); - return xyz; -} diff --git a/src/pj_internal.c b/src/pj_internal.c index 7bfd192b..88fb2b62 100644 --- a/src/pj_internal.c +++ b/src/pj_internal.c @@ -8,7 +8,7 @@ * Author: Thomas Knudsen, thokn@sdfe.dk, 2017-07-05 * ****************************************************************************** - * Copyright (c) 2016, 2017, Thomas Knudsen/SDFE + * Copyright (c) 2016, 2017, 2018, Thomas Knudsen/SDFE * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -28,16 +28,15 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. *****************************************************************************/ -#define PJ_INTERNAL_C -#include "proj_internal.h" -#include "projects.h" -#include - #include #include #include #include +#include +#include "proj_internal.h" +#include "projects.h" + enum pj_io_units pj_left (PJ *P) { enum pj_io_units u = P->inverted? P->right: P->left; @@ -62,32 +61,59 @@ PJ_COORD proj_coord_error (void) { } -PJ_COORD pj_fwd4d (PJ_COORD coo, PJ *P) { - if (0!=P->fwd4d) - return P->fwd4d (coo, P); - if (0!=P->fwd3d) { - coo.xyz = pj_fwd3d (coo.lpz, P); - return coo; - } - if (0!=P->fwd) { - coo.xy = pj_fwd (coo.lp, P); + +/**************************************************************************************/ +PJ_COORD pj_approx_2D_trans (PJ *P, PJ_DIRECTION direction, PJ_COORD coo) { +/*************************************************************************************** +Behave mostly as proj_trans, but attempt to use 2D interfaces only. +Used in gie.c, to enforce testing 2D code, and by PJ_pipeline.c to implement +chained calls starting out with a call to its 2D interface. +***************************************************************************************/ + if (0==P) return coo; + if (P->inverted) + direction = -direction; + switch (direction) { + case PJ_FWD: + coo.xy = pj_fwd (coo.lp, P); + return coo; + case PJ_INV: + coo.lp = pj_inv (coo.xy, P); + return coo; + case PJ_IDENT: + return coo; + default: + break; } proj_errno_set (P, EINVAL); return proj_coord_error (); } -PJ_COORD pj_inv4d (PJ_COORD coo, PJ *P) { - if (0!=P->inv4d) - return P->inv4d (coo, P); - if (0!=P->inv3d) { - coo.lpz = pj_inv3d (coo.xyz, P); - return coo; - } - if (0!=P->inv) { - coo.lp = pj_inv (coo.xy, P); +/**************************************************************************************/ +PJ_COORD pj_approx_3D_trans (PJ *P, PJ_DIRECTION direction, PJ_COORD coo) { +/*************************************************************************************** +Companion to pj_approx_2D_trans. + +Behave mostly as proj_trans, but attempt to use 3D interfaces only. +Used in gie.c, to enforce testing 3D code, and by PJ_pipeline.c to implement +chained calls starting out with a call to its 3D interface. +***************************************************************************************/ + if (0==P) return coo; + if (P->inverted) + direction = -direction; + switch (direction) { + case PJ_FWD: + coo.xyz = pj_fwd3d (coo.lpz, P); + return coo; + case PJ_INV: + coo.lpz = pj_inv3d (coo.xyz, P); + return coo; + case PJ_IDENT: + return coo; + default: + break; } proj_errno_set (P, EINVAL); return proj_coord_error (); @@ -96,7 +122,6 @@ PJ_COORD pj_inv4d (PJ_COORD coo, PJ *P) { - /* Move P to a new context - or to the default context if 0 is specified */ void proj_context_set (PJ *P, PJ_CONTEXT *ctx) { if (0==ctx) @@ -105,6 +130,7 @@ void proj_context_set (PJ *P, PJ_CONTEXT *ctx) { return; } + void proj_context_inherit (PJ *parent, PJ *child) { if (0==parent) pj_set_ctx (child, pj_get_default_ctx()); diff --git a/src/pj_inv.c b/src/pj_inv.c index 68a5595b..e1fb05f6 100644 --- a/src/pj_inv.c +++ b/src/pj_inv.c @@ -1,60 +1,169 @@ -/* general inverse projection */ -#define PJ_LIB__ -#include -#include +/****************************************************************************** + * Project: PROJ.4 + * Purpose: Inverse operation invocation + * Author: Thomas Knudsen, thokn@sdfe.dk, 2018-01-02 + * Based on material from Gerald Evenden (original pj_inv) + * and Piyush Agram (original pj_inv3d) + * + ****************************************************************************** + * Copyright (c) 2000, Frank Warmerdam + * Copyright (c) 2018, Thomas Knudsen / SDFE + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + *****************************************************************************/ #include -# define EPS 1.0e-12 -/* inverse projection entry */ -LP pj_inv(XY xy, PJ *P) { - LP lp; - LP err; - int last_errno; +#include "proj_internal.h" +#include "projects.h" - /* cannot const-initialize this due to MSVC's broken (non const) HUGE_VAL */ - err.lam = err.phi = HUGE_VAL; - if (0==P->inv) - return err; - /* can't do as much preliminary checking as with forward */ - if (xy.x == HUGE_VAL || xy.y == HUGE_VAL) { - pj_ctx_set_errno( P->ctx, -15); - return err; +PJ_COORD pj_inv_prepare (PJ *P, PJ_COORD coo) { + if (coo.xyz.x == HUGE_VAL) { + proj_errno_set (P, PJD_ERR_INVALID_X_OR_Y); + return proj_coord_error (); } - last_errno = proj_errno_reset (P); - /* de-scale and de-offset */ - xy.x = (xy.x * P->to_meter - P->x0); - xy.y = (xy.y * P->to_meter - P->y0); + coo.xyz.x = (coo.xyz.x * P->to_meter - P->x0); + coo.xyz.y = (coo.xyz.y * P->to_meter - P->y0); + coo.xyz.z = (coo.xyz.z * P->vto_meter - P->z0); - /* Classic proj.4 functions expect plane coordinates in units of the semimajor axis */ - /* Multiplying by ra, rather than dividing by a because the CALCOFI projection */ - /* stomps on a and hence depends on this */ + /* Classic proj.4 functions expect plane coordinates in units of the semimajor axis */ + /* Multiplying by ra, rather than dividing by a because the CALCOFI projection */ + /* stomps on a and hence (apparently) depends on this to roundtrip correctly */ + /* (CALCOFI avoids further scaling by stomping - a better solution must be possible) */ if (P->right==PJ_IO_UNITS_CLASSIC) { - xy.x *= P->ra; - xy.y *= P->ra; + coo.xyz.x *= P->ra; + coo.xyz.y *= P->ra; } - /* Do inverse transformation */ - lp = (*P->inv) (xy, P); - if (P->ctx->last_errno) - return err; + return coo; +} + + + +PJ_COORD pj_inv_finalize (PJ *P, PJ_COORD coo) { + if (coo.xyz.x == HUGE_VAL) { + proj_errno_set (P, PJD_ERR_INVALID_X_OR_Y); + return proj_coord_error (); + } if (P->left==PJ_IO_UNITS_RADIANS) { - /* reduce from del lp.lam */ - lp.lam += P->lam0; + /* Distance from central meridian, taking system zero meridian into account */ + coo.lp.lam = coo.lp.lam + P->from_greenwich + P->lam0; /* adjust longitude to central meridian */ - if (!P->over) - lp.lam = adjlon(lp.lam); + if (0==P->over) + coo.lpz.lam = adjlon(coo.lpz.lam); + + /* If input latitude was geocentrical, convert back to geocentrical */ + if (P->geoc) + coo = proj_geoc_lat (P, PJ_FWD, coo); + } + + return coo; +} + + + +LP pj_inv(XY xy, PJ *P) { + PJ_COORD coo = {{0,0,0,0}}; + coo.xy = xy; + + if (!P->skip_inv_prepare) + coo = pj_inv_prepare (P, coo); + if (HUGE_VAL==coo.v[0]) + return proj_coord_error ().lp; + + /* Do the transformation, using the lowest dimensional transformer available */ + if (P->inv) + coo.lp = P->inv(coo.xy, P); + else if (P->inv3d) + coo.lpz = P->inv3d (coo.xyz, P); + else if (P->inv4d) + coo = P->inv4d (coo, P); + else { + proj_errno_set (P, EINVAL); + return proj_coord_error ().lp; + } + if (HUGE_VAL==coo.v[0]) + return proj_coord_error ().lp; + + if (!P->skip_inv_finalize) + coo = pj_inv_finalize (P, coo); + return coo.lp; +} + + + +LPZ pj_inv3d (XYZ xyz, PJ *P) { + PJ_COORD coo = {{0,0,0,0}}; + coo.xyz = xyz; + + if (!P->skip_inv_prepare) + coo = pj_inv_prepare (P, coo); + if (HUGE_VAL==coo.v[0]) + return proj_coord_error ().lpz; + + /* Do the transformation, using the lowest dimensional transformer feasible */ + if (P->inv3d) + coo.lpz = P->inv3d (coo.xyz, P); + else if (P->inv4d) + coo = P->inv4d (coo, P); + else if (P->inv) + coo.lp = P->inv (coo.xy, P); + else { + proj_errno_set (P, EINVAL); + return proj_coord_error ().lpz; + } + if (HUGE_VAL==coo.v[0]) + return proj_coord_error ().lpz; + + if (!P->skip_inv_finalize) + coo = pj_inv_finalize (P, coo); + return coo.lpz; +} + + + +PJ_COORD pj_inv4d (PJ_COORD coo, PJ *P) { + if (!P->skip_inv_prepare) + coo = pj_inv_prepare (P, coo); + if (HUGE_VAL==coo.v[0]) + return proj_coord_error (); - /* This may be redundant and never used */ - if (P->geoc && fabs(fabs(lp.phi)-M_HALFPI) > EPS) - lp.phi = atan(P->one_es * tan(lp.phi)); + /* Call the highest dimensional converter available */ + if (P->inv4d) + coo = P->inv4d (coo, P); + else if (P->inv3d) + coo.lpz = P->inv3d (coo.xyz, P); + else if (P->inv) + coo.lp = P->inv (coo.xy, P); + else { + proj_errno_set (P, EINVAL); + return proj_coord_error (); } + if (HUGE_VAL==coo.v[0]) + return proj_coord_error (); - proj_errno_restore (P, last_errno); - return lp; -} \ No newline at end of file + if (!P->skip_inv_finalize) + coo = pj_inv_finalize (P, coo); + return coo; +} diff --git a/src/pj_inv3d.c b/src/pj_inv3d.c deleted file mode 100644 index 53e39a76..00000000 --- a/src/pj_inv3d.c +++ /dev/null @@ -1,60 +0,0 @@ -#define PJ_LIB__ -#include -#include -#include -# define EPS 1.0e-12 - -/* 3D inverse transformation */ - -LPZ pj_inv3d (XYZ xyz, PJ *P) { - LPZ lpz; - LPZ err; - int last_errno; - - /* cannot const-initialize this due to MSVC's broken (non const) HUGE_VAL */ - err.lam = err.phi = err.z = HUGE_VAL; - - if (0==P->inv3d) - return err; - - /* can't do as much preliminary checking as with forward */ - if (xyz.x == HUGE_VAL || xyz.y == HUGE_VAL || xyz.z == HUGE_VAL ) { - pj_ctx_set_errno( P->ctx, -15); - return err; - } - - last_errno = proj_errno_reset (P); - - /* de-scale and de-offset */ - /* z is not de-scaled since that is handled by vto_meter before we get here */ - xyz.x = (xyz.x * P->to_meter - P->x0); - xyz.y = (xyz.y * P->to_meter - P->y0); - /* Classic proj.4 functions expect plane coordinates in units of the semimajor axis */ - /* Multiplying by ra, rather than dividing by a because the CALCOFI projection */ - /* stomps on a and hence depends on this */ - if (P->right==PJ_IO_UNITS_CLASSIC) { - xyz.x *= P->ra; - xyz.y *= P->ra; - } - - /* Do inverse transformation */ - lpz = (*P->inv3d) (xyz, P); - if (P->ctx->last_errno) - return err; - - if (P->left==PJ_IO_UNITS_RADIANS) { - /* reduce from del lp.lam */ - lpz.lam += P->lam0; - - /* adjust longitude to central meridian */ - if (!P->over) - lpz.lam = adjlon(lpz.lam); - - /* This may be redundant and never used */ - if (P->geoc && fabs(fabs(lpz.phi)-M_HALFPI) > EPS) - lpz.phi = atan(P->one_es * tan(lpz.phi)); - } - - proj_errno_restore (P, last_errno); - return lpz; -} diff --git a/src/pj_transform.c b/src/pj_transform.c index 21861331..c72df2e7 100644 --- a/src/pj_transform.c +++ b/src/pj_transform.c @@ -116,15 +116,6 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset, return err; } -/* -------------------------------------------------------------------- */ -/* Transform Z to meters if it isn't already. */ -/* -------------------------------------------------------------------- */ - if( srcdefn->vto_meter != 1.0 && z != NULL ) - { - for( i = 0; i < point_count; i++ ) - z[point_offset*i] *= srcdefn->vto_meter; - } - /* -------------------------------------------------------------------- */ /* Transform geocentric source coordinates to lat/long. */ /* -------------------------------------------------------------------- */ @@ -145,6 +136,7 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset, { x[point_offset*i] *= srcdefn->to_meter; y[point_offset*i] *= srcdefn->to_meter; + z[point_offset*i] *= srcdefn->to_meter; } } } @@ -253,11 +245,12 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset, } } } + /* -------------------------------------------------------------------- */ /* But if they are already lat long, adjust for the prime */ /* meridian if there is one in effect. */ /* -------------------------------------------------------------------- */ - if( srcdefn->from_greenwich != 0.0 ) + if ((srcdefn->is_geocent || srcdefn->is_latlong) && ( srcdefn->from_greenwich != 0.0 )) { for( i = 0; i < point_count; i++ ) { @@ -308,15 +301,14 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset, /* But if they are staying lat long, adjust for the prime */ /* meridian if there is one in effect. */ /* -------------------------------------------------------------------- */ - if( dstdefn->from_greenwich != 0.0 ) + if ((dstdefn->is_geocent || dstdefn->is_latlong) && ( dstdefn->from_greenwich != 0.0 )) { for( i = 0; i < point_count; i++ ) { if( x[point_offset*i] != HUGE_VAL ) x[point_offset*i] -= dstdefn->from_greenwich; } - } - +} /* -------------------------------------------------------------------- */ /* Transform destination latlong to geocentric if required. */ @@ -340,6 +332,7 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset, { x[point_offset*i] *= dstdefn->fr_meter; y[point_offset*i] *= dstdefn->fr_meter; + z[point_offset*i] *= srcdefn->fr_meter; } } } @@ -453,15 +446,6 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset, } } -/* -------------------------------------------------------------------- */ -/* Transform Z from meters if needed. */ -/* -------------------------------------------------------------------- */ - if( dstdefn->vto_meter != 1.0 && z != NULL ) - { - for( i = 0; i < point_count; i++ ) - z[point_offset*i] *= dstdefn->vfr_meter; - } - /* -------------------------------------------------------------------- */ /* Transform normalized axes into unusual output coordinate axis */ /* orientation if needed. */ diff --git a/src/proj.def b/src/proj.def index 51b79558..f758477d 100644 --- a/src/proj.def +++ b/src/proj.def @@ -151,3 +151,6 @@ EXPORTS pj_calc_ellipsoid_params @135 pj_chomp @136 pj_shrink @137 + + pj_approx_2D_trans @138 + pj_approx_3D_trans @139 diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index a0550727..4a416084 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -132,8 +132,15 @@ double proj_roundtrip (PJ *P, PJ_DIRECTION direction, int n, PJ_COORD *coo) { -/* Apply the transformation P to the coordinate coo */ +/**************************************************************************************/ PJ_COORD proj_trans (PJ *P, PJ_DIRECTION direction, PJ_COORD coo) { +/*************************************************************************************** +Apply the transformation P to the coordinate coo, preferring the 4D interfaces if +available. + +See also pj_approx_2D_trans and pj_approx_3D_trans in pj_internal.c, which work +similarly, but prefers the 2D resp. 3D interfaces if available. +***************************************************************************************/ if (0==P) return coo; if (P->inverted) diff --git a/src/proj_internal.h b/src/proj_internal.h index 13a1cac6..3dd04e62 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -57,6 +57,9 @@ extern "C" { #define PJ_TORAD(deg) ((deg)*M_PI/180.0) #endif +/* Maximum latitudinal overshoot accepted */ +#define PJ_EPS_LAT 1e-12 + /* This enum is also conditionally defined in projects.h - but we need it here */ /* for the pj_left/right prototypes, and enums cannot be forward declared */ @@ -79,6 +82,14 @@ void proj_context_inherit (PJ *parent, PJ *child); PJ_COORD pj_fwd4d (PJ_COORD coo, PJ *P); PJ_COORD pj_inv4d (PJ_COORD coo, PJ *P); +PJ_COORD pj_fwd_prepare (PJ *P, PJ_COORD coo); +PJ_COORD pj_fwd_finalize (PJ *P, PJ_COORD coo); +PJ_COORD pj_inv_prepare (PJ *P, PJ_COORD coo); +PJ_COORD pj_inv_finalize (PJ *P, PJ_COORD coo); +PJ_COORD pj_approx_2D_trans (PJ *P, PJ_DIRECTION direction, PJ_COORD coo); +PJ_COORD pj_approx_3D_trans (PJ *P, PJ_DIRECTION direction, PJ_COORD coo); + + /* Grid functionality */ int proj_vgrid_init(PJ *P, const char *grids); int proj_hgrid_init(PJ *P, const char *grids); diff --git a/src/projects.h b/src/projects.h index 63ea44da..209d6f39 100644 --- a/src/projects.h +++ b/src/projects.h @@ -337,7 +337,12 @@ struct PJconsts { int geoc; /* Geocentric latitude flag */ int is_latlong; /* proj=latlong ... not really a projection at all */ int is_geocent; /* proj=geocent ... not really a projection at all */ + int is_pipeline; /* 1 if PJ represents a pipeline */ int need_ellps; /* 0 for operations that are purely cartesian */ + int skip_fwd_prepare; + int skip_fwd_finalize; + int skip_inv_prepare; + int skip_inv_finalize; enum pj_io_units left; /* Flags for input/output coordinate types */ enum pj_io_units right; @@ -349,7 +354,7 @@ struct PJconsts { **************************************************************************************/ - double lam0, phi0; /* central longitude, latitude */ + double lam0, phi0; /* central meridian, parallel */ double x0, y0, z0, t0; /* false easting and northing (and height and time) */ @@ -590,7 +595,7 @@ extern struct PJ_PRIME_MERIDIANS pj_prime_meridians[]; #ifdef PJ_LIB__ -#define PROJ_HEAD(id, name) static const char des_##id [] = name +#define PROJ_HEAD(name, desc) static const char des_##name [] = desc #define OPERATION(name, NEED_ELLPS) \ \ diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index a9acf4f9..3877b58a 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -509,7 +509,9 @@ Central Conic =============================================================================== ------------------------------------------------------------------------------- -operation +proj=pipeline +step +proj=ccon +lat_1=52 +lat_0=52 +lon_0=19 +a=6390000 +x_0=330000 +y_0=-350000 +step +proj=axisswap +order=1,-2,3,4 +operation +proj=pipeline +R=6390000 + +step +proj=ccon +lat_1=52 +lat_0=52 +lon_0=19 +x_0=330000 +y_0=-350000 + +step +proj=axisswap +order=1,-2 ------------------------------------------------------------------------------- tolerance 0.00010 mm accept 24 55 diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index 2d558f88..099934a7 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -18,13 +18,13 @@ operation +proj=ob_tran +o_proj=moll +R=6378137.0 +o_lon_p=0 +o_lat_p=0 +lo tolerance 1 mm direction inverse -accept 300000 400000 0 0 -expect -42.7562158333 85.5911341667 0 0 +accept 300000 400000 +expect -42.7562158333 85.5911341667 direction forward -accept 10 20 0 0 -expect -1384841.18787 7581707.88240 0 0 +accept 10 20 +expect -1384841.18787 7581707.88240 ------------------------------------------------------------------------------- -- cgit v1.2.3 From a5ea3117194f214434a455aab9566d3f23f65f78 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Thu, 4 Jan 2018 10:43:02 +0100 Subject: Bar step-internal params from influencing pipeline driver init (#729) In cases such as: proj=pipeline step proj=utm zone=32 ellps=GRS80 ... The pj_init code would pick up the ellps information (and other material such as false eastings and northings) from the utm step and place it into the PJ object of the pipeline driver. This is not the intention, and is eliminated in this PR by terminating parameter searching (done by pj_param) once a step parameter is reached. --- src/pj_param.c | 124 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 68 insertions(+), 56 deletions(-) diff --git a/src/pj_param.c b/src/pj_param.c index 5024346d..72175ed9 100644 --- a/src/pj_param.c +++ b/src/pj_param.c @@ -56,6 +56,11 @@ paralist *pj_param_exists (paralist *list, const char *parameter) { Determine whether a given parameter exists in a paralist. If it does, return a pointer to the corresponding list element - otherwise return 0. + In support of the pipeline syntax, the search is terminated once a "+step" list + element is reached, in which case a 0 is returned, unless the parameter + searched for is actually "step", in which case a pointer to the "step" list + element is returned. + This function is equivalent to the pj_param (...) call with the "opt" argument set to the parameter name preceeeded by a 't'. But by using this one, one avoids writing the code allocating memory for a new copy of parameter name, and prepending @@ -69,9 +74,12 @@ paralist *pj_param_exists (paralist *list, const char *parameter) { if (list==0) return 0; - for (next = list; next; next = next->next) + for (next = list; next; next = next->next) { if (0==strncmp (parameter, next->param, len) && (next->param[len]=='=' || next->param[len]==0)) return next; + if (0==strcmp (parameter, "step")) + return 0; + } return 0; } @@ -92,78 +100,82 @@ paralist *pj_param_exists (paralist *list, const char *parameter) { /* `s' - string returned in PROJVALUE.s */ /* `b' - test for t/T/f/F, return in PROJVALUE.i */ /* */ +/* Search is terminated when "step" is found, in which case */ +/* 0 is returned, unless "step" was the target searched for. */ +/* */ /************************************************************************/ - PROJVALUE /* test for presence or get parameter value */ -pj_param(projCtx ctx, paralist *pl, const char *opt) { +PROJVALUE pj_param (projCtx ctx, paralist *pl, const char *opt) { int type; unsigned l; - PROJVALUE value; + PROJVALUE value = {0}; - if( ctx == NULL ) + if ( ctx == NULL ) ctx = pj_get_default_ctx(); type = *opt++; - /* simple linear lookup */ - l = (int)strlen(opt); - while (pl && !(!strncmp(pl->param, opt, l) && - (!pl->param[l] || pl->param[l] == '='))) - pl = pl->next; - if (type == 't') + + if (0==strchr ("tbirds", type)) { + fprintf(stderr, "invalid request to pj_param, fatal\n"); + exit(1); + } + + pl = pj_param_exists (pl, opt); + if (type == 't') { value.i = pl != 0; - else if (pl) { - pl->used |= 1; - opt = pl->param + l; - if (*opt == '=') - ++opt; - switch (type) { - case 'i': /* integer input */ - value.i = atoi(opt); - break; - case 'd': /* simple real input */ - value.f = pj_atof(opt); - break; - case 'r': /* degrees input */ - value.f = dmstor_ctx(ctx, opt, 0); - break; - case 's': /* char string */ - value.s = (char *) opt; - break; - case 'b': /* boolean */ - switch (*opt) { - case 'F': case 'f': - value.i = 0; - break; - case '\0': case 'T': case 't': - value.i = 1; - break; - default: - pj_ctx_set_errno(ctx, -8); - value.i = 0; - break; - } - break; - default: -bum_type: /* note: this is an error in parameter, not a user error */ - fprintf(stderr, "invalid request to pj_param, fatal\n"); - exit(1); - } - } else /* not given */ + return value; + } + + /* Not found */ + if (0==pl) { switch (type) { - case 'b': - case 'i': + case 'b': case 'i': value.i = 0; - break; - case 'd': - case 'r': + return value; + case 'd': case 'r': value.f = 0.; - break; + return value; case 's': value.s = 0; + return value; + } + } + + /* Found parameter - now find its value */ + pl->used |= 1; + l = (int) strlen(opt); + opt = pl->param + l; + if (*opt == '=') + ++opt; + + switch (type) { + case 'i': /* integer input */ + value.i = atoi(opt); + break; + case 'd': /* simple real input */ + value.f = pj_atof(opt); + break; + case 'r': /* degrees input */ + value.f = dmstor_ctx(ctx, opt, 0); + break; + case 's': /* char string */ + value.s = (char *) opt; + break; + case 'b': /* boolean */ + switch (*opt) { + case 'F': case 'f': + value.i = 0; + break; + case '\0': case 'T': case 't': + value.i = 1; break; default: - goto bum_type; + pj_ctx_set_errno (ctx, PJD_ERR_INVALID_BOOLEAN_PARAM); + value.i = 0; + break; } + break; + } return value; } -- cgit v1.2.3 From 81df68d8aa1ad9d9bb50f7266b231ec44cd36885 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Thu, 4 Jan 2018 14:54:41 +0100 Subject: Avoid overwriting time component with zero --- src/PJ_unitconvert.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PJ_unitconvert.c b/src/PJ_unitconvert.c index 106caabf..9cd2acf8 100644 --- a/src/PJ_unitconvert.c +++ b/src/PJ_unitconvert.c @@ -347,7 +347,7 @@ static PJ_COORD forward_4d(PJ_COORD obs, PJ *P) { Forward conversion of time units ************************************************************************/ struct pj_opaque_unitconvert *Q = (struct pj_opaque_unitconvert *) P->opaque; - PJ_COORD out = {{0,0,0,0}}; + PJ_COORD out = obs; /* delegate unit conversion of physical dimensions to the 3D function */ out.xyz = forward_3d(obs.lpz, P); @@ -367,7 +367,7 @@ static PJ_COORD reverse_4d(PJ_COORD obs, PJ *P) { Reverse conversion of time units ************************************************************************/ struct pj_opaque_unitconvert *Q = (struct pj_opaque_unitconvert *) P->opaque; - PJ_COORD out = {{0,0,0,0}}; + PJ_COORD out = obs; /* delegate unit conversion of physical dimensions to the 3D function */ out.lpz = reverse_3d(obs.xyz, P); -- cgit v1.2.3 From 7449edfb10496e2e8d1633d6fe77201787ae7ad8 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Thu, 4 Jan 2018 16:51:30 +0100 Subject: Custom unit factors in unitconvert. Added the possibility to use custom unit factors. Similar to the classic +to_meter parameter the conversion factor is related to meters, i.e. the factor for conversion from kilometers meters is 1000. The custom unit factors is given using the existing xy_in, xy_out, z_in and z_out parameters, for example: proj=unitconvert xy_in=4.5 +xy_out=mm --- src/PJ_unitconvert.c | 85 ++++++++++++++++++++++++++++++------------------ src/gie.c | 42 ++---------------------- test/gie/unitconvert.gie | 28 ++++++++++++++++ 3 files changed, 84 insertions(+), 71 deletions(-) create mode 100644 test/gie/unitconvert.gie diff --git a/src/PJ_unitconvert.c b/src/PJ_unitconvert.c index 9cd2acf8..bf1fcd37 100644 --- a/src/PJ_unitconvert.c +++ b/src/PJ_unitconvert.c @@ -80,6 +80,13 @@ struct TIME_UNITS { char *name; /* comments */ }; +struct pj_opaque_unitconvert { + int t_in_id; /* time unit id for the time input unit */ + int t_out_id; /* time unit id for the time output unit */ + double xy_factor; /* unit conversion factor for horizontal components */ + double z_factor; /* unit conversion factor for vertical components */ +}; + /***********************************************************************/ static int is_leap_year(int year) { @@ -255,7 +262,6 @@ static double mjd_to_yyyymmdd(double mjd) { return year*10000.0 + month*100.0 + day; } - static const struct TIME_UNITS time_units[] = { {"mjd", mjd_to_mjd, mjd_to_mjd, "Modified julian date"}, {"decimalyear", decimalyear_to_mjd, mjd_to_decimalyear, "Decimal year"}, @@ -264,15 +270,6 @@ static const struct TIME_UNITS time_units[] = { {NULL, NULL, NULL, NULL} }; -struct pj_opaque_unitconvert { - int t_in_id; /* time unit id for the time input unit */ - int t_out_id; /* time unit id for the time output unit */ - int xy_in_id; /* unit id for the horizontal input unit */ - int xy_out_id; /* unit id for the horizontal output unit */ - int z_in_id; /* unit id for the vertical input unit */ - int z_out_id; /* unit id for the vertical output unit */ -}; - /***********************************************************************/ static XY forward_2d(LP lp, PJ *P) { @@ -283,8 +280,8 @@ static XY forward_2d(LP lp, PJ *P) { PJ_COORD point = {{0,0,0,0}}; point.lp = lp; - point.xy.x *= pj_units[Q->xy_in_id].factor / pj_units[Q->xy_out_id].factor; - point.xy.y *= pj_units[Q->xy_in_id].factor / pj_units[Q->xy_out_id].factor; + point.xy.x *= Q->xy_factor; + point.xy.y *= Q->xy_factor; return point.xy; } @@ -299,8 +296,8 @@ static LP reverse_2d(XY xy, PJ *P) { PJ_COORD point = {{0,0,0,0}}; point.xy = xy; - point.xy.x *= pj_units[Q->xy_out_id].factor / pj_units[Q->xy_in_id].factor; - point.xy.y *= pj_units[Q->xy_out_id].factor / pj_units[Q->xy_in_id].factor; + point.xy.x /= Q->xy_factor; + point.xy.y /= Q->xy_factor; return point.lp; } @@ -318,7 +315,7 @@ static XYZ forward_3d(LPZ lpz, PJ *P) { /* take care of the horizontal components in the 2D function */ point.xy = forward_2d(point.lp, P); - point.xyz.z *= pj_units[Q->z_in_id].factor / pj_units[Q->z_out_id].factor; + point.xyz.z *= Q->z_factor; return point.xyz; } @@ -335,7 +332,7 @@ static LPZ reverse_3d(XYZ xyz, PJ *P) { /* take care of the horizontal components in the 2D function */ point.lp = reverse_2d(point.xy, P); - point.xyz.z *= pj_units[Q->z_out_id].factor / pj_units[Q->z_in_id].factor; + point.xyz.z /= Q->z_factor; return point.lpz; } @@ -387,6 +384,7 @@ PJ *CONVERSION(unitconvert,0) { struct pj_opaque_unitconvert *Q = pj_calloc (1, sizeof (struct pj_opaque_unitconvert)); char *s, *name; int i; + double f; if (0==Q) return pj_default_destructor (P, ENOMEM); @@ -406,40 +404,63 @@ PJ *CONVERSION(unitconvert,0) { Q->t_in_id = -1; Q->t_out_id = -1; + Q->xy_factor = 1.0; + Q->z_factor = 1.0; + if ((name = pj_param (P->ctx, P->params, "sxy_in").s) != NULL) { for (i = 0; (s = pj_units[i].id) && strcmp(name, s) ; ++i); - if (!s) return pj_default_destructor(P, PJD_ERR_UNKNOW_UNIT_ID); - - Q->xy_in_id = i; - proj_log_debug(P, "xy_in unit: %s", pj_units[i].name); + if (s) { + f = pj_units[i].factor; + proj_log_debug(P, "xy_in unit: %s", pj_units[i].name); + } else { + if ( (f = pj_param (P->ctx, P->params, "dxy_in").f) == 0.0) + return pj_default_destructor(P, PJD_ERR_UNKNOW_UNIT_ID); + } + if (f != 0.0) + Q->xy_factor *= f; } if ((name = pj_param (P->ctx, P->params, "sxy_out").s) != NULL) { for (i = 0; (s = pj_units[i].id) && strcmp(name, s) ; ++i); - if (!s) return pj_default_destructor(P, PJD_ERR_UNKNOW_UNIT_ID); - - Q->xy_out_id = i; - proj_log_debug(P, "xy_out unit: %s", pj_units[i].name); + if (s) { + f = pj_units[i].factor; + proj_log_debug(P, "xy_out unit: %s", pj_units[i].name); + } else { + if ( (f = pj_param (P->ctx, P->params, "dxy_out").f) == 0.0) + return pj_default_destructor(P, PJD_ERR_UNKNOW_UNIT_ID); + } + if (f != 0.0) + Q->xy_factor /= f; } if ((name = pj_param (P->ctx, P->params, "sz_in").s) != NULL) { for (i = 0; (s = pj_units[i].id) && strcmp(name, s) ; ++i); - if (!s) return pj_default_destructor(P, PJD_ERR_UNKNOW_UNIT_ID); /* unknown unit conversion id */ - - Q->z_in_id = i; - proj_log_debug(P, "z_in unit: %s", pj_units[i].name); + if (s) { + f = pj_units[i].factor; + proj_log_debug(P, "z_in unit: %s", pj_units[i].name); + } else { + if ( (f = pj_param (P->ctx, P->params, "dz_in").f) == 0.0) + return pj_default_destructor(P, PJD_ERR_UNKNOW_UNIT_ID); + } + if (f != 0.0) + Q->z_factor *= f; } if ((name = pj_param (P->ctx, P->params, "sz_out").s) != NULL) { for (i = 0; (s = pj_units[i].id) && strcmp(name, s) ; ++i); - if (!s) return pj_default_destructor(P, PJD_ERR_UNKNOW_UNIT_ID); /* unknown unit conversion id */ - - Q->z_out_id = i; - proj_log_debug(P, "z_out unit: %s", pj_units[i].name); + if (s) { + f = pj_units[i].factor; + proj_log_debug(P, "z_out unit: %s", pj_units[i].name); + } else { + if ( (f = pj_param (P->ctx, P->params, "dz_out").f) == 0.0) + return pj_default_destructor(P, PJD_ERR_UNKNOW_UNIT_ID); + } + if (f != 0.0) + Q->z_factor /= f; } diff --git a/src/gie.c b/src/gie.c index c6440a2d..e37acf62 100644 --- a/src/gie.c +++ b/src/gie.c @@ -1850,34 +1850,6 @@ static int test_time(const char* args, double tol, double t_in, double t_exp) { return ret; } -static int test_xyz(const char* args, double tol, PJ_COORD in, PJ_COORD exp) { - PJ_COORD out = {{0,0,0,0}}, obs_in = {{0,0,0,0}}; - PJ *P = proj_create(PJ_DEFAULT_CTX, args); - int ret = 0; - - if (P == 0) - return 5; - - obs_in.xyz = in.xyz; - out = proj_trans(P, PJ_FWD, obs_in); - if (proj_xyz_dist(out.xyz, exp.xyz) > tol) { - printf("exp: %10.10g, %10.10g, %10.10g\n", exp.xyz.x, exp.xyz.y, exp.xyz.z); - printf("out: %10.10g, %10.10g, %10.10g\n", out.xyz.x, out.xyz.y, out.xyz.z); - ret = 1; - } - - out = proj_trans(P, PJ_INV, out); - if (proj_xyz_dist(out.xyz, in.xyz) > tol) { - printf("exp: %g, %g, %g\n", in.xyz.x, in.xyz.y, in.xyz.z); - printf("out: %g, %g, %g\n", out.xyz.x, out.xyz.y, out.xyz.z); - ret += 2; - } - proj_destroy(P); - proj_log_level(NULL, 0); - return ret; -} - - static int pj_unitconvert_selftest (void) { int ret = 0; char args1[] = "+proj=unitconvert +t_in=decimalyear +t_out=decimalyear"; @@ -1892,22 +1864,14 @@ static int pj_unitconvert_selftest (void) { char args4[] = "+proj=unitconvert +t_in=gps_week +t_out=decimalyear"; double in4 = 1877.71428, exp4 = 2016.0; - char args5[] = "+proj=unitconvert +xy_in=m +xy_out=dm +z_in=cm +z_out=mm"; - PJ_COORD in5 = {{55.25, 23.23, 45.5, 0}}, exp5 = {{552.5, 232.3, 455.0, 0}}; - - char args6[] = "+proj=unitconvert +xy_in=m +xy_out=m +z_in=m +z_out=m"; - PJ_COORD in6 = {{12.3, 45.6, 7.89, 0}}; - - char args7[] = "+proj=unitconvert +t_in=yyyymmdd +t_out=yyyymmdd"; - double in7 = 20170131; + char args5[] = "+proj=unitconvert +t_in=yyyymmdd +t_out=yyyymmdd"; + double in5 = 20170131; ret = test_time(args1, 1e-6, in1, in1); if (ret) return ret + 10; ret = test_time(args2, 1e-6, in2, in2); if (ret) return ret + 20; ret = test_time(args3, 1e-6, in3, in3); if (ret) return ret + 30; ret = test_time(args4, 1e-6, in4, exp4); if (ret) return ret + 40; - ret = test_xyz (args5, 1e-10, in5, exp5); if (ret) return ret + 50; - ret = test_xyz (args6, 1e-10, in6, in6); if (ret) return ret + 60; - ret = test_time(args7, 1e-6, in7, in7); if (ret) return ret + 70; + ret = test_time(args5, 1e-6, in5, in5); if (ret) return ret + 50; return 0; diff --git a/test/gie/unitconvert.gie b/test/gie/unitconvert.gie new file mode 100644 index 00000000..30d9dc0b --- /dev/null +++ b/test/gie/unitconvert.gie @@ -0,0 +1,28 @@ +------------------------------------------------------------------------------- + Tests for the unitconvert operation +------------------------------------------------------------------------------- + + + +operation proj=unitconvert xy_in=m xy_out=dm z_in=cm z_out=mm +tolerance 0.1 +accept 55.25 23.23 45.5 +expect 552.5 232.3 455.0 + +operation proj=unitconvert +xy_in=m +xy_out=m +z_in=m +z_out=m +tolerance 0.1 +accept 12.3 45.6 7.89 +expect 12.3 45.6 7.89 + +operation proj=unitconvert xy_in=dm xy_out=dm +tolerance 0.1 +accept 1 1 1 1 +expect 1 1 1 1 + + +operation proj=unitconvert xy_in=2.0 xy_out=4.0 +tolerance 0.1 +accept 1 1 1 1 +expect 0.5 0.5 1 1 + + -- cgit v1.2.3 From 51a2ab2d6706d39c81a1555608ba8954068e2543 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sat, 6 Jan 2018 11:30:27 +0100 Subject: Eliminate potential zero-dereference in get_init. --- src/pj_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pj_init.c b/src/pj_init.c index 310206f7..2cf53e41 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -246,7 +246,8 @@ Expand key from buffer or (if not in buffer) from init file if (0==definition) return 0; init_items = string_to_paralist (ctx, definition); - pj_log (ctx, 3, "get_init: got [%s], paralist[0,1]: [%s,%s]\n", definition, init_items->param, init_items->next? init_items->next->param: "(empty)"); + if (init_items) + pj_log (ctx, 3, "get_init: got [%s], paralist[0,1]: [%s,%s]\n", definition, init_items->param, init_items->next? init_items->next->param: "(empty)"); pj_dealloc (definition); if (0==init_items) return 0; -- cgit v1.2.3 From 81885b034d06191d7e1bc7c96a88dd4ceb37fed4 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sat, 6 Jan 2018 13:17:41 +0100 Subject: Repair ratio numbers for units in pj_init_ctx --- src/pj_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pj_init.c b/src/pj_init.c index 2cf53e41..087a3096 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -691,9 +691,9 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { int ratio = 0; /* ratio number? */ - if (*s == '/') { + if (strlen (s) > 1 && s[0] == '1' && s[1]=='/') { ratio = 1; - s++; + s += 2; } factor = pj_strtod(s, &s); -- cgit v1.2.3 From 42e3c6c2ae465ff3dd7397afe5487513b170e7cf Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sat, 6 Jan 2018 23:09:57 +0100 Subject: Remove superfluous self-assignment in phi12 --- src/PJ_sconics.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/PJ_sconics.c b/src/PJ_sconics.c index 93a2f2f4..b94fca12 100644 --- a/src/PJ_sconics.c +++ b/src/PJ_sconics.c @@ -52,7 +52,6 @@ static int phi12(PJ *P, double *del) { *del = 0.5 * (p2 - p1); P->opaque->sig = 0.5 * (p2 + p1); err = (fabs(*del) < EPS || fabs(P->opaque->sig) < EPS) ? PJD_ERR_ABS_LAT1_EQ_ABS_LAT2 : 0; - *del = *del; } return err; } -- cgit v1.2.3 From 4809a281abca09085cba6494a0da247c03f0a487 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sat, 6 Jan 2018 23:14:29 +0100 Subject: Remove unused typedef from pj_init.c --- src/pj_init.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pj_init.c b/src/pj_init.c index 087a3096..862a6515 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -471,7 +471,6 @@ pj_init(int argc, char **argv) { typedef PJ *(constructor)(PJ *); -typedef constructor *(*function_returning_constructor)(const char *); static constructor *pj_constructor (const char *name) { int i; -- cgit v1.2.3 From 07bb446ec474cf62094070a8ea848b37c911a075 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Mon, 8 Jan 2018 03:41:45 +0100 Subject: Discern between 2D projected and 3D cartesian linear units (#732) --- src/PJ_axisswap.c | 5 ++--- src/PJ_cart.c | 3 +-- src/PJ_deformation.c | 4 ++-- src/PJ_helmert.c | 10 ++++++++-- src/PJ_horner.c | 2 +- src/PJ_ob_tran.c | 2 +- src/PJ_unitconvert.c | 5 ++--- src/pj_internal.c | 12 ++++++------ src/proj_internal.h | 12 +++++++----- src/projects.h | 8 +++++--- 10 files changed, 35 insertions(+), 28 deletions(-) diff --git a/src/PJ_axisswap.c b/src/PJ_axisswap.c index aee3c56e..62a9fba3 100644 --- a/src/PJ_axisswap.c +++ b/src/PJ_axisswap.c @@ -242,10 +242,9 @@ PJ *CONVERSION(axisswap,0) { P->left = PJ_IO_UNITS_RADIANS; P->right = PJ_IO_UNITS_RADIANS; } else { - P->left = PJ_IO_UNITS_METERS; - P->right = PJ_IO_UNITS_METERS; + P->left = PJ_IO_UNITS_PROJECTED; + P->right = PJ_IO_UNITS_PROJECTED; } return P; } - diff --git a/src/PJ_cart.c b/src/PJ_cart.c index 12b5876a..8e11c030 100644 --- a/src/PJ_cart.c +++ b/src/PJ_cart.c @@ -214,7 +214,6 @@ PJ *CONVERSION(cart,1) { P->fwd = cart_forward; P->inv = cart_reverse; P->left = PJ_IO_UNITS_RADIANS; - P->right = PJ_IO_UNITS_METERS; + P->right = PJ_IO_UNITS_CARTESIAN; return P; } - diff --git a/src/PJ_deformation.c b/src/PJ_deformation.c index d227e49f..797af006 100644 --- a/src/PJ_deformation.c +++ b/src/PJ_deformation.c @@ -306,8 +306,8 @@ PJ *TRANSFORMATION(deformation,1) { P->fwd = 0; P->inv = 0; - P->left = PJ_IO_UNITS_METERS; - P->right = PJ_IO_UNITS_METERS; + P->left = PJ_IO_UNITS_CARTESIAN; + P->right = PJ_IO_UNITS_CARTESIAN; P->destructor = destructor; return P; diff --git a/src/PJ_helmert.c b/src/PJ_helmert.c index ca14a5cb..f726d946 100644 --- a/src/PJ_helmert.c +++ b/src/PJ_helmert.c @@ -477,8 +477,14 @@ PJ *TRANSFORMATION(helmert, 0) { P->fwd = helmert_forward; P->inv = helmert_reverse; - P->left = PJ_IO_UNITS_METERS; - P->right = PJ_IO_UNITS_METERS; + /* In most cases, we work on 3D cartesian coordinates */ + P->left = PJ_IO_UNITS_CARTESIAN; + P->right = PJ_IO_UNITS_CARTESIAN; + /* But in the 2D case, the coordinates are projected */ + if (pj_param_exists (P->params, "theta")) { + P->left = PJ_IO_UNITS_PROJECTED; + P->right = PJ_IO_UNITS_PROJECTED; + } /* Translations */ if (pj_param (P->ctx, P->params, "tx").i) diff --git a/src/PJ_horner.c b/src/PJ_horner.c index fe0452d6..d1146aa1 100644 --- a/src/PJ_horner.c +++ b/src/PJ_horner.c @@ -434,7 +434,7 @@ PJ *PROJECTION(horner) { P->inv3d = 0; P->fwd = 0; P->inv = 0; - P->left = P->right = PJ_IO_UNITS_METERS; + P->left = P->right = PJ_IO_UNITS_PROJECTED; P->destructor = horner_freeup; /* Polynomial degree specified? */ diff --git a/src/PJ_ob_tran.c b/src/PJ_ob_tran.c index 43211fe7..debb211c 100644 --- a/src/PJ_ob_tran.c +++ b/src/PJ_ob_tran.c @@ -233,7 +233,7 @@ PJ *PROJECTION(ob_tran) { /* Support some rather speculative test cases, where the rotated projection */ /* is actually latlong. We do not want scaling in that case... */ if (Q->link->right==PJ_IO_UNITS_RADIANS) - P->right = PJ_IO_UNITS_METERS; + P->right = PJ_IO_UNITS_PROJECTED; return P; diff --git a/src/PJ_unitconvert.c b/src/PJ_unitconvert.c index bf1fcd37..06224362 100644 --- a/src/PJ_unitconvert.c +++ b/src/PJ_unitconvert.c @@ -397,8 +397,8 @@ PJ *CONVERSION(unitconvert,0) { P->fwd = forward_2d; P->inv = reverse_2d; - P->left = PJ_IO_UNITS_METERS; - P->right = PJ_IO_UNITS_METERS; + P->left = PJ_IO_UNITS_WHATEVER; + P->right = PJ_IO_UNITS_WHATEVER; /* if no time input/output unit is specified we can skip them */ Q->t_in_id = -1; @@ -485,4 +485,3 @@ PJ *CONVERSION(unitconvert,0) { return P; } - diff --git a/src/pj_internal.c b/src/pj_internal.c index 88fb2b62..deb0c054 100644 --- a/src/pj_internal.c +++ b/src/pj_internal.c @@ -40,16 +40,16 @@ enum pj_io_units pj_left (PJ *P) { enum pj_io_units u = P->inverted? P->right: P->left; - if (u==PJ_IO_UNITS_RADIANS) - return PJ_IO_UNITS_RADIANS; - return PJ_IO_UNITS_METERS; + if (u==PJ_IO_UNITS_CLASSIC) + return PJ_IO_UNITS_PROJECTED; + return u; } enum pj_io_units pj_right (PJ *P) { enum pj_io_units u = P->inverted? P->left: P->right; - if (u==PJ_IO_UNITS_RADIANS) - return PJ_IO_UNITS_RADIANS; - return PJ_IO_UNITS_METERS; + if (u==PJ_IO_UNITS_CLASSIC) + return PJ_IO_UNITS_PROJECTED; + return u; } diff --git a/src/proj_internal.h b/src/proj_internal.h index 3dd04e62..41f95c07 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -61,12 +61,14 @@ extern "C" { #define PJ_EPS_LAT 1e-12 -/* This enum is also conditionally defined in projects.h - but we need it here */ -/* for the pj_left/right prototypes, and enums cannot be forward declared */ +/* This enum is also conditionally defined in projects.h - but enums cannot */ +/* be forward declared and we need it here for the pj_left/right prototypes */ enum pj_io_units { - PJ_IO_UNITS_CLASSIC = 0, /* Scaled meters (right) */ - PJ_IO_UNITS_METERS = 1, /* Meters */ - PJ_IO_UNITS_RADIANS = 2 /* Radians */ + PJ_IO_UNITS_WHATEVER = 0, /* Doesn't matter (or depends on pipeline neighbours) */ + PJ_IO_UNITS_CLASSIC = 1, /* Scaled meters (right), projected system */ + PJ_IO_UNITS_PROJECTED = 2, /* Meters, projected system */ + PJ_IO_UNITS_CARTESIAN = 3, /* Meters, 3D cartesian system */ + PJ_IO_UNITS_RADIANS = 4 /* Radians */ }; enum pj_io_units pj_left (PJ *P); enum pj_io_units pj_right (PJ *P); diff --git a/src/projects.h b/src/projects.h index 209d6f39..86ca2524 100644 --- a/src/projects.h +++ b/src/projects.h @@ -192,9 +192,11 @@ typedef struct PJ_REGION_S PJ_Region; typedef struct ARG_list paralist; /* parameter list */ #ifndef PROJ_INTERNAL_H enum pj_io_units { - PJ_IO_UNITS_CLASSIC = 0, /* Scaled meters (right) */ - PJ_IO_UNITS_METERS = 1, /* Meters */ - PJ_IO_UNITS_RADIANS = 2 /* Radians */ + PJ_IO_UNITS_WHATEVER = 0, /* Doesn't matter (or depends on pipeline neighbours) */ + PJ_IO_UNITS_CLASSIC = 1, /* Scaled meters (right), projected system */ + PJ_IO_UNITS_PROJECTED = 2, /* Meters, projected system */ + PJ_IO_UNITS_CARTESIAN = 3, /* Meters, 3D cartesian system */ + PJ_IO_UNITS_RADIANS = 4 /* Radians */ }; #endif #ifndef PROJ_H -- cgit v1.2.3 From 47953f0a93cd90d0d52b74f2b2705516f018b2f1 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Mon, 8 Jan 2018 11:54:54 +0100 Subject: Allow usage of classic +axis parameter in axisswap. Instead of +order the classic PROJ.4 parameter +axis can used instead. This is mostly an inititive to simplify backwars compatibility in the 4D API. P->axis is initialized in pj_init() it can be assumed that it is set up correctly. +order and +axis are mutually exclusive. --- src/PJ_axisswap.c | 97 +++++++++++++++++++++++++++++++++------------------ test/gie/axisswap.gie | 27 ++++++++++++++ 2 files changed, 90 insertions(+), 34 deletions(-) diff --git a/src/PJ_axisswap.c b/src/PJ_axisswap.c index 62a9fba3..bb22f41e 100644 --- a/src/PJ_axisswap.c +++ b/src/PJ_axisswap.c @@ -159,53 +159,70 @@ static PJ_COORD reverse_4d(PJ_COORD coo, PJ *P) { PJ *CONVERSION(axisswap,0) { /***********************************************************************/ struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque)); - char *order, *s; - unsigned int i, j, n; + char *s; + unsigned int i, j, n = 0; if (0==Q) return pj_default_destructor (P, ENOMEM); P->opaque = (void *) Q; - /* read axis order */ - if (pj_param (P->ctx, P->params, "torder").i) { - order = pj_param(P->ctx, P->params, "sorder").s; - } else { - return pj_default_destructor(P, PJD_ERR_MISSING_ARGS); - } - - /* Preparation and finalization steps are skipped, since the raison */ - /* d'etre of axisswap is to bring input coordinates in line with the */ - /* the internally expected order (ENU), such that handling of offsets */ - /* etc. can be done correctly in a later step of a pipeline */ - P->skip_fwd_prepare = 1; - P->skip_fwd_finalize = 1; - P->skip_inv_prepare = 1; - P->skip_inv_finalize = 1; + /* +order and +axis are mutually exclusive */ + if ( !pj_param_exists(P->params, "order") == !pj_param_exists(P->params, "axis") ) + return pj_default_destructor(P, PJD_ERR_AXIS); /* fill axis list with indices from 4-7 to simplify duplicate search further down */ - for (i=0; i<4; i++) + for (i=0; i<4; i++) { Q->axis[i] = i+4; + Q->sign[i] = 1; + } + + /* if the "order" parameter is used */ + if ( pj_param_exists(P->params, "order") ) { + /* read axis order */ + char *order = pj_param(P->ctx, P->params, "sorder").s; + + /* check that all characters are valid */ + for (i=0; iaxis[n] = abs(atoi(s))-1; + Q->sign[n++] = sign(atoi(s)); + while ( *s != '\0' && *s != ',' ) + s++; + if ( *s == ',' ) + s++; } + } - /* read axes numbers and signs */ - for ( s = order, n = 0; *s != '\0' && n < 4; ) { - Q->axis[n] = abs(atoi(s))-1; - if (Q->axis[n] >= 4) { - proj_log_error(P, "swapaxis: invalid axis '%s'", s); - return pj_default_destructor(P, PJD_ERR_AXIS); + /* if the "axis" parameter is used */ + if ( pj_param_exists(P->params, "axis") ) { + /* parse the classic PROJ.4 enu axis specification */ + for (i=0; i < 3; i++) { + switch(P->axis[i]) { + case 'w': + Q->sign[i] = -1; + case 'e': + Q->axis[i] = 0; + break; + case 's': + Q->sign[i] = -1; + case 'n': + Q->axis[i] = 1; + break; + case 'd': + Q->sign[i] = -1; + case 'u': + Q->axis[i] = 2; + break; + } } - Q->sign[n++] = sign(atoi(s)); - while ( *s != '\0' && *s != ',' ) - s++; - if ( *s == ',' ) - s++; + n = 3; } /* check for duplicate axes */ @@ -219,6 +236,7 @@ PJ *CONVERSION(axisswap,0) { } } + /* only map fwd/inv functions that are possible with the given axis setup */ if (n == 4) { P->fwd4d = forward_4d; @@ -233,6 +251,7 @@ PJ *CONVERSION(axisswap,0) { P->inv = reverse_2d; } + if (P->fwd4d == NULL && P->fwd3d == NULL && P->fwd == NULL) { proj_log_error(P, "swapaxis: bad axis order"); return pj_default_destructor(P, PJD_ERR_AXIS); @@ -246,5 +265,15 @@ PJ *CONVERSION(axisswap,0) { P->right = PJ_IO_UNITS_PROJECTED; } + + /* Preparation and finalization steps are skipped, since the raison */ + /* d'etre of axisswap is to bring input coordinates in line with the */ + /* the internally expected order (ENU), such that handling of offsets */ + /* etc. can be done correctly in a later step of a pipeline */ + P->skip_fwd_prepare = 1; + P->skip_fwd_finalize = 1; + P->skip_inv_prepare = 1; + P->skip_inv_finalize = 1; + return P; } diff --git a/test/gie/axisswap.gie b/test/gie/axisswap.gie index 7f0c366c..ac148a92 100644 --- a/test/gie/axisswap.gie +++ b/test/gie/axisswap.gie @@ -52,6 +52,15 @@ accept 1 2 3 4 expect 3 -2 1 4 roundtrip 100 +operation proj=axisswap axis=neu +tolerance 0.000001 m +accept 1 2 3 4 +expect 2 1 3 4 + +operation proj=axisswap axis=swd +tolerance 0.000001 m +accept 1 2 3 4 +expect -2 -1 -3 4 operation proj=pipeline step proj=latlong @@ -73,4 +82,22 @@ tolerance 0.00001 m accept 12 55 0 0 expect -55 -12 0 0 +operation proj=axisswap order=1,2,3,4 axis=enu +expect failure pjd_err_axis + +operation proj=axisswap +expect failure pjd_err_axis + +operation proj=axisswap order=1,2,1,4 +expect failure pjd_err_axis + +operation proj=axisswap order=2,3 +expect failure pjd_err_axis + +operation proj=axisswap order=2,3,4 +expect failure pjd_err_axis + +operation proj=axisswap order=1,2,3,5 +expect failure pjd_err_axis + -- cgit v1.2.3 From f7a1fe14454b091eecb5fd3e33ff73796a726da1 Mon Sep 17 00:00:00 2001 From: Aaron Puchert Date: Tue, 9 Jan 2018 20:32:08 +0100 Subject: Remove or use unused macros Some macros seemed to be leftover from earlier code, so I removed them. Others seemed like they should have been used, but weren't. There should be no functional change, except the following: in floating- point arithmetic, x / y is not the same as x * (1.0 / y). It can be argued that using the multiplication is significantly faster, and the algorithm is approximative anyway. Otherwise, the constants are obviously not required. Also fixes one location in PJ_aitoff.c, where an enumeration value should have been used. --- src/PJ_aitoff.c | 2 +- src/PJ_boggs.c | 1 - src/PJ_cass.c | 1 - src/PJ_eck4.c | 4 ++-- src/PJ_isea.c | 10 +--------- src/PJ_laea.c | 2 -- src/PJ_sterea.c | 2 -- src/PJ_vandg.c | 1 - src/aasincos.c | 1 - src/gen_cheb.c | 4 ++-- src/gie.c | 3 --- src/proj_etmerc.c | 1 - src/proj_mdist.c | 2 +- 13 files changed, 7 insertions(+), 27 deletions(-) diff --git a/src/PJ_aitoff.c b/src/PJ_aitoff.c index 8927d39c..c4a5abdc 100644 --- a/src/PJ_aitoff.c +++ b/src/PJ_aitoff.c @@ -141,7 +141,7 @@ static LP s_inverse (XY xy, PJ *P) { /* Spheroidal, inverse */ y *= D * sin(lp.phi); } else x = y = 0.; - if (Q->mode) { /* Winkel Tripel */ + if (Q->mode == WINKEL_TRIPEL) { x = (x + lp.lam * Q->cosphi1) * 0.5; y = (y + lp.phi) * 0.5; } diff --git a/src/PJ_boggs.c b/src/PJ_boggs.c index fe17eaa6..93de0679 100644 --- a/src/PJ_boggs.c +++ b/src/PJ_boggs.c @@ -4,7 +4,6 @@ PROJ_HEAD(boggs, "Boggs Eumorphic") "\n\tPCyl., no inv., Sph."; # define NITER 20 # define EPS 1e-7 -# define ONETOL 1.000001 # define FXC 2.00276 # define FXC2 1.11072 # define FYC 0.49931 diff --git a/src/PJ_cass.c b/src/PJ_cass.c index ddb3eaf3..acf779a1 100644 --- a/src/PJ_cass.c +++ b/src/PJ_cass.c @@ -4,7 +4,6 @@ PROJ_HEAD(cass, "Cassini") "\n\tCyl, Sph&Ell"; -# define EPS10 1e-10 # define C1 .16666666666666666666 # define C2 .00833333333333333333 # define C3 .04166666666666666666 diff --git a/src/PJ_eck4.c b/src/PJ_eck4.c index c3e1b677..a95c10b5 100644 --- a/src/PJ_eck4.c +++ b/src/PJ_eck4.c @@ -44,9 +44,9 @@ static LP s_inverse (XY xy, PJ *P) { /* Spheroidal, inverse */ LP lp = {0.0,0.0}; double c; - lp.phi = aasin(P->ctx,xy.y / C_y); + lp.phi = aasin(P->ctx,xy.y * RC_y); lp.lam = xy.x / (C_x * (1. + (c = cos(lp.phi)))); - lp.phi = aasin(P->ctx,(lp.phi + sin(lp.phi) * (c + 2.)) / C_p); + lp.phi = aasin(P->ctx,(lp.phi + sin(lp.phi) * (c + 2.)) * RC_p); return lp; } diff --git a/src/PJ_isea.c b/src/PJ_isea.c index 9baea8b5..5cc71c08 100644 --- a/src/PJ_isea.c +++ b/src/PJ_isea.c @@ -170,10 +170,6 @@ struct snyder_constants constants[] = { {37.37736814, 36.0, 30.0, 17.27, 1.163, 0.860, 13.14, 1.584, 1.0}, }; -#define E 52.62263186 -#define F 10.81231696 - -#define DEG60 1.04719755119659774614 #define DEG120 2.09439510239319549229 #define DEG72 1.25663706143591729537 #define DEG90 1.57079632679489661922 @@ -266,14 +262,12 @@ az_adjustment(int triangle) /* H = 0.25 R tan g = */ #define TABLE_H 0.1909830056 -#define RPRIME 0.91038328153090290025 - ISEA_STATIC struct isea_pt isea_triangle_xy(int triangle) { struct isea_pt c; - double Rprime = 0.91038328153090290025; + const double Rprime = 0.91038328153090290025; triangle = (triangle - 1) % 20; @@ -509,8 +503,6 @@ isea_snyder_forward(struct isea_geo * ll, struct isea_pt * out) * in original coordinate system, this function return the new coordinates. */ -#define PRECISION 0.0000000000005 - /* formula from Snyder, Map Projections: A working manual, p31 */ /* * old north pole at np in new coordinates diff --git a/src/PJ_laea.c b/src/PJ_laea.c index 82a341d8..9edd5558 100644 --- a/src/PJ_laea.c +++ b/src/PJ_laea.c @@ -26,8 +26,6 @@ struct pj_opaque { }; #define EPS10 1.e-10 -#define NITER 20 -#define CONV 1.e-10 static XY e_forward (LP lp, PJ *P) { /* Ellipsoidal, forward */ XY xy = {0.0,0.0}; diff --git a/src/PJ_sterea.c b/src/PJ_sterea.c index 38b26117..b1cb736a 100644 --- a/src/PJ_sterea.c +++ b/src/PJ_sterea.c @@ -37,8 +37,6 @@ struct pj_opaque { PROJ_HEAD(sterea, "Oblique Stereographic Alternative") "\n\tAzimuthal, Sph&Ell"; -# define DEL_TOL 1.e-14 -# define MAX_ITER 10 diff --git a/src/PJ_vandg.c b/src/PJ_vandg.c index b6b84bd0..d4ed7b8a 100644 --- a/src/PJ_vandg.c +++ b/src/PJ_vandg.c @@ -6,7 +6,6 @@ PROJ_HEAD(vandg, "van der Grinten (I)") "\n\tMisc Sph"; # define TOL 1.e-10 # define THIRD .33333333333333333333 -# define TWO_THRD .66666666666666666666 # define C2_27 .07407407407407407407 # define PI4_3 4.18879020478639098458 # define PISQ 9.86960440108935861869 diff --git a/src/aasincos.c b/src/aasincos.c index 7cb6bd89..7d49ac1a 100644 --- a/src/aasincos.c +++ b/src/aasincos.c @@ -1,7 +1,6 @@ /* arc sin, cosine, tan2 and sqrt that will NOT fail */ #include #define ONE_TOL 1.00000000000001 -#define TOL 0.000000001 #define ATOL 1e-50 double diff --git a/src/gen_cheb.c b/src/gen_cheb.c index 9b2d8cb3..351d9604 100644 --- a/src/gen_cheb.c +++ b/src/gen_cheb.c @@ -6,7 +6,7 @@ #include #include "emess.h" #ifndef COEF_LINE_MAX -#define COEF_LINE_MAX 60 +#define COEF_LINE_MAX 50 #endif /* FIXME: put the declaration in a header. Also used in proj.c */ @@ -43,7 +43,7 @@ void gen_cheb(int inverse, projUV (*proj)(projUV), char *s, PJ *P, if (*arg != '+') { if (!n) { putchar('#'); ++n; } (void)printf(" %s%n",arg, &L); - if ((n += L) > 50) { putchar('\n'); n = 0; } + if ((n += L) > COEF_LINE_MAX) { putchar('\n'); n = 0; } } } if (n) putchar('\n'); diff --git a/src/gie.c b/src/gie.c index e37acf62..e0045ebd 100644 --- a/src/gie.c +++ b/src/gie.c @@ -198,9 +198,6 @@ static gie_ctx T; static const char delim[] = {"-------------------------------------------------------------------------------\n"}; -#define CMDLEN 250000 - - static const char usage[] = { "--------------------------------------------------------------------------------\n" "Usage: %s [-options]... infile...\n" diff --git a/src/proj_etmerc.c b/src/proj_etmerc.c index b03862f8..67da4981 100644 --- a/src/proj_etmerc.c +++ b/src/proj_etmerc.c @@ -39,7 +39,6 @@ */ -#define PROJ_LIB__ #define PJ_LIB__ #include diff --git a/src/proj_mdist.c b/src/proj_mdist.c index 5f7458b5..24957895 100644 --- a/src/proj_mdist.c +++ b/src/proj_mdist.c @@ -27,7 +27,7 @@ ** and inverse on unit ellipsoid. ** Precision commensurate with double precision. */ -#define PROJ_LIB__ +#define PJ_LIB__ #include #define MAX_ITER 20 #define TOL 1e-14 -- cgit v1.2.3 From a053ad0e9172badb14828ab5fe6fc807b686090b Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Tue, 24 Oct 2017 08:53:44 +0200 Subject: Added json to gie conversion script --- test/gigs/convert_to_gie.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 test/gigs/convert_to_gie.py diff --git a/test/gigs/convert_to_gie.py b/test/gigs/convert_to_gie.py new file mode 100644 index 00000000..2b80aaa3 --- /dev/null +++ b/test/gigs/convert_to_gie.py @@ -0,0 +1,44 @@ +import sys +import json + + +with open(sys.argv[1]) as f: + data = json.load(f) + +coords = data['coordinates'] +tests = data['tests'] +crss = data['projections'] + +if len(coords[0]) == 3: + tolerance_index = 0 +else: + tolerance_index = 1 + +filename = sys.argv[1].replace('json', 'gie') +with open(filename, 'w') as f: + f.write('-'*80 + '\n\n') + f.write('{descr}\n\n'.format(descr=data['description'])) + f.write('-'*80 + '\n\n') + f.write('\n\n'); + for test in tests: + f.write('-'*80 + '\n') + f.write('operation +proj=pipeline\n') + f.write(' +step {src} +inv\n'.format(src=crss[0])) + f.write(' +step {dst}\n'.format(dst=crss[1])) + f.write('-'*80 + '\n') + + if test['type'] == 'conversion': + write_coords(f, coords, 'fwd', test) + + f.write('-'*80 + '\n') + f.write('operation +proj=pipeline\n') + f.write(' +step {src} +inv\n'.format(src=crss[1])) + f.write(' +step {dst}\n'.format(dst=crss[0])) + f.write('-'*80 + '\n') + + write_coords(f, coords, 'inv', test) + + if test['type'] == 'roundtrip': + write_coords(f, coords, 'roundtrip', test) + + f.write('\n') -- cgit v1.2.3 From 1bd5c06781cc6be5b8de512a807b6f2774ae8df7 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Mon, 11 Dec 2017 19:03:34 +0100 Subject: Add gie tests to CMake testing facility --- CMakeLists.txt | 1 + cmake/Proj4Test.cmake | 25 +++++++++++++++++++------ test/CMakeLists.txt | 9 +++++++++ 3 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 test/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 88f2b594..6f998011 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,4 +149,5 @@ add_subdirectory(nad) add_subdirectory(src) add_subdirectory(man) add_subdirectory(cmake) +add_subdirectory(test) diff --git a/cmake/Proj4Test.cmake b/cmake/Proj4Test.cmake index a289f0c5..ec56afd2 100644 --- a/cmake/Proj4Test.cmake +++ b/cmake/Proj4Test.cmake @@ -5,7 +5,7 @@ function(proj_add_test_script_sh SH_NAME BIN_USE) if(UNIX) get_filename_component(testname ${SH_NAME} NAME_WE) - + set(TEST_OK 1) if(ARGV2) set(TEST_OK 0) @@ -14,19 +14,32 @@ function(proj_add_test_script_sh SH_NAME BIN_USE) set(TEST_OK 1) endif(EXISTS ${GRID_FULLNAME}) endif(ARGV2) - + if( CMAKE_VERSION VERSION_LESS 2.8.4 ) set(TEST_OK 0) message(STATUS "test with bash script need a cmake version >= 2.8.4") endif() - + if(${TEST_OK}) add_test( NAME "${testname}" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/nad - COMMAND ${PROJECT_SOURCE_DIR}/nad/${SH_NAME} - ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${${BIN_USE}} + COMMAND ${PROJECT_SOURCE_DIR}/nad/${SH_NAME} + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${${BIN_USE}} ) endif(${TEST_OK}) - + endif(UNIX) endfunction() + + +function(proj_add_gie_test TESTNAME TESTCASE) + + set(GIE_BIN "gie") + set(TESTFILE ${CMAKE_SOURCE_DIR}/test/${TESTCASE}) + add_test( NAME ${TESTNAME} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test + COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${GIE_BIN} + ${TESTFILE} + ) + +endfunction() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 00000000..4fe1d5ad --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,9 @@ +set(GIE_BIN "gie") + +# Regression tests +proj_add_gie_test("Builtins" "gie/builtins.gie") +proj_add_gie_test("Builtins2" "gie/more_builtins.gie") +proj_add_gie_test("Axisswap" "gie/axisswap.gie") +proj_add_gie_test("Deformation" "gie/deformation.gie") +proj_add_gie_test("Ellipsoid" "gie/ellipsoid.gie") +proj_add_gie_test("GDA" "gie/GDA.gie") -- cgit v1.2.3 From 4cf424f18a99be6bbce979fd17027f0ebdd934a6 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Mon, 11 Dec 2017 19:17:36 +0100 Subject: Convert GIGS tests to gie format and add to CMake tests --- test/CMakeLists.txt | 31 ++ test/gigs/5101.1-jhs.gie | 732 ++++++++++++++++++++++++++++++++++++++++ test/gigs/5101.2-jhs.gie | 300 ++++++++++++++++ test/gigs/5101.3-jhs.gie | 300 ++++++++++++++++ test/gigs/5101.4-jhs-etmerc.gie | 300 ++++++++++++++++ test/gigs/5101.4-jhs.gie | 300 ++++++++++++++++ test/gigs/5102.1.gie | 252 ++++++++++++++ test/gigs/5102.2.gie | 252 ++++++++++++++ test/gigs/5103.1.gie | 264 +++++++++++++++ test/gigs/5103.2.gie | 144 ++++++++ test/gigs/5103.3.gie | 144 ++++++++ test/gigs/5104.gie | 264 +++++++++++++++ test/gigs/5105.1.gie | 300 ++++++++++++++++ test/gigs/5105.2.gie | 168 +++++++++ test/gigs/5106.gie | 300 ++++++++++++++++ test/gigs/5107.gie | 180 ++++++++++ test/gigs/5108.gie | 228 +++++++++++++ test/gigs/5109.gie | 180 ++++++++++ test/gigs/5110.gie | 156 +++++++++ test/gigs/5111.1.gie | 444 ++++++++++++++++++++++++ test/gigs/5111.2.gie | 444 ++++++++++++++++++++++++ test/gigs/5112.gie | 84 +++++ test/gigs/5113.gie | 84 +++++ test/gigs/5201.gie | 348 +++++++++++++++++++ test/gigs/5203.1.gie | 192 +++++++++++ test/gigs/5204.1.gie | 192 +++++++++++ test/gigs/5205.1.gie | 192 +++++++++++ test/gigs/5206.gie | 540 +++++++++++++++++++++++++++++ test/gigs/5207.1.gie | 252 ++++++++++++++ test/gigs/5207.2.gie | 456 +++++++++++++++++++++++++ test/gigs/5208.gie | 192 +++++++++++ test/gigs/convert_to_gie.py | 31 +- 32 files changed, 8243 insertions(+), 3 deletions(-) create mode 100644 test/gigs/5101.1-jhs.gie create mode 100644 test/gigs/5101.2-jhs.gie create mode 100644 test/gigs/5101.3-jhs.gie create mode 100644 test/gigs/5101.4-jhs-etmerc.gie create mode 100644 test/gigs/5101.4-jhs.gie create mode 100644 test/gigs/5102.1.gie create mode 100644 test/gigs/5102.2.gie create mode 100644 test/gigs/5103.1.gie create mode 100644 test/gigs/5103.2.gie create mode 100644 test/gigs/5103.3.gie create mode 100644 test/gigs/5104.gie create mode 100644 test/gigs/5105.1.gie create mode 100644 test/gigs/5105.2.gie create mode 100644 test/gigs/5106.gie create mode 100644 test/gigs/5107.gie create mode 100644 test/gigs/5108.gie create mode 100644 test/gigs/5109.gie create mode 100644 test/gigs/5110.gie create mode 100644 test/gigs/5111.1.gie create mode 100644 test/gigs/5111.2.gie create mode 100644 test/gigs/5112.gie create mode 100644 test/gigs/5113.gie create mode 100644 test/gigs/5201.gie create mode 100644 test/gigs/5203.1.gie create mode 100644 test/gigs/5204.1.gie create mode 100644 test/gigs/5205.1.gie create mode 100644 test/gigs/5206.gie create mode 100644 test/gigs/5207.1.gie create mode 100644 test/gigs/5207.2.gie create mode 100644 test/gigs/5208.gie diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4fe1d5ad..a91492da 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -7,3 +7,34 @@ proj_add_gie_test("Axisswap" "gie/axisswap.gie") proj_add_gie_test("Deformation" "gie/deformation.gie") proj_add_gie_test("Ellipsoid" "gie/ellipsoid.gie") proj_add_gie_test("GDA" "gie/GDA.gie") + +proj_add_gie_test("GIGS-5101.1-jhs" "gigs/5101.1-jhs.gie") +proj_add_gie_test("GIGS-5101.2-jhs" "gigs/5101.2-jhs.gie") +proj_add_gie_test("GIGS-5101.3-jhs" "gigs/5101.3-jhs.gie") +proj_add_gie_test("GIGS-5101.4-jhs-etmerc" "gigs/5101.4-jhs-etmerc.gie") +#proj_add_gie_test("GIGS-5101.4-jhs" "gigs/5101.4-jhs.gie") +proj_add_gie_test("GIGS-5102.1" "gigs/5102.1.gie") +#proj_add_gie_test("GIGS-5102.2" "gigs/5102.2.gie") +proj_add_gie_test("GIGS-5103.1" "gigs/5103.1.gie") +proj_add_gie_test("GIGS-5103.2" "gigs/5103.2.gie") +proj_add_gie_test("GIGS-5103.3" "gigs/5103.3.gie") +proj_add_gie_test("GIGS-5104" "gigs/5104.gie") +#proj_add_gie_test("GIGS-5105.1" "gigs/5105.1.gie") +proj_add_gie_test("GIGS-5105.2" "gigs/5105.2.gie") +proj_add_gie_test("GIGS-5106" "gigs/5106.gie") +proj_add_gie_test("GIGS-5107" "gigs/5107.gie") +#proj_add_gie_test("GIGS-5108" "gigs/5108.gie") +proj_add_gie_test("GIGS-5109" "gigs/5109.gie") +#proj_add_gie_test("GIGS-5110" "gigs/5110.gie") +proj_add_gie_test("GIGS-5111.1" "gigs/5111.1.gie") +#proj_add_gie_test("GIGS-5111.2" "gigs/5111.2.gie") +proj_add_gie_test("GIGS-5112" "gigs/5112.gie") +#proj_add_gie_test("GIGS-5113" "gigs/5113.gie") +#proj_add_gie_test("GIGS-5201" "gigs/5201.gie") +#proj_add_gie_test("GIGS-5203" "gigs/5203.1.gie") +#proj_add_gie_test("GIGS-5204.1" "gigs/5204.1.gie") +#proj_add_gie_test("GIGS-5205.1" "gigs/5205.1.gie") +#proj_add_gie_test("GIGS-5206" "gigs/5206.gie") +#proj_add_gie_test("GIGS-5207.1" "gigs/5207.1.gie") +#proj_add_gie_test("GIGS-5207.2" "gigs/5207.2.gie") +#proj_add_gie_test("GIGS-5208" "gigs/5208.gie") diff --git a/test/gigs/5101.1-jhs.gie b/test/gigs/5101.1-jhs.gie new file mode 100644 index 00000000..2fd98883 --- /dev/null +++ b/test/gigs/5101.1-jhs.gie @@ -0,0 +1,732 @@ +-------------------------------------------------------------------------------- + +Test 5101 (part 1), Transverse Mercator, v2-0_2011-06-28, recommended JHS formula + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4326 +inv + +step +proj=etmerc +lat_0=49 +lon_0=-2 +k_0=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=WGS84 +units=m +no_def +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 3 80 +expect 496813.178 3358297.326 + +tolerance 0.03 m +accept 2.9999999 60 +expect 678711.584 1134498.83 + +tolerance 0.03 m +accept 3 49 +expect 765648.501 -87944.74 + +tolerance 0.03 m +accept 3.0000001 40 +expect 826893.845 -1087710.121 + +tolerance 0.03 m +accept 3 20 +expect 923539.353 -3308151.625 + +tolerance 0.03 m +accept 3 0 +expect 957087.829 -5527462.686 + +tolerance 0.03 m +accept 3 -20 +expect 923539.353 -7746773.748 + +tolerance 0.03 m +accept 3 -40 +expect 826893.845 -9967215.251 + +tolerance 0.03 m +accept 3 -60 +expect 678711.584 -12189424.202 + +tolerance 0.03 m +accept 3 -80 +expect 496813.178 -14413222.698 + +tolerance 0.03 m +accept -2 80 +expect 400000 3354134.429 + +tolerance 0.03 m +accept -2 60 +expect 400000 1123956.966 + +tolerance 0.03 m +accept -2 49 +expect 400000 -100000 + +tolerance 0.03 m +accept -2 40 +expect 400000 -1099699.834 + +tolerance 0.03 m +accept -2 20 +expect 400000 -3315978.565 + +tolerance 0.03 m +accept -2 0 +expect 400000 -5527462.686 + +tolerance 0.03 m +accept -2 -20 +expect 400000 -7738946.807 + +tolerance 0.03 m +accept -2 -40 +expect 400000 -9955225.538 + +tolerance 0.03 m +accept -2 -60 +expect 400000 -12178882.338 + +tolerance 0.03 m +accept -2 -80 +expect 400000 -14409059.801 + +tolerance 0.03 m +accept -5 80 +expect 341867.711 3355633.571 + +tolerance 0.03 m +accept -5 60 +expect 232704.966 1127751.264 + +tolerance 0.03 m +accept -5 49 +expect 180586.02 -95662.911 + +tolerance 0.03 m +accept -5 40 +expect 143900.026 -1095387.991 + +tolerance 0.03 m +accept -5 20 +expect 86073.28 -3313165.843 + +tolerance 0.03 m +accept -5 0 +expect 66021.018 -5527462.686 + +tolerance 0.03 m +accept -5 -20 +expect 86073.28 -7741759.529 + +tolerance 0.03 m +accept -5 -40 +expect 143900.026 -9959537.381 + +tolerance 0.03 m +accept -5 -60 +expect 232704.966 -12182676.637 + +tolerance 0.03 m +accept -5 -80 +expect 341867.711 -14410558.943 + +tolerance 0.03 m +accept -7.5559037 49.7661327 +expect 0 0 + +tolerance 0.03 m +accept -5 0 +expect 66021.018 -5527462.686 + +tolerance 0.03 m +accept -4 0 +expect 177404.277 -5527462.686 + +tolerance 0.03 m +accept -3 0 +expect 288719.208 -5527462.686 + +tolerance 0.03 m +accept -2 0 +expect 400000.0 -5527462.686 + +tolerance 0.03 m +accept -1 0 +expect 511280.792 -5527462.686 + +tolerance 0.03 m +accept 0 0 +expect 622595.723 -5527462.686 + +tolerance 0.03 m +accept 1 0 +expect 733978.982 -5527462.686 + +tolerance 0.03 m +accept 2 0 +expect 845464.865 -5527462.686 + +tolerance 0.03 m +accept 3 0 +expect 957087.829 -5527462.686 + +tolerance 0.03 m +accept 4 0 +expect 1068882.539 -5527462.686 + +tolerance 0.03 m +accept 5 0 +expect 1180883.933 -5527462.686 + +tolerance 0.03 m +accept 6 0 +expect 1293127.266 -5527462.686 + +tolerance 0.03 m +accept 7 0 +expect 1405648.179 -5527462.686 + +tolerance 0.03 m +accept 8 0 +expect 1518482.747 -5527462.686 + +tolerance 0.03 m +accept -5 60 +expect 232704.966 1127751.264 + +tolerance 0.03 m +accept -4 60 +expect 288455.816 1125643.213 + +tolerance 0.03 m +accept -3 60 +expect 344223.662 1124378.512 + +tolerance 0.03 m +accept -2 60 +expect 400000 1123956.966 + +tolerance 0.03 m +accept -1 60 +expect 455776.338 1124378.512 + +tolerance 0.03 m +accept 0 60 +expect 511544.184 1125643.213 + +tolerance 0.03 m +accept 1 60 +expect 567295.034 1127751.264 + +tolerance 0.03 m +accept 2 60 +expect 623020.357 1130702.987 + +tolerance 0.03 m +accept 3 60 +expect 678711.584 1134498.83 + +tolerance 0.03 m +accept 4.0 60.0 +expect 734360.093 1139139.367 + +tolerance 0.03 m +accept 5.0 60.0 +expect 789957.197 1144625.296 + +tolerance 0.03 m +accept 6.0 60.0 +expect 845494.132 1150957.434 + +tolerance 0.03 m +accept 7.0 60.0 +expect 900962.042 1158136.713 + +tolerance 0.03 m +accept 8.0 60.0 +expect 956351.967 1166164.18 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +proj=etmerc +lat_0=49 +lon_0=-2 +k_0=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=WGS84 +units=m +no_def +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 496813.178 3358297.326 +expect 3 80 + +tolerance 0.03 m +accept 678711.584 1134498.83 +expect 2.9999999 60 + +tolerance 0.03 m +accept 765648.501 -87944.74 +expect 3 49 + +tolerance 0.03 m +accept 826893.845 -1087710.121 +expect 3.0000001 40 + +tolerance 0.03 m +accept 923539.353 -3308151.625 +expect 3 20 + +tolerance 0.03 m +accept 957087.829 -5527462.686 +expect 3 0 + +tolerance 0.03 m +accept 923539.353 -7746773.748 +expect 3 -20 + +tolerance 0.03 m +accept 826893.845 -9967215.251 +expect 3 -40 + +tolerance 0.03 m +accept 678711.584 -12189424.202 +expect 3 -60 + +tolerance 0.03 m +accept 496813.178 -14413222.698 +expect 3 -80 + +tolerance 0.03 m +accept 400000 3354134.429 +expect -2 80 + +tolerance 0.03 m +accept 400000 1123956.966 +expect -2 60 + +tolerance 0.03 m +accept 400000 -100000 +expect -2 49 + +tolerance 0.03 m +accept 400000 -1099699.834 +expect -2 40 + +tolerance 0.03 m +accept 400000 -3315978.565 +expect -2 20 + +tolerance 0.03 m +accept 400000 -5527462.686 +expect -2 0 + +tolerance 0.03 m +accept 400000 -7738946.807 +expect -2 -20 + +tolerance 0.03 m +accept 400000 -9955225.538 +expect -2 -40 + +tolerance 0.03 m +accept 400000 -12178882.338 +expect -2 -60 + +tolerance 0.03 m +accept 400000 -14409059.801 +expect -2 -80 + +tolerance 0.03 m +accept 341867.711 3355633.571 +expect -5 80 + +tolerance 0.03 m +accept 232704.966 1127751.264 +expect -5 60 + +tolerance 0.03 m +accept 180586.02 -95662.911 +expect -5 49 + +tolerance 0.03 m +accept 143900.026 -1095387.991 +expect -5 40 + +tolerance 0.03 m +accept 86073.28 -3313165.843 +expect -5 20 + +tolerance 0.03 m +accept 66021.018 -5527462.686 +expect -5 0 + +tolerance 0.03 m +accept 86073.28 -7741759.529 +expect -5 -20 + +tolerance 0.03 m +accept 143900.026 -9959537.381 +expect -5 -40 + +tolerance 0.03 m +accept 232704.966 -12182676.637 +expect -5 -60 + +tolerance 0.03 m +accept 341867.711 -14410558.943 +expect -5 -80 + +tolerance 0.03 m +accept 0 0 +expect -7.5559037 49.7661327 + +tolerance 0.03 m +accept 66021.018 -5527462.686 +expect -5 0 + +tolerance 0.03 m +accept 177404.277 -5527462.686 +expect -4 0 + +tolerance 0.03 m +accept 288719.208 -5527462.686 +expect -3 0 + +tolerance 0.03 m +accept 400000.0 -5527462.686 +expect -2 0 + +tolerance 0.03 m +accept 511280.792 -5527462.686 +expect -1 0 + +tolerance 0.03 m +accept 622595.723 -5527462.686 +expect 0 0 + +tolerance 0.03 m +accept 733978.982 -5527462.686 +expect 1 0 + +tolerance 0.03 m +accept 845464.865 -5527462.686 +expect 2 0 + +tolerance 0.03 m +accept 957087.829 -5527462.686 +expect 3 0 + +tolerance 0.03 m +accept 1068882.539 -5527462.686 +expect 4 0 + +tolerance 0.03 m +accept 1180883.933 -5527462.686 +expect 5 0 + +tolerance 0.03 m +accept 1293127.266 -5527462.686 +expect 6 0 + +tolerance 0.03 m +accept 1405648.179 -5527462.686 +expect 7 0 + +tolerance 0.03 m +accept 1518482.747 -5527462.686 +expect 8 0 + +tolerance 0.03 m +accept 232704.966 1127751.264 +expect -5 60 + +tolerance 0.03 m +accept 288455.816 1125643.213 +expect -4 60 + +tolerance 0.03 m +accept 344223.662 1124378.512 +expect -3 60 + +tolerance 0.03 m +accept 400000 1123956.966 +expect -2 60 + +tolerance 0.03 m +accept 455776.338 1124378.512 +expect -1 60 + +tolerance 0.03 m +accept 511544.184 1125643.213 +expect 0 60 + +tolerance 0.03 m +accept 567295.034 1127751.264 +expect 1 60 + +tolerance 0.03 m +accept 623020.357 1130702.987 +expect 2 60 + +tolerance 0.03 m +accept 678711.584 1134498.83 +expect 3 60 + +tolerance 0.03 m +accept 734360.093 1139139.367 +expect 4.0 60.0 + +tolerance 0.03 m +accept 789957.197 1144625.296 +expect 5.0 60.0 + +tolerance 0.03 m +accept 845494.132 1150957.434 +expect 6.0 60.0 + +tolerance 0.03 m +accept 900962.042 1158136.713 +expect 7.0 60.0 + +tolerance 0.03 m +accept 956351.967 1166164.18 +expect 8.0 60.0 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4326 +inv + +step +proj=etmerc +lat_0=49 +lon_0=-2 +k_0=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=WGS84 +units=m +no_def +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 3 80 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9999999 60 +roundtrip 1000 + +tolerance 0.006 m +accept 3 49 +roundtrip 1000 + +tolerance 0.006 m +accept 3.0000001 40 +roundtrip 1000 + +tolerance 0.006 m +accept 3 20 +roundtrip 1000 + +tolerance 0.006 m +accept 3 0 +roundtrip 1000 + +tolerance 0.006 m +accept 3 -20 +roundtrip 1000 + +tolerance 0.006 m +accept 3 -40 +roundtrip 1000 + +tolerance 0.006 m +accept 3 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 3 -80 +roundtrip 1000 + +tolerance 0.006 m +accept -2 80 +roundtrip 1000 + +tolerance 0.006 m +accept -2 60 +roundtrip 1000 + +tolerance 0.006 m +accept -2 49 +roundtrip 1000 + +tolerance 0.006 m +accept -2 40 +roundtrip 1000 + +tolerance 0.006 m +accept -2 20 +roundtrip 1000 + +tolerance 0.006 m +accept -2 0 +roundtrip 1000 + +tolerance 0.006 m +accept -2 -20 +roundtrip 1000 + +tolerance 0.006 m +accept -2 -40 +roundtrip 1000 + +tolerance 0.006 m +accept -2 -60 +roundtrip 1000 + +tolerance 0.006 m +accept -2 -80 +roundtrip 1000 + +tolerance 0.006 m +accept -5 80 +roundtrip 1000 + +tolerance 0.006 m +accept -5 60 +roundtrip 1000 + +tolerance 0.006 m +accept -5 49 +roundtrip 1000 + +tolerance 0.006 m +accept -5 40 +roundtrip 1000 + +tolerance 0.006 m +accept -5 20 +roundtrip 1000 + +tolerance 0.006 m +accept -5 0 +roundtrip 1000 + +tolerance 0.006 m +accept -5 -20 +roundtrip 1000 + +tolerance 0.006 m +accept -5 -40 +roundtrip 1000 + +tolerance 0.006 m +accept -5 -60 +roundtrip 1000 + +tolerance 0.006 m +accept -5 -80 +roundtrip 1000 + +tolerance 0.006 m +accept -7.5559037 49.7661327 +roundtrip 1000 + +tolerance 0.006 m +accept -5 0 +roundtrip 1000 + +tolerance 0.006 m +accept -4 0 +roundtrip 1000 + +tolerance 0.006 m +accept -3 0 +roundtrip 1000 + +tolerance 0.006 m +accept -2 0 +roundtrip 1000 + +tolerance 0.006 m +accept -1 0 +roundtrip 1000 + +tolerance 0.006 m +accept 0 0 +roundtrip 1000 + +tolerance 0.006 m +accept 1 0 +roundtrip 1000 + +tolerance 0.006 m +accept 2 0 +roundtrip 1000 + +tolerance 0.006 m +accept 3 0 +roundtrip 1000 + +tolerance 0.006 m +accept 4 0 +roundtrip 1000 + +tolerance 0.006 m +accept 5 0 +roundtrip 1000 + +tolerance 0.006 m +accept 6 0 +roundtrip 1000 + +tolerance 0.006 m +accept 7 0 +roundtrip 1000 + +tolerance 0.006 m +accept 8 0 +roundtrip 1000 + +tolerance 0.006 m +accept -5 60 +roundtrip 1000 + +tolerance 0.006 m +accept -4 60 +roundtrip 1000 + +tolerance 0.006 m +accept -3 60 +roundtrip 1000 + +tolerance 0.006 m +accept -2 60 +roundtrip 1000 + +tolerance 0.006 m +accept -1 60 +roundtrip 1000 + +tolerance 0.006 m +accept 0 60 +roundtrip 1000 + +tolerance 0.006 m +accept 1 60 +roundtrip 1000 + +tolerance 0.006 m +accept 2 60 +roundtrip 1000 + +tolerance 0.006 m +accept 3 60 +roundtrip 1000 + +tolerance 0.006 m +accept 4.0 60.0 +roundtrip 1000 + +tolerance 0.006 m +accept 5.0 60.0 +roundtrip 1000 + +tolerance 0.006 m +accept 6.0 60.0 +roundtrip 1000 + +tolerance 0.006 m +accept 7.0 60.0 +roundtrip 1000 + +tolerance 0.006 m +accept 8.0 60.0 +roundtrip 1000 + + diff --git a/test/gigs/5101.2-jhs.gie b/test/gigs/5101.2-jhs.gie new file mode 100644 index 00000000..7ea6275e --- /dev/null +++ b/test/gigs/5101.2-jhs.gie @@ -0,0 +1,300 @@ +-------------------------------------------------------------------------------- + +Test 5101 (part 2), Transverse Mercator, v2-0_2011-06-28, recommended JHS formula + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4326 +inv + +step +init=epsg:32631 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept -2.0 80.0 +expect 403186.945 8885748.708 + +tolerance 0.03 m +accept -2.0 60.0 +expect 221288.77 6661953.041 + +tolerance 0.03 m +accept -2.0 40.0 +expect 73106.698 4439746.917 + +tolerance 0.03 m +accept -2.0 20.0 +expect -23538.687 2219308.238 + +tolerance 0.03 m +accept -2.0 0.0 +expect -57087.12 0.0 + +tolerance 0.03 m +accept -2.0 -20.0 +expect -23538.687 -2219308.238 + +tolerance 0.03 m +accept -2.0 -40.0 +expect 73106.698 -4439746.917 + +tolerance 0.03 m +accept -2.0 -60.0 +expect 221288.77 -6661953.041 + +tolerance 0.03 m +accept -2.0 -80.0 +expect 403186.945 -8885748.708 + +tolerance 0.03 m +accept -5.0 60.0 +expect 54506.435 6678411.623 + +tolerance 0.03 m +accept -4.0 60.0 +expect 110043.299 6672079.494 + +tolerance 0.03 m +accept -3.0 60.0 +expect 165640.332 6666593.572 + +tolerance 0.03 m +accept -2.0 60.0 +expect 221288.77 6661953.041 + +tolerance 0.03 m +accept -1.0 60.0 +expect 276979.926 6658157.202 + +tolerance 0.03 m +accept 0.0 60.0 +expect 332705.179 6655205.484 + +tolerance 0.03 m +accept 1.0 60.0 +expect 388455.958 6653097.435 + +tolerance 0.03 m +accept 2.0 60.0 +expect 444223.733 6651832.735 + +tolerance 0.03 m +accept 3.0 60.0 +expect 500000.0 6651411.19 + +tolerance 0.03 m +accept 4.0 60.0 +expect 555776.267 6651832.735 + +tolerance 0.03 m +accept 5.0 60.0 +expect 611544.042 6653097.435 + +tolerance 0.03 m +accept 6.0 60.0 +expect 667294.821 6655205.484 + +tolerance 0.03 m +accept 7.0 60.0 +expect 723020.074 6658157.202 + +tolerance 0.03 m +accept 8.0 60.0 +expect 778711.23 6661953.041 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:32631 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 403186.945 8885748.708 +expect -2.0 80.0 + +tolerance 0.03 m +accept 221288.77 6661953.041 +expect -2.0 60.0 + +tolerance 0.03 m +accept 73106.698 4439746.917 +expect -2.0 40.0 + +tolerance 0.03 m +accept -23538.687 2219308.238 +expect -2.0 20.0 + +tolerance 0.03 m +accept -57087.12 0.0 +expect -2.0 0.0 + +tolerance 0.03 m +accept -23538.687 -2219308.238 +expect -2.0 -20.0 + +tolerance 0.03 m +accept 73106.698 -4439746.917 +expect -2.0 -40.0 + +tolerance 0.03 m +accept 221288.77 -6661953.041 +expect -2.0 -60.0 + +tolerance 0.03 m +accept 403186.945 -8885748.708 +expect -2.0 -80.0 + +tolerance 0.03 m +accept 54506.435 6678411.623 +expect -5.0 60.0 + +tolerance 0.03 m +accept 110043.299 6672079.494 +expect -4.0 60.0 + +tolerance 0.03 m +accept 165640.332 6666593.572 +expect -3.0 60.0 + +tolerance 0.03 m +accept 221288.77 6661953.041 +expect -2.0 60.0 + +tolerance 0.03 m +accept 276979.926 6658157.202 +expect -1.0 60.0 + +tolerance 0.03 m +accept 332705.179 6655205.484 +expect 0.0 60.0 + +tolerance 0.03 m +accept 388455.958 6653097.435 +expect 1.0 60.0 + +tolerance 0.03 m +accept 444223.733 6651832.735 +expect 2.0 60.0 + +tolerance 0.03 m +accept 500000.0 6651411.19 +expect 3.0 60.0 + +tolerance 0.03 m +accept 555776.267 6651832.735 +expect 4.0 60.0 + +tolerance 0.03 m +accept 611544.042 6653097.435 +expect 5.0 60.0 + +tolerance 0.03 m +accept 667294.821 6655205.484 +expect 6.0 60.0 + +tolerance 0.03 m +accept 723020.074 6658157.202 +expect 7.0 60.0 + +tolerance 0.03 m +accept 778711.23 6661953.041 +expect 8.0 60.0 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4326 +inv + +step +init=epsg:32631 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept -2.0 80.0 +roundtrip 1000 + +tolerance 0.006 m +accept -2.0 60.0 +roundtrip 1000 + +tolerance 0.006 m +accept -2.0 40.0 +roundtrip 1000 + +tolerance 0.006 m +accept -2.0 20.0 +roundtrip 1000 + +tolerance 0.006 m +accept -2.0 0.0 +roundtrip 1000 + +tolerance 0.006 m +accept -2.0 -20.0 +roundtrip 1000 + +tolerance 0.006 m +accept -2.0 -40.0 +roundtrip 1000 + +tolerance 0.006 m +accept -2.0 -60.0 +roundtrip 1000 + +tolerance 0.006 m +accept -2.0 -80.0 +roundtrip 1000 + +tolerance 0.006 m +accept -5.0 60.0 +roundtrip 1000 + +tolerance 0.006 m +accept -4.0 60.0 +roundtrip 1000 + +tolerance 0.006 m +accept -3.0 60.0 +roundtrip 1000 + +tolerance 0.006 m +accept -2.0 60.0 +roundtrip 1000 + +tolerance 0.006 m +accept -1.0 60.0 +roundtrip 1000 + +tolerance 0.006 m +accept 0.0 60.0 +roundtrip 1000 + +tolerance 0.006 m +accept 1.0 60.0 +roundtrip 1000 + +tolerance 0.006 m +accept 2.0 60.0 +roundtrip 1000 + +tolerance 0.006 m +accept 3.0 60.0 +roundtrip 1000 + +tolerance 0.006 m +accept 4.0 60.0 +roundtrip 1000 + +tolerance 0.006 m +accept 5.0 60.0 +roundtrip 1000 + +tolerance 0.006 m +accept 6.0 60.0 +roundtrip 1000 + +tolerance 0.006 m +accept 7.0 60.0 +roundtrip 1000 + +tolerance 0.006 m +accept 8.0 60.0 +roundtrip 1000 + + diff --git a/test/gigs/5101.3-jhs.gie b/test/gigs/5101.3-jhs.gie new file mode 100644 index 00000000..d588df4c --- /dev/null +++ b/test/gigs/5101.3-jhs.gie @@ -0,0 +1,300 @@ +-------------------------------------------------------------------------------- + +Test 5101 (part 3), Transverse Mercator, v2-0_2011-06-28, recommended JHS formula + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4283 +inv + +step +init=epsg:28354 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 146 80 +expect 596813.055 18885748.71 + +tolerance 0.03 m +accept 146 60 +expect 778711.23 16661953.04 + +tolerance 0.03 m +accept 146 40 +expect 926893.302 14439746.92 + +tolerance 0.03 m +accept 146 20 +expect 1023538.687 12219308.24 + +tolerance 0.03 m +accept 146 0 +expect 1057087.12 10000000.0 + +tolerance 0.03 m +accept 146 -20 +expect 1023538.687 7780691.762 + +tolerance 0.03 m +accept 146 -40 +expect 926893.302 5560253.083 + +tolerance 0.03 m +accept 146 -60 +expect 778711.23 3338046.96 + +tolerance 0.03 m +accept 146 -80 +expect 596813.055 1114251.292 + +tolerance 0.03 m +accept 136 -60 +expect 221288.77 3338046.96 + +tolerance 0.03 m +accept 137 -60 +expect 276979.926 3341842.798 + +tolerance 0.03 m +accept 138 -60 +expect 332705.179 3344794.516 + +tolerance 0.03 m +accept 139 -60 +expect 388455.958 3346902.565 + +tolerance 0.03 m +accept 140 -60 +expect 444223.733 3348167.265 + +tolerance 0.03 m +accept 141 -60 +expect 500000.0 3348588.81 + +tolerance 0.03 m +accept 142 -60 +expect 555776.267 3348167.265 + +tolerance 0.03 m +accept 143 -60 +expect 611544.042 3346902.565 + +tolerance 0.03 m +accept 144 -60 +expect 667294.821 3344794.516 + +tolerance 0.03 m +accept 145 -60 +expect 723020.074 3341842.798 + +tolerance 0.03 m +accept 146 -60 +expect 778711.23 3338046.96 + +tolerance 0.03 m +accept 147 -60 +expect 834359.668 3333406.428 + +tolerance 0.03 m +accept 148 -60 +expect 889956.701 3327920.506 + +tolerance 0.03 m +accept 149 -60 +expect 945493.565 3321588.377 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:28354 +inv + +step +init=epsg:4283 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 596813.055 18885748.71 +expect 146 80 + +tolerance 0.03 m +accept 778711.23 16661953.04 +expect 146 60 + +tolerance 0.03 m +accept 926893.302 14439746.92 +expect 146 40 + +tolerance 0.03 m +accept 1023538.687 12219308.24 +expect 146 20 + +tolerance 0.03 m +accept 1057087.12 10000000.0 +expect 146 0 + +tolerance 0.03 m +accept 1023538.687 7780691.762 +expect 146 -20 + +tolerance 0.03 m +accept 926893.302 5560253.083 +expect 146 -40 + +tolerance 0.03 m +accept 778711.23 3338046.96 +expect 146 -60 + +tolerance 0.03 m +accept 596813.055 1114251.292 +expect 146 -80 + +tolerance 0.03 m +accept 221288.77 3338046.96 +expect 136 -60 + +tolerance 0.03 m +accept 276979.926 3341842.798 +expect 137 -60 + +tolerance 0.03 m +accept 332705.179 3344794.516 +expect 138 -60 + +tolerance 0.03 m +accept 388455.958 3346902.565 +expect 139 -60 + +tolerance 0.03 m +accept 444223.733 3348167.265 +expect 140 -60 + +tolerance 0.03 m +accept 500000.0 3348588.81 +expect 141 -60 + +tolerance 0.03 m +accept 555776.267 3348167.265 +expect 142 -60 + +tolerance 0.03 m +accept 611544.042 3346902.565 +expect 143 -60 + +tolerance 0.03 m +accept 667294.821 3344794.516 +expect 144 -60 + +tolerance 0.03 m +accept 723020.074 3341842.798 +expect 145 -60 + +tolerance 0.03 m +accept 778711.23 3338046.96 +expect 146 -60 + +tolerance 0.03 m +accept 834359.668 3333406.428 +expect 147 -60 + +tolerance 0.03 m +accept 889956.701 3327920.506 +expect 148 -60 + +tolerance 0.03 m +accept 945493.565 3321588.377 +expect 149 -60 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4283 +inv + +step +init=epsg:28354 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 146 80 +roundtrip 1000 + +tolerance 0.006 m +accept 146 60 +roundtrip 1000 + +tolerance 0.006 m +accept 146 40 +roundtrip 1000 + +tolerance 0.006 m +accept 146 20 +roundtrip 1000 + +tolerance 0.006 m +accept 146 0 +roundtrip 1000 + +tolerance 0.006 m +accept 146 -20 +roundtrip 1000 + +tolerance 0.006 m +accept 146 -40 +roundtrip 1000 + +tolerance 0.006 m +accept 146 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 146 -80 +roundtrip 1000 + +tolerance 0.006 m +accept 136 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 137 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 138 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 139 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 140 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 141 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 142 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 143 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 144 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 145 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 146 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 147 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 148 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 149 -60 +roundtrip 1000 + + diff --git a/test/gigs/5101.4-jhs-etmerc.gie b/test/gigs/5101.4-jhs-etmerc.gie new file mode 100644 index 00000000..b97b7769 --- /dev/null +++ b/test/gigs/5101.4-jhs-etmerc.gie @@ -0,0 +1,300 @@ +-------------------------------------------------------------------------------- + +Test 5101 (part 4), Transverse Mercator, v2-0_2011-06-28, recommended JHS formula + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4190 +inv + +step +proj=etmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept -63.9993433 80.0002644 +expect 5422500.0 18889800.0 + +tolerance 0.03 m +accept -63.9998472 60.0001191 +expect 5276900.0 16662800.0 + +tolerance 0.03 m +accept -63.9997361 40.0003081 +expect 5158399.999 14439199.99 + +tolerance 0.03 m +accept -64.0004605 19.9996448 +expect 5081100.0 12219300.0 + +tolerance 0.03 m +accept -63.9996186 0.0003092 +expect 5054400.005 10002000.0 + +tolerance 0.03 m +accept -64.0004675 -19.9999283 +expect 5081100.017 7784599.993 + +tolerance 0.03 m +accept -63.9997001 -39.9996924 +expect 5158400.0 5564800.0 + +tolerance 0.03 m +accept -63.9998814 -60.0004008 +expect 5276899.994 3341099.995 + +tolerance 0.03 m +accept -63.9991006 -79.9996521 +expect 5422500.0 1114200.0 + +tolerance 0.03 m +accept -70.0002089 -40.000215 +expect 4645300.113 5524200.123 + +tolerance 0.03 m +accept -69.0001441 -40.0002935 +expect 4730900.0 5533400.0 + +tolerance 0.03 m +accept -67.9995333 -39.9996136 +expect 4816500.043 5541700.028 + +tolerance 0.03 m +accept -66.9998073 -39.9999313 +expect 4902000.0 5548900.0 + +tolerance 0.03 m +accept -65.9996522 -39.9995894 +expect 4987500.009 5555200.001 + +tolerance 0.03 m +accept -64.9992796 -40.000411 +expect 5073000.0 5560400.0 + +tolerance 0.03 m +accept -63.9997 -39.9996925 +expect 5158400.01 5564799.987 + +tolerance 0.03 m +accept -62.9999842 -40.0002087 +expect 5243800.0 5568100.0 + +tolerance 0.03 m +accept -62.0000778 -40.0001803 +expect 5329199.995 5570500.009 + +tolerance 0.03 m +accept -61.0000574 -39.9996182 +expect 5414600.0 5572000.0 + +tolerance 0.03 m +accept -60.0 -40.0003306 +expect 5500000.0 5572399.996 + +tolerance 0.03 m +accept -58.9999426 -39.9996182 +expect 5585400.0 5572000.0 + +tolerance 0.03 m +accept -57.9999222 -40.0001803 +expect 5670800.005 5570500.009 + +tolerance 0.03 m +accept -57.0000158 -40.0002087 +expect 5756200.0 5568100.0 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +proj=etmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +inv + +step +init=epsg:4190 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 5422500.0 18889800.0 +expect -63.9993433 80.0002644 + +tolerance 0.03 m +accept 5276900.0 16662800.0 +expect -63.9998472 60.0001191 + +tolerance 0.03 m +accept 5158399.999 14439199.99 +expect -63.9997361 40.0003081 + +tolerance 0.03 m +accept 5081100.0 12219300.0 +expect -64.0004605 19.9996448 + +tolerance 0.03 m +accept 5054400.005 10002000.0 +expect -63.9996186 0.0003092 + +tolerance 0.03 m +accept 5081100.017 7784599.993 +expect -64.0004675 -19.9999283 + +tolerance 0.03 m +accept 5158400.0 5564800.0 +expect -63.9997001 -39.9996924 + +tolerance 0.03 m +accept 5276899.994 3341099.995 +expect -63.9998814 -60.0004008 + +tolerance 0.03 m +accept 5422500.0 1114200.0 +expect -63.9991006 -79.9996521 + +tolerance 0.03 m +accept 4645300.113 5524200.123 +expect -70.0002089 -40.000215 + +tolerance 0.03 m +accept 4730900.0 5533400.0 +expect -69.0001441 -40.0002935 + +tolerance 0.03 m +accept 4816500.043 5541700.028 +expect -67.9995333 -39.9996136 + +tolerance 0.03 m +accept 4902000.0 5548900.0 +expect -66.9998073 -39.9999313 + +tolerance 0.03 m +accept 4987500.009 5555200.001 +expect -65.9996522 -39.9995894 + +tolerance 0.03 m +accept 5073000.0 5560400.0 +expect -64.9992796 -40.000411 + +tolerance 0.03 m +accept 5158400.01 5564799.987 +expect -63.9997 -39.9996925 + +tolerance 0.03 m +accept 5243800.0 5568100.0 +expect -62.9999842 -40.0002087 + +tolerance 0.03 m +accept 5329199.995 5570500.009 +expect -62.0000778 -40.0001803 + +tolerance 0.03 m +accept 5414600.0 5572000.0 +expect -61.0000574 -39.9996182 + +tolerance 0.03 m +accept 5500000.0 5572399.996 +expect -60.0 -40.0003306 + +tolerance 0.03 m +accept 5585400.0 5572000.0 +expect -58.9999426 -39.9996182 + +tolerance 0.03 m +accept 5670800.005 5570500.009 +expect -57.9999222 -40.0001803 + +tolerance 0.03 m +accept 5756200.0 5568100.0 +expect -57.0000158 -40.0002087 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4190 +inv + +step +proj=etmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept -63.9993433 80.0002644 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9998472 60.0001191 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9997361 40.0003081 +roundtrip 1000 + +tolerance 0.006 m +accept -64.0004605 19.9996448 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9996186 0.0003092 +roundtrip 1000 + +tolerance 0.006 m +accept -64.0004675 -19.9999283 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9997001 -39.9996924 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9998814 -60.0004008 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9991006 -79.9996521 +roundtrip 1000 + +tolerance 0.006 m +accept -70.0002089 -40.000215 +roundtrip 1000 + +tolerance 0.006 m +accept -69.0001441 -40.0002935 +roundtrip 1000 + +tolerance 0.006 m +accept -67.9995333 -39.9996136 +roundtrip 1000 + +tolerance 0.006 m +accept -66.9998073 -39.9999313 +roundtrip 1000 + +tolerance 0.006 m +accept -65.9996522 -39.9995894 +roundtrip 1000 + +tolerance 0.006 m +accept -64.9992796 -40.000411 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9997 -39.9996925 +roundtrip 1000 + +tolerance 0.006 m +accept -62.9999842 -40.0002087 +roundtrip 1000 + +tolerance 0.006 m +accept -62.0000778 -40.0001803 +roundtrip 1000 + +tolerance 0.006 m +accept -61.0000574 -39.9996182 +roundtrip 1000 + +tolerance 0.006 m +accept -60.0 -40.0003306 +roundtrip 1000 + +tolerance 0.006 m +accept -58.9999426 -39.9996182 +roundtrip 1000 + +tolerance 0.006 m +accept -57.9999222 -40.0001803 +roundtrip 1000 + +tolerance 0.006 m +accept -57.0000158 -40.0002087 +roundtrip 1000 + + diff --git a/test/gigs/5101.4-jhs.gie b/test/gigs/5101.4-jhs.gie new file mode 100644 index 00000000..615bf60b --- /dev/null +++ b/test/gigs/5101.4-jhs.gie @@ -0,0 +1,300 @@ +-------------------------------------------------------------------------------- + +Test 5101 (part 4), Transverse Mercator, v2-0_2011-06-28, recommended JHS formula + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4190 +inv + +step +init=epsg:22175 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept -63.9993433 80.0002644 +expect 5422500.0 18889800.0 + +tolerance 0.03 m +accept -63.9998472 60.0001191 +expect 5276900.0 16662800.0 + +tolerance 0.03 m +accept -63.9997361 40.0003081 +expect 5158399.999 14439199.99 + +tolerance 0.03 m +accept -64.0004605 19.9996448 +expect 5081100.0 12219300.0 + +tolerance 0.03 m +accept -63.9996186 0.0003092 +expect 5054400.005 10002000.0 + +tolerance 0.03 m +accept -64.0004675 -19.9999283 +expect 5081100.017 7784599.993 + +tolerance 0.03 m +accept -63.9997001 -39.9996924 +expect 5158400.0 5564800.0 + +tolerance 0.03 m +accept -63.9998814 -60.0004008 +expect 5276899.994 3341099.995 + +tolerance 0.03 m +accept -63.9991006 -79.9996521 +expect 5422500.0 1114200.0 + +tolerance 0.03 m +accept -70.0002089 -40.000215 +expect 4645300.113 5524200.123 + +tolerance 0.03 m +accept -69.0001441 -40.0002935 +expect 4730900.0 5533400.0 + +tolerance 0.03 m +accept -67.9995333 -39.9996136 +expect 4816500.043 5541700.028 + +tolerance 0.03 m +accept -66.9998073 -39.9999313 +expect 4902000.0 5548900.0 + +tolerance 0.03 m +accept -65.9996522 -39.9995894 +expect 4987500.009 5555200.001 + +tolerance 0.03 m +accept -64.9992796 -40.000411 +expect 5073000.0 5560400.0 + +tolerance 0.03 m +accept -63.9997 -39.9996925 +expect 5158400.01 5564799.987 + +tolerance 0.03 m +accept -62.9999842 -40.0002087 +expect 5243800.0 5568100.0 + +tolerance 0.03 m +accept -62.0000778 -40.0001803 +expect 5329199.995 5570500.009 + +tolerance 0.03 m +accept -61.0000574 -39.9996182 +expect 5414600.0 5572000.0 + +tolerance 0.03 m +accept -60 -40.0003306 +expect 5500000.0 5572399.996 + +tolerance 0.03 m +accept -58.9999426 -39.9996182 +expect 5585400.0 5572000.0 + +tolerance 0.03 m +accept -57.9999222 -40.0001803 +expect 5670800.005 5570500.009 + +tolerance 0.03 m +accept -57.0000158 -40.0002087 +expect 5756200.0 5568100.0 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:22175 +inv + +step +init=epsg:4190 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 5422500.0 18889800.0 +expect -63.9993433 80.0002644 + +tolerance 0.03 m +accept 5276900.0 16662800.0 +expect -63.9998472 60.0001191 + +tolerance 0.03 m +accept 5158399.999 14439199.99 +expect -63.9997361 40.0003081 + +tolerance 0.03 m +accept 5081100.0 12219300.0 +expect -64.0004605 19.9996448 + +tolerance 0.03 m +accept 5054400.005 10002000.0 +expect -63.9996186 0.0003092 + +tolerance 0.03 m +accept 5081100.017 7784599.993 +expect -64.0004675 -19.9999283 + +tolerance 0.03 m +accept 5158400.0 5564800.0 +expect -63.9997001 -39.9996924 + +tolerance 0.03 m +accept 5276899.994 3341099.995 +expect -63.9998814 -60.0004008 + +tolerance 0.03 m +accept 5422500.0 1114200.0 +expect -63.9991006 -79.9996521 + +tolerance 0.03 m +accept 4645300.113 5524200.123 +expect -70.0002089 -40.000215 + +tolerance 0.03 m +accept 4730900.0 5533400.0 +expect -69.0001441 -40.0002935 + +tolerance 0.03 m +accept 4816500.043 5541700.028 +expect -67.9995333 -39.9996136 + +tolerance 0.03 m +accept 4902000.0 5548900.0 +expect -66.9998073 -39.9999313 + +tolerance 0.03 m +accept 4987500.009 5555200.001 +expect -65.9996522 -39.9995894 + +tolerance 0.03 m +accept 5073000.0 5560400.0 +expect -64.9992796 -40.000411 + +tolerance 0.03 m +accept 5158400.01 5564799.987 +expect -63.9997 -39.9996925 + +tolerance 0.03 m +accept 5243800.0 5568100.0 +expect -62.9999842 -40.0002087 + +tolerance 0.03 m +accept 5329199.995 5570500.009 +expect -62.0000778 -40.0001803 + +tolerance 0.03 m +accept 5414600.0 5572000.0 +expect -61.0000574 -39.9996182 + +tolerance 0.03 m +accept 5500000.0 5572399.996 +expect -60 -40.0003306 + +tolerance 0.03 m +accept 5585400.0 5572000.0 +expect -58.9999426 -39.9996182 + +tolerance 0.03 m +accept 5670800.005 5570500.009 +expect -57.9999222 -40.0001803 + +tolerance 0.03 m +accept 5756200.0 5568100.0 +expect -57.0000158 -40.0002087 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4190 +inv + +step +init=epsg:22175 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept -63.9993433 80.0002644 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9998472 60.0001191 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9997361 40.0003081 +roundtrip 1000 + +tolerance 0.006 m +accept -64.0004605 19.9996448 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9996186 0.0003092 +roundtrip 1000 + +tolerance 0.006 m +accept -64.0004675 -19.9999283 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9997001 -39.9996924 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9998814 -60.0004008 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9991006 -79.9996521 +roundtrip 1000 + +tolerance 0.006 m +accept -70.0002089 -40.000215 +roundtrip 1000 + +tolerance 0.006 m +accept -69.0001441 -40.0002935 +roundtrip 1000 + +tolerance 0.006 m +accept -67.9995333 -39.9996136 +roundtrip 1000 + +tolerance 0.006 m +accept -66.9998073 -39.9999313 +roundtrip 1000 + +tolerance 0.006 m +accept -65.9996522 -39.9995894 +roundtrip 1000 + +tolerance 0.006 m +accept -64.9992796 -40.000411 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9997 -39.9996925 +roundtrip 1000 + +tolerance 0.006 m +accept -62.9999842 -40.0002087 +roundtrip 1000 + +tolerance 0.006 m +accept -62.0000778 -40.0001803 +roundtrip 1000 + +tolerance 0.006 m +accept -61.0000574 -39.9996182 +roundtrip 1000 + +tolerance 0.006 m +accept -60 -40.0003306 +roundtrip 1000 + +tolerance 0.006 m +accept -58.9999426 -39.9996182 +roundtrip 1000 + +tolerance 0.006 m +accept -57.9999222 -40.0001803 +roundtrip 1000 + +tolerance 0.006 m +accept -57.0000158 -40.0002087 +roundtrip 1000 + + diff --git a/test/gigs/5102.1.gie b/test/gigs/5102.1.gie new file mode 100644 index 00000000..d3eef080 --- /dev/null +++ b/test/gigs/5102.1.gie @@ -0,0 +1,252 @@ +-------------------------------------------------------------------------------- + +Test 5102, Lambert Conic Conformal (1SP), v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4230 +inv + +step +init=epsg:2192 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 5 58 +expect 760722.92 3457368.68 + +tolerance 0.03 m +accept 5 57 +expect 764566.844 3343948.93 + +tolerance 0.03 m +accept 5 56 +expect 768396.683 3230944.812 + +tolerance 0.03 m +accept 5 55 +expect 772213.973 3118310.947 + +tolerance 0.03 m +accept 5 54 +expect 776020.189 3006003.839 + +tolerance 0.03 m +accept 5 53 +expect 779816.748 2893981.68 + +tolerance 0.03 m +accept 4 51 +expect 717027.292 2668695.784 + +tolerance 0.03 m +accept 4 50 +expect 719385.249 2557252.841 + +tolerance 0.03 m +accept 4 49 +expect 721740.43 2445941.161 + +tolerance 0.03 m +accept 4 46.8 +expect 726915.752 2201342.519 + +tolerance 0.03 m +accept 3 53 +expect 644764.905 2891124.195 + +tolerance 0.03 m +accept 4 53 +expect 712299.916 2892123.369 + +tolerance 0.03 m +accept 5 53 +expect 779816.748 2893981.68 + +tolerance 0.03 m +accept 6 53 +expect 847304.473 2896698.827 + +tolerance 0.03 m +accept 7 53 +expect 914752.168 2900274.371 + +tolerance 0.03 m +accept 8 53 +expect 982148.913 2904707.734 + +tolerance 0.03 m +accept 9 53 +expect 1049483.8 2909998.196 + +tolerance 0.03 m +accept 10 53 +expect 1116745.929 2916144.902 + +tolerance 0.03 m +accept 11 53 +expect 1183924.412 2923146.858 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:2192 +inv + +step +init=epsg:4230 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 760722.92 3457368.68 +expect 5 58 + +tolerance 0.03 m +accept 764566.844 3343948.93 +expect 5 57 + +tolerance 0.03 m +accept 768396.683 3230944.812 +expect 5 56 + +tolerance 0.03 m +accept 772213.973 3118310.947 +expect 5 55 + +tolerance 0.03 m +accept 776020.189 3006003.839 +expect 5 54 + +tolerance 0.03 m +accept 779816.748 2893981.68 +expect 5 53 + +tolerance 0.03 m +accept 717027.292 2668695.784 +expect 4 51 + +tolerance 0.03 m +accept 719385.249 2557252.841 +expect 4 50 + +tolerance 0.03 m +accept 721740.43 2445941.161 +expect 4 49 + +tolerance 0.03 m +accept 726915.752 2201342.519 +expect 4 46.8 + +tolerance 0.03 m +accept 644764.905 2891124.195 +expect 3 53 + +tolerance 0.03 m +accept 712299.916 2892123.369 +expect 4 53 + +tolerance 0.03 m +accept 779816.748 2893981.68 +expect 5 53 + +tolerance 0.03 m +accept 847304.473 2896698.827 +expect 6 53 + +tolerance 0.03 m +accept 914752.168 2900274.371 +expect 7 53 + +tolerance 0.03 m +accept 982148.913 2904707.734 +expect 8 53 + +tolerance 0.03 m +accept 1049483.8 2909998.196 +expect 9 53 + +tolerance 0.03 m +accept 1116745.929 2916144.902 +expect 10 53 + +tolerance 0.03 m +accept 1183924.412 2923146.858 +expect 11 53 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4230 +inv + +step +init=epsg:2192 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 5 58 +roundtrip 1000 + +tolerance 0.006 m +accept 5 57 +roundtrip 1000 + +tolerance 0.006 m +accept 5 56 +roundtrip 1000 + +tolerance 0.006 m +accept 5 55 +roundtrip 1000 + +tolerance 0.006 m +accept 5 54 +roundtrip 1000 + +tolerance 0.006 m +accept 5 53 +roundtrip 1000 + +tolerance 0.006 m +accept 4 51 +roundtrip 1000 + +tolerance 0.006 m +accept 4 50 +roundtrip 1000 + +tolerance 0.006 m +accept 4 49 +roundtrip 1000 + +tolerance 0.006 m +accept 4 46.8 +roundtrip 1000 + +tolerance 0.006 m +accept 3 53 +roundtrip 1000 + +tolerance 0.006 m +accept 4 53 +roundtrip 1000 + +tolerance 0.006 m +accept 5 53 +roundtrip 1000 + +tolerance 0.006 m +accept 6 53 +roundtrip 1000 + +tolerance 0.006 m +accept 7 53 +roundtrip 1000 + +tolerance 0.006 m +accept 8 53 +roundtrip 1000 + +tolerance 0.006 m +accept 9 53 +roundtrip 1000 + +tolerance 0.006 m +accept 10 53 +roundtrip 1000 + +tolerance 0.006 m +accept 11 53 +roundtrip 1000 + + diff --git a/test/gigs/5102.2.gie b/test/gigs/5102.2.gie new file mode 100644 index 00000000..db812dbd --- /dev/null +++ b/test/gigs/5102.2.gie @@ -0,0 +1,252 @@ +-------------------------------------------------------------------------------- + +Test 5102 (part 2), Lambert Conic Conformal (1SP), v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4807 +inv + +step +init=epsg:27572 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 2.9586342556 64.4444444444 +expect 760724.023 3457334.864 + +tolerance 0.03 m +accept 2.9586342556 63.3333333333 +expect 764567.882 3343917.044 + +tolerance 0.03 m +accept 2.9586342556 62.2222222222 +expect 768397.648 3230915.06 + +tolerance 0.03 m +accept 2.9586342556 61.1111111111 +expect 772214.859 3118283.535 + +tolerance 0.03 m +accept 2.9586342556 60 +expect 776020.989 3005978.979 + +tolerance 0.03 m +accept 2.9586342556 58.8888888889 +expect 779817.454 2893959.584 + +tolerance 0.03 m +accept 1.8475231444 56.6666666667 +expect 717027.602 2668679.866 + +tolerance 0.03 m +accept 1.8475231444 55.5555555556 +expect 719385.487 2557240.347 + +tolerance 0.03 m +accept 1.8475231444 54.4444444444 +expect 721740.59 2445932.319 + +tolerance 0.03 m +accept 1.8475231444 52 +expect 726915.726 2201342.51839 + +tolerance 0.03 m +accept 0.7364120333 58.8888888889 +expect 644765.081 2891102.088 + +tolerance 0.03 m +accept 1.8475231444 58.8888888889 +expect 712300.356 2892101.266 + +tolerance 0.03 m +accept 2.9586342556 58.8888888889 +expect 779817.454 2893959.584 + +tolerance 0.03 m +accept 4.0697453667 58.8888888889 +expect 847305.444 2896676.742 + +tolerance 0.03 m +accept 5.1808564778 58.8888888889 +expect 914753.403 2900252.301 + +tolerance 0.03 m +accept 6.2919675889 58.8888888889 +expect 982150.413 2904685.68 + +tolerance 0.03 m +accept 7.4030787 58.8888888889 +expect 1049485.565 2909976.163 + +tolerance 0.03 m +accept 8.5141898111 58.8888888889 +expect 1116747.958 2916122.894 + +tolerance 0.03 m +accept 9.6253009222 58.8888888889 +expect 1183926.705 2923124.876 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:27572 +inv + +step +init=epsg:4807 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 760724.023 3457334.864 +expect 2.9586342556 64.4444444444 + +tolerance 0.03 m +accept 764567.882 3343917.044 +expect 2.9586342556 63.3333333333 + +tolerance 0.03 m +accept 768397.648 3230915.06 +expect 2.9586342556 62.2222222222 + +tolerance 0.03 m +accept 772214.859 3118283.535 +expect 2.9586342556 61.1111111111 + +tolerance 0.03 m +accept 776020.989 3005978.979 +expect 2.9586342556 60 + +tolerance 0.03 m +accept 779817.454 2893959.584 +expect 2.9586342556 58.8888888889 + +tolerance 0.03 m +accept 717027.602 2668679.866 +expect 1.8475231444 56.6666666667 + +tolerance 0.03 m +accept 719385.487 2557240.347 +expect 1.8475231444 55.5555555556 + +tolerance 0.03 m +accept 721740.59 2445932.319 +expect 1.8475231444 54.4444444444 + +tolerance 0.03 m +accept 726915.726 2201342.51839 +expect 1.8475231444 52 + +tolerance 0.03 m +accept 644765.081 2891102.088 +expect 0.7364120333 58.8888888889 + +tolerance 0.03 m +accept 712300.356 2892101.266 +expect 1.8475231444 58.8888888889 + +tolerance 0.03 m +accept 779817.454 2893959.584 +expect 2.9586342556 58.8888888889 + +tolerance 0.03 m +accept 847305.444 2896676.742 +expect 4.0697453667 58.8888888889 + +tolerance 0.03 m +accept 914753.403 2900252.301 +expect 5.1808564778 58.8888888889 + +tolerance 0.03 m +accept 982150.413 2904685.68 +expect 6.2919675889 58.8888888889 + +tolerance 0.03 m +accept 1049485.565 2909976.163 +expect 7.4030787 58.8888888889 + +tolerance 0.03 m +accept 1116747.958 2916122.894 +expect 8.5141898111 58.8888888889 + +tolerance 0.03 m +accept 1183926.705 2923124.876 +expect 9.6253009222 58.8888888889 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4807 +inv + +step +init=epsg:27572 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 2.9586342556 64.4444444444 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9586342556 63.3333333333 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9586342556 62.2222222222 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9586342556 61.1111111111 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9586342556 60 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9586342556 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 1.8475231444 56.6666666667 +roundtrip 1000 + +tolerance 0.006 m +accept 1.8475231444 55.5555555556 +roundtrip 1000 + +tolerance 0.006 m +accept 1.8475231444 54.4444444444 +roundtrip 1000 + +tolerance 0.006 m +accept 1.8475231444 52 +roundtrip 1000 + +tolerance 0.006 m +accept 0.7364120333 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 1.8475231444 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9586342556 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 4.0697453667 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 5.1808564778 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 6.2919675889 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 7.4030787 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 8.5141898111 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 9.6253009222 58.8888888889 +roundtrip 1000 + + diff --git a/test/gigs/5103.1.gie b/test/gigs/5103.1.gie new file mode 100644 index 00000000..f00ed019 --- /dev/null +++ b/test/gigs/5103.1.gie @@ -0,0 +1,264 @@ +-------------------------------------------------------------------------------- + +Test 5103 (part 1), Lambert Conic Conformal (2SP), v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4313 +inv + +step +init=epsg:31370 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 5 58 +expect 187742.7 969521.653 + +tolerance 0.03 m +accept 5 57 +expect 188698.877 857277.135 + +tolerance 0.03 m +accept 5 56 +expect 189652.853 745291.184 + +tolerance 0.03 m +accept 5 55 +expect 190604.967 633523.672 + +tolerance 0.03 m +accept 5 54 +expect 191555.55 521935.9 + +tolerance 0.03 m +accept 5 53 +expect 192504.921 410490.433 + +tolerance 0.03 m +accept 5.3876389 52.1561606 +expect 219843.841 316827.604 + +tolerance 0.03 m +accept 4 51 +expect 124202.936 187756.876 + +tolerance 0.03 m +accept 4 50 +expect 123652.406 76521.628 + +tolerance 0.03 m +accept 4 49 +expect 123101.889 -34711.068 + +tolerance 0.03 m +accept 3.3137281 47.9752611 +expect 71254.553 -148236.592 + +tolerance 0.03 m +accept 3 53 +expect 58108.966 411155.591 + +tolerance 0.03 m +accept 4 53 +expect 125304.704 410370.504 + +tolerance 0.03 m +accept 5 53 +expect 192504.921 410490.433 + +tolerance 0.03 m +accept 6 53 +expect 259697.429 411515.356 + +tolerance 0.03 m +accept 7 53 +expect 326870.04 413445.087 + +tolerance 0.03 m +accept 8 53 +expect 394010.571 416279.276 + +tolerance 0.03 m +accept 9 53 +expect 461106.844 420017.408 + +tolerance 0.03 m +accept 10 53 +expect 528146.69 424658.807 + +tolerance 0.03 m +accept 11 53 +expect 595117.95 430202.63 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:31370 +inv + +step +init=epsg:4313 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 187742.7 969521.653 +expect 5 58 + +tolerance 0.03 m +accept 188698.877 857277.135 +expect 5 57 + +tolerance 0.03 m +accept 189652.853 745291.184 +expect 5 56 + +tolerance 0.03 m +accept 190604.967 633523.672 +expect 5 55 + +tolerance 0.03 m +accept 191555.55 521935.9 +expect 5 54 + +tolerance 0.03 m +accept 192504.921 410490.433 +expect 5 53 + +tolerance 0.03 m +accept 219843.841 316827.604 +expect 5.3876389 52.1561606 + +tolerance 0.03 m +accept 124202.936 187756.876 +expect 4 51 + +tolerance 0.03 m +accept 123652.406 76521.628 +expect 4 50 + +tolerance 0.03 m +accept 123101.889 -34711.068 +expect 4 49 + +tolerance 0.03 m +accept 71254.553 -148236.592 +expect 3.3137281 47.9752611 + +tolerance 0.03 m +accept 58108.966 411155.591 +expect 3 53 + +tolerance 0.03 m +accept 125304.704 410370.504 +expect 4 53 + +tolerance 0.03 m +accept 192504.921 410490.433 +expect 5 53 + +tolerance 0.03 m +accept 259697.429 411515.356 +expect 6 53 + +tolerance 0.03 m +accept 326870.04 413445.087 +expect 7 53 + +tolerance 0.03 m +accept 394010.571 416279.276 +expect 8 53 + +tolerance 0.03 m +accept 461106.844 420017.408 +expect 9 53 + +tolerance 0.03 m +accept 528146.69 424658.807 +expect 10 53 + +tolerance 0.03 m +accept 595117.95 430202.63 +expect 11 53 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4313 +inv + +step +init=epsg:31370 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 5 58 +roundtrip 1000 + +tolerance 0.006 m +accept 5 57 +roundtrip 1000 + +tolerance 0.006 m +accept 5 56 +roundtrip 1000 + +tolerance 0.006 m +accept 5 55 +roundtrip 1000 + +tolerance 0.006 m +accept 5 54 +roundtrip 1000 + +tolerance 0.006 m +accept 5 53 +roundtrip 1000 + +tolerance 0.006 m +accept 5.3876389 52.1561606 +roundtrip 1000 + +tolerance 0.006 m +accept 4 51 +roundtrip 1000 + +tolerance 0.006 m +accept 4 50 +roundtrip 1000 + +tolerance 0.006 m +accept 4 49 +roundtrip 1000 + +tolerance 0.006 m +accept 3.3137281 47.9752611 +roundtrip 1000 + +tolerance 0.006 m +accept 3 53 +roundtrip 1000 + +tolerance 0.006 m +accept 4 53 +roundtrip 1000 + +tolerance 0.006 m +accept 5 53 +roundtrip 1000 + +tolerance 0.006 m +accept 6 53 +roundtrip 1000 + +tolerance 0.006 m +accept 7 53 +roundtrip 1000 + +tolerance 0.006 m +accept 8 53 +roundtrip 1000 + +tolerance 0.006 m +accept 9 53 +roundtrip 1000 + +tolerance 0.006 m +accept 10 53 +roundtrip 1000 + +tolerance 0.006 m +accept 11 53 +roundtrip 1000 + + diff --git a/test/gigs/5103.2.gie b/test/gigs/5103.2.gie new file mode 100644 index 00000000..3975e9d8 --- /dev/null +++ b/test/gigs/5103.2.gie @@ -0,0 +1,144 @@ +-------------------------------------------------------------------------------- + +Test 5103 (part 2), Lambert Conic Conformal (2SP), v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4152 +inv + +step +init=epsg:2921 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept -110 49 +expect 2003937.27 6452491.7 + +tolerance 0.03 m +accept -110 47 +expect 2016621.93 5717728.61 + +tolerance 0.03 m +accept -110 45 +expect 2029255.57 4985920.56 + +tolerance 0.03 m +accept -110 43 +expect 2041855.08 4256089.74 + +tolerance 0.03 m +accept -110 41 +expect 2054436.57 3527302.73 + +tolerance 0.03 m +accept -110 41 +expect 2054436.57 3527302.73 + +tolerance 0.03 m +accept -108 41 +expect 2606245.52 3543182.55 + +tolerance 0.03 m +accept -106 41 +expect 3157542.86 3571757.39 + +tolerance 0.03 m +accept -104 41 +expect 3708036.57 3613012.12 + +tolerance 0.03 m +accept -102 41 +expect 4257435.06 3666924.89 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:2921 +inv + +step +init=epsg:4152 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 2003937.27 6452491.7 +expect -110 49 + +tolerance 0.03 m +accept 2016621.93 5717728.61 +expect -110 47 + +tolerance 0.03 m +accept 2029255.57 4985920.56 +expect -110 45 + +tolerance 0.03 m +accept 2041855.08 4256089.74 +expect -110 43 + +tolerance 0.03 m +accept 2054436.57 3527302.73 +expect -110 41 + +tolerance 0.03 m +accept 2054436.57 3527302.73 +expect -110 41 + +tolerance 0.03 m +accept 2606245.52 3543182.55 +expect -108 41 + +tolerance 0.03 m +accept 3157542.86 3571757.39 +expect -106 41 + +tolerance 0.03 m +accept 3708036.57 3613012.12 +expect -104 41 + +tolerance 0.03 m +accept 4257435.06 3666924.89 +expect -102 41 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4152 +inv + +step +init=epsg:2921 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept -110 49 +roundtrip 1000 + +tolerance 0.006 m +accept -110 47 +roundtrip 1000 + +tolerance 0.006 m +accept -110 45 +roundtrip 1000 + +tolerance 0.006 m +accept -110 43 +roundtrip 1000 + +tolerance 0.006 m +accept -110 41 +roundtrip 1000 + +tolerance 0.006 m +accept -110 41 +roundtrip 1000 + +tolerance 0.006 m +accept -108 41 +roundtrip 1000 + +tolerance 0.006 m +accept -106 41 +roundtrip 1000 + +tolerance 0.006 m +accept -104 41 +roundtrip 1000 + +tolerance 0.006 m +accept -102 41 +roundtrip 1000 + + diff --git a/test/gigs/5103.3.gie b/test/gigs/5103.3.gie new file mode 100644 index 00000000..b8965132 --- /dev/null +++ b/test/gigs/5103.3.gie @@ -0,0 +1,144 @@ +-------------------------------------------------------------------------------- + +Test 5103 (part 3), Lambert Conic Conformal (2SP), v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4152 +inv + +step +init=epsg:3568 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept -110 49 +expect 2003933.27 6452478.8 + +tolerance 0.03 m +accept -110 47 +expect 2016617.9 5717717.18 + +tolerance 0.03 m +accept -110 45 +expect 2029251.51 4985910.59 + +tolerance 0.03 m +accept -110 43 +expect 2041851.0 4256081.23 + +tolerance 0.03 m +accept -110 41 +expect 2054432.46 3527295.67 + +tolerance 0.03 m +accept -110 41 +expect 2054432.46 3527295.67 + +tolerance 0.03 m +accept -108 41 +expect 2606240.3 3543175.46 + +tolerance 0.03 m +accept -106 41 +expect 3157536.54 3571750.25 + +tolerance 0.03 m +accept -104 41 +expect 3708029.16 3613004.9 + +tolerance 0.03 m +accept -102 41 +expect 4257426.54 3666917.56 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:3568 +inv + +step +init=epsg:4152 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 2003933.27 6452478.8 +expect -110 49 + +tolerance 0.03 m +accept 2016617.9 5717717.18 +expect -110 47 + +tolerance 0.03 m +accept 2029251.51 4985910.59 +expect -110 45 + +tolerance 0.03 m +accept 2041851.0 4256081.23 +expect -110 43 + +tolerance 0.03 m +accept 2054432.46 3527295.67 +expect -110 41 + +tolerance 0.03 m +accept 2054432.46 3527295.67 +expect -110 41 + +tolerance 0.03 m +accept 2606240.3 3543175.46 +expect -108 41 + +tolerance 0.03 m +accept 3157536.54 3571750.25 +expect -106 41 + +tolerance 0.03 m +accept 3708029.16 3613004.9 +expect -104 41 + +tolerance 0.03 m +accept 4257426.54 3666917.56 +expect -102 41 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4152 +inv + +step +init=epsg:3568 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept -110 49 +roundtrip 1000 + +tolerance 0.006 m +accept -110 47 +roundtrip 1000 + +tolerance 0.006 m +accept -110 45 +roundtrip 1000 + +tolerance 0.006 m +accept -110 43 +roundtrip 1000 + +tolerance 0.006 m +accept -110 41 +roundtrip 1000 + +tolerance 0.006 m +accept -110 41 +roundtrip 1000 + +tolerance 0.006 m +accept -108 41 +roundtrip 1000 + +tolerance 0.006 m +accept -106 41 +roundtrip 1000 + +tolerance 0.006 m +accept -104 41 +roundtrip 1000 + +tolerance 0.006 m +accept -102 41 +roundtrip 1000 + + diff --git a/test/gigs/5104.gie b/test/gigs/5104.gie new file mode 100644 index 00000000..10c42935 --- /dev/null +++ b/test/gigs/5104.gie @@ -0,0 +1,264 @@ +-------------------------------------------------------------------------------- + +Test 5104, Oblique stereographic, v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4289 +inv + +step +init=epsg:28992 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 5 58 +expect 132023.27 1114054.87 + +tolerance 0.05 m +accept 5 57 +expect 131405.466 1002468.081 + +tolerance 0.05 m +accept 5 56 +expect 130792.264 890981.281 + +tolerance 0.05 m +accept 5 55 +expect 130183.56 779577.7 + +tolerance 0.05 m +accept 5 54 +expect 129579.26 668240.58 + +tolerance 0.05 m +accept 5 53 +expect 128979.26 556953.19 + +tolerance 0.05 m +accept 5.38763888889 52.1561605556 +expect 155000 463000 + +tolerance 0.05 m +accept 4 51 +expect 57605.946 335312.662 + +tolerance 0.05 m +accept 4 50 +expect 55502.306 224086.514 + +tolerance 0.05 m +accept 4.0 49.0 +expect 53412.76 112842.73 + +tolerance 0.05 m +accept 3.31372805556 47.9752611111 +expect 0 0 + +tolerance 0.05 m +accept 3 53 +expect -5253.06 559535.55 + +tolerance 0.05 m +accept 4 53 +expect 61856.78 557779.12 + +tolerance 0.05 m +accept 5 53 +expect 128979.26 556953.19 + +tolerance 0.05 m +accept 6 53 +expect 196105.28 557057.74 + +tolerance 0.05 m +accept 7 53 +expect 263225.72 558092.77 + +tolerance 0.05 m +accept 8 53 +expect 330331.46 560058.31 + +tolerance 0.05 m +accept 9 53 +expect 397413.385 562954.436 + +tolerance 0.05 m +accept 10 53 +expect 464462.35 566781.24 + +tolerance 0.05 m +accept 11 53 +expect 531469.2 571538.84 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:28992 +inv + +step +init=epsg:4289 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 132023.27 1114054.87 +expect 5 58 + +tolerance 0.05 m +accept 131405.466 1002468.081 +expect 5 57 + +tolerance 0.05 m +accept 130792.264 890981.281 +expect 5 56 + +tolerance 0.05 m +accept 130183.56 779577.7 +expect 5 55 + +tolerance 0.05 m +accept 129579.26 668240.58 +expect 5 54 + +tolerance 0.05 m +accept 128979.26 556953.19 +expect 5 53 + +tolerance 0.05 m +accept 155000 463000 +expect 5.38763888889 52.1561605556 + +tolerance 0.05 m +accept 57605.946 335312.662 +expect 4 51 + +tolerance 0.05 m +accept 55502.306 224086.514 +expect 4 50 + +tolerance 0.05 m +accept 53412.76 112842.73 +expect 4.0 49.0 + +tolerance 0.05 m +accept 0 0 +expect 3.31372805556 47.9752611111 + +tolerance 0.05 m +accept -5253.06 559535.55 +expect 3 53 + +tolerance 0.05 m +accept 61856.78 557779.12 +expect 4 53 + +tolerance 0.05 m +accept 128979.26 556953.19 +expect 5 53 + +tolerance 0.05 m +accept 196105.28 557057.74 +expect 6 53 + +tolerance 0.05 m +accept 263225.72 558092.77 +expect 7 53 + +tolerance 0.05 m +accept 330331.46 560058.31 +expect 8 53 + +tolerance 0.05 m +accept 397413.385 562954.436 +expect 9 53 + +tolerance 0.05 m +accept 464462.35 566781.24 +expect 10 53 + +tolerance 0.05 m +accept 531469.2 571538.84 +expect 11 53 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4289 +inv + +step +init=epsg:28992 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 5 58 +roundtrip 1000 + +tolerance 0.006 m +accept 5 57 +roundtrip 1000 + +tolerance 0.006 m +accept 5 56 +roundtrip 1000 + +tolerance 0.006 m +accept 5 55 +roundtrip 1000 + +tolerance 0.006 m +accept 5 54 +roundtrip 1000 + +tolerance 0.006 m +accept 5 53 +roundtrip 1000 + +tolerance 0.006 m +accept 5.38763888889 52.1561605556 +roundtrip 1000 + +tolerance 0.006 m +accept 4 51 +roundtrip 1000 + +tolerance 0.006 m +accept 4 50 +roundtrip 1000 + +tolerance 0.006 m +accept 4.0 49.0 +roundtrip 1000 + +tolerance 0.006 m +accept 3.31372805556 47.9752611111 +roundtrip 1000 + +tolerance 0.006 m +accept 3 53 +roundtrip 1000 + +tolerance 0.006 m +accept 4 53 +roundtrip 1000 + +tolerance 0.006 m +accept 5 53 +roundtrip 1000 + +tolerance 0.006 m +accept 6 53 +roundtrip 1000 + +tolerance 0.006 m +accept 7 53 +roundtrip 1000 + +tolerance 0.006 m +accept 8 53 +roundtrip 1000 + +tolerance 0.006 m +accept 9 53 +roundtrip 1000 + +tolerance 0.006 m +accept 10 53 +roundtrip 1000 + +tolerance 0.006 m +accept 11 53 +roundtrip 1000 + + diff --git a/test/gigs/5105.1.gie b/test/gigs/5105.1.gie new file mode 100644 index 00000000..a0803d2b --- /dev/null +++ b/test/gigs/5105.1.gie @@ -0,0 +1,300 @@ +-------------------------------------------------------------------------------- + +Test 5105 (part 1), Oblique Mercator (variant B), v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4742 +inv + +step +proj=somerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +no_uoff +gamma=53.13010236111111 +ellps=GRS80 +units=m +no_defs +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 117 12 +expect 807919.14 1329535.33 + +tolerance 0.05 m +accept 117 10 +expect 808784.98 1107678.47 + +tolerance 0.05 m +accept 117 9 +expect 809334.18 996918.21 + +tolerance 0.05 m +accept 117 8 +expect 809939.3 886240.18 + +tolerance 0.05 m +accept 116.8465522 6.8784583 +expect 793704.63 762081.05 + +tolerance 0.05 m +accept 117 6 +expect 811253.3 665041.27 + +tolerance 0.05 m +accept 117 5 +expect 811930.35 554475.63 + +tolerance 0.05 m +accept 117 4 +expect 812599.58 443902.71 + +tolerance 0.05 m +accept 115 4 +expect 590521.15 442890.86 + +tolerance 0.05 m +accept 117 3 +expect 813245.13 333300.13 + +tolerance 0.05 m +accept 117 2 +expect 813851.07 222645.51 + +tolerance 0.05 m +accept 117.0 1.0 +expect 814401.38 111916.45 + +tolerance 0.05 m +accept 109.6858208 -0.0001733 +expect 0 0 + +tolerance 0.05 m +accept 123 6 +expect 1475669.28 673118.57 + +tolerance 0.05 m +accept 122 6 +expect 1364854.86 671146.25 + +tolerance 0.05 m +accept 121 6 +expect 1254086.17 669446.25 + +tolerance 0.05 m +accept 120.0 6.0 +expect 1143352.6 668002.07 + +tolerance 0.05 m +accept 119.0 6.0 +expect 1032643.31 666797.35 + +tolerance 0.05 m +accept 118.0 6.0 +expect 921947.29 665815.82 + +tolerance 0.05 m +accept 117.0 6.0 +expect 811253.3 665041.27 + +tolerance 0.05 m +accept 116.0 6.0 +expect 700549.97 664457.59 + +tolerance 0.05 m +accept 115.0 6.0 +expect 589825.71 664048.72 + +tolerance 0.05 m +accept 114 6 +expect 479068.802 663798.63 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +proj=somerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +no_uoff +gamma=53.13010236111111 +ellps=GRS80 +units=m +no_defs +inv + +step +init=epsg:4742 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 807919.14 1329535.33 +expect 117 12 + +tolerance 0.05 m +accept 808784.98 1107678.47 +expect 117 10 + +tolerance 0.05 m +accept 809334.18 996918.21 +expect 117 9 + +tolerance 0.05 m +accept 809939.3 886240.18 +expect 117 8 + +tolerance 0.05 m +accept 793704.63 762081.05 +expect 116.8465522 6.8784583 + +tolerance 0.05 m +accept 811253.3 665041.27 +expect 117 6 + +tolerance 0.05 m +accept 811930.35 554475.63 +expect 117 5 + +tolerance 0.05 m +accept 812599.58 443902.71 +expect 117 4 + +tolerance 0.05 m +accept 590521.15 442890.86 +expect 115 4 + +tolerance 0.05 m +accept 813245.13 333300.13 +expect 117 3 + +tolerance 0.05 m +accept 813851.07 222645.51 +expect 117 2 + +tolerance 0.05 m +accept 814401.38 111916.45 +expect 117.0 1.0 + +tolerance 0.05 m +accept 0 0 +expect 109.6858208 -0.0001733 + +tolerance 0.05 m +accept 1475669.28 673118.57 +expect 123 6 + +tolerance 0.05 m +accept 1364854.86 671146.25 +expect 122 6 + +tolerance 0.05 m +accept 1254086.17 669446.25 +expect 121 6 + +tolerance 0.05 m +accept 1143352.6 668002.07 +expect 120.0 6.0 + +tolerance 0.05 m +accept 1032643.31 666797.35 +expect 119.0 6.0 + +tolerance 0.05 m +accept 921947.29 665815.82 +expect 118.0 6.0 + +tolerance 0.05 m +accept 811253.3 665041.27 +expect 117.0 6.0 + +tolerance 0.05 m +accept 700549.97 664457.59 +expect 116.0 6.0 + +tolerance 0.05 m +accept 589825.71 664048.72 +expect 115.0 6.0 + +tolerance 0.05 m +accept 479068.802 663798.63 +expect 114 6 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4742 +inv + +step +proj=somerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +no_uoff +gamma=53.13010236111111 +ellps=GRS80 +units=m +no_defs +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 117 12 +roundtrip 1000 + +tolerance 0.006 m +accept 117 10 +roundtrip 1000 + +tolerance 0.006 m +accept 117 9 +roundtrip 1000 + +tolerance 0.006 m +accept 117 8 +roundtrip 1000 + +tolerance 0.006 m +accept 116.8465522 6.8784583 +roundtrip 1000 + +tolerance 0.006 m +accept 117 6 +roundtrip 1000 + +tolerance 0.006 m +accept 117 5 +roundtrip 1000 + +tolerance 0.006 m +accept 117 4 +roundtrip 1000 + +tolerance 0.006 m +accept 115 4 +roundtrip 1000 + +tolerance 0.006 m +accept 117 3 +roundtrip 1000 + +tolerance 0.006 m +accept 117 2 +roundtrip 1000 + +tolerance 0.006 m +accept 117.0 1.0 +roundtrip 1000 + +tolerance 0.006 m +accept 109.6858208 -0.0001733 +roundtrip 1000 + +tolerance 0.006 m +accept 123 6 +roundtrip 1000 + +tolerance 0.006 m +accept 122 6 +roundtrip 1000 + +tolerance 0.006 m +accept 121 6 +roundtrip 1000 + +tolerance 0.006 m +accept 120.0 6.0 +roundtrip 1000 + +tolerance 0.006 m +accept 119.0 6.0 +roundtrip 1000 + +tolerance 0.006 m +accept 118.0 6.0 +roundtrip 1000 + +tolerance 0.006 m +accept 117.0 6.0 +roundtrip 1000 + +tolerance 0.006 m +accept 116.0 6.0 +roundtrip 1000 + +tolerance 0.006 m +accept 115.0 6.0 +roundtrip 1000 + +tolerance 0.006 m +accept 114 6 +roundtrip 1000 + + diff --git a/test/gigs/5105.2.gie b/test/gigs/5105.2.gie new file mode 100644 index 00000000..190c9176 --- /dev/null +++ b/test/gigs/5105.2.gie @@ -0,0 +1,168 @@ +-------------------------------------------------------------------------------- + +Test 5105 (part 2), Oblique Mercator (variant B), v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4237 +inv + +step +init=epsg:23700 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 16 48.5 +expect 424714.235 355124.6 + +tolerance 0.05 m +accept 17.2 48.0 +expect 512056.188 296756.716 + +tolerance 0.05 m +accept 17.5826505556 47.6361347222 +expect 539847.765 255701.086 + +tolerance 0.05 m +accept 19.0485716667 47.1443936111 +expect 650000 200000 + +tolerance 0.05 m +accept 19.2234294444 46.8756683333 +expect 663329.053 170142.318 + +tolerance 0.05 m +accept 20.1357405556 46.3703011111 +expect 733651.455 114532.099 + +tolerance 0.05 m +accept 21.4 45.7 +expect 833148.855 42191.482 + +tolerance 0.05 m +accept 22.3 49.3 +expect 886565.935 444656.613 + +tolerance 0.05 m +accept 21.2941986111 48.4899747222 +expect 815999.993 351999.998 + +tolerance 0.05 m +accept 19.2234294444 46.8756683333 +expect 663329.053 170142.318 + +tolerance 0.05 m +accept 17.6191536111 46.0687463889 +expect 539403.958 81440.103 + +tolerance 0.05 m +accept 16.36 45.5 +expect 439836.709 20816.456 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:23700 +inv + +step +init=epsg:4237 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 424714.235 355124.6 +expect 16 48.5 + +tolerance 0.05 m +accept 512056.188 296756.716 +expect 17.2 48.0 + +tolerance 0.05 m +accept 539847.765 255701.086 +expect 17.5826505556 47.6361347222 + +tolerance 0.05 m +accept 650000 200000 +expect 19.0485716667 47.1443936111 + +tolerance 0.05 m +accept 663329.053 170142.318 +expect 19.2234294444 46.8756683333 + +tolerance 0.05 m +accept 733651.455 114532.099 +expect 20.1357405556 46.3703011111 + +tolerance 0.05 m +accept 833148.855 42191.482 +expect 21.4 45.7 + +tolerance 0.05 m +accept 886565.935 444656.613 +expect 22.3 49.3 + +tolerance 0.05 m +accept 815999.993 351999.998 +expect 21.2941986111 48.4899747222 + +tolerance 0.05 m +accept 663329.053 170142.318 +expect 19.2234294444 46.8756683333 + +tolerance 0.05 m +accept 539403.958 81440.103 +expect 17.6191536111 46.0687463889 + +tolerance 0.05 m +accept 439836.709 20816.456 +expect 16.36 45.5 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4237 +inv + +step +init=epsg:23700 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 16 48.5 +roundtrip 1000 + +tolerance 0.006 m +accept 17.2 48.0 +roundtrip 1000 + +tolerance 0.006 m +accept 17.5826505556 47.6361347222 +roundtrip 1000 + +tolerance 0.006 m +accept 19.0485716667 47.1443936111 +roundtrip 1000 + +tolerance 0.006 m +accept 19.2234294444 46.8756683333 +roundtrip 1000 + +tolerance 0.006 m +accept 20.1357405556 46.3703011111 +roundtrip 1000 + +tolerance 0.006 m +accept 21.4 45.7 +roundtrip 1000 + +tolerance 0.006 m +accept 22.3 49.3 +roundtrip 1000 + +tolerance 0.006 m +accept 21.2941986111 48.4899747222 +roundtrip 1000 + +tolerance 0.006 m +accept 19.2234294444 46.8756683333 +roundtrip 1000 + +tolerance 0.006 m +accept 17.6191536111 46.0687463889 +roundtrip 1000 + +tolerance 0.006 m +accept 16.36 45.5 +roundtrip 1000 + + diff --git a/test/gigs/5106.gie b/test/gigs/5106.gie new file mode 100644 index 00000000..6c5940ef --- /dev/null +++ b/test/gigs/5106.gie @@ -0,0 +1,300 @@ +-------------------------------------------------------------------------------- + +Test 5106, Hotine Oblique Mercator (variant A), v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4742 +inv + +step +init=epsg:3376 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 117 12 +expect 807919.144 1329535.334 + +tolerance 0.05 m +accept 117 10 +expect 808784.981 1107678.473 + +tolerance 0.05 m +accept 117 9 +expect 809334.177 996918.212 + +tolerance 0.05 m +accept 117 8 +expect 809939.302 886240.183 + +tolerance 0.05 m +accept 116.846552222 6.87845833333 +expect 793704.631 762081.047 + +tolerance 0.05 m +accept 117 6 +expect 811253.303 665041.265 + +tolerance 0.05 m +accept 117 5 +expect 811930.345 554475.627 + +tolerance 0.05 m +accept 117 4 +expect 812599.582 443902.706 + +tolerance 0.05 m +accept 115 4 +expect 590521.147 442890.861 + +tolerance 0.05 m +accept 117 3 +expect 813245.133 333300.13 + +tolerance 0.05 m +accept 117 2 +expect 813851.067 222645.511 + +tolerance 0.05 m +accept 117 1 +expect 814401.375 111916.452 + +tolerance 0.05 m +accept 109.685820833 -0.000173333333333 +expect 0 0 + +tolerance 0.05 m +accept 123 6 +expect 1475669.281 673118.573 + +tolerance 0.05 m +accept 122 6 +expect 1364854.862 671146.254 + +tolerance 0.05 m +accept 121 6 +expect 1254086.173 669446.249 + +tolerance 0.05 m +accept 120 6 +expect 1143352.598 668002.074 + +tolerance 0.05 m +accept 119 6 +expect 1032643.312 666797.354 + +tolerance 0.05 m +accept 118 6 +expect 921947.286 665815.815 + +tolerance 0.05 m +accept 117 6 +expect 811253.303 665041.265 + +tolerance 0.05 m +accept 116 6 +expect 700549.965 664457.586 + +tolerance 0.05 m +accept 115 6 +expect 589825.706 664048.715 + +tolerance 0.05 m +accept 114 6 +expect 479068.802 663798.63 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:3376 +inv + +step +init=epsg:4742 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 807919.144 1329535.334 +expect 117 12 + +tolerance 0.05 m +accept 808784.981 1107678.473 +expect 117 10 + +tolerance 0.05 m +accept 809334.177 996918.212 +expect 117 9 + +tolerance 0.05 m +accept 809939.302 886240.183 +expect 117 8 + +tolerance 0.05 m +accept 793704.631 762081.047 +expect 116.846552222 6.87845833333 + +tolerance 0.05 m +accept 811253.303 665041.265 +expect 117 6 + +tolerance 0.05 m +accept 811930.345 554475.627 +expect 117 5 + +tolerance 0.05 m +accept 812599.582 443902.706 +expect 117 4 + +tolerance 0.05 m +accept 590521.147 442890.861 +expect 115 4 + +tolerance 0.05 m +accept 813245.133 333300.13 +expect 117 3 + +tolerance 0.05 m +accept 813851.067 222645.511 +expect 117 2 + +tolerance 0.05 m +accept 814401.375 111916.452 +expect 117 1 + +tolerance 0.05 m +accept 0 0 +expect 109.685820833 -0.000173333333333 + +tolerance 0.05 m +accept 1475669.281 673118.573 +expect 123 6 + +tolerance 0.05 m +accept 1364854.862 671146.254 +expect 122 6 + +tolerance 0.05 m +accept 1254086.173 669446.249 +expect 121 6 + +tolerance 0.05 m +accept 1143352.598 668002.074 +expect 120 6 + +tolerance 0.05 m +accept 1032643.312 666797.354 +expect 119 6 + +tolerance 0.05 m +accept 921947.286 665815.815 +expect 118 6 + +tolerance 0.05 m +accept 811253.303 665041.265 +expect 117 6 + +tolerance 0.05 m +accept 700549.965 664457.586 +expect 116 6 + +tolerance 0.05 m +accept 589825.706 664048.715 +expect 115 6 + +tolerance 0.05 m +accept 479068.802 663798.63 +expect 114 6 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4742 +inv + +step +init=epsg:3376 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 117 12 +roundtrip 1000 + +tolerance 0.006 m +accept 117 10 +roundtrip 1000 + +tolerance 0.006 m +accept 117 9 +roundtrip 1000 + +tolerance 0.006 m +accept 117 8 +roundtrip 1000 + +tolerance 0.006 m +accept 116.846552222 6.87845833333 +roundtrip 1000 + +tolerance 0.006 m +accept 117 6 +roundtrip 1000 + +tolerance 0.006 m +accept 117 5 +roundtrip 1000 + +tolerance 0.006 m +accept 117 4 +roundtrip 1000 + +tolerance 0.006 m +accept 115 4 +roundtrip 1000 + +tolerance 0.006 m +accept 117 3 +roundtrip 1000 + +tolerance 0.006 m +accept 117 2 +roundtrip 1000 + +tolerance 0.006 m +accept 117 1 +roundtrip 1000 + +tolerance 0.006 m +accept 109.685820833 -0.000173333333333 +roundtrip 1000 + +tolerance 0.006 m +accept 123 6 +roundtrip 1000 + +tolerance 0.006 m +accept 122 6 +roundtrip 1000 + +tolerance 0.006 m +accept 121 6 +roundtrip 1000 + +tolerance 0.006 m +accept 120 6 +roundtrip 1000 + +tolerance 0.006 m +accept 119 6 +roundtrip 1000 + +tolerance 0.006 m +accept 118 6 +roundtrip 1000 + +tolerance 0.006 m +accept 117 6 +roundtrip 1000 + +tolerance 0.006 m +accept 116 6 +roundtrip 1000 + +tolerance 0.006 m +accept 115 6 +roundtrip 1000 + +tolerance 0.006 m +accept 114 6 +roundtrip 1000 + + diff --git a/test/gigs/5107.gie b/test/gigs/5107.gie new file mode 100644 index 00000000..f78e9c22 --- /dev/null +++ b/test/gigs/5107.gie @@ -0,0 +1,180 @@ +-------------------------------------------------------------------------------- + +Test 5107, American Polyconic, v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4674 +inv + +step +proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept -54 0 +expect 5000000.0 10000000.0 + +tolerance 0.05 m +accept -45 6 +expect 5996378.70982 10671650.0559 + +tolerance 0.05 m +accept -45 0 +expect 6001875.41714 10000000.0 + +tolerance 0.05 m +accept -45 -6 +expect 5996378.70982 9328349.94408 + +tolerance 0.05 m +accept -41 -13 +expect 6409689.58688 8526306.26193 + +tolerance 0.05 m +accept -38 -20 +expect 6671808.91963 7707735.72988 + +tolerance 0.05 m +accept -37 -24 +expect 6725584.49173 7240461.99578 + +tolerance 0.05 m +accept -36 -30 +expect 6729619.73995 6543762.57644 + +tolerance 0.05 m +accept -57 -30 +expect 4710574.22344 6676097.81117 + +tolerance 0.05 m +accept -54 -29.3674766667 +expect 5000000.0 6750000.0 + +tolerance 0.05 m +accept -47 -27.5 +expect 5691318.14689 6937461.05067 + +tolerance 0.05 m +accept -37 -24 +expect 6725584.49173 7240461.99578 + +tolerance 0.05 m +accept -30 -22.5 +expect 7458947.70133 7313327.31691 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +inv + +step +init=epsg:4674 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 5000000.0 10000000.0 +expect -54 0 + +tolerance 0.05 m +accept 5996378.70982 10671650.0559 +expect -45 6 + +tolerance 0.05 m +accept 6001875.41714 10000000.0 +expect -45 0 + +tolerance 0.05 m +accept 5996378.70982 9328349.94408 +expect -45 -6 + +tolerance 0.05 m +accept 6409689.58688 8526306.26193 +expect -41 -13 + +tolerance 0.05 m +accept 6671808.91963 7707735.72988 +expect -38 -20 + +tolerance 0.05 m +accept 6725584.49173 7240461.99578 +expect -37 -24 + +tolerance 0.05 m +accept 6729619.73995 6543762.57644 +expect -36 -30 + +tolerance 0.05 m +accept 4710574.22344 6676097.81117 +expect -57 -30 + +tolerance 0.05 m +accept 5000000.0 6750000.0 +expect -54 -29.3674766667 + +tolerance 0.05 m +accept 5691318.14689 6937461.05067 +expect -47 -27.5 + +tolerance 0.05 m +accept 6725584.49173 7240461.99578 +expect -37 -24 + +tolerance 0.05 m +accept 7458947.70133 7313327.31691 +expect -30 -22.5 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4674 +inv + +step +proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept -54 0 +roundtrip 1000 + +tolerance 0.006 m +accept -45 6 +roundtrip 1000 + +tolerance 0.006 m +accept -45 0 +roundtrip 1000 + +tolerance 0.006 m +accept -45 -6 +roundtrip 1000 + +tolerance 0.006 m +accept -41 -13 +roundtrip 1000 + +tolerance 0.006 m +accept -38 -20 +roundtrip 1000 + +tolerance 0.006 m +accept -37 -24 +roundtrip 1000 + +tolerance 0.006 m +accept -36 -30 +roundtrip 1000 + +tolerance 0.006 m +accept -57 -30 +roundtrip 1000 + +tolerance 0.006 m +accept -54 -29.3674766667 +roundtrip 1000 + +tolerance 0.006 m +accept -47 -27.5 +roundtrip 1000 + +tolerance 0.006 m +accept -37 -24 +roundtrip 1000 + +tolerance 0.006 m +accept -30 -22.5 +roundtrip 1000 + + diff --git a/test/gigs/5108.gie b/test/gigs/5108.gie new file mode 100644 index 00000000..a5273a65 --- /dev/null +++ b/test/gigs/5108.gie @@ -0,0 +1,228 @@ +-------------------------------------------------------------------------------- + +Test 5108, Cassini-Soldner, v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4742 +inv + +step +init=epsg:3377 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 106 10 +expect 267186.017 881108.902 + +tolerance 0.05 m +accept 106 9 +expect 268006.024 770398.186 + +tolerance 0.05 m +accept 106 8 +expect 268740.351 659692.254 + +tolerance 0.05 m +accept 106 7 +expect 269388.786 548990.588 + +tolerance 0.05 m +accept 106 6 +expect 269951.141 438292.666 + +tolerance 0.05 m +accept 106 5 +expect 270427.255 327597.962 + +tolerance 0.05 m +accept 106 4 +expect 270816.99 216905.945 + +tolerance 0.05 m +accept 106 3 +expect 271120.234 106216.081 + +tolerance 0.05 m +accept 103.561065778 2.0424676812 +expect 0 0 + +tolerance 0.05 m +accept 103.64025984 1.82776484381 +expect 8813.252 -23740.095 + +tolerance 0.05 m +accept 106 1 +expect 271466.923 -115159.332 + +tolerance 0.05 m +accept 109 5 +expect 603116.703 329668.599 + +tolerance 0.05 m +accept 108 5 +expect 492221.308 328807.336 + +tolerance 0.05 m +accept 107 5 +expect 381324.74 328117.472 + +tolerance 0.05 m +accept 106 5 +expect 270427.255 327597.962 + +tolerance 0.05 m +accept 105 5 +expect 159529.111 327248.012 + +tolerance 0.05 m +accept 104 5 +expect 48630.563 327067.097 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:3377 +inv + +step +init=epsg:4742 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 267186.017 881108.902 +expect 106 10 + +tolerance 0.05 m +accept 268006.024 770398.186 +expect 106 9 + +tolerance 0.05 m +accept 268740.351 659692.254 +expect 106 8 + +tolerance 0.05 m +accept 269388.786 548990.588 +expect 106 7 + +tolerance 0.05 m +accept 269951.141 438292.666 +expect 106 6 + +tolerance 0.05 m +accept 270427.255 327597.962 +expect 106 5 + +tolerance 0.05 m +accept 270816.99 216905.945 +expect 106 4 + +tolerance 0.05 m +accept 271120.234 106216.081 +expect 106 3 + +tolerance 0.05 m +accept 0 0 +expect 103.561065778 2.0424676812 + +tolerance 0.05 m +accept 8813.252 -23740.095 +expect 103.64025984 1.82776484381 + +tolerance 0.05 m +accept 271466.923 -115159.332 +expect 106 1 + +tolerance 0.05 m +accept 603116.703 329668.599 +expect 109 5 + +tolerance 0.05 m +accept 492221.308 328807.336 +expect 108 5 + +tolerance 0.05 m +accept 381324.74 328117.472 +expect 107 5 + +tolerance 0.05 m +accept 270427.255 327597.962 +expect 106 5 + +tolerance 0.05 m +accept 159529.111 327248.012 +expect 105 5 + +tolerance 0.05 m +accept 48630.563 327067.097 +expect 104 5 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4742 +inv + +step +init=epsg:3377 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 106 10 +roundtrip 1000 + +tolerance 0.006 m +accept 106 9 +roundtrip 1000 + +tolerance 0.006 m +accept 106 8 +roundtrip 1000 + +tolerance 0.006 m +accept 106 7 +roundtrip 1000 + +tolerance 0.006 m +accept 106 6 +roundtrip 1000 + +tolerance 0.006 m +accept 106 5 +roundtrip 1000 + +tolerance 0.006 m +accept 106 4 +roundtrip 1000 + +tolerance 0.006 m +accept 106 3 +roundtrip 1000 + +tolerance 0.006 m +accept 103.561065778 2.0424676812 +roundtrip 1000 + +tolerance 0.006 m +accept 103.64025984 1.82776484381 +roundtrip 1000 + +tolerance 0.006 m +accept 106 1 +roundtrip 1000 + +tolerance 0.006 m +accept 109 5 +roundtrip 1000 + +tolerance 0.006 m +accept 108 5 +roundtrip 1000 + +tolerance 0.006 m +accept 107 5 +roundtrip 1000 + +tolerance 0.006 m +accept 106 5 +roundtrip 1000 + +tolerance 0.006 m +accept 105 5 +roundtrip 1000 + +tolerance 0.006 m +accept 104 5 +roundtrip 1000 + + diff --git a/test/gigs/5109.gie b/test/gigs/5109.gie new file mode 100644 index 00000000..a104e66f --- /dev/null +++ b/test/gigs/5109.gie @@ -0,0 +1,180 @@ +-------------------------------------------------------------------------------- + +Test 5109, Albers Equal Area, v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4283 +inv + +step +init=epsg:3577 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 132 0 +expect 0 0 + +tolerance 0.05 m +accept 132 -27 +expect 0 -2926820.89 + +tolerance 0.05 m +accept 140 0 +expect 966973.98 -30285.6 + +tolerance 0.05 m +accept 140 -20 +expect 832799.36 -2170181.93 + +tolerance 0.05 m +accept 140 -40 +expect 693250.21 -4395794.49 + +tolerance 0.05 m +accept 140 -60 +expect 567313.29 -6404311.16 + +tolerance 0.05 m +accept 140 -80 +expect 486878.674 -7687130.029 + +tolerance 0.05 m +accept 120 -60 +expect -850274.75 -6426505.13 + +tolerance 0.05 m +accept 130 -60 +expect -141915.26 -6387653.78 + +tolerance 0.05 m +accept 140 -60 +expect 567313.29 -6404311.16 + +tolerance 0.05 m +accept 150 -60 +expect 1273067.747 -6476375.276 + +tolerance 0.05 m +accept 160 -60 +expect 1971026.26 -6603404.82 + +tolerance 0.05 m +accept 170 -60 +expect 2656914.716 -6784621.89 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:3577 +inv + +step +init=epsg:4283 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 0 0 +expect 132 0 + +tolerance 0.05 m +accept 0 -2926820.89 +expect 132 -27 + +tolerance 0.05 m +accept 966973.98 -30285.6 +expect 140 0 + +tolerance 0.05 m +accept 832799.36 -2170181.93 +expect 140 -20 + +tolerance 0.05 m +accept 693250.21 -4395794.49 +expect 140 -40 + +tolerance 0.05 m +accept 567313.29 -6404311.16 +expect 140 -60 + +tolerance 0.05 m +accept 486878.674 -7687130.029 +expect 140 -80 + +tolerance 0.05 m +accept -850274.75 -6426505.13 +expect 120 -60 + +tolerance 0.05 m +accept -141915.26 -6387653.78 +expect 130 -60 + +tolerance 0.05 m +accept 567313.29 -6404311.16 +expect 140 -60 + +tolerance 0.05 m +accept 1273067.747 -6476375.276 +expect 150 -60 + +tolerance 0.05 m +accept 1971026.26 -6603404.82 +expect 160 -60 + +tolerance 0.05 m +accept 2656914.716 -6784621.89 +expect 170 -60 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4283 +inv + +step +init=epsg:3577 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 132 0 +roundtrip 1000 + +tolerance 0.006 m +accept 132 -27 +roundtrip 1000 + +tolerance 0.006 m +accept 140 0 +roundtrip 1000 + +tolerance 0.006 m +accept 140 -20 +roundtrip 1000 + +tolerance 0.006 m +accept 140 -40 +roundtrip 1000 + +tolerance 0.006 m +accept 140 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 140 -80 +roundtrip 1000 + +tolerance 0.006 m +accept 120 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 130 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 140 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 150 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 160 -60 +roundtrip 1000 + +tolerance 0.006 m +accept 170 -60 +roundtrip 1000 + + diff --git a/test/gigs/5110.gie b/test/gigs/5110.gie new file mode 100644 index 00000000..031dfac9 --- /dev/null +++ b/test/gigs/5110.gie @@ -0,0 +1,156 @@ +-------------------------------------------------------------------------------- + +Test 5110, Lambert Azimuthal Equal Area, v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4258 +inv + +step +init=epsg:3035 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 5 70 +expect 4127824.65822 5214090.649 + +tolerance 0.05 m +accept 5 60 +expect 4041548.13 4109791.66 + +tolerance 0.05 m +accept 5 50 +expect 3962799.45 2999718.853 + +tolerance 0.05 m +accept 5 40 +expect 3892127.02 1892578.962 + +tolerance 0.05 m +accept 5 30 +expect 3830117.9 796781.677 + +tolerance 0.05 m +accept 10 52 +expect 4321000.0 3210000.0 + +tolerance 0.05 m +accept 0.0 50.0 +expect 3606514.43 3036305.967 + +tolerance 0.05 m +accept 3.0 50.0 +expect 3819948.288 3011432.894 + +tolerance 0.05 m +accept 5.0 50.0 +expect 3962799.451 2999718.853 + +tolerance 0.05 m +accept 8.0 50.0 +expect 4177612.521 2989464.315 + +tolerance 0.05 m +accept 10.0 50.0 +expect 4321000.0 2987510.567 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:3035 +inv + +step +init=epsg:4258 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 4127824.65822 5214090.649 +expect 5 70 + +tolerance 0.05 m +accept 4041548.13 4109791.66 +expect 5 60 + +tolerance 0.05 m +accept 3962799.45 2999718.853 +expect 5 50 + +tolerance 0.05 m +accept 3892127.02 1892578.962 +expect 5 40 + +tolerance 0.05 m +accept 3830117.9 796781.677 +expect 5 30 + +tolerance 0.05 m +accept 4321000.0 3210000.0 +expect 10 52 + +tolerance 0.05 m +accept 3606514.43 3036305.967 +expect 0.0 50.0 + +tolerance 0.05 m +accept 3819948.288 3011432.894 +expect 3.0 50.0 + +tolerance 0.05 m +accept 3962799.451 2999718.853 +expect 5.0 50.0 + +tolerance 0.05 m +accept 4177612.521 2989464.315 +expect 8.0 50.0 + +tolerance 0.05 m +accept 4321000.0 2987510.567 +expect 10.0 50.0 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4258 +inv + +step +init=epsg:3035 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 5 70 +roundtrip 1000 + +tolerance 0.006 m +accept 5 60 +roundtrip 1000 + +tolerance 0.006 m +accept 5 50 +roundtrip 1000 + +tolerance 0.006 m +accept 5 40 +roundtrip 1000 + +tolerance 0.006 m +accept 5 30 +roundtrip 1000 + +tolerance 0.006 m +accept 10 52 +roundtrip 1000 + +tolerance 0.006 m +accept 0.0 50.0 +roundtrip 1000 + +tolerance 0.006 m +accept 3.0 50.0 +roundtrip 1000 + +tolerance 0.006 m +accept 5.0 50.0 +roundtrip 1000 + +tolerance 0.006 m +accept 8.0 50.0 +roundtrip 1000 + +tolerance 0.006 m +accept 10.0 50.0 +roundtrip 1000 + + diff --git a/test/gigs/5111.1.gie b/test/gigs/5111.1.gie new file mode 100644 index 00000000..2517b185 --- /dev/null +++ b/test/gigs/5111.1.gie @@ -0,0 +1,444 @@ +-------------------------------------------------------------------------------- + +Test 5111 (part 1), Mercator (variant A), v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4211 +inv + +step +init=epsg:3001 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 100.0876483 77.6534822 +expect 2800000.0 15000000.0 + +tolerance 0.05 m +accept 100.0876483 73.1442856 +expect 2800000.0 13000000.0 + +tolerance 0.05 m +accept 100.0876483 67.0518325 +expect 2800000.0 11000000.0 + +tolerance 0.05 m +accept 100.0876483 58.9140458 +expect 2800000.0 9000000.0 + +tolerance 0.05 m +accept 100.0876483 48.2638981 +expect 2800000.0 7000000.0 + +tolerance 0.05 m +accept 100.0876483 34.8029044 +expect 2800000.0 5000000.0 + +tolerance 0.05 m +accept 100.0876483 18.7048581 +expect 2800000.0 3000000.0 + +tolerance 0.05 m +accept 100.0876483 0.9071392 +expect 2800000.0 1000000.0 + +tolerance 0.05 m +accept 110.0 0.0 +expect 3900000.0 900000.0 + +tolerance 0.05 m +accept 100.0876483 -0.9071392 +expect 2800000.0 800000.0 + +tolerance 0.05 m +accept 100.0876483 -1.8140483 +expect 2800000.0 700000.0 + +tolerance 0.05 m +accept 100.0876483 -2.0 +expect 2800000.0 679490.65 + +tolerance 0.05 m +accept 100.0876483 -3.6262553 +expect 2800000.0 500000.0 + +tolerance 0.05 m +accept 100.0876483 -4.531095 +expect 2800000.0 400000.0 + +tolerance 0.05 m +accept 100.0876483 -5.4347892 +expect 2800000.0 300000.0 + +tolerance 0.05 m +accept 100.0876483 -6.3371111 +expect 2800000.0 200000.0 + +tolerance 0.05 m +accept 100.0876483 -7.2378372 +expect 2800000.0 100000.0 + +tolerance 0.05 m +accept 74.8562083 -8.136745 +expect 0.0 0.0 + +tolerance 0.05 m +accept -71.0 -2.0 +expect 23764105.84 679490.65 + +tolerance 0.05 m +accept -90.0 -2.0 +expect 21655625.33 679490.65 + +tolerance 0.05 m +accept -120.0 -2.0 +expect 18326445.58 679490.65 + +tolerance 0.05 m +accept -150.0 -2.0 +expect 14997265.83 679490.65 + +tolerance 0.05 m +accept 180.0 -2.0 +expect 11668086.08 679490.65 + +tolerance 0.05 m +accept 150.0 -2.0 +expect 8338906.33 679490.65 + +tolerance 0.05 m +accept 120.0 -2.0 +expect 5009726.58 679490.65 + +tolerance 0.05 m +accept 110.0 -2.0 +expect 3900000.0 679490.65 + +tolerance 0.05 m +accept 106.8077194 -2.0 +expect 3545744.14 679490.65 + +tolerance 0.05 m +accept 100.0876483 -2.0 +expect 2800000.0 679490.65 + +tolerance 0.05 m +accept 90.0 -2.0 +expect 1680546.83 679490.65 + +tolerance 0.05 m +accept 60.0 -2.0 +expect -1648632.92 679490.65 + +tolerance 0.05 m +accept 30.0 -2.0 +expect -4977812.67 679490.65 + +tolerance 0.05 m +accept 0.0 -2.0 +expect -8306992.42 679490.65 + +tolerance 0.05 m +accept -30.0 -2.0 +expect -11636172.17 679490.65 + +tolerance 0.05 m +accept -60.0 -2.0 +expect -14965351.92 679490.65 + +tolerance 0.05 m +accept -69.0 -2.0 +expect -15964105.84 679490.65 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:3001 +inv + +step +init=epsg:4211 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 2800000.0 15000000.0 +expect 100.0876483 77.6534822 + +tolerance 0.05 m +accept 2800000.0 13000000.0 +expect 100.0876483 73.1442856 + +tolerance 0.05 m +accept 2800000.0 11000000.0 +expect 100.0876483 67.0518325 + +tolerance 0.05 m +accept 2800000.0 9000000.0 +expect 100.0876483 58.9140458 + +tolerance 0.05 m +accept 2800000.0 7000000.0 +expect 100.0876483 48.2638981 + +tolerance 0.05 m +accept 2800000.0 5000000.0 +expect 100.0876483 34.8029044 + +tolerance 0.05 m +accept 2800000.0 3000000.0 +expect 100.0876483 18.7048581 + +tolerance 0.05 m +accept 2800000.0 1000000.0 +expect 100.0876483 0.9071392 + +tolerance 0.05 m +accept 3900000.0 900000.0 +expect 110.0 0.0 + +tolerance 0.05 m +accept 2800000.0 800000.0 +expect 100.0876483 -0.9071392 + +tolerance 0.05 m +accept 2800000.0 700000.0 +expect 100.0876483 -1.8140483 + +tolerance 0.05 m +accept 2800000.0 679490.65 +expect 100.0876483 -2.0 + +tolerance 0.05 m +accept 2800000.0 500000.0 +expect 100.0876483 -3.6262553 + +tolerance 0.05 m +accept 2800000.0 400000.0 +expect 100.0876483 -4.531095 + +tolerance 0.05 m +accept 2800000.0 300000.0 +expect 100.0876483 -5.4347892 + +tolerance 0.05 m +accept 2800000.0 200000.0 +expect 100.0876483 -6.3371111 + +tolerance 0.05 m +accept 2800000.0 100000.0 +expect 100.0876483 -7.2378372 + +tolerance 0.05 m +accept 0.0 0.0 +expect 74.8562083 -8.136745 + +tolerance 0.05 m +accept 23764105.84 679490.65 +expect -71.0 -2.0 + +tolerance 0.05 m +accept 21655625.33 679490.65 +expect -90.0 -2.0 + +tolerance 0.05 m +accept 18326445.58 679490.65 +expect -120.0 -2.0 + +tolerance 0.05 m +accept 14997265.83 679490.65 +expect -150.0 -2.0 + +tolerance 0.05 m +accept 11668086.08 679490.65 +expect 180.0 -2.0 + +tolerance 0.05 m +accept 8338906.33 679490.65 +expect 150.0 -2.0 + +tolerance 0.05 m +accept 5009726.58 679490.65 +expect 120.0 -2.0 + +tolerance 0.05 m +accept 3900000.0 679490.65 +expect 110.0 -2.0 + +tolerance 0.05 m +accept 3545744.14 679490.65 +expect 106.8077194 -2.0 + +tolerance 0.05 m +accept 2800000.0 679490.65 +expect 100.0876483 -2.0 + +tolerance 0.05 m +accept 1680546.83 679490.65 +expect 90.0 -2.0 + +tolerance 0.05 m +accept -1648632.92 679490.65 +expect 60.0 -2.0 + +tolerance 0.05 m +accept -4977812.67 679490.65 +expect 30.0 -2.0 + +tolerance 0.05 m +accept -8306992.42 679490.65 +expect 0.0 -2.0 + +tolerance 0.05 m +accept -11636172.17 679490.65 +expect -30.0 -2.0 + +tolerance 0.05 m +accept -14965351.92 679490.65 +expect -60.0 -2.0 + +tolerance 0.05 m +accept -15964105.84 679490.65 +expect -69.0 -2.0 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4211 +inv + +step +init=epsg:3001 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 100.0876483 77.6534822 +roundtrip 1000 + +tolerance 0.006 m +accept 100.0876483 73.1442856 +roundtrip 1000 + +tolerance 0.006 m +accept 100.0876483 67.0518325 +roundtrip 1000 + +tolerance 0.006 m +accept 100.0876483 58.9140458 +roundtrip 1000 + +tolerance 0.006 m +accept 100.0876483 48.2638981 +roundtrip 1000 + +tolerance 0.006 m +accept 100.0876483 34.8029044 +roundtrip 1000 + +tolerance 0.006 m +accept 100.0876483 18.7048581 +roundtrip 1000 + +tolerance 0.006 m +accept 100.0876483 0.9071392 +roundtrip 1000 + +tolerance 0.006 m +accept 110.0 0.0 +roundtrip 1000 + +tolerance 0.006 m +accept 100.0876483 -0.9071392 +roundtrip 1000 + +tolerance 0.006 m +accept 100.0876483 -1.8140483 +roundtrip 1000 + +tolerance 0.006 m +accept 100.0876483 -2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 100.0876483 -3.6262553 +roundtrip 1000 + +tolerance 0.006 m +accept 100.0876483 -4.531095 +roundtrip 1000 + +tolerance 0.006 m +accept 100.0876483 -5.4347892 +roundtrip 1000 + +tolerance 0.006 m +accept 100.0876483 -6.3371111 +roundtrip 1000 + +tolerance 0.006 m +accept 100.0876483 -7.2378372 +roundtrip 1000 + +tolerance 0.006 m +accept 74.8562083 -8.136745 +roundtrip 1000 + +tolerance 0.006 m +accept -71.0 -2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -90.0 -2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -120.0 -2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -150.0 -2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 180.0 -2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 150.0 -2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 120.0 -2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 110.0 -2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 106.8077194 -2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 100.0876483 -2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 90.0 -2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 60.0 -2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 30.0 -2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 0.0 -2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -30.0 -2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -60.0 -2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -69.0 -2.0 +roundtrip 1000 + + diff --git a/test/gigs/5111.2.gie b/test/gigs/5111.2.gie new file mode 100644 index 00000000..dfa6bca2 --- /dev/null +++ b/test/gigs/5111.2.gie @@ -0,0 +1,444 @@ +-------------------------------------------------------------------------------- + +Test 5111 (part 2), Mercator (variant A), v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4813 +inv + +step +proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept -6.7200711 77.6534822 +expect 2800000.0 15000000.0 + +tolerance 0.05 m +accept -6.7200711 73.1442856 +expect 2800000.0 13000000.0 + +tolerance 0.05 m +accept -6.7200711 67.0518325 +expect 2800000.0 11000000.0 + +tolerance 0.05 m +accept -6.7200711 58.9140458 +expect 2800000.0 9000000.0 + +tolerance 0.05 m +accept -6.7200711 48.2638981 +expect 2800000.0 7000000.0 + +tolerance 0.05 m +accept -6.7200711 34.8029044 +expect 2800000.0 5000000.0 + +tolerance 0.05 m +accept -6.7200711 18.7048581 +expect 2800000.0 3000000.0 + +tolerance 0.05 m +accept -6.7200711 0.9071392 +expect 2800000.0 1000000.0 + +tolerance 0.05 m +accept 3.1922806 0.0 +expect 3900000.0 900000.0 + +tolerance 0.05 m +accept -6.7200711 0.9071392 +expect 2800000.0 800000.0 + +tolerance 0.05 m +accept -6.7200711 1.8140483 +expect 2800000.0 700000.0 + +tolerance 0.05 m +accept -6.7200711 2.0 +expect 2800000.0 679490.65 + +tolerance 0.05 m +accept -6.7200711 3.6262553 +expect 2800000.0 500000.0 + +tolerance 0.05 m +accept -6.7200711 4.531095 +expect 2800000.0 400000.0 + +tolerance 0.05 m +accept -6.7200711 5.4347892 +expect 2800000.0 300000.0 + +tolerance 0.05 m +accept -6.7200711 6.3371111 +expect 2800000.0 200000.0 + +tolerance 0.05 m +accept -6.7200711 7.2378372 +expect 2800000.0 100000.0 + +tolerance 0.05 m +accept -31.9515111 8.136745 +expect 0.0 0.0 + +tolerance 0.05 m +accept -177.8077194 2.0 +expect 23764105.84 679490.65 + +tolerance 0.05 m +accept 163.1922806 2.0 +expect 21655625.33 679490.65 + +tolerance 0.05 m +accept 133.1922806 2.0 +expect 18326445.58 679490.65 + +tolerance 0.05 m +accept 103.1922806 2.0 +expect 14997265.83 679490.65 + +tolerance 0.05 m +accept 73.1922806 2.0 +expect 11668086.08 679490.65 + +tolerance 0.05 m +accept 43.1922806 2.0 +expect 8338906.33 679490.65 + +tolerance 0.05 m +accept 13.1922806 2.0 +expect 5009726.58 679490.65 + +tolerance 0.05 m +accept 3.1922806 2.0 +expect 3900000.0 679490.65 + +tolerance 0.05 m +accept 0.0 2.0 +expect 3545744.14 679490.65 + +tolerance 0.05 m +accept -6.7200711 2.0 +expect 2800000.0 679490.65 + +tolerance 0.05 m +accept -16.8077194 2.0 +expect 1680546.83 679490.65 + +tolerance 0.05 m +accept -46.8077194 2.0 +expect -1648632.92 679490.65 + +tolerance 0.05 m +accept -76.8077194 2.0 +expect -4977812.67 679490.65 + +tolerance 0.05 m +accept -106.8077194 2.0 +expect -8306992.42 679490.65 + +tolerance 0.05 m +accept -136.8077194 2.0 +expect -11636172.17 679490.65 + +tolerance 0.05 m +accept -166.8077194 2.0 +expect -14965351.92 679490.65 + +tolerance 0.05 m +accept -175.8077194 2.0 +expect -15964105.84 679490.65 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs +inv + +step +init=epsg:4813 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 2800000.0 15000000.0 +expect -6.7200711 77.6534822 + +tolerance 0.05 m +accept 2800000.0 13000000.0 +expect -6.7200711 73.1442856 + +tolerance 0.05 m +accept 2800000.0 11000000.0 +expect -6.7200711 67.0518325 + +tolerance 0.05 m +accept 2800000.0 9000000.0 +expect -6.7200711 58.9140458 + +tolerance 0.05 m +accept 2800000.0 7000000.0 +expect -6.7200711 48.2638981 + +tolerance 0.05 m +accept 2800000.0 5000000.0 +expect -6.7200711 34.8029044 + +tolerance 0.05 m +accept 2800000.0 3000000.0 +expect -6.7200711 18.7048581 + +tolerance 0.05 m +accept 2800000.0 1000000.0 +expect -6.7200711 0.9071392 + +tolerance 0.05 m +accept 3900000.0 900000.0 +expect 3.1922806 0.0 + +tolerance 0.05 m +accept 2800000.0 800000.0 +expect -6.7200711 0.9071392 + +tolerance 0.05 m +accept 2800000.0 700000.0 +expect -6.7200711 1.8140483 + +tolerance 0.05 m +accept 2800000.0 679490.65 +expect -6.7200711 2.0 + +tolerance 0.05 m +accept 2800000.0 500000.0 +expect -6.7200711 3.6262553 + +tolerance 0.05 m +accept 2800000.0 400000.0 +expect -6.7200711 4.531095 + +tolerance 0.05 m +accept 2800000.0 300000.0 +expect -6.7200711 5.4347892 + +tolerance 0.05 m +accept 2800000.0 200000.0 +expect -6.7200711 6.3371111 + +tolerance 0.05 m +accept 2800000.0 100000.0 +expect -6.7200711 7.2378372 + +tolerance 0.05 m +accept 0.0 0.0 +expect -31.9515111 8.136745 + +tolerance 0.05 m +accept 23764105.84 679490.65 +expect -177.8077194 2.0 + +tolerance 0.05 m +accept 21655625.33 679490.65 +expect 163.1922806 2.0 + +tolerance 0.05 m +accept 18326445.58 679490.65 +expect 133.1922806 2.0 + +tolerance 0.05 m +accept 14997265.83 679490.65 +expect 103.1922806 2.0 + +tolerance 0.05 m +accept 11668086.08 679490.65 +expect 73.1922806 2.0 + +tolerance 0.05 m +accept 8338906.33 679490.65 +expect 43.1922806 2.0 + +tolerance 0.05 m +accept 5009726.58 679490.65 +expect 13.1922806 2.0 + +tolerance 0.05 m +accept 3900000.0 679490.65 +expect 3.1922806 2.0 + +tolerance 0.05 m +accept 3545744.14 679490.65 +expect 0.0 2.0 + +tolerance 0.05 m +accept 2800000.0 679490.65 +expect -6.7200711 2.0 + +tolerance 0.05 m +accept 1680546.83 679490.65 +expect -16.8077194 2.0 + +tolerance 0.05 m +accept -1648632.92 679490.65 +expect -46.8077194 2.0 + +tolerance 0.05 m +accept -4977812.67 679490.65 +expect -76.8077194 2.0 + +tolerance 0.05 m +accept -8306992.42 679490.65 +expect -106.8077194 2.0 + +tolerance 0.05 m +accept -11636172.17 679490.65 +expect -136.8077194 2.0 + +tolerance 0.05 m +accept -14965351.92 679490.65 +expect -166.8077194 2.0 + +tolerance 0.05 m +accept -15964105.84 679490.65 +expect -175.8077194 2.0 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4813 +inv + +step +proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept -6.7200711 77.6534822 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 73.1442856 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 67.0518325 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 58.9140458 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 48.2638981 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 34.8029044 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 18.7048581 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 0.9071392 +roundtrip 1000 + +tolerance 0.006 m +accept 3.1922806 0.0 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 0.9071392 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 1.8140483 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 3.6262553 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 4.531095 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 5.4347892 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 6.3371111 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 7.2378372 +roundtrip 1000 + +tolerance 0.006 m +accept -31.9515111 8.136745 +roundtrip 1000 + +tolerance 0.006 m +accept -177.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 163.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 133.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 103.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 73.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 43.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 13.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 3.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 0.0 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -16.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -46.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -76.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -106.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -136.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -166.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -175.8077194 2.0 +roundtrip 1000 + + diff --git a/test/gigs/5112.gie b/test/gigs/5112.gie new file mode 100644 index 00000000..3c4bb367 --- /dev/null +++ b/test/gigs/5112.gie @@ -0,0 +1,84 @@ +-------------------------------------------------------------------------------- + +Test 5112, Mercator (variant B), v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4284 +inv + +step +init=epsg:3388 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 51.0 42.0 +expect 0.0 3819897.85 + +tolerance 0.05 m +accept 51.0 0.0 +expect 0.0 0.0 + +tolerance 0.05 m +accept 57.0 0.0 +expect 497112.88 0.0 + +tolerance 0.05 m +accept 54.0 20.5 +expect 248556.44 1724781.5 + +tolerance 0.05 m +accept 67.0 -41.0 +expect 1325634.35 -3709687.25 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:3388 +inv + +step +init=epsg:4284 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 0.0 3819897.85 +expect 51.0 42.0 + +tolerance 0.05 m +accept 0.0 0.0 +expect 51.0 0.0 + +tolerance 0.05 m +accept 497112.88 0.0 +expect 57.0 0.0 + +tolerance 0.05 m +accept 248556.44 1724781.5 +expect 54.0 20.5 + +tolerance 0.05 m +accept 1325634.35 -3709687.25 +expect 67.0 -41.0 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4284 +inv + +step +init=epsg:3388 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 51.0 42.0 +roundtrip 1000 + +tolerance 0.006 m +accept 51.0 0.0 +roundtrip 1000 + +tolerance 0.006 m +accept 57.0 0.0 +roundtrip 1000 + +tolerance 0.006 m +accept 54.0 20.5 +roundtrip 1000 + +tolerance 0.006 m +accept 67.0 -41.0 +roundtrip 1000 + + diff --git a/test/gigs/5113.gie b/test/gigs/5113.gie new file mode 100644 index 00000000..5c3904e7 --- /dev/null +++ b/test/gigs/5113.gie @@ -0,0 +1,84 @@ +-------------------------------------------------------------------------------- + +Test 5113, Transverse Mercator (South Oriented), v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4148 +inv + +step +init=epsg:2049 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 22.5 0.0 +expect -166998.44 0.0 + +tolerance 0.03 m +accept 21.5 -25.0 +expect -50475.46 2766147.25 + +tolerance 0.03 m +accept 20.5 -30.0 +expect 48243.45 3320218.65 + +tolerance 0.03 m +accept 19.5 -35.0 +expect 136937.65 3875621.18 + +tolerance 0.03 m +accept 19.5 -35.0 +expect 136937.65 3875621.18 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:2049 +inv + +step +init=epsg:4148 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept -166998.44 0.0 +expect 22.5 0.0 + +tolerance 0.03 m +accept -50475.46 2766147.25 +expect 21.5 -25.0 + +tolerance 0.03 m +accept 48243.45 3320218.65 +expect 20.5 -30.0 + +tolerance 0.03 m +accept 136937.65 3875621.18 +expect 19.5 -35.0 + +tolerance 0.03 m +accept 136937.65 3875621.18 +expect 19.5 -35.0 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4148 +inv + +step +init=epsg:2049 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 22.5 0.0 +roundtrip 1000 + +tolerance 0.006 m +accept 21.5 -25.0 +roundtrip 1000 + +tolerance 0.006 m +accept 20.5 -30.0 +roundtrip 1000 + +tolerance 0.006 m +accept 19.5 -35.0 +roundtrip 1000 + +tolerance 0.006 m +accept 19.5 -35.0 +roundtrip 1000 + + diff --git a/test/gigs/5201.gie b/test/gigs/5201.gie new file mode 100644 index 00000000..e7bdcb1e --- /dev/null +++ b/test/gigs/5201.gie @@ -0,0 +1,348 @@ +-------------------------------------------------------------------------------- + +Test 5201, Geographic Geocentric conversions, v2.0_2011-09-28. (EPSG 4979 - WGS84 3d has been replaced with EPSG code 4326 WGS84 2d). + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4978 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -962479.5924 555687.8517 6260738.6526 +expect 150 80 1214.137 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -962297.0059 555582.4354 6259542.961 +expect 150 80 0 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -1598248.169 2768777.623 5501278.468 +expect 119.99524538 60.00475191 619.6317 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -1598023.169 2768387.912 5500499.045 +expect 119.9952447 60.00475258 -280.3683 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 2764210.4054 4787752.865 3170468.5199 +expect 60 30 189.569 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 2764128.3196 4787610.6883 3170373.7354 +expect 60 30 0 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 6377934.396 -112 434 +expect -0.00100615 0.00392509 -202.5882 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 6374934.396 -112 434 +expect -0.00100662 0.00392695 -3202.5881 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 6367934.396 -112 434 +expect -0.00100773 0.00393129 -10202.5881 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 2764128.3196 -4787610.6883 -3170373.7354 +expect -60 -30 0 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 2763900.3489 -4787215.8313 -3170110.4974 +expect -60 -30 -526.476 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 2763880.8633 -4787182.0813 -3170087.9974 +expect -60 -30 -571.476 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -1598023.169 -2768611.912 -5499631.045 +expect -119.99323757 -59.99934884 -935.0995 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -1597798.169 -2768222.201 -5498851.622 +expect -119.99323663 -59.99934874 -1835.0995 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -962297.0059 -555582.4354 -6259542.961 +expect -150 -80 0 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -962150.945 -555498.1071 -6258586.4616 +expect -150 -80 -971.255 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -961798.2951 -555294.5046 -6256277.0874 +expect -150 -80 -3316.255 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -2187336.719 -112 5971017.093 +expect -179.99706624 70.00490733 -223.6178 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -2904698.5551 -2904698.5551 4862789.0377 +expect -135 50 0 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 371 -5783593.614 2679326.11 +expect -89.99632465 25.00366329 -274.7286 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 6378137 0 0 +expect 0 0 0 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -4087095.478 2977467.559 -3875457.429 +expect 143.92649252 -37.65282217 737.7182 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -4085919.959 2976611.233 -3874335.274 +expect 143.92649211 -37.65282206 -1099.2288 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -4084000.165 2975212.729 -3872502.631 +expect 143.92649143 -37.65282187 -4099.2288 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -4079520.647 2971949.553 -3868226.465 +expect 143.92648984 -37.65282143 -11099.2288 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -2904698.5551 2904698.5551 -4862789.0377 +expect 135 -50 0 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -2187336.719 -112 -5970149.093 +expect -179.99706624 -70.00224647 -1039.2896 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4326 +inv + +step +init=epsg:4978 +-------------------------------------------------------------------------------- +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 150 80 1214.137 +expect -962479.5924 555687.8517 6260738.6526 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 150 80 0 +expect -962297.0059 555582.4354 6259542.961 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 119.99524538 60.00475191 619.6317 +expect -1598248.169 2768777.623 5501278.468 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 119.9952447 60.00475258 -280.3683 +expect -1598023.169 2768387.912 5500499.045 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 60 30 189.569 +expect 2764210.4054 4787752.865 3170468.5199 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 60 30 0 +expect 2764128.3196 4787610.6883 3170373.7354 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -0.00100615 0.00392509 -202.5882 +expect 6377934.396 -112 434 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -0.00100662 0.00392695 -3202.5881 +expect 6374934.396 -112 434 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -0.00100773 0.00393129 -10202.5881 +expect 6367934.396 -112 434 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -60 -30 0 +expect 2764128.3196 -4787610.6883 -3170373.7354 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -60 -30 -526.476 +expect 2763900.3489 -4787215.8313 -3170110.4974 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -60 -30 -571.476 +expect 2763880.8633 -4787182.0813 -3170087.9974 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -119.99323757 -59.99934884 -935.0995 +expect -1598023.169 -2768611.912 -5499631.045 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -119.99323663 -59.99934874 -1835.0995 +expect -1597798.169 -2768222.201 -5498851.622 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -150 -80 0 +expect -962297.0059 -555582.4354 -6259542.961 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -150 -80 -971.255 +expect -962150.945 -555498.1071 -6258586.4616 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -150 -80 -3316.255 +expect -961798.2951 -555294.5046 -6256277.0874 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -179.99706624 70.00490733 -223.6178 +expect -2187336.719 -112 5971017.093 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -135 50 0 +expect -2904698.5551 -2904698.5551 4862789.0377 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -89.99632465 25.00366329 -274.7286 +expect 371 -5783593.614 2679326.11 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 0 0 0 +expect 6378137 0 0 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 143.92649252 -37.65282217 737.7182 +expect -4087095.478 2977467.559 -3875457.429 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 143.92649211 -37.65282206 -1099.2288 +expect -4085919.959 2976611.233 -3874335.274 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 143.92649143 -37.65282187 -4099.2288 +expect -4084000.165 2975212.729 -3872502.631 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 143.92648984 -37.65282143 -11099.2288 +expect -4079520.647 2971949.553 -3868226.465 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept 135 -50 0 +expect -2904698.5551 2904698.5551 -4862789.0377 + +tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +accept -179.99706624 -70.00224647 -1039.2896 +expect -2187336.719 -112 -5970149.093 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4978 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept -962479.5924 555687.8517 6260738.6526 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept -962297.0059 555582.4354 6259542.961 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept -1598248.169 2768777.623 5501278.468 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept -1598023.169 2768387.912 5500499.045 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept 2764210.4054 4787752.865 3170468.5199 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept 2764128.3196 4787610.6883 3170373.7354 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept 6377934.396 -112 434 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept 6374934.396 -112 434 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept 6367934.396 -112 434 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept 2764128.3196 -4787610.6883 -3170373.7354 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept 2763900.3489 -4787215.8313 -3170110.4974 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept 2763880.8633 -4787182.0813 -3170087.9974 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept -1598023.169 -2768611.912 -5499631.045 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept -1597798.169 -2768222.201 -5498851.622 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept -962297.0059 -555582.4354 -6259542.961 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept -962150.945 -555498.1071 -6258586.4616 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept -961798.2951 -555294.5046 -6256277.0874 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept -2187336.719 -112 5971017.093 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept -2904698.5551 -2904698.5551 4862789.0377 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept 371 -5783593.614 2679326.11 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept 6378137 0 0 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept -4087095.478 2977467.559 -3875457.429 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept -4085919.959 2976611.233 -3874335.274 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept -4084000.165 2975212.729 -3872502.631 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept -4079520.647 2971949.553 -3868226.465 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept -2904698.5551 2904698.5551 -4862789.0377 +roundtrip 1000 + +tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +accept -2187336.719 -112 -5970149.093 +roundtrip 1000 + + diff --git a/test/gigs/5203.1.gie b/test/gigs/5203.1.gie new file mode 100644 index 00000000..960b9171 --- /dev/null +++ b/test/gigs/5203.1.gie @@ -0,0 +1,192 @@ +-------------------------------------------------------------------------------- + +GIGS Test 5203 (part 1), Position Vector 7-parameter transformation, v2.0_2011-06-28. Geographic 2D domain (EPSG method code 9606). + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4277 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 150.00567472 79.99487333 +expect 150.0 80.0 + +tolerance 2.77777777778e-07 m +accept 120.0 60.0 +expect 119.99435889 60.00569306 + +tolerance 2.77777777778e-07 m +accept 60.00446778 29.99566778 +expect 60.0 30.0 + +tolerance 2.77777777778e-07 m +accept 0.0 0.0 +expect -0.00089056 0.00483333 + +tolerance 2.77777777778e-07 m +accept -60.00357056 -30.00504639 +expect -60.0 -30.0 + +tolerance 2.77777777778e-07 m +accept -120.0 -60.0 +expect -119.9918525 -59.99907361 + +tolerance 2.77777777778e-07 m +accept -150.01693111 -79.99778139 +expect -150.0 -80.0 + +tolerance 2.77777777778e-07 m +accept -180.0 70.0 +expect -179.99637361 70.005945 + +tolerance 2.77777777778e-07 m +accept -135.00596333 49.99458694 +expect -135.0 50.0 + +tolerance 2.77777777778e-07 m +accept -90.0 25.0 +expect -89.99531139 25.00445833 + +tolerance 2.77777777778e-07 m +accept 0.00089056 -0.00483333 +expect 0.0 0.0 + +tolerance 2.77777777778e-07 m +accept 143.9279419 -37.6532236 +expect 143.92634806 -37.65235306 + +tolerance 2.77777777778e-07 m +accept 135.00291194 -49.99973028 +expect 135.0 -50.0 + +tolerance 2.77777777778e-07 m +accept 180.0 -70.0 +expect -179.99660139 -70.002485 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4326 +inv + +step +init=epsg:4277 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 150.0 80.0 +expect 150.00567472 79.99487333 + +tolerance 2.77777777778e-07 m +accept 119.99435889 60.00569306 +expect 120.0 60.0 + +tolerance 2.77777777778e-07 m +accept 60.0 30.0 +expect 60.00446778 29.99566778 + +tolerance 2.77777777778e-07 m +accept -0.00089056 0.00483333 +expect 0.0 0.0 + +tolerance 2.77777777778e-07 m +accept -60.0 -30.0 +expect -60.00357056 -30.00504639 + +tolerance 2.77777777778e-07 m +accept -119.9918525 -59.99907361 +expect -120.0 -60.0 + +tolerance 2.77777777778e-07 m +accept -150.0 -80.0 +expect -150.01693111 -79.99778139 + +tolerance 2.77777777778e-07 m +accept -179.99637361 70.005945 +expect -180.0 70.0 + +tolerance 2.77777777778e-07 m +accept -135.0 50.0 +expect -135.00596333 49.99458694 + +tolerance 2.77777777778e-07 m +accept -89.99531139 25.00445833 +expect -90.0 25.0 + +tolerance 2.77777777778e-07 m +accept 0.0 0.0 +expect 0.00089056 -0.00483333 + +tolerance 2.77777777778e-07 m +accept 143.92634806 -37.65235306 +expect 143.9279419 -37.6532236 + +tolerance 2.77777777778e-07 m +accept 135.0 -50.0 +expect 135.00291194 -49.99973028 + +tolerance 2.77777777778e-07 m +accept -179.99660139 -70.002485 +expect 180.0 -70.0 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4277 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept 150.00567472 79.99487333 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 120.0 60.0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 60.00446778 29.99566778 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 0.0 0.0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -60.00357056 -30.00504639 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -120.0 -60.0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -150.01693111 -79.99778139 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -180.0 70.0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -135.00596333 49.99458694 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -90.0 25.0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 0.00089056 -0.00483333 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 143.9279419 -37.6532236 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 135.00291194 -49.99973028 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 180.0 -70.0 +roundtrip 1000 + + diff --git a/test/gigs/5204.1.gie b/test/gigs/5204.1.gie new file mode 100644 index 00000000..3c7e3fff --- /dev/null +++ b/test/gigs/5204.1.gie @@ -0,0 +1,192 @@ +-------------------------------------------------------------------------------- + +GIGS Test 5204, Coordinate Frame 7-parameter transformation, v2.0_2011-06-28. Geographic 2D domain (EPSG method code 9607) + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4313 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 149.99825389 80.00155167 +expect 150 80 + +tolerance 2.77777777778e-07 m +accept 120 60 +expect 120.00197111 59.99807333 + +tolerance 2.77777777778e-07 m +accept 59.99822194 30.00134083 +expect 60 30 + +tolerance 2.77777777778e-07 m +accept 0 0 +expect 0.00098139 -0.00081028 + +tolerance 2.77777777778e-07 m +accept -59.99991333 -29.99943917 +expect -60 -30 + +tolerance 2.77777777778e-07 m +accept -120 -60 +expect -120.00150694 -59.999835 + +tolerance 2.77777777778e-07 m +accept -149.99532167 -80.00054917 +expect -150 -80 + +tolerance 2.77777777778e-07 m +accept -180 70 +expect 179.99939778 69.99812806 + +tolerance 2.77777777778e-07 m +accept -134.99891389 50.00183 +expect -135 50 + +tolerance 2.77777777778e-07 m +accept -90 25 +expect -90.00060583 24.99862667 + +tolerance 2.77777777778e-07 m +accept -0.00098139 0.00081028 +expect 0 0 + +tolerance 2.77777777778e-07 m +accept 143.9279419 -37.6532236 +expect 143.92857222 -37.65257083 + +tolerance 2.77777777778e-07 m +accept 134.99913472 -50.00096139 +expect 135 -50 + +tolerance 2.77777777778e-07 m +accept 180 -70 +expect 179.99888667 -69.99901667 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4326 +inv + +step +init=epsg:4313 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 150 80 +expect 149.99825389 80.00155167 + +tolerance 2.77777777778e-07 m +accept 120.00197111 59.99807333 +expect 120 60 + +tolerance 2.77777777778e-07 m +accept 60 30 +expect 59.99822194 30.00134083 + +tolerance 2.77777777778e-07 m +accept 0.00098139 -0.00081028 +expect 0 0 + +tolerance 2.77777777778e-07 m +accept -60 -30 +expect -59.99991333 -29.99943917 + +tolerance 2.77777777778e-07 m +accept -120.00150694 -59.999835 +expect -120 -60 + +tolerance 2.77777777778e-07 m +accept -150 -80 +expect -149.99532167 -80.00054917 + +tolerance 2.77777777778e-07 m +accept 179.99939778 69.99812806 +expect -180 70 + +tolerance 2.77777777778e-07 m +accept -135 50 +expect -134.99891389 50.00183 + +tolerance 2.77777777778e-07 m +accept -90.00060583 24.99862667 +expect -90 25 + +tolerance 2.77777777778e-07 m +accept 0 0 +expect -0.00098139 0.00081028 + +tolerance 2.77777777778e-07 m +accept 143.92857222 -37.65257083 +expect 143.9279419 -37.6532236 + +tolerance 2.77777777778e-07 m +accept 135 -50 +expect 134.99913472 -50.00096139 + +tolerance 2.77777777778e-07 m +accept 179.99888667 -69.99901667 +expect 180 -70 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4313 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept 149.99825389 80.00155167 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 120 60 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 59.99822194 30.00134083 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 0 0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -59.99991333 -29.99943917 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -120 -60 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -149.99532167 -80.00054917 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -180 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -134.99891389 50.00183 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -90 25 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -0.00098139 0.00081028 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 143.9279419 -37.6532236 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 134.99913472 -50.00096139 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 180 -70 +roundtrip 1000 + + diff --git a/test/gigs/5205.1.gie b/test/gigs/5205.1.gie new file mode 100644 index 00000000..df4cb674 --- /dev/null +++ b/test/gigs/5205.1.gie @@ -0,0 +1,192 @@ +-------------------------------------------------------------------------------- + +GIGS Test 5205 (Part 1), Molodensky-Badekas 10-parameter transformation, v2.0_2011-06-28. Geographic 2D domain (EPSG method code 9636) + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4289 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 150.01814371 79.99494639 +expect 150 80 + +tolerance 2.77777777778e-07 m +accept 120 60 +expect 119.99001559 60.00441792 + +tolerance 2.77777777778e-07 m +accept 60.00535007 29.99746103 +expect 60 30 + +tolerance 2.77777777778e-07 m +accept 0 0 +expect -7.025e-05 0.0041133 + +tolerance 2.77777777778e-07 m +accept -60.00473241 -30.0042486 +expect -60 -30 + +tolerance 2.77777777778e-07 m +accept -120 -60 +expect -119.9922412 -60.00081456 + +tolerance 2.77777777778e-07 m +accept -150.01209192 -79.99612229 +expect -150 -80 + +tolerance 2.77777777778e-07 m +accept -180 70 +expect 179.99786174 70.00666951 + +tolerance 2.77777777778e-07 m +accept -135.00454845 49.99357566 +expect -135 50 + +tolerance 2.77777777778e-07 m +accept -90 25 +expect -89.99487454 25.00457271 + +tolerance 2.77777777778e-07 m +accept 7.032e-05 -0.00411349 +expect 0 0 + +tolerance 2.77777777778e-07 m +accept 143.9279419 -37.6532236 +expect 143.92330599 -37.65282034 + +tolerance 2.77777777778e-07 m +accept 135.00641074 -49.99958243 +expect 135 -50 + +tolerance 2.77777777778e-07 m +accept 180 -70 +expect 179.99847886 -70.00362084 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4326 +inv + +step +init=epsg:4289 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 150 80 +expect 150.01814371 79.99494639 + +tolerance 2.77777777778e-07 m +accept 119.99001559 60.00441792 +expect 120 60 + +tolerance 2.77777777778e-07 m +accept 60 30 +expect 60.00535007 29.99746103 + +tolerance 2.77777777778e-07 m +accept -7.025e-05 0.0041133 +expect 0 0 + +tolerance 2.77777777778e-07 m +accept -60 -30 +expect -60.00473241 -30.0042486 + +tolerance 2.77777777778e-07 m +accept -119.9922412 -60.00081456 +expect -120 -60 + +tolerance 2.77777777778e-07 m +accept -150 -80 +expect -150.01209192 -79.99612229 + +tolerance 2.77777777778e-07 m +accept 179.99786174 70.00666951 +expect -180 70 + +tolerance 2.77777777778e-07 m +accept -135 50 +expect -135.00454845 49.99357566 + +tolerance 2.77777777778e-07 m +accept -89.99487454 25.00457271 +expect -90 25 + +tolerance 2.77777777778e-07 m +accept 0 0 +expect 7.032e-05 -0.00411349 + +tolerance 2.77777777778e-07 m +accept 143.92330599 -37.65282034 +expect 143.9279419 -37.6532236 + +tolerance 2.77777777778e-07 m +accept 135 -50 +expect 135.00641074 -49.99958243 + +tolerance 2.77777777778e-07 m +accept 179.99847886 -70.00362084 +expect 180 -70 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4289 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept 150.01814371 79.99494639 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 120 60 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 60.00535007 29.99746103 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 0 0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -60.00473241 -30.0042486 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -120 -60 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -150.01209192 -79.99612229 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -180 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -135.00454845 49.99357566 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -90 25 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 7.032e-05 -0.00411349 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 143.9279419 -37.6532236 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 135.00641074 -49.99958243 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 180 -70 +roundtrip 1000 + + diff --git a/test/gigs/5206.gie b/test/gigs/5206.gie new file mode 100644 index 00000000..5f3d6eb6 --- /dev/null +++ b/test/gigs/5206.gie @@ -0,0 +1,540 @@ +-------------------------------------------------------------------------------- + +Test 5206, NADCON transformation, v2.0_2011-06-28. Out of transform grid area error tests have been removed. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4267 +inv + +step +init=epsg:4269 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept -89.5177272 29.9997978 +expect -89.5177778 30.0 + +tolerance 2.77777777778e-07 m +accept -90.5177778 29.2833333 +expect -90.5178639 29.2835592 + +tolerance 2.77777777778e-07 m +accept -91.5176758 28.2830864 +expect -91.5177778 28.2833333 + +tolerance 2.77777777778e-07 m +accept -92.5177778 27.2833333 +expect -92.5178811 27.2836106 + +tolerance 2.77777777778e-07 m +accept -93.5176731 26.2830225 +expect -93.5177778 26.2833333 + +tolerance 2.77777777778e-07 m +accept -94.5177778 25 +expect -94.5178744 25.0003486 + +tolerance 2.77777777778e-07 m +accept -142.9972522 70.0001631 +expect -143 70 + +tolerance 2.77777777778e-07 m +accept -142 70.0 +expect -142.0026922 69.9998422 + +tolerance 2.77777777778e-07 m +accept -141.9973078 70.0001578 +expect -142 70 + +tolerance 2.77777777778e-07 m +accept -140.9971981 70.0001481 +expect -141 70 + +tolerance 2.77777777778e-07 m +accept -140 70 +expect -140.0027922 69.9998617 + +tolerance 2.77777777778e-07 m +accept -138.9973075 70.0001297 +expect -139 70 + +tolerance 2.77777777778e-07 m +accept -138 70 +expect -138.0026767 69.9998867 + +tolerance 2.77777777778e-07 m +accept -134.9973733 70.000055 +expect -135 70 + +tolerance 2.77777777778e-07 m +accept -130 70 +expect -130.0025347 70.0000511 + +tolerance 2.77777777778e-07 m +accept -128.0009742 69.9999053 +expect -128.0034722 70 + +tolerance 2.77777777778e-07 m +accept -179 70 +expect -179.0035064 69.9990142 + +tolerance 2.77777777778e-07 m +accept -179.9964664 70.0010089 +expect 180 70 + +tolerance 2.77777777778e-07 m +accept 180 70 +expect 179.9964664 69.9989911 + +tolerance 2.77777777778e-07 m +accept 179 70 +expect 178.9964394 69.9989678 + +tolerance 2.77777777778e-07 m +accept -111.9991714 49.9999556 +expect -112 49.9999997 + +tolerance 2.77777777778e-07 m +accept -112 49.9999997 +expect -112.0008286 50.0000439 + +tolerance 2.77777777778e-07 m +accept -111.9991214 49.0000033 +expect -112 49 + +tolerance 2.77777777778e-07 m +accept -112 48 +expect -112.0008492 47.9999606 + +tolerance 2.77777777778e-07 m +accept -111.9991678 47.0000569 +expect -112 47 + +tolerance 2.77777777778e-07 m +accept -112 47 +expect -112.0008325 46.9999431 + +tolerance 2.77777777778e-07 m +accept -111.9991756 46.0000733 +expect -112 46 + +tolerance 2.77777777778e-07 m +accept -112 45 +expect -112.0008022 44.9999197 + +tolerance 2.77777777778e-07 m +accept -130.5177467 51 +expect -130.5193953 50.9997114 + +tolerance 2.77777777778e-07 m +accept -130.5160981 51.0002886 +expect -130.5177467 51 + +tolerance 2.77777777778e-07 m +accept -130.5161206 50.0002897 +expect -130.5177467 49.9999997 + +tolerance 2.77777777778e-07 m +accept -130.5177467 49.9999997 +expect -130.5193731 49.9997097 + +tolerance 2.77777777778e-07 m +accept -130.5161458 49.0002717 +expect -130.5177467 49 + +tolerance 2.77777777778e-07 m +accept -130.5177467 48.1166667 +expect -130.5193258 48.1164106 + +tolerance 2.77777777778e-07 m +accept -130.5161942 47.0002378 +expect -130.5177467 47 + +tolerance 2.77777777778e-07 m +accept -130.5177467 47 +expect -130.5192992 46.9997622 + +tolerance 2.77777777778e-07 m +accept -130.5162172 46.0002222 +expect -130.5177467 46 + +tolerance 2.77777777778e-07 m +accept -130.5177467 45 +expect -130.5192539 44.9997925 + +tolerance 2.77777777778e-07 m +accept -132.9984775 48.1169867 +expect -133 48.1166667 + +tolerance 2.77777777778e-07 m +accept -131.4555556 48.1166667 +expect -131.4571578 48.1163964 + +tolerance 2.77777777778e-07 m +accept -130.5161675 48.1169228 +expect -130.5177467 48.1166667 + +tolerance 2.77777777778e-07 m +accept -128.4555556 48.1166667 +expect -128.4570433 48.1164319 + +tolerance 2.77777777778e-07 m +accept -128.5444444 48.1166667 +expect -128.5459361 48.1164311 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4269 +inv + +step +init=epsg:4267 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept -89.5177778 30.0 +expect -89.5177272 29.9997978 + +tolerance 2.77777777778e-07 m +accept -90.5178639 29.2835592 +expect -90.5177778 29.2833333 + +tolerance 2.77777777778e-07 m +accept -91.5177778 28.2833333 +expect -91.5176758 28.2830864 + +tolerance 2.77777777778e-07 m +accept -92.5178811 27.2836106 +expect -92.5177778 27.2833333 + +tolerance 2.77777777778e-07 m +accept -93.5177778 26.2833333 +expect -93.5176731 26.2830225 + +tolerance 2.77777777778e-07 m +accept -94.5178744 25.0003486 +expect -94.5177778 25 + +tolerance 2.77777777778e-07 m +accept -143 70 +expect -142.9972522 70.0001631 + +tolerance 2.77777777778e-07 m +accept -142.0026922 69.9998422 +expect -142 70.0 + +tolerance 2.77777777778e-07 m +accept -142 70 +expect -141.9973078 70.0001578 + +tolerance 2.77777777778e-07 m +accept -141 70 +expect -140.9971981 70.0001481 + +tolerance 2.77777777778e-07 m +accept -140.0027922 69.9998617 +expect -140 70 + +tolerance 2.77777777778e-07 m +accept -139 70 +expect -138.9973075 70.0001297 + +tolerance 2.77777777778e-07 m +accept -138.0026767 69.9998867 +expect -138 70 + +tolerance 2.77777777778e-07 m +accept -135 70 +expect -134.9973733 70.000055 + +tolerance 2.77777777778e-07 m +accept -130.0025347 70.0000511 +expect -130 70 + +tolerance 2.77777777778e-07 m +accept -128.0034722 70 +expect -128.0009742 69.9999053 + +tolerance 2.77777777778e-07 m +accept -179.0035064 69.9990142 +expect -179 70 + +tolerance 2.77777777778e-07 m +accept 180 70 +expect -179.9964664 70.0010089 + +tolerance 2.77777777778e-07 m +accept 179.9964664 69.9989911 +expect 180 70 + +tolerance 2.77777777778e-07 m +accept 178.9964394 69.9989678 +expect 179 70 + +tolerance 2.77777777778e-07 m +accept -112 49.9999997 +expect -111.9991714 49.9999556 + +tolerance 2.77777777778e-07 m +accept -112.0008286 50.0000439 +expect -112 49.9999997 + +tolerance 2.77777777778e-07 m +accept -112 49 +expect -111.9991214 49.0000033 + +tolerance 2.77777777778e-07 m +accept -112.0008492 47.9999606 +expect -112 48 + +tolerance 2.77777777778e-07 m +accept -112 47 +expect -111.9991678 47.0000569 + +tolerance 2.77777777778e-07 m +accept -112.0008325 46.9999431 +expect -112 47 + +tolerance 2.77777777778e-07 m +accept -112 46 +expect -111.9991756 46.0000733 + +tolerance 2.77777777778e-07 m +accept -112.0008022 44.9999197 +expect -112 45 + +tolerance 2.77777777778e-07 m +accept -130.5193953 50.9997114 +expect -130.5177467 51 + +tolerance 2.77777777778e-07 m +accept -130.5177467 51 +expect -130.5160981 51.0002886 + +tolerance 2.77777777778e-07 m +accept -130.5177467 49.9999997 +expect -130.5161206 50.0002897 + +tolerance 2.77777777778e-07 m +accept -130.5193731 49.9997097 +expect -130.5177467 49.9999997 + +tolerance 2.77777777778e-07 m +accept -130.5177467 49 +expect -130.5161458 49.0002717 + +tolerance 2.77777777778e-07 m +accept -130.5193258 48.1164106 +expect -130.5177467 48.1166667 + +tolerance 2.77777777778e-07 m +accept -130.5177467 47 +expect -130.5161942 47.0002378 + +tolerance 2.77777777778e-07 m +accept -130.5192992 46.9997622 +expect -130.5177467 47 + +tolerance 2.77777777778e-07 m +accept -130.5177467 46 +expect -130.5162172 46.0002222 + +tolerance 2.77777777778e-07 m +accept -130.5192539 44.9997925 +expect -130.5177467 45 + +tolerance 2.77777777778e-07 m +accept -133 48.1166667 +expect -132.9984775 48.1169867 + +tolerance 2.77777777778e-07 m +accept -131.4571578 48.1163964 +expect -131.4555556 48.1166667 + +tolerance 2.77777777778e-07 m +accept -130.5177467 48.1166667 +expect -130.5161675 48.1169228 + +tolerance 2.77777777778e-07 m +accept -128.4570433 48.1164319 +expect -128.4555556 48.1166667 + +tolerance 2.77777777778e-07 m +accept -128.5459361 48.1164311 +expect -128.5444444 48.1166667 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4267 +inv + +step +init=epsg:4269 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept -89.5177272 29.9997978 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -90.5177778 29.2833333 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -91.5176758 28.2830864 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -92.5177778 27.2833333 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -93.5176731 26.2830225 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -94.5177778 25 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -142.9972522 70.0001631 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -142 70.0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -141.9973078 70.0001578 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -140.9971981 70.0001481 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -140 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.9973075 70.0001297 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -134.9973733 70.000055 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128.0009742 69.9999053 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -179 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -179.9964664 70.0010089 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 180 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 179 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.9991714 49.9999556 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 49.9999997 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.9991214 49.0000033 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 48 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.9991678 47.0000569 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 47 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.9991756 46.0000733 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 45 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5177467 51 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5160981 51.0002886 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5161206 50.0002897 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5177467 49.9999997 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5161458 49.0002717 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5177467 48.1166667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5161942 47.0002378 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5177467 47 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5162172 46.0002222 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5177467 45 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -132.9984775 48.1169867 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -131.4555556 48.1166667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5161675 48.1169228 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128.4555556 48.1166667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128.5444444 48.1166667 +roundtrip 1000 + + diff --git a/test/gigs/5207.1.gie b/test/gigs/5207.1.gie new file mode 100644 index 00000000..8384bf0e --- /dev/null +++ b/test/gigs/5207.1.gie @@ -0,0 +1,252 @@ +-------------------------------------------------------------------------------- + +Test 5207, NTv2 transformation, v2.0_2011-06-28. Out of transform grid area error tests have been removed. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4202 +inv + +step +init=epsg:4283 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept -115 -10.05 +expect -115.001251111 -10.0486372222 + +tolerance 2.77777777778e-07 m +accept -114.998744167 -11.0013594444 +expect -115 -11 + +tolerance 2.77777777778e-07 m +accept -115 -12 +expect -115.001261389 -11.9986441667 + +tolerance 2.77777777778e-07 m +accept -138.04 -9 +expect -138.041132778 -8.99854333333 + +tolerance 2.77777777778e-07 m +accept -138.043867222 -9.00145666667 +expect -138.045 -9 + +tolerance 2.77777777778e-07 m +accept -138.05 -9 +expect -138.051132778 -8.99854333333 + +tolerance 2.77777777778e-07 m +accept -138.048867222 -9.00145666667 +expect -138.05 -9 + +tolerance 2.77777777778e-07 m +accept -138.053867222 -9.00145666667 +expect -138.055 -9 + +tolerance 2.77777777778e-07 m +accept -138.06 -9 +expect -138.061132778 -8.99854333333 + +tolerance 2.77777777778e-07 m +accept -138.038730833 -27.1264763889 +expect -138.04 -27.125 + +tolerance 2.77777777778e-07 m +accept -138.045 -27.125 +expect -138.046268889 -27.1235236111 + +tolerance 2.77777777778e-07 m +accept -138.05 -27.125 +expect -138.051268889 -27.1235236111 + +tolerance 2.77777777778e-07 m +accept -138.048731111 -27.1264763889 +expect -138.05 -27.125 + +tolerance 2.77777777778e-07 m +accept -138.055 -27.125 +expect -138.056268889 -27.1235233333 + +tolerance 2.77777777778e-07 m +accept -138.058731111 -27.1264766667 +expect -138.06 -27.125 + +tolerance 2.77777777778e-07 m +accept -136.847222222 -28.05 +expect -136.848525278 -28.0485269444 + +tolerance 2.77777777778e-07 m +accept -137.847222222 -28.05 +expect -137.848505556 -28.0485311111 + +tolerance 2.77777777778e-07 m +accept -138.847222222 -28.05 +expect -138.8484925 -28.0485188889 + +tolerance 2.77777777778e-07 m +accept -139.847222222 -28.05 +expect -139.848475278 -28.0485072222 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4283 +inv + +step +init=epsg:4202 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept -115.001251111 -10.0486372222 +expect -115 -10.05 + +tolerance 2.77777777778e-07 m +accept -115 -11 +expect -114.998744167 -11.0013594444 + +tolerance 2.77777777778e-07 m +accept -115.001261389 -11.9986441667 +expect -115 -12 + +tolerance 2.77777777778e-07 m +accept -138.041132778 -8.99854333333 +expect -138.04 -9 + +tolerance 2.77777777778e-07 m +accept -138.045 -9 +expect -138.043867222 -9.00145666667 + +tolerance 2.77777777778e-07 m +accept -138.051132778 -8.99854333333 +expect -138.05 -9 + +tolerance 2.77777777778e-07 m +accept -138.05 -9 +expect -138.048867222 -9.00145666667 + +tolerance 2.77777777778e-07 m +accept -138.055 -9 +expect -138.053867222 -9.00145666667 + +tolerance 2.77777777778e-07 m +accept -138.061132778 -8.99854333333 +expect -138.06 -9 + +tolerance 2.77777777778e-07 m +accept -138.04 -27.125 +expect -138.038730833 -27.1264763889 + +tolerance 2.77777777778e-07 m +accept -138.046268889 -27.1235236111 +expect -138.045 -27.125 + +tolerance 2.77777777778e-07 m +accept -138.051268889 -27.1235236111 +expect -138.05 -27.125 + +tolerance 2.77777777778e-07 m +accept -138.05 -27.125 +expect -138.048731111 -27.1264763889 + +tolerance 2.77777777778e-07 m +accept -138.056268889 -27.1235233333 +expect -138.055 -27.125 + +tolerance 2.77777777778e-07 m +accept -138.06 -27.125 +expect -138.058731111 -27.1264766667 + +tolerance 2.77777777778e-07 m +accept -136.848525278 -28.0485269444 +expect -136.847222222 -28.05 + +tolerance 2.77777777778e-07 m +accept -137.848505556 -28.0485311111 +expect -137.847222222 -28.05 + +tolerance 2.77777777778e-07 m +accept -138.8484925 -28.0485188889 +expect -138.847222222 -28.05 + +tolerance 2.77777777778e-07 m +accept -139.848475278 -28.0485072222 +expect -139.847222222 -28.05 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4202 +inv + +step +init=epsg:4283 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept -115 -10.05 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -114.998744167 -11.0013594444 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -115 -12 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.04 -9 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.043867222 -9.00145666667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.05 -9 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.048867222 -9.00145666667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.053867222 -9.00145666667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.06 -9 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.038730833 -27.1264763889 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.045 -27.125 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.05 -27.125 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.048731111 -27.1264763889 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.055 -27.125 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.058731111 -27.1264766667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -136.847222222 -28.05 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -137.847222222 -28.05 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.847222222 -28.05 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -139.847222222 -28.05 +roundtrip 1000 + + diff --git a/test/gigs/5207.2.gie b/test/gigs/5207.2.gie new file mode 100644 index 00000000..bc76504a --- /dev/null +++ b/test/gigs/5207.2.gie @@ -0,0 +1,456 @@ +-------------------------------------------------------------------------------- + +Test 5206, NADCON transformation, v2.0_2011-06-28. Out of transform grid area error tests have been removed. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4267 +inv + +step +init=epsg:4269 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept -142 70 +expect -142.002804722 69.9998069444 + +tolerance 2.77777777778e-07 m +accept -141.997195278 70.0001930556 +expect -142 70 + +tolerance 2.77777777778e-07 m +accept -140.997219722 70.0001791667 +expect -141 70 + +tolerance 2.77777777778e-07 m +accept -140 70 +expect -140.002795278 69.9998280556 + +tolerance 2.77777777778e-07 m +accept -138.997199444 70.0001608333 +expect -139 70 + +tolerance 2.77777777778e-07 m +accept -138 70 +expect -138.002957222 69.9998755556 + +tolerance 2.77777777778e-07 m +accept -134.997081944 70.0000463889 +expect -135 70 + +tolerance 2.77777777778e-07 m +accept -130 70 +expect -130.002737222 70.0000533333 + +tolerance 2.77777777778e-07 m +accept -128.000734722 69.9998663889 +expect -128.003472222 70 + +tolerance 2.77777777778e-07 m +accept -128 70 +expect -128.002737778 70.0001336111 + +tolerance 2.77777777778e-07 m +accept -125.997388333 69.9997780556 +expect -126 70 + +tolerance 2.77777777778e-07 m +accept -88.005575 70 +expect -88.0056825 70.0006094444 + +tolerance 2.77777777778e-07 m +accept -88 70 +expect -88.0001072222 70.0006091667 + +tolerance 2.77777777778e-07 m +accept -87.9998933333 69.9993908333 +expect -88 70 + +tolerance 2.77777777778e-07 m +accept -87.6610917 70 +expect -87.6611716667 70.0006033333 + +tolerance 2.77777777778e-07 m +accept -112.165693333 51.0169555556 +expect -112.166607778 51.0170094444 + +tolerance 2.77777777778e-07 m +accept -111.999093889 50.9999491667 +expect -112 51 + +tolerance 2.77777777778e-07 m +accept -111.999095278 49.9999597222 +expect -112 49.9999997222 + +tolerance 2.77777777778e-07 m +accept -112 49.9999997222 +expect -112.000904639 50.0000396667 + +tolerance 2.77777777778e-07 m +accept -111.9991175 49.0000063889 +expect -112 49 + +tolerance 2.77777777778e-07 m +accept -112 48 +expect -112.0008525 47.9999888889 + +tolerance 2.77777777778e-07 m +accept -111.999174722 47.0000097222 +expect -112 47 + +tolerance 2.77777777778e-07 m +accept -112 47 +expect -112.000825278 46.9999902778 + +tolerance 2.77777777778e-07 m +accept -130.517746667 51 +expect -130.519401944 50.9997713889 + +tolerance 2.77777777778e-07 m +accept -130.516091667 51.0002286111 +expect -130.517746667 51 + +tolerance 2.77777777778e-07 m +accept -130.516041667 50.0002461111 +expect -130.517746667 49.9999997222 + +tolerance 2.77777777778e-07 m +accept -130.517746667 49.9999997222 +expect -130.519451667 49.9997533333 + +tolerance 2.77777777778e-07 m +accept -130.516067222 49.0002825 +expect -130.517746667 49 + +tolerance 2.77777777778e-07 m +accept -130.517746667 48 +expect -130.519391111 47.9996794444 + +tolerance 2.77777777778e-07 m +accept -130.516146944 47.0003611111 +expect -130.517746667 47 + +tolerance 2.77777777778e-07 m +accept -130.517746667 47 +expect -130.519346389 46.9996386111 + +tolerance 2.77777777778e-07 m +accept -132.998205278 48.1170263889 +expect -133 48.1166666667 + +tolerance 2.77777777778e-07 m +accept -131.455555556 48.1166666667 +expect -131.457260278 48.1163330556 + +tolerance 2.77777777778e-07 m +accept -130.516098056 48.1169827778 +expect -130.517746667 48.1166666667 + +tolerance 2.77777777778e-07 m +accept -128.455555556 48.1166666667 +expect -128.457086944 48.1163927778 + +tolerance 2.77777777778e-07 m +accept -128.5444 48.1167066 +expect -128.545936111 48.1164311111 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4269 +inv + +step +init=epsg:4267 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept -142.002804722 69.9998069444 +expect -142 70 + +tolerance 2.77777777778e-07 m +accept -142 70 +expect -141.997195278 70.0001930556 + +tolerance 2.77777777778e-07 m +accept -141 70 +expect -140.997219722 70.0001791667 + +tolerance 2.77777777778e-07 m +accept -140.002795278 69.9998280556 +expect -140 70 + +tolerance 2.77777777778e-07 m +accept -139 70 +expect -138.997199444 70.0001608333 + +tolerance 2.77777777778e-07 m +accept -138.002957222 69.9998755556 +expect -138 70 + +tolerance 2.77777777778e-07 m +accept -135 70 +expect -134.997081944 70.0000463889 + +tolerance 2.77777777778e-07 m +accept -130.002737222 70.0000533333 +expect -130 70 + +tolerance 2.77777777778e-07 m +accept -128.003472222 70 +expect -128.000734722 69.9998663889 + +tolerance 2.77777777778e-07 m +accept -128.002737778 70.0001336111 +expect -128 70 + +tolerance 2.77777777778e-07 m +accept -126 70 +expect -125.997388333 69.9997780556 + +tolerance 2.77777777778e-07 m +accept -88.0056825 70.0006094444 +expect -88.005575 70 + +tolerance 2.77777777778e-07 m +accept -88.0001072222 70.0006091667 +expect -88 70 + +tolerance 2.77777777778e-07 m +accept -88 70 +expect -87.9998933333 69.9993908333 + +tolerance 2.77777777778e-07 m +accept -87.6611716667 70.0006033333 +expect -87.6610917 70 + +tolerance 2.77777777778e-07 m +accept -112.166607778 51.0170094444 +expect -112.165693333 51.0169555556 + +tolerance 2.77777777778e-07 m +accept -112 51 +expect -111.999093889 50.9999491667 + +tolerance 2.77777777778e-07 m +accept -112 49.9999997222 +expect -111.999095278 49.9999597222 + +tolerance 2.77777777778e-07 m +accept -112.000904639 50.0000396667 +expect -112 49.9999997222 + +tolerance 2.77777777778e-07 m +accept -112 49 +expect -111.9991175 49.0000063889 + +tolerance 2.77777777778e-07 m +accept -112.0008525 47.9999888889 +expect -112 48 + +tolerance 2.77777777778e-07 m +accept -112 47 +expect -111.999174722 47.0000097222 + +tolerance 2.77777777778e-07 m +accept -112.000825278 46.9999902778 +expect -112 47 + +tolerance 2.77777777778e-07 m +accept -130.519401944 50.9997713889 +expect -130.517746667 51 + +tolerance 2.77777777778e-07 m +accept -130.517746667 51 +expect -130.516091667 51.0002286111 + +tolerance 2.77777777778e-07 m +accept -130.517746667 49.9999997222 +expect -130.516041667 50.0002461111 + +tolerance 2.77777777778e-07 m +accept -130.519451667 49.9997533333 +expect -130.517746667 49.9999997222 + +tolerance 2.77777777778e-07 m +accept -130.517746667 49 +expect -130.516067222 49.0002825 + +tolerance 2.77777777778e-07 m +accept -130.519391111 47.9996794444 +expect -130.517746667 48 + +tolerance 2.77777777778e-07 m +accept -130.517746667 47 +expect -130.516146944 47.0003611111 + +tolerance 2.77777777778e-07 m +accept -130.519346389 46.9996386111 +expect -130.517746667 47 + +tolerance 2.77777777778e-07 m +accept -133 48.1166666667 +expect -132.998205278 48.1170263889 + +tolerance 2.77777777778e-07 m +accept -131.457260278 48.1163330556 +expect -131.455555556 48.1166666667 + +tolerance 2.77777777778e-07 m +accept -130.517746667 48.1166666667 +expect -130.516098056 48.1169827778 + +tolerance 2.77777777778e-07 m +accept -128.457086944 48.1163927778 +expect -128.455555556 48.1166666667 + +tolerance 2.77777777778e-07 m +accept -128.545936111 48.1164311111 +expect -128.5444 48.1167066 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4267 +inv + +step +init=epsg:4269 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept -142 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -141.997195278 70.0001930556 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -140.997219722 70.0001791667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -140 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.997199444 70.0001608333 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -134.997081944 70.0000463889 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128.000734722 69.9998663889 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -125.997388333 69.9997780556 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -88.005575 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -88 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -87.9998933333 69.9993908333 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -87.6610917 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112.165693333 51.0169555556 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.999093889 50.9999491667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.999095278 49.9999597222 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 49.9999997222 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.9991175 49.0000063889 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 48 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.999174722 47.0000097222 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 47 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.517746667 51 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.516091667 51.0002286111 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.516041667 50.0002461111 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.517746667 49.9999997222 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.516067222 49.0002825 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.517746667 48 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.516146944 47.0003611111 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.517746667 47 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -132.998205278 48.1170263889 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -131.455555556 48.1166666667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.516098056 48.1169827778 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128.455555556 48.1166666667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128.5444 48.1167066 +roundtrip 1000 + + diff --git a/test/gigs/5208.gie b/test/gigs/5208.gie new file mode 100644 index 00000000..5d94474a --- /dev/null +++ b/test/gigs/5208.gie @@ -0,0 +1,192 @@ +-------------------------------------------------------------------------------- + +Test 5208, Longitude Rotation, v2.0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4275 +inv + +step +init=epsg:4807 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 5 58 +expect 2.66277083 58 + +tolerance 2.77777777778e-07 m +accept 5 56 +expect 2.66277083 56 + +tolerance 2.77777777778e-07 m +accept 5 55 +expect 2.66277083 55 + +tolerance 2.77777777778e-07 m +accept 5 53 +expect 2.66277083 53 + +tolerance 2.77777777778e-07 m +accept 4 51 +expect 1.66277083 51 + +tolerance 2.77777777778e-07 m +accept 4 49 +expect 1.66277083 49 + +tolerance 2.77777777778e-07 m +accept 2.33722917 46.8 +expect 0 46.8 + +tolerance 2.77777777778e-07 m +accept 3 53 +expect 0.66277083 53 + +tolerance 2.77777777778e-07 m +accept 4 53 +expect 1.66277083 53 + +tolerance 2.77777777778e-07 m +accept 6 53 +expect 3.66277083 53 + +tolerance 2.77777777778e-07 m +accept 7 53 +expect 4.66277083 53 + +tolerance 2.77777777778e-07 m +accept 9 53 +expect 6.66277083 53 + +tolerance 2.77777777778e-07 m +accept 10 53 +expect 7.66277083 53 + +tolerance 2.77777777778e-07 m +accept 11 53 +expect 8.66277083 53 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4807 +inv + +step +init=epsg:4275 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 2.66277083 58 +expect 5 58 + +tolerance 2.77777777778e-07 m +accept 2.66277083 56 +expect 5 56 + +tolerance 2.77777777778e-07 m +accept 2.66277083 55 +expect 5 55 + +tolerance 2.77777777778e-07 m +accept 2.66277083 53 +expect 5 53 + +tolerance 2.77777777778e-07 m +accept 1.66277083 51 +expect 4 51 + +tolerance 2.77777777778e-07 m +accept 1.66277083 49 +expect 4 49 + +tolerance 2.77777777778e-07 m +accept 0 46.8 +expect 2.33722917 46.8 + +tolerance 2.77777777778e-07 m +accept 0.66277083 53 +expect 3 53 + +tolerance 2.77777777778e-07 m +accept 1.66277083 53 +expect 4 53 + +tolerance 2.77777777778e-07 m +accept 3.66277083 53 +expect 6 53 + +tolerance 2.77777777778e-07 m +accept 4.66277083 53 +expect 7 53 + +tolerance 2.77777777778e-07 m +accept 6.66277083 53 +expect 9 53 + +tolerance 2.77777777778e-07 m +accept 7.66277083 53 +expect 10 53 + +tolerance 2.77777777778e-07 m +accept 8.66277083 53 +expect 11 53 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4275 +inv + +step +init=epsg:4807 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept 5 58 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 5 56 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 5 55 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 5 53 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 4 51 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 4 49 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 2.33722917 46.8 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 3 53 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 4 53 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 6 53 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 7 53 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 9 53 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 10 53 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 11 53 +roundtrip 1000 + + diff --git a/test/gigs/convert_to_gie.py b/test/gigs/convert_to_gie.py index 2b80aaa3..ba04b03d 100644 --- a/test/gigs/convert_to_gie.py +++ b/test/gigs/convert_to_gie.py @@ -1,6 +1,34 @@ import sys import json +def write_coords(f, coords, testtype, test): + '''testtype can be either ('fwd', 'inv', 'roundtrip')''' + + for coord in coords: + if len(coord[0]) == 3: + cstring = '{} {} {}' + else: + cstring = '{} {}' + + f.write('tolerance {tol} m\n'.format(tol=test['tolerances'][tolerance_index])) + accept = 'accept {s}\n'.format(s=cstring) + expect = 'expect {s}\n'.format(s=cstring) + + if testtype == 'fwd': + f.write(accept.format(*coord[0])) + f.write(expect.format(*coord[1])) + + if testtype == 'inv': + f.write(accept.format(*coord[1])) + f.write(expect.format(*coord[0])) + + if testtype == 'roundtrip': + f.write(accept.format(*coord[0])) + f.write('roundtrip {n}\n'.format(n=test['times'])) + + f.write('\n') + + with open(sys.argv[1]) as f: data = json.load(f) @@ -26,16 +54,13 @@ with open(filename, 'w') as f: f.write(' +step {src} +inv\n'.format(src=crss[0])) f.write(' +step {dst}\n'.format(dst=crss[1])) f.write('-'*80 + '\n') - if test['type'] == 'conversion': write_coords(f, coords, 'fwd', test) - f.write('-'*80 + '\n') f.write('operation +proj=pipeline\n') f.write(' +step {src} +inv\n'.format(src=crss[1])) f.write(' +step {dst}\n'.format(dst=crss[0])) f.write('-'*80 + '\n') - write_coords(f, coords, 'inv', test) if test['type'] == 'roundtrip': -- cgit v1.2.3 From 12c502d09f7cd06afc48dee7f1a064f40d99900c Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Tue, 9 Jan 2018 21:09:54 +0100 Subject: Add gie tests to autoconf makefile. Download grid files as the first thing in the travis install script and that 'make check' can be run without errors caused by missing grids. --- nad/Makefile.am | 5 +++++ travis/install.sh | 26 +++++++++++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/nad/Makefile.am b/nad/Makefile.am index e8f31f4b..af466df8 100644 --- a/nad/Makefile.am +++ b/nad/Makefile.am @@ -1,8 +1,11 @@ # Executables paths passed to test scripts NADPATH = $(top_srcdir)/nad +GIETESTPATH = $(top_srcdir)/test/gie +GIGSTESTPATH = $(top_srcdir)/test/gigs EXEPATH = ../src PROJEXE = $(EXEPATH)/proj CS2CSEXE = $(EXEPATH)/cs2cs +GIEEXE = $(EXEPATH)/gie # PROJ.4 test scripts TEST27 = $(NADPATH)/test27 @@ -87,6 +90,8 @@ check-local: process-nad2bin export PROJ_LIB=. ; \ $(TESTNTV2) $(CS2CSEXE) ; \ fi + $(GIEEXE) $(GIETESTPATH)/*.gie +#$(GIEEXE) $(GIGSTESTPATH)/*.gie clean-local: $(RM) $(TEST_DB) diff --git a/travis/install.sh b/travis/install.sh index 5be36eb1..5f520902 100755 --- a/travis/install.sh +++ b/travis/install.sh @@ -2,6 +2,15 @@ set -e +# Download grid files to nad/ +wget http://download.osgeo.org/proj/proj-datumgrid-1.6.zip +cd nad +unzip -o ../proj-datumgrid-1.6.zip +wget http://download.osgeo.org/proj/vdatum/egm96_15/egm96_15.gtx +GRIDDIR=`pwd` +echo $GRIDDIR +cd .. + # prepare build files ./autogen.sh # cmake build @@ -20,7 +29,7 @@ make -j3 make install make dist-all find /tmp/proj_autoconf_install -make check +PROJ_LIB=$GRIDDIR make check # Check consistency of generated tarball TAR_FILENAME=`ls *.tar.gz` TAR_DIRECTORY=`basename $TAR_FILENAME .tar.gz` @@ -30,7 +39,7 @@ cd $TAR_DIRECTORY make -j3 make install make dist-all -make check +PROJ_LIB=$GRIDDIR make check CURRENT_PWD=`pwd` cd /tmp/proj_autoconf_install find | sort > /tmp/list_proj_autoconf_install.txt @@ -42,14 +51,6 @@ cd $CURRENT_PWD cd .. # cd .. -# Now with grids -wget http://download.osgeo.org/proj/proj-datumgrid-1.6.zip -cd nad -unzip -o ../proj-datumgrid-1.6.zip -wget http://download.osgeo.org/proj/vdatum/egm96_15/egm96_15.gtx -GRIDDIR=`pwd` -echo $GRIDDIR -cd .. # cmake build with grids mkdir build_cmake_nad cd build_cmake_nad @@ -65,7 +66,7 @@ cd build_autoconf_nad make -j3 make install find /tmp/proj_autoconf_install_nad -make check +PROJ_LIB=$GRIDDIR make check cd src make multistresstest make test228 @@ -79,8 +80,7 @@ if [ $TRAVIS_OS_NAME == "osx" ]; then CFLAGS="--coverage" LDFLAGS="-lgcov" ./configure; fi make -j3 -make check -PROJ_LIB=$GRIDDIR ./src/gie ./test/gie/*.gie +PROJ_LIB=$GRIDDIR make check # install & run the working GIGS test # create locations that pyproj understands -- cgit v1.2.3 From d109f6e826e7a2542d7e1bd50cc62e5fa9ac373e Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 11 Jan 2018 12:13:47 +0100 Subject: PJ_axisswap.c: validate axis value. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5073. Credit to OSS Fuzz. master only --- src/PJ_axisswap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/PJ_axisswap.c b/src/PJ_axisswap.c index bb22f41e..0d1683b4 100644 --- a/src/PJ_axisswap.c +++ b/src/PJ_axisswap.c @@ -192,6 +192,10 @@ PJ *CONVERSION(axisswap,0) { /* read axes numbers and signs */ for ( s = order, n = 0; *s != '\0' && n < 4; ) { Q->axis[n] = abs(atoi(s))-1; + if (Q->axis[n] <= 0 || Q->axis[n] > 3) { + proj_log_error(P, "axisswap: invalid axis '%d'", Q->axis[n]); + return pj_default_destructor(P, PJD_ERR_AXIS); + } Q->sign[n++] = sign(atoi(s)); while ( *s != '\0' && *s != ',' ) s++; -- cgit v1.2.3 From a00d13a1fdd869596bf2f13a39f12a0ab7961fb3 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 11 Jan 2018 13:22:20 +0100 Subject: Fix breakage of previous commit --- src/PJ_axisswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PJ_axisswap.c b/src/PJ_axisswap.c index 0d1683b4..725077a8 100644 --- a/src/PJ_axisswap.c +++ b/src/PJ_axisswap.c @@ -192,7 +192,7 @@ PJ *CONVERSION(axisswap,0) { /* read axes numbers and signs */ for ( s = order, n = 0; *s != '\0' && n < 4; ) { Q->axis[n] = abs(atoi(s))-1; - if (Q->axis[n] <= 0 || Q->axis[n] > 3) { + if (Q->axis[n] < 0 || Q->axis[n] > 3) { proj_log_error(P, "axisswap: invalid axis '%d'", Q->axis[n]); return pj_default_destructor(P, PJD_ERR_AXIS); } -- cgit v1.2.3 From 29916584ae00a16ef0974d419a89d6f12edecc12 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 11 Jan 2018 13:46:38 +0100 Subject: Fix breakage of previous commit (bis) --- src/PJ_axisswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PJ_axisswap.c b/src/PJ_axisswap.c index 725077a8..f7e89c33 100644 --- a/src/PJ_axisswap.c +++ b/src/PJ_axisswap.c @@ -192,7 +192,7 @@ PJ *CONVERSION(axisswap,0) { /* read axes numbers and signs */ for ( s = order, n = 0; *s != '\0' && n < 4; ) { Q->axis[n] = abs(atoi(s))-1; - if (Q->axis[n] < 0 || Q->axis[n] > 3) { + if (Q->axis[n] > 3) { proj_log_error(P, "axisswap: invalid axis '%d'", Q->axis[n]); return pj_default_destructor(P, PJD_ERR_AXIS); } -- cgit v1.2.3 From 754f62987a8035497236e2fae24cc4e9d8d91937 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 11 Jan 2018 12:22:24 +0100 Subject: axisswap initialization: avoid switch case fallthrough case without break are really confusing, and should be avoided as much as possible IMHO. Also error out if a unrecognized character is provided as the axis value. --- src/PJ_axisswap.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/PJ_axisswap.c b/src/PJ_axisswap.c index f7e89c33..d57834fc 100644 --- a/src/PJ_axisswap.c +++ b/src/PJ_axisswap.c @@ -211,19 +211,31 @@ PJ *CONVERSION(axisswap,0) { switch(P->axis[i]) { case 'w': Q->sign[i] = -1; + Q->axis[i] = 0; + break; case 'e': + Q->sign[i] = 1; Q->axis[i] = 0; break; case 's': Q->sign[i] = -1; + Q->axis[i] = 1; + break; case 'n': + Q->sign[i] = 1; Q->axis[i] = 1; break; case 'd': Q->sign[i] = -1; + Q->axis[i] = 2; + break; case 'u': + Q->sign[i] = 1; Q->axis[i] = 2; break; + default: + proj_log_error(P, "axisswap: unknown axis '%c'", P->axis[i]); + return pj_default_destructor(P, PJD_ERR_AXIS); } } n = 3; -- cgit v1.2.3 From fb69e67f8694fd61943cc9f9c2da75ec35ce9841 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Thu, 11 Jan 2018 16:34:47 +0100 Subject: Fail gracefully when invalid inverse operation is specified in cct. Similar to proj and cs2cs, cct now returns immediately when trying to do an inverse operation that is not possible, for example using proj=urm5 which doesn't have an inverse: $ cct.exe -I +proj=pipeline +step +proj=urm5 +n=0.5 Inverse operation not available --- src/cct.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cct.c b/src/cct.c index f315ae1a..7e48311a 100644 --- a/src/cct.c +++ b/src/cct.c @@ -217,9 +217,15 @@ int main(int argc, char **argv) { return 1; } - /* We have no API call for inverting an operation, so we brute force it. */ - if (direction==-1) + if (direction==-1) { + /* fail if an inverse operation is not available */ + if (!proj_pj_info(P).has_inverse) { + fprintf (stderr, "Inverse operation not available\n"); + return 1; + } + /* We have no API call for inverting an operation, so we brute force it. */ P->inverted = !(P->inverted); + } direction = 1; /* Allocate input buffer */ -- cgit v1.2.3 From b6c8e417d71dca9ac04f57660da2c94a0a85e8ff Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Thu, 11 Jan 2018 16:40:01 +0100 Subject: Set inv*-functions to zero on pipeline PJ's where an inverse does not exist. Some projections do not have an inverse mapping. If such a projection is used as a (forward) step in a pipeline we won't be able to perform an inverse operation using the pipeline. By setting the inv, inv3d and inv4d pointers to zero we signal to the caller that an inverse mapping is not available. --- src/PJ_pipeline.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/PJ_pipeline.c b/src/PJ_pipeline.c index af9c5394..3dcc85d9 100644 --- a/src/PJ_pipeline.c +++ b/src/PJ_pipeline.c @@ -320,6 +320,7 @@ PJ *OPERATION(pipeline,0) { int i, nsteps = 0, argc; int i_pipeline = -1, i_first_step = -1, i_current_step; char **argv, **current_argv; + PJ *Q; P->fwd4d = pipeline_forward_4d; P->inv4d = pipeline_reverse_4d; @@ -429,14 +430,29 @@ PJ *OPERATION(pipeline,0) { /* Is this step inverted? */ for (j = 0; j < current_argc; j++) - if (0==strcmp("inv", current_argv[j])) + if (0==strcmp("inv", current_argv[j])) { next_step->inverted = 1; + } P->opaque->pipeline[i+1] = next_step; proj_log_trace (P, "Pipeline at [%p]: step at [%p] done", P, next_step); } + /* determine if an inverse operation is possible */ + for (i = 1; i <= nsteps; i++) { + Q = P->opaque->pipeline[i]; + if ( ( Q->inverted && (Q->fwd || Q->fwd3d || Q->fwd4d) ) || + ( Q->inv || Q->inv3d || Q->inv4d) ) { + continue; + } else { + P->inv = 0; + P->inv3d = 0; + P->inv4d = 0; + break; + } + } + proj_log_trace (P, "Pipeline: %d steps built. Determining i/o characteristics", nsteps); /* Determine forward input (= reverse output) data type */ -- cgit v1.2.3 From 9181fcfebde8a3969dc49100674f16286119059b Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Tue, 16 Jan 2018 13:16:18 +0100 Subject: Fix "double inversions" in pipelines, require a defined forward operation. "+proj=pipeline +inv +step +urm5 +n=0.5 +inv" now works as expected, returning the forward operation of urm5. In principle adding more +inv's should also work, resulting in the forward operation when an even number of +inv's are present, and the inverse when an odd number of +inv's are present. "+proj=pipeline +step +urm5 +n=0.5 +inv" fails at initialization since no forward operation can be performed. This is a new requirement, but aligns perfectly with the rest of the library since no operation without a forward method exists. --- src/PJ_pipeline.c | 18 +++++++++++++++--- test/gie/more_builtins.gie | 18 +++++++++++++++++- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/src/PJ_pipeline.c b/src/PJ_pipeline.c index 3dcc85d9..befc8557 100644 --- a/src/PJ_pipeline.c +++ b/src/PJ_pipeline.c @@ -320,7 +320,6 @@ PJ *OPERATION(pipeline,0) { int i, nsteps = 0, argc; int i_pipeline = -1, i_first_step = -1, i_current_step; char **argv, **current_argv; - PJ *Q; P->fwd4d = pipeline_forward_4d; P->inv4d = pipeline_reverse_4d; @@ -431,7 +430,8 @@ PJ *OPERATION(pipeline,0) { /* Is this step inverted? */ for (j = 0; j < current_argc; j++) if (0==strcmp("inv", current_argv[j])) { - next_step->inverted = 1; + /* if +inv exists in both global and local args the forward operation should be used */ + next_step->inverted = next_step->inverted == 0 ? 1 : 0; } P->opaque->pipeline[i+1] = next_step; @@ -439,9 +439,21 @@ PJ *OPERATION(pipeline,0) { proj_log_trace (P, "Pipeline at [%p]: step at [%p] done", P, next_step); } + /* Require a forward path through the pipeline */ + for (i = 1; i <= nsteps; i++) { + PJ *Q = P->opaque->pipeline[i]; + if ( ( Q->inverted && (Q->inv || Q->inv3d || Q->fwd4d) ) || + (!Q->inverted && (Q->fwd || Q->fwd3d || Q->fwd4d) ) ) { + continue; + } else { + proj_log_error (P, "Pipeline: A forward operation couldn't be constructed"); + return destructor (P, PJD_ERR_MALFORMED_PIPELINE); + } + } + /* determine if an inverse operation is possible */ for (i = 1; i <= nsteps; i++) { - Q = P->opaque->pipeline[i]; + PJ *Q = P->opaque->pipeline[i]; if ( ( Q->inverted && (Q->fwd || Q->fwd3d || Q->fwd4d) ) || ( Q->inv || Q->inv3d || Q->inv4d) ) { continue; diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index 099934a7..00f584b4 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -115,10 +115,26 @@ expect 691875.63214 6098907.82501 0 0 direction inverse accept 12 55 0 0 expect 12 55 0 0 +------------------------------------------------------------------------------- +Test a few inversion scenarios (urm5 has no inverse operation) +------------------------------------------------------------------------------- +operation proj=pipeline step + proj=urm5 n=0.5 inv +expect failure pjd_err_malformed_pipeline +operation proj=pipeline inv step + proj=urm5 n=0.5 +expect failure pjd_err_malformed_pipeline +operation proj=pipeline inv step + proj=urm5 n=0.5 inv +accept 12 56 +expect 1215663.2814182492 5452209.5424045017 - +operation proj=pipeline step + proj=urm5 n=0.5 +accept 12 56 +expect 1215663.2814182492 5452209.5424045017 ------------------------------------------------------------------------------- Some tests from PJ_vgridshift.c -- cgit v1.2.3 From 046ce54719f3224b1b9299ee8d370cc92b0929af Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Tue, 16 Jan 2018 14:08:39 +0100 Subject: Adding a few more test cases for pipeline, ensuring better test coverage --- test/gie/more_builtins.gie | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index 00f584b4..20bffbd9 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -65,7 +65,7 @@ roundtrip 100 1 m ------------------------------------------------------------------------------- Some tests from PJ_pipeline.c ------------------------------------------------------------------------------- -Forward-reverse geo->utm->geo +Forward-reverse geo->utm->geo (4D functions) ------------------------------------------------------------------------------- operation proj=pipeline zone=32 step proj=utm ellps=GRS80 step @@ -81,7 +81,7 @@ Now the inverse direction (still same result: the pipeline is symmetrical) direction inverse expect 12 55 0 0 ------------------------------------------------------------------------------- -And now the back-to-back situation utm->geo->utm +And now the back-to-back situation utm->geo->utm (4D functions) ------------------------------------------------------------------------------- operation proj=pipeline zone=32 ellps=GRS80 step proj=utm inv step @@ -92,6 +92,33 @@ expect 691875.63214 6098907.82501 0 0 direction inverse expect 691875.63214 6098907.82501 0 0 ------------------------------------------------------------------------------- +Forward-reverse geo->utm->geo (3D functions) +------------------------------------------------------------------------------- +operation proj=pipeline zone=32 step + proj=utm ellps=GRS80 step + proj=utm ellps=GRS80 inv +------------------------------------------------------------------------------- +tolerance 0.1 mm + +accept 12 55 0 +expect 12 55 0 + +Now the inverse direction (still same result: the pipeline is symmetrical) + +direction inverse +expect 12 55 0 +------------------------------------------------------------------------------- +And now the back-to-back situation utm->geo->utm (3D functions) +------------------------------------------------------------------------------- +operation proj=pipeline zone=32 ellps=GRS80 step + proj=utm inv step + proj=utm +------------------------------------------------------------------------------- +accept 691875.63214 6098907.82501 0 +expect 691875.63214 6098907.82501 0 +direction inverse +expect 691875.63214 6098907.82501 0 +------------------------------------------------------------------------------- Test a corner case: A rather pointless one-step pipeline geo->utm ------------------------------------------------------------------------------- operation proj=pipeline step proj=utm zone=32 ellps=GRS80 @@ -135,6 +162,20 @@ operation proj=pipeline step proj=urm5 n=0.5 accept 12 56 expect 1215663.2814182492 5452209.5424045017 +------------------------------------------------------------------------------- +Test various failing scenarios. +------------------------------------------------------------------------------- +operation proj=pipeline step + proj=pipeline step + proj=merc +expect failure pjd_err_malformed_pipeline + +operation step proj=pipeline step proj=merc +expect failure pjd_err_malformed_pipeline + +operation proj=pipeline +expect failure pjd_err_malformed_pipeline + ------------------------------------------------------------------------------- Some tests from PJ_vgridshift.c -- cgit v1.2.3 From d0dbf48438f9e152314abf294467cb54f9ae0e70 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Mon, 22 Jan 2018 21:06:23 +0100 Subject: Handle ellipsoid parameters correctly when using +nadgrids=@null. Fixes #22. Make sure to not change ellipsoid parameters to WGS84 when applying the null grid. Coordinates will still refer to the input ellipsoid so we keep the original parameters which in turn will be used when the coordinates are transformated to/from cartesian/geocentric space. Adjusted regression test material in nad/proj_outIGNF.dist slightly to accomodate numerical differences at the mm level. The transformations in question are at best accurate to about 1m so this shouldn't change real world usage of these transformations. --- nad/proj_outIGNF.dist | 10 +++++----- src/pj_transform.c | 21 +++++++++++++++++---- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/nad/proj_outIGNF.dist b/nad/proj_outIGNF.dist index 45112f60..be666fb0 100644 --- a/nad/proj_outIGNF.dist +++ b/nad/proj_outIGNF.dist @@ -1,16 +1,16 @@ +init=./IGNF:NTFG +to +init=./IGNF:RGF93G 3.300866856 43.4477976569 0.0000 3d18'0.915"E 43d26'52.077"N 0.000 +init=./IGNF:LAMBE +to +init=./IGNF:LAMB93 - 600000.0000 2600545.4523 0.0000 652760.737 7033791.243 0.000 + 600000.0000 2600545.4523 0.0000 652760.737 7033791.244 0.000 135638.3592 2418760.4094 0.0000 187194.062 6855928.882 0.000 998137.3947 2413822.2844 0.0000 1049052.258 6843776.562 0.000 - 600000.0000 2200000.0000 0.0000 649398.872 6633524.191 0.000 + 600000.0000 2200000.0000 0.0000 649398.872 6633524.192 0.000 311552.5340 1906457.4840 0.0000 358799.172 6342652.486 0.000 960488.4138 1910172.8812 0.0000 1007068.686 6340907.237 0.000 600000.0000 1699510.8340 0.0000 645204.279 6133556.746 0.000 -1203792.5981 626873.17210 0.0000 1238875.764 5057405.016 0.000 +1203792.5981 626873.17210 0.0000 1238875.764 5057405.017 0.000 +init=./IGNF:LAMBE +to +init=./IGNF:GEOPORTALFXX - 600000.0000 2600545.4523 0.0000 179040.148 5610495.275 0.000 + 600000.0000 2600545.4523 0.0000 179040.148 5610495.276 0.000 135638.3592 2418760.4094 0.0000 -303729.363 5410118.356 0.000 998137.3947 2413822.2844 0.0000 592842.792 5410120.554 0.000 600000.0000 2200000.0000 0.0000 179041.670 5209746.080 0.000 @@ -37,4 +37,4 @@ 2d20'11.7754730" 42d18'00.0824436" 0.0 260109.601 5009175.714 0.000 9d32'12.6680218" 41d24'00.3542556" 0.0 1061637.534 4889066.592 0.000 +init=./IGNF:RGR92 +to +init=./IGNF:REUN47 -3356123.5400 1303218.3090 5247430.6050 3353421.833 1304074.314 5248935.607 +3356123.5400 1303218.3090 5247430.6050 3353421.833 1304074.314 5248935.606 diff --git a/src/pj_transform.c b/src/pj_transform.c index c72df2e7..6ad227cd 100644 --- a/src/pj_transform.c +++ b/src/pj_transform.c @@ -748,17 +748,30 @@ int pj_datum_transform( PJ *srcdefn, PJ *dstdefn, /* -------------------------------------------------------------------- */ if( srcdefn->datum_type == PJD_GRIDSHIFT ) { + const char* srcnadgrids = pj_param(srcdefn->ctx, srcdefn->params,"snadgrids").s; + pj_apply_gridshift_2( srcdefn, 0, point_count, point_offset, x, y, z ); CHECK_RETURN(srcdefn); - src_a = SRS_WGS84_SEMIMAJOR; - src_es = SRS_WGS84_ESQUARED; + /* If the gridlist has either "@null" or "null" as its only */ + /* grid we don't change the ellipsoid parameters, since the */ + /* datum shift to WGS84 was not performed in practice. */ + if ( strcmp("@null", srcnadgrids) && strcmp("null", srcnadgrids) ) { + src_a = SRS_WGS84_SEMIMAJOR; + src_es = SRS_WGS84_ESQUARED; + } } if( dstdefn->datum_type == PJD_GRIDSHIFT ) { - dst_a = SRS_WGS84_SEMIMAJOR; - dst_es = SRS_WGS84_ESQUARED; + const char* dstnadgrids = pj_param(dstdefn->ctx, dstdefn->params,"snadgrids").s; + /* If the gridlist has either "@null" or "null" as its only */ + /* grid we don't change the ellipsoid parameters, since the */ + /* datum shift to WGS84 will not be performed. */ + if ( strcmp("@null", dstnadgrids) && strcmp("null", dstnadgrids) ) { + dst_a = SRS_WGS84_SEMIMAJOR; + dst_es = SRS_WGS84_ESQUARED; + } } /* ==================================================================== */ -- cgit v1.2.3 From aff1011a16372465ffeca05b0d7fcc8a9c2cf86e Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 25 Jan 2018 15:51:37 +0100 Subject: Fix null pointer dereference in pj_datum_tranform() caused by d0dbf48438f9e152314abf294467cb54f9ae0e70 changes. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5649. Credit to OSS Fuzz --- src/pj_transform.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pj_transform.c b/src/pj_transform.c index 6ad227cd..fc0a3241 100644 --- a/src/pj_transform.c +++ b/src/pj_transform.c @@ -756,7 +756,8 @@ int pj_datum_transform( PJ *srcdefn, PJ *dstdefn, /* If the gridlist has either "@null" or "null" as its only */ /* grid we don't change the ellipsoid parameters, since the */ /* datum shift to WGS84 was not performed in practice. */ - if ( strcmp("@null", srcnadgrids) && strcmp("null", srcnadgrids) ) { + if ( srcnadgrids != NULL && + strcmp("@null", srcnadgrids) && strcmp("null", srcnadgrids) ) { src_a = SRS_WGS84_SEMIMAJOR; src_es = SRS_WGS84_ESQUARED; } @@ -768,7 +769,8 @@ int pj_datum_transform( PJ *srcdefn, PJ *dstdefn, /* If the gridlist has either "@null" or "null" as its only */ /* grid we don't change the ellipsoid parameters, since the */ /* datum shift to WGS84 will not be performed. */ - if ( strcmp("@null", dstnadgrids) && strcmp("null", dstnadgrids) ) { + if ( dstnadgrids != NULL && + strcmp("@null", dstnadgrids) && strcmp("null", dstnadgrids) ) { dst_a = SRS_WGS84_SEMIMAJOR; dst_es = SRS_WGS84_ESQUARED; } -- cgit v1.2.3 From b6c3d16dae36ed2dfd09e231c5171482553ff2d7 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Fri, 26 Jan 2018 15:40:35 +0100 Subject: Make sure to mark +proj param used so it shows up in the definition. Fixes #744. --- src/pj_init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pj_init.c b/src/pj_init.c index 862a6515..f25c0344 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -554,6 +554,7 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { curr = pj_param_exists (start, "proj"); if (0==curr) return pj_dealloc_params (ctx, start, PJD_ERR_PROJ_NOT_NAMED); + curr->used = 1; name = curr->param; if (strlen (name) < 6) return pj_dealloc_params (ctx, start, PJD_ERR_PROJ_NOT_NAMED); -- cgit v1.2.3 From e979bce36ccd2bc52cabc0b1192bc0f8d4ed6f33 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Wed, 31 Jan 2018 10:56:11 +0100 Subject: Add pj_has_inverse(). With the introduction of the "inverted" flag on PJ objects you can no longer rely on checking that the inv, inv3d and inv4d functions are available on said PJ object. The function is used internally a few places and otherwise exposed in proj_api.h to ensure that users of the old programming interface can safely check if an operation has an inverse. --- src/PJ_pipeline.c | 3 +-- src/pj_internal.c | 9 ++++++++- src/proj.def | 1 + src/proj_4D_api.c | 4 +--- src/proj_api.h | 1 + 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/PJ_pipeline.c b/src/PJ_pipeline.c index befc8557..2f904ab1 100644 --- a/src/PJ_pipeline.c +++ b/src/PJ_pipeline.c @@ -454,8 +454,7 @@ PJ *OPERATION(pipeline,0) { /* determine if an inverse operation is possible */ for (i = 1; i <= nsteps; i++) { PJ *Q = P->opaque->pipeline[i]; - if ( ( Q->inverted && (Q->fwd || Q->fwd3d || Q->fwd4d) ) || - ( Q->inv || Q->inv3d || Q->inv4d) ) { + if ( pj_has_inverse(Q) ) { continue; } else { P->inv = 0; diff --git a/src/pj_internal.c b/src/pj_internal.c index deb0c054..6bb33d64 100644 --- a/src/pj_internal.c +++ b/src/pj_internal.c @@ -119,7 +119,14 @@ chained calls starting out with a call to its 3D interface. return proj_coord_error (); } - +/**************************************************************************************/ +int pj_has_inverse(PJ *P) { +/*************************************************************************************** +Check if a a PJ has an inverse. +***************************************************************************************/ + return ( (P->inverted && (P->fwd || P->fwd3d || P->fwd4d) ) || + ( P->inv || P->inv3d || P->inv4d) ); +} /* Move P to a new context - or to the default context if 0 is specified */ diff --git a/src/proj.def b/src/proj.def index f758477d..6ab0c007 100644 --- a/src/proj.def +++ b/src/proj.def @@ -154,3 +154,4 @@ EXPORTS pj_approx_2D_trans @138 pj_approx_3D_trans @139 + pj_has_inverse @140 diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index 4a416084..2c6bac2d 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -696,9 +696,7 @@ PJ_PROJ_INFO proj_pj_info(PJ *P) { pj_strlcpy(info.definition, &def[1], sizeof(info.definition)); /* def includes a leading space */ pj_dealloc(def); - /* this does not take into account that a pipeline potentially does not */ - /* have an inverse. */ - info.has_inverse = (P->inv != 0 || P->inv3d != 0 || P->inv4d != 0); + info.has_inverse = pj_has_inverse(P); return info; } diff --git a/src/proj_api.h b/src/proj_api.h index 597a2589..40c40ad1 100644 --- a/src/proj_api.h +++ b/src/proj_api.h @@ -155,6 +155,7 @@ projPJ pj_init_ctx( projCtx, int, char ** ); projPJ pj_init_plus_ctx( projCtx, const char * ); char *pj_get_def(projPJ, int); projPJ pj_latlong_from_proj( projPJ ); +int pj_has_inverse(projPJ); void *pj_malloc(size_t); -- cgit v1.2.3 From 90968ff934a348b02f982080f8b7ccf17e037a46 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Fri, 5 Jan 2018 12:03:21 +0100 Subject: Introduce compatibility for cs2cs-style proj-strings into the 4D API. Parameters such as towgs84, nadgrids and geoidgrids was previously only handled by pj_transform(). This commit add a compatibility layer in proj_create() by calling the pj_cs2cs_emulation_setup() function. This function sets up a handful of predefined transformation objects on the PJ object that is being created. Each of these transformation objects are related to the cs2cs-style parameters we are trying to emulate in the 4D API. That is, if the +towgs84 parameters is used we create P->helmert with the parameters specified in +towgs84. Similarly for +axis, +nadgrids and +geoidgrids. When these transformation objects exists we use them in the prepare and finalize functions in pj_fwd/ pj_inv. If no cs2cs-style parametes are specified we skip those parts of the prepare and finalizing steps. Co-authored-by:Thomas Knudsen Co-authored-by:Kristian Evers --- src/PJ_helmert.c | 32 ++++++-- src/gie.c | 47 ++++++++---- src/pj_fwd.c | 115 +++++++++++++++++++++++----- src/pj_geocent.c | 2 + src/pj_init.c | 23 ------ src/pj_inv.c | 123 +++++++++++++++++++++++++----- src/pj_malloc.c | 34 +++++++++ src/proj.def | 2 + src/proj_4D_api.c | 119 ++++++++++++++++++++++++++++- src/proj_internal.h | 4 - src/projects.h | 10 ++- test/gie/4D-API_cs2cs-style.gie | 161 ++++++++++++++++++++++++++++++++++++++++ test/gie/axisswap.gie | 11 ++- test/gie/builtins.gie | 16 ++-- test/gie/more_builtins.gie | 10 +-- 15 files changed, 603 insertions(+), 106 deletions(-) create mode 100644 test/gie/4D-API_cs2cs-style.gie diff --git a/src/PJ_helmert.c b/src/PJ_helmert.c index f726d946..229e30c2 100644 --- a/src/PJ_helmert.c +++ b/src/PJ_helmert.c @@ -486,6 +486,25 @@ PJ *TRANSFORMATION(helmert, 0) { P->right = PJ_IO_UNITS_PROJECTED; } + /* Support the classic PROJ towgs84 parameter, but allow later overrides.*/ + /* Note that if towgs84 is specified, the datum_params array is set up */ + /* for us automagically by the pj_datum_set call in pj_init_ctx */ + if (pj_param_exists (P->params, "towgs84")) { + Q->xyz_0.x = P->datum_params[0]; + Q->xyz_0.y = P->datum_params[1]; + Q->xyz_0.z = P->datum_params[2]; + + Q->opk_0.o = P->datum_params[3]; + Q->opk_0.p = P->datum_params[4]; + Q->opk_0.k = P->datum_params[5]; + + /* We must undo conversion to absolute scale from pj_datum_set */ + if (0==P->datum_params[6]) + Q->scale_0 = 0; + else + Q->scale_0 = (P->datum_params[6] - 1) * 1e6; + } + /* Translations */ if (pj_param (P->ctx, P->params, "tx").i) Q->xyz_0.x = pj_param (P->ctx, P->params, "dx").f; @@ -570,14 +589,13 @@ PJ *TRANSFORMATION(helmert, 0) { /* Let's help with debugging */ if (proj_log_level(P->ctx, PJ_LOG_TELL) >= PJ_LOG_DEBUG) { proj_log_debug(P, "Helmert parameters:"); - proj_log_debug(P, "x= % 3.5f y= % 3.5f z= % 3.5f", Q->xyz.x, Q->xyz.y, Q->xyz.z); - proj_log_debug(P, "rx= % 3.5f ry= % 3.5f rz= % 3.5f", + proj_log_debug(P, "x= %8.5f y= %8.5f z= %8.5f", Q->xyz.x, Q->xyz.y, Q->xyz.z); + proj_log_debug(P, "rx= %8.5f ry= %8.5f rz= %8.5f", Q->opk.o / ARCSEC_TO_RAD, Q->opk.p / ARCSEC_TO_RAD, Q->opk.k / ARCSEC_TO_RAD); - proj_log_debug(P, "s=% 3.5f exact=% d transpose=% d", - Q->scale, Q->exact, Q->transpose); - proj_log_debug(P, "dx= % 3.5f dy= % 3.5f dz= % 3.5f", Q->dxyz.x, Q->dxyz.y, Q->dxyz.z); - proj_log_debug(P, "drx=% 3.5f dry=% 3.5f drz=% 3.5f", Q->dopk.o, Q->dopk.p, Q->dopk.k); - proj_log_debug(P, "ds=% 3.5f t_epoch=% 5.5f t_obs=% 5.5f", Q->dscale, Q->t_epoch, Q->t_obs); + proj_log_debug(P, "s= %8.5f exact=%d transpose=%d", Q->scale, Q->exact, Q->transpose); + proj_log_debug(P, "dx= %8.5f dy= %8.5f dz= %8.5f", Q->dxyz.x, Q->dxyz.y, Q->dxyz.z); + proj_log_debug(P, "drx=%8.5f dry=%8.5f drz=%8.5f", Q->dopk.o, Q->dopk.p, Q->dopk.k); + proj_log_debug(P, "ds= %8.5f t_epoch=%8.5f t_obs=%8.5f", Q->dscale, Q->t_epoch, Q->t_obs); } if ((Q->opk.o==0) && (Q->opk.p==0) && (Q->opk.k==0) && (Q->scale==0) && diff --git a/src/gie.c b/src/gie.c index e0045ebd..b2673d13 100644 --- a/src/gie.c +++ b/src/gie.c @@ -387,6 +387,7 @@ Interpret as a numeric followed by a linear decadal prefix. Return the properly scaled numeric ******************************************************************************/ double s; + const double GRS80_DEG = 111319.4908; /* deg-to-m at equator of GRS80 */ const char *endp = args; s = proj_strtod (args, (char **) &endp); if (args==endp) @@ -408,6 +409,10 @@ Return the properly scaled numeric s /= 1e6; else if (0==strcmp(endp, "nm")) s /= 1e9; + else if (0==strcmp(endp, "rad")) + s = GRS80_DEG * proj_todeg (s); + else if (0==strcmp(endp, "deg")) + s = GRS80_DEG * s; else s *= default_scale; return s; @@ -553,19 +558,29 @@ using the "builtins" command verb. } -static PJ_COORD torad_coord (PJ_COORD a) { - PJ_COORD c = a; - c.lpz.lam = proj_torad (a.lpz.lam); - c.lpz.phi = proj_torad (a.lpz.phi); - return c; +static PJ_COORD torad_coord (PJ *P, PJ_DIRECTION dir, PJ_COORD a) { + size_t i, n; + char *axis = "enut"; + paralist *l = pj_param_exists (P->params, "axis"); + if (l && dir==PJ_INV) + axis = l->param + strlen ("axis="); + for (i = 0, n = strlen (axis); i < n; i++) + if (strchr ("news", axis[i])) + a.v[i] = proj_torad (a.v[i]); + return a; } -static PJ_COORD todeg_coord (PJ_COORD a) { - PJ_COORD c = a; - c.lpz.lam = proj_todeg (a.lpz.lam); - c.lpz.phi = proj_todeg (a.lpz.phi); - return c; +static PJ_COORD todeg_coord (PJ *P, PJ_DIRECTION dir, PJ_COORD a) { + size_t i, n; + char *axis = "enut"; + paralist *l = pj_param_exists (P->params, "axis"); + if (l && dir==PJ_FWD) + axis = l->param + strlen ("axis="); + for (i = 0, n = strlen (axis); i < n; i++) + if (strchr ("news", axis[i])) + a.v[i] = proj_todeg (a.v[i]); + return a; } @@ -627,7 +642,7 @@ back/forward transformation pairs. d = d==HUGE_VAL? T.tolerance: d; /* input ("accepted") values - probably in degrees */ - coo = proj_angular_input (T.P, T.dir)? torad_coord (T.a): T.a; + coo = proj_angular_input (T.P, T.dir)? torad_coord (T.P, T.dir, T.a): T.a; r = proj_roundtrip (T.P, T.dir, ntrips, &coo); if (r <= d) @@ -747,7 +762,7 @@ Tell GIE what to expect, when transforming the ACCEPTed input proj_errno_reset (T.P); /* Try to carry out the operation - and expect failure */ - ci = proj_angular_input (T.P, T.dir)? torad_coord (T.a): T.a; + ci = proj_angular_input (T.P, T.dir)? torad_coord (T.P, T.dir, T.a): T.a; co = expect_trans_n_dim (ci); /* Failed to fail? - that's a failure */ @@ -780,20 +795,20 @@ Tell GIE what to expect, when transforming the ACCEPTed input return expect_message_cannot_parse (args); /* expected angular values, probably in degrees */ - ce = proj_angular_output (T.P, T.dir)? torad_coord (T.e): T.e; + ce = proj_angular_output (T.P, T.dir)? torad_coord (T.P, T.dir, T.e): T.e; if (T.verbosity > 3) printf ("EXPECTS %.4f %.4f %.4f %.4f\n", ce.v[0],ce.v[1],ce.v[2],ce.v[3]); /* input ("accepted") values, also probably in degrees */ - ci = proj_angular_input (T.P, T.dir)? torad_coord (T.a): T.a; + ci = proj_angular_input (T.P, T.dir)? torad_coord (T.P, T.dir, T.a): T.a; if (T.verbosity > 3) printf ("ACCEPTS %.4f %.4f %.4f %.4f\n", ci.v[0],ci.v[1],ci.v[2],ci.v[3]); /* angular output from proj_trans comes in radians */ co = expect_trans_n_dim (ci); - T.b = proj_angular_output (T.P, T.dir)? todeg_coord (co): co; + T.b = proj_angular_output (T.P, T.dir)? todeg_coord (T.P, T.dir, co): co; if (T.verbosity > 3) - printf ("GOT %.4f %.4f %.4f %.4f\n", ci.v[0],ci.v[1],ci.v[2],ci.v[3]); + printf ("GOT %.4f %.4f %.4f %.4f\n", co.v[0],co.v[1],co.v[2],co.v[3]); /* but there are a few more possible input conventions... */ if (proj_angular_output (T.P, T.dir)) { diff --git a/src/pj_fwd.c b/src/pj_fwd.c index a1025aac..2293cf2e 100644 --- a/src/pj_fwd.c +++ b/src/pj_fwd.c @@ -32,58 +32,137 @@ #include "proj_internal.h" #include "projects.h" -PJ_COORD pj_fwd_prepare (PJ *P, PJ_COORD coo) { +#define INPUT_UNITS P->left +#define OUTPUT_UNITS P->right + + +static PJ_COORD pj_fwd_prepare (PJ *P, PJ_COORD coo) { if (HUGE_VAL==coo.v[0]) return proj_coord_error (); + /* The helmert datum shift will choke unless it gets a sensible 4D coordinate */ + if (HUGE_VAL==coo.v[2] && P->helmert) coo.v[2] = 0.0; + if (HUGE_VAL==coo.v[3] && P->helmert) coo.v[3] = 0.0; + /* Check validity of angular input coordinates */ - if (P->left==PJ_IO_UNITS_RADIANS) { + if (INPUT_UNITS==PJ_IO_UNITS_RADIANS) { double t; - LP lp = coo.lp; /* check for latitude or longitude over-range */ - t = (lp.phi < 0 ? -lp.phi : lp.phi) - M_HALFPI; - if (t > PJ_EPS_LAT || lp.lam > 10 || lp.lam < -10) { + t = (coo.lp.phi < 0 ? -coo.lp.phi : coo.lp.phi) - M_HALFPI; + if (t > PJ_EPS_LAT || coo.lp.lam > 10 || coo.lp.lam < -10) { proj_errno_set (P, PJD_ERR_LAT_OR_LON_EXCEED_LIMIT); return proj_coord_error (); } /* Clamp latitude to -90..90 degree range */ - if (lp.phi > M_HALFPI) - lp.phi = M_HALFPI; - if (lp.phi < -M_HALFPI) - lp.phi = -M_HALFPI; + if (coo.lp.phi > M_HALFPI) + coo.lp.phi = M_HALFPI; + if (coo.lp.phi < -M_HALFPI) + coo.lp.phi = -M_HALFPI; /* If input latitude is geocentrical, convert to geographical */ if (P->geoc) coo = proj_geoc_lat (P, PJ_INV, coo); + /* Ensure longitude is in the -pi:pi range */ + if (0==P->over) + coo.lp.lam = adjlon(coo.lp.lam); + + if (P->hgridshift) + coo = proj_trans (P->hgridshift, PJ_INV, coo); + else if (P->helmert) { + coo = proj_trans (P->cart_wgs84, PJ_FWD, coo); /* Go cartesian in WGS84 frame */ + coo = proj_trans (P->helmert, PJ_FWD, coo); /* Step into local frame */ + coo = proj_trans (P->cart, PJ_INV, coo); /* Go back to angular using local ellps */ + } + if (P->vgridshift) + coo = proj_trans (P->vgridshift, PJ_FWD, coo); + /* Distance from central meridian, taking system zero meridian into account */ - lp.lam = (lp.lam - P->from_greenwich) - P->lam0; + coo.lp.lam = (coo.lp.lam - P->from_greenwich) - P->lam0; /* Ensure longitude is in the -pi:pi range */ if (0==P->over) - lp.lam = adjlon(lp.lam); + coo.lp.lam = adjlon(coo.lp.lam); - coo.lp = lp; + return coo; } + + /* We do not support gridshifts on cartesian input */ + if (INPUT_UNITS==PJ_IO_UNITS_CARTESIAN && P->helmert) + return proj_trans (P->helmert, PJ_FWD, coo); return coo; } -PJ_COORD pj_fwd_finalize (PJ *P, PJ_COORD coo) { + +static PJ_COORD pj_fwd_finalize (PJ *P, PJ_COORD coo) { + + switch (OUTPUT_UNITS) { + + /* Handle false eastings/northings and non-metric linear units */ + case PJ_IO_UNITS_CARTESIAN: + + if (P->is_geocent) { + coo = proj_trans (P->cart, PJ_FWD, coo); + } + + coo.xyz.x = P->fr_meter * (coo.xyz.x + P->x0); + coo.xyz.y = P->fr_meter * (coo.xyz.y + P->y0); + coo.xyz.z = P->fr_meter * (coo.xyz.z + P->z0); + break; /* Classic proj.4 functions return plane coordinates in units of the semimajor axis */ - if (P->right==PJ_IO_UNITS_CLASSIC) { + case PJ_IO_UNITS_CLASSIC: coo.xy.x *= P->a; coo.xy.y *= P->a; + + /* Falls through */ /* (<-- GCC warning silencer) */ + /* to continue processing in common with PJ_IO_UNITS_PROJECTED */ + case PJ_IO_UNITS_PROJECTED: + coo.xyz.x = P->fr_meter * (coo.xyz.x + P->x0); + coo.xyz.y = P->fr_meter * (coo.xyz.y + P->y0); + coo.xyz.z = P->vfr_meter * (coo.xyz.z + P->z0); + break; + + case PJ_IO_UNITS_WHATEVER: + break; + + case PJ_IO_UNITS_RADIANS: + if (INPUT_UNITS==PJ_IO_UNITS_RADIANS) + break; + + /* adjust longitude to central meridian */ + if (0==P->over) + coo.lpz.lam = adjlon(coo.lpz.lam); + + if (P->vgridshift) + coo = proj_trans (P->vgridshift, PJ_INV, coo); + if (P->hgridshift) + coo = proj_trans (P->hgridshift, PJ_FWD, coo); + else if (P->helmert) { + coo = proj_trans (P->cart_wgs84, PJ_FWD, coo); /* Go cartesian in WGS84 frame */ + coo = proj_trans (P->helmert, PJ_FWD, coo); /* Step into local frame */ + coo = proj_trans (P->cart, PJ_INV, coo); /* Go back to angular using local ellps */ + } + + /* If input latitude was geocentrical, convert back to geocentrical */ + if (P->geoc) + coo = proj_geoc_lat (P, PJ_FWD, coo); + + + /* Distance from central meridian, taking system zero meridian into account */ + coo.lp.lam = coo.lp.lam + P->from_greenwich + P->lam0; + + /* adjust longitude to central meridian */ + if (0==P->over) + coo.lpz.lam = adjlon(coo.lpz.lam); } - /* Handle false eastings/northings and non-metric linear units */ - coo.xyz.x = P->fr_meter * (coo.xyz.x + P->x0); - coo.xyz.y = P->fr_meter * (coo.xyz.y + P->y0); - coo.xyz.z = P->vfr_meter * (coo.xyz.z + P->z0); + if (P->axisswap) + coo = proj_trans (P->axisswap, PJ_FWD, coo); return coo; } diff --git a/src/pj_geocent.c b/src/pj_geocent.c index eca62080..e676b735 100644 --- a/src/pj_geocent.c +++ b/src/pj_geocent.c @@ -54,6 +54,8 @@ PJ *PROJECTION(geocent) { P->y0 = 0.0; P->inv = inverse; P->fwd = forward; + P->left = PJ_IO_UNITS_RADIANS; + P->right = PJ_IO_UNITS_CARTESIAN; return P; } diff --git a/src/pj_init.c b/src/pj_init.c index f25c0344..51a742c7 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -769,26 +769,3 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { proj_errno_restore (PIN, err); return PIN; } - - - -/************************************************************************/ -/* pj_free() */ -/* */ -/* This is the application callable entry point for destroying */ -/* a projection definition. It does work generic to all */ -/* projection types, and then calls the projection specific */ -/* free function, P->destructor(), to do local work. */ -/* In most cases P->destructor()==pj_default_destructor. */ -/************************************************************************/ - -void pj_free(PJ *P) { - if (0==P) - return; - /* free projection parameters - all the hard work is done by */ - /* pj_default_destructor (in pj_malloc.c), which is supposed */ - /* to be called as the last step of the local destructor */ - /* pointed to by P->destructor. In most cases, */ - /* pj_default_destructor actually *is* what is pointed to */ - P->destructor (P, 0); -} diff --git a/src/pj_inv.c b/src/pj_inv.c index e1fb05f6..02a2ca53 100644 --- a/src/pj_inv.c +++ b/src/pj_inv.c @@ -32,46 +32,131 @@ #include "proj_internal.h" #include "projects.h" +#define INPUT_UNITS P->right +#define OUTPUT_UNITS P->left - -PJ_COORD pj_inv_prepare (PJ *P, PJ_COORD coo) { +static PJ_COORD pj_inv_prepare (PJ *P, PJ_COORD coo) { if (coo.xyz.x == HUGE_VAL) { proj_errno_set (P, PJD_ERR_INVALID_X_OR_Y); return proj_coord_error (); } + /* The helmert datum shift will choke unless it gets a sensible 4D coordinate */ + if (HUGE_VAL==coo.v[2] && P->helmert) coo.v[2] = 0.0; + if (HUGE_VAL==coo.v[3] && P->helmert) coo.v[3] = 0.0; + + if (P->axisswap) + coo = proj_trans (P->axisswap, PJ_INV, coo); + + /* Check validity of angular input coordinates */ + if (INPUT_UNITS==PJ_IO_UNITS_RADIANS) { + double t; + + /* check for latitude or longitude over-range */ + t = (coo.lp.phi < 0 ? -coo.lp.phi : coo.lp.phi) - M_HALFPI; + if (t > PJ_EPS_LAT || coo.lp.lam > 10 || coo.lp.lam < -10) { + proj_errno_set (P, PJD_ERR_LAT_OR_LON_EXCEED_LIMIT); + return proj_coord_error (); + } + + /* Clamp latitude to -90..90 degree range */ + if (coo.lp.phi > M_HALFPI) + coo.lp.phi = M_HALFPI; + if (coo.lp.phi < -M_HALFPI) + coo.lp.phi = -M_HALFPI; + + /* If input latitude is geocentrical, convert to geographical */ + if (P->geoc) + coo = proj_geoc_lat (P, PJ_INV, coo); + + /* Distance from central meridian, taking system zero meridian into account */ + coo.lp.lam = (coo.lp.lam + P->from_greenwich) - P->lam0; + + /* Ensure longitude is in the -pi:pi range */ + if (0==P->over) + coo.lp.lam = adjlon(coo.lp.lam); + + if (P->hgridshift) + coo = proj_trans (P->hgridshift, PJ_FWD, coo); + else if (P->helmert) { + coo = proj_trans (P->cart, PJ_FWD, coo); /* Go cartesian in local frame */ + coo = proj_trans (P->helmert, PJ_INV, coo); /* Step into WGS84 */ + coo = proj_trans (P->cart_wgs84, PJ_INV, coo); /* Go back to angular using WGS84 ellps */ + } + if (P->vgridshift) + coo = proj_trans (P->vgridshift, PJ_INV, coo); + return coo; + } + + /* Handle remaining possible input types */ + switch (INPUT_UNITS) { + case PJ_IO_UNITS_WHATEVER: + return coo; + /* de-scale and de-offset */ - coo.xyz.x = (coo.xyz.x * P->to_meter - P->x0); - coo.xyz.y = (coo.xyz.y * P->to_meter - P->y0); - coo.xyz.z = (coo.xyz.z * P->vto_meter - P->z0); - - /* Classic proj.4 functions expect plane coordinates in units of the semimajor axis */ - /* Multiplying by ra, rather than dividing by a because the CALCOFI projection */ - /* stomps on a and hence (apparently) depends on this to roundtrip correctly */ - /* (CALCOFI avoids further scaling by stomping - a better solution must be possible) */ - if (P->right==PJ_IO_UNITS_CLASSIC) { + case PJ_IO_UNITS_CARTESIAN: + coo.xyz.x = P->to_meter * coo.xyz.x - P->x0; + coo.xyz.y = P->to_meter * coo.xyz.y - P->y0; + coo.xyz.z = P->to_meter * coo.xyz.z - P->z0; + + if (P->is_geocent) { + coo = proj_trans (P->cart, PJ_INV, coo); + } + + return coo; + + case PJ_IO_UNITS_PROJECTED: + case PJ_IO_UNITS_CLASSIC: + coo.xyz.x = P->to_meter * coo.xyz.x - P->x0; + coo.xyz.y = P->to_meter * coo.xyz.y - P->y0; + coo.xyz.z = P->vto_meter * coo.xyz.z - P->z0; + if (INPUT_UNITS==PJ_IO_UNITS_PROJECTED) + return coo; + + /* Classic proj.4 functions expect plane coordinates in units of the semimajor axis */ + /* Multiplying by ra, rather than dividing by a because the CALCOFI projection */ + /* stomps on a and hence (apparently) depends on this to roundtrip correctly */ + /* (CALCOFI avoids further scaling by stomping - but a better solution is possible) */ coo.xyz.x *= P->ra; coo.xyz.y *= P->ra; + return coo; + /* Silence some compiler warnings about PJ_IO_UNITS_RADIANS not handled */ + default: + break; } + /* Should not happen, so we could return pj_coord_err here */ return coo; } -PJ_COORD pj_inv_finalize (PJ *P, PJ_COORD coo) { +static PJ_COORD pj_inv_finalize (PJ *P, PJ_COORD coo) { if (coo.xyz.x == HUGE_VAL) { proj_errno_set (P, PJD_ERR_INVALID_X_OR_Y); return proj_coord_error (); } - if (P->left==PJ_IO_UNITS_RADIANS) { - /* Distance from central meridian, taking system zero meridian into account */ - coo.lp.lam = coo.lp.lam + P->from_greenwich + P->lam0; - - /* adjust longitude to central meridian */ - if (0==P->over) - coo.lpz.lam = adjlon(coo.lpz.lam); + if (OUTPUT_UNITS==PJ_IO_UNITS_RADIANS) { + + if (INPUT_UNITS!=PJ_IO_UNITS_RADIANS) { + /* Distance from central meridian, taking system zero meridian into account */ + coo.lp.lam = coo.lp.lam + P->from_greenwich + P->lam0; + + /* adjust longitude to central meridian */ + if (0==P->over) + coo.lpz.lam = adjlon(coo.lpz.lam); + + if (P->vgridshift) + coo = proj_trans (P->vgridshift, PJ_INV, coo); + if (P->hgridshift) + coo = proj_trans (P->hgridshift, PJ_FWD, coo); + else if (P->helmert) { + coo = proj_trans (P->cart, PJ_FWD, coo); /* Go cartesian in local frame */ + coo = proj_trans (P->helmert, PJ_INV, coo); /* Step into WGS84 */ + coo = proj_trans (P->cart_wgs84, PJ_INV, coo); /* Go back to angular using WGS84 ellps */ + } + } /* If input latitude was geocentrical, convert back to geocentrical */ if (P->geoc) diff --git a/src/pj_malloc.c b/src/pj_malloc.c index 63278a56..cfb7f658 100644 --- a/src/pj_malloc.c +++ b/src/pj_malloc.c @@ -162,6 +162,32 @@ void *pj_dealloc_params (PJ_CONTEXT *ctx, paralist *start, int errlev) { } + + +/************************************************************************/ +/* pj_free() */ +/* */ +/* This is the application callable entry point for destroying */ +/* a projection definition. It does work generic to all */ +/* projection types, and then calls the projection specific */ +/* free function, P->destructor(), to do local work. */ +/* In most cases P->destructor()==pj_default_destructor. */ +/************************************************************************/ + +void pj_free(PJ *P) { + if (0==P) + return; + /* free projection parameters - all the hard work is done by */ + /* pj_default_destructor, which is supposed */ + /* to be called as the last step of the local destructor */ + /* pointed to by P->destructor. In most cases, */ + /* pj_default_destructor actually *is* what is pointed to */ + P->destructor (P, 0); +} + + + + /*****************************************************************************/ void *pj_default_destructor (PJ *P, int errlev) { /* Destructor */ /***************************************************************************** @@ -196,6 +222,14 @@ void *pj_default_destructor (PJ *P, int errlev) { /* Destructor */ /* free parameter list elements */ pj_dealloc_params (pj_get_ctx(P), P->params, errlev); + /* free the cs2cs emulation elements */ + pj_free (P->axisswap); + pj_free (P->helmert); + pj_free (P->cart); + pj_free (P->cart_wgs84); + pj_free (P->hgridshift); + pj_free (P->vgridshift); + pj_dealloc (P->opaque); return pj_dealloc(P); } diff --git a/src/proj.def b/src/proj.def index 6ab0c007..099a78a5 100644 --- a/src/proj.def +++ b/src/proj.def @@ -155,3 +155,5 @@ EXPORTS pj_approx_2D_trans @138 pj_approx_3D_trans @139 pj_has_inverse @140 + pj_param_exists @141 + diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index 2c6bac2d..fa24c430 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -380,7 +380,114 @@ char* proj_rtodms(char *s, double r, int pos, int neg) { return rtodms(s, r, pos, neg); } +/*************************************************************************************/ +static PJ* skip_prep_fin(PJ *P) { +/************************************************************************************** +Skip prepare and finalize function for the various "helper operations" added to P when +in cs2cs compatibility mode. +**************************************************************************************/ + P->skip_fwd_prepare = 1; + P->skip_fwd_finalize = 1; + P->skip_inv_prepare = 1; + P->skip_inv_finalize = 1; + return P; +} + +/*************************************************************************************/ +static int pj_cs2cs_emulation_setup (PJ *P) { +/************************************************************************************** +If any cs2cs style modifiers are given (axis=..., towgs84=..., ) create the 4D API +equivalent operations, so the preparation and finalization steps in the pj_inv/pj_fwd +invocators can emulate the behaviour of pj_transform and the cs2cs app. +**************************************************************************************/ + PJ *Q; + paralist *p; + char def[1000]; + if (0==P) + return 0; + + /* Don't recurse when calling proj_create (which calls us back) */ + if (pj_param_exists (P->params, "break_cs2cs_recursion")) + return 1; + + /* Swap axes? */ + p = pj_param_exists (P->params, "axis"); + + /* Don't axisswap if data are already in "enu" order */ + if (p && (0!=strcmp ("enu", p->param))) { + sprintf (def, "break_cs2cs_recursion proj=axisswap axis=%s", P->axis); + Q = proj_create (P->ctx, def); + if (0==Q) + return 0; + P->axisswap = skip_prep_fin(Q); + } + + /* Geoid grid(s) given? */ + p = pj_param_exists (P->params, "geoidgrids"); + if (p && strlen (p->param) > strlen ("geoidgrids=")) { + char *gridnames = p->param + strlen ("geoidgrids="); + sprintf (def, "break_cs2cs_recursion proj=vgridshift grids=%s", gridnames); + Q = proj_create (P->ctx, def); + if (0==Q) + return 0; + P->vgridshift = skip_prep_fin(Q); + } + + /* Datum shift grid(s) given? */ + p = pj_param_exists (P->params, "nadgrids"); + if (p && strlen (p->param) > strlen ("nadgrids=")) { + char *gridnames = p->param + strlen ("nadgrids="); + sprintf (def, "break_cs2cs_recursion proj=hgridshift grids=%s", gridnames); + Q = proj_create (P->ctx, def); + if (0==Q) + return 0; + P->hgridshift = skip_prep_fin(Q); + } + + /* We ignore helmert if we have grid shift */ + p = P->hgridshift ? 0 : pj_param_exists (P->params, "towgs84"); + while (p) { + char *s = p->param; + double *d = P->datum_params; + size_t n = strlen (s); + + /* We ignore null helmert shifts (common in auto-translated resource files, e.g. epsg) */ + if (0==d[0] && 0==d[1] && 0==d[2] && 0==d[3] && 0==d[4] && 0==d[5] && 0==d[6]) + break; + + if (n > 900) + return 0; + if (n <= 8) /* 8==strlen ("towgs84=") */ + return 0; + sprintf (def, "break_cs2cs_recursion proj=helmert %s", s); + Q = proj_create (P->ctx, def); + if (0==Q) + return 0; + P->helmert = skip_prep_fin(Q); + + break; + } + + /* We also need cartesian/geographical transformations if we are working in */ + /* geocentric/cartesian space or we need to do a Helmert transform. */ + if (P->is_geocent || P->helmert) { + char *wgs84 = "ellps=WGS84"; + sprintf (def, "break_cs2cs_recursion proj=cart"); + Q = proj_create (P->ctx, def); + if (0==Q) + return 0; + pj_inherit_ellipsoid_def(P, Q); + P->cart = skip_prep_fin(Q); + + sprintf (def, "break_cs2cs_recursion proj=cart %s", wgs84); + Q = proj_create (P->ctx, def); + if (0==Q) + return 0; + P->cart_wgs84 = skip_prep_fin(Q); + } + return 1; +} /*************************************************************************************/ @@ -394,9 +501,10 @@ PJ *proj_create (PJ_CONTEXT *ctx, const char *definition) { It may even use free formatting "proj = utm; zone =32 ellps= GRS80". Note that the semicolon separator is allowed, but not required. **************************************************************************************/ - PJ *P; - char *args, **argv; + PJ *P; + char *args, **argv; size_t argc, n; + int ret; if (0==ctx) ctx = pj_get_default_ctx (); @@ -421,6 +529,12 @@ PJ *proj_create (PJ_CONTEXT *ctx, const char *definition) { pj_dealloc (argv); pj_dealloc (args); + + /* Support cs2cs-style modifiers */ + ret = pj_cs2cs_emulation_setup (P); + if (0==ret) + return proj_destroy (P); + return P; } @@ -449,6 +563,7 @@ indicator, as in {"+proj=utm", "+zone=32"}, or leave it out, as in {"proj=utm", return 0; P = proj_create (ctx, c); + pj_dealloc ((char *) c); return P; } diff --git a/src/proj_internal.h b/src/proj_internal.h index 41f95c07..2c6cbee2 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -84,10 +84,6 @@ void proj_context_inherit (PJ *parent, PJ *child); PJ_COORD pj_fwd4d (PJ_COORD coo, PJ *P); PJ_COORD pj_inv4d (PJ_COORD coo, PJ *P); -PJ_COORD pj_fwd_prepare (PJ *P, PJ_COORD coo); -PJ_COORD pj_fwd_finalize (PJ *P, PJ_COORD coo); -PJ_COORD pj_inv_prepare (PJ *P, PJ_COORD coo); -PJ_COORD pj_inv_finalize (PJ *P, PJ_COORD coo); PJ_COORD pj_approx_2D_trans (PJ *P, PJ_DIRECTION direction, PJ_COORD coo); PJ_COORD pj_approx_3D_trans (PJ *P, PJ_DIRECTION direction, PJ_COORD coo); diff --git a/src/projects.h b/src/projects.h index 86ca2524..aeaf09ae 100644 --- a/src/projects.h +++ b/src/projects.h @@ -349,6 +349,14 @@ struct PJconsts { enum pj_io_units left; /* Flags for input/output coordinate types */ enum pj_io_units right; + /* These PJs are used for implementing cs2cs style coordinate handling in the 4D API */ + PJ *axisswap; + PJ *cart; + PJ *cart_wgs84; + PJ *helmert; + PJ *hgridshift; + PJ *vgridshift; + /************************************************************************************* @@ -394,7 +402,7 @@ struct PJconsts { double from_greenwich; /* prime meridian offset (in radians) */ double long_wrap_center; /* 0.0 for -180 to 180, actually in radians*/ int is_long_wrap_set; - char axis[4]; /* TODO: Description needed */ + char axis[4]; /* Axis order, pj_transform/pj_adjust_axis */ /* New Datum Shift Grid Catalogs */ char *catalog_name; diff --git a/test/gie/4D-API_cs2cs-style.gie b/test/gie/4D-API_cs2cs-style.gie new file mode 100644 index 00000000..853df993 --- /dev/null +++ b/test/gie/4D-API_cs2cs-style.gie @@ -0,0 +1,161 @@ +=============================================================================== + +Test the 4D API handling of cs2cs style transformation options. + +These tests are mostly based on the same material as those in +more_builtins.gie, since we are testing the same kinds of things, +but provided through a different interface. + +=============================================================================== + + + + +------------------------------------------------------------------------------- +Test the handling of the +towgs84 parameter +------------------------------------------------------------------------------- +This example is from Lotti Jivall: "Simplified transformations from +ITRF2008/IGS08 to ETRS89 for maritime applications". The original +XYZ data (cf. more_builtins.gie) have been transformed to LPZ using +this command: echo x_val y_val z_val | cct -It0 proj=cart ellps=GRS80 -- + +NOTE: Here, the ellipsoid has been swapped to WGS84, to align with + the WGS84 ellipsoid used in the cs2cs emulation introduced by + pj_cs2cs_emulation_setup() +------------------------------------------------------------------------------- +operation proj=latlong ellps=WGS84 + towgs84 = 0.676780, 0.654950, -0.528270, + -0.022742, 0.012667, 0.022704, -0.010700 +------------------------------------------------------------------------------- +tolerance 0.05 mm +direction forward + +accept 13.4999969828397 54.9999995493206 -0.6034 +expect 13.4999906103972 54.9999957469562 -0.6374 + +direction inverse + +accept 13.4999906103972 54.9999957469562 -0.6374 +expect 13.4999969828397 54.9999995493206 -0.6034 +------------------------------------------------------------------------------- + + + +------------------------------------------------------------------------------- +This example is a random point, transformed from ED50 to ETRS89 using KMStrans2. + +NOTE: Signs swapped wrt. KMStrans2, which apparently uses frame rotation. +------------------------------------------------------------------------------- +operation proj=latlong ellps=intl + towgs84 = 081.07030, 089.36030, 115.75260, + 000.48488, 000.02436, 000.41321, 0.540645 +------------------------------------------------------------------------------- +tolerance 0.1 mm +# echo SWAPPED and trimmed - expect succcess +# accept 16.819999997 55.170000002 61.0 +accept 16.82 55.17 61.0 +expect 16.8210462130 55.1705688946 29.0317 +------------------------------------------------------------------------------- +This commented-out version of the example above was used to detect the sign +discrepancy between KMSTrans2 and PROJ. +------------------------------------------------------------------------------- +operation proj=latlong ellps=intl + towgs84 = -081.07030, -089.36030, -115.75260, + -000.48488, -000.02436, -000.41321, -0.540645 +------------------------------------------------------------------------------- +# echo NOT SWAPPED - Expect failure +# accept 16.8210462130 55.1705688946 29.0317 +# expect 16.819999997 55.170000002 61.0 +------------------------------------------------------------------------------- + + + +------------------------------------------------------------------------------- +operation proj=latlong nadgrids=nzgd2kgrid0005.gsb ellps=GRS80 +------------------------------------------------------------------------------- +tolerance 1 nm +accept 173 -45 0 0 +expect 172.999892181021551 -45.001620431954613 0 0 +direction inverse +accept 172.999892181021551 -45.001620431954613 0 0 +expect 173 -45 0 0 +------------------------------------------------------------------------------- + + + +------------------------------------------------------------------------------- +operation proj=latlong geoidgrids=egm96_15.gtx ellps=GRS80 +------------------------------------------------------------------------------- +tolerance 15 cm # lax tolerance due to widespread bad egm96 file +accept 12.5 55.5 0 +expect 12.5 55.5 -36.0213 +direction inverse +accept 12.5 55.5 -36.0213 +expect 12.5 55.5 0 +------------------------------------------------------------------------------- +operation proj=merc geoidgrids=egm96_15.gtx ellps=GRS80 +------------------------------------------------------------------------------- +tolerance 0.1 mm +accept 12.5 55.5 0 +expect 1391493.63492 7424275.19462 -36.0213 +direction inverse +accept 1391493.63492 7424275.19462 -36.0213 +expect 12.5 55.5 0 +------------------------------------------------------------------------------- + + + +------------------------------------------------------------------------------- +Same as the two above, but also do axis swapping. +------------------------------------------------------------------------------- +operation proj=latlong geoidgrids=egm96_15.gtx axis=neu ellps=GRS80 +------------------------------------------------------------------------------- +tolerance 15 cm # lax tolerance due to widely distributed, bad egm96 file +accept 12.5 55.5 0 +expect 55.5 12.5 -36.0213 +direction inverse +accept 55.5 12.5 -36.0213 +expect 12.5 55.5 0 +------------------------------------------------------------------------------- +operation proj=latlong geoidgrids=egm96_15.gtx axis=dne ellps=GRS80 +------------------------------------------------------------------------------- +tolerance 15 cm # lax tolerance due to widely distributed, bad egm96 file +accept 12.5 55.5 0 +expect 36.0213 55.5 12.5 +direction inverse +accept 36.0213 55.5 12.5 +expect 12.5 55.5 0 +------------------------------------------------------------------------------- +operation proj=merc geoidgrids=egm96_15.gtx ellps=GRS80 +------------------------------------------------------------------------------- +tolerance 0.1 mm +accept 12.5 55.5 0 +expect 1391493.63492 7424275.19462 -36.0213 +direction inverse +accept 1391493.63492 7424275.19462 -36.0213 +expect 12.5 55.5 0 +------------------------------------------------------------------------------- + + +------------------------------------------------------------------------------- +Some more complex axis swapping. +------------------------------------------------------------------------------- +operation proj=latlong geoidgrids=egm96_15.gtx axis=nue ellps=GRS80 +------------------------------------------------------------------------------- +tolerance 15 cm # lax tolerance due to widely distributed, bad egm96 file +accept 12.5 55.5 0 +expect 55.5 -36.0213 12.5 +direction inverse +accept 55.5 -36.0213 12.5 +expect 12.5 55.5 0 +------------------------------------------------------------------------------- +operation proj=merc geoidgrids=egm96_15.gtx axis=sue ellps=GRS80 +------------------------------------------------------------------------------- +tolerance 15 cm +accept 12.5 55.5 0 +expect -7424275.1946 -36.0213 1391493.6349 0.0000 +direction inverse +accept -7424275.1946 -36.0213 1391493.6349 0.0000 +expect 12.5 55.5 0 +------------------------------------------------------------------------------- + diff --git a/test/gie/axisswap.gie b/test/gie/axisswap.gie index ac148a92..190ca3e7 100644 --- a/test/gie/axisswap.gie +++ b/test/gie/axisswap.gie @@ -53,9 +53,14 @@ expect 3 -2 1 4 roundtrip 100 operation proj=axisswap axis=neu -tolerance 0.000001 m -accept 1 2 3 4 -expect 2 1 3 4 +tolerance 0 m +accept 1 2 3 +expect 2 1 3 + +operation proj=axisswap axis=nue +tolerance 0 m +accept 1 2 3 +expect 2 3 1 operation proj=axisswap axis=swd tolerance 0.000001 m diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index 3877b58a..e8f1bfe1 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -1233,14 +1233,14 @@ Geocentric operation +proj=geocent +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- tolerance 0.00010 mm -accept 2 1 -expect 222638.981586547 111319.490793274 -accept 2 -1 -expect 222638.981586547 -111319.490793274 -accept -2 1 -expect -222638.981586547 111319.490793274 -accept -2 -1 -expect -222638.981586547 -111319.490793274 +accept 2 1 0 +expect 6373287.27950247 222560.09599219 110568.77482092 +accept 2 -1 0 +expect 6373287.27950247 222560.09599219 -110568.77482092 +accept -2 1 0 +expect 6373287.27950247 -222560.09599219 110568.77482092 +accept -2 -1 0 +expect 6373287.27950247 -222560.09599219 -110568.77482092 direction inverse accept 200 100 diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index 20bffbd9..e21f0321 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -131,11 +131,11 @@ expect 12 55 0 0 ------------------------------------------------------------------------------- Finally test a pipeline with more than one init step ------------------------------------------------------------------------------- -operation proj=pipeline step - init=epsg:25832 inv step - init=epsg:25833 step - init=epsg:25833 inv step - init=epsg:25832 +operation proj=pipeline + step init=epsg:25832 inv + step init=epsg:25833 + step init=epsg:25833 inv + step init=epsg:25832 ------------------------------------------------------------------------------- accept 691875.63214 6098907.82501 0 0 expect 691875.63214 6098907.82501 0 0 -- cgit v1.2.3 From b3354f70d3ca2c6b77d702f5ab73a0378819b703 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Fri, 26 Jan 2018 12:47:14 +0100 Subject: proj_roundtrip: simplify control logic --- src/proj_4D_api.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index fa24c430..6654522c 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -100,7 +100,7 @@ double proj_xyz_dist (XYZ a, XYZ b) { /* Measure numerical deviation after n roundtrips fwd-inv (or inv-fwd) */ double proj_roundtrip (PJ *P, PJ_DIRECTION direction, int n, PJ_COORD *coo) { int i; - PJ_COORD o, u, org; + PJ_COORD t, org; if (0==P) return HUGE_VAL; @@ -111,23 +111,23 @@ double proj_roundtrip (PJ *P, PJ_DIRECTION direction, int n, PJ_COORD *coo) { } /* in the first half-step, we generate the output value */ - u = org = *coo; - o = *coo = proj_trans (P, direction, u); + org = *coo; + *coo = proj_trans (P, direction, org); + t = *coo; - /* now we take n-1 full steps */ - for (i = 0; i < n - 1; i++) { - u = proj_trans (P, -direction, o); - o = proj_trans (P, direction, u); - } + /* now we take n-1 full steps in inverse direction: We are */ + /* out of phase due to the half step already taken */ + for (i = 0; i < n - 1; i++) + t = proj_trans (P, direction, proj_trans (P, -direction, t) ); /* finally, we take the last half-step */ - u = proj_trans (P, -direction, o); + t = proj_trans (P, -direction, t); /* checking for angular *input* since we do a roundtrip, and end where we begin */ if (proj_angular_input (P, direction)) - return proj_lpz_dist (P, org.lpz, u.lpz); + return proj_lpz_dist (P, org.lpz, t.lpz); - return proj_xyz_dist (org.xyz, u.xyz); + return proj_xyz_dist (org.xyz, t.xyz); } -- cgit v1.2.3 From 0770483f47593317b594e5602e6c2084cab5222e Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Wed, 31 Jan 2018 16:05:14 +0100 Subject: Test material for the cs2cs emulation in the 4D API. The GIGS tests that are known to work are added to the CMake test setup. The GIGS gie files have been auto-translated from the existing json-files and some corrections to tolerances have been necessary since gie uses different norms than GIGS specify. The GIGS tolerances are specified as the infinity norm of angular coordinates, whereas gie uses the actual distances between calculated and expected coordinates (using geodesics). In a few tests +towgs84 is overriden from the EPSG inits to avoid creeping numerical inaccuracy in roundtrips. Co-authored-by: Thomas Knudsen Co-authored-by: Kristian Evers --- test/CMakeLists.txt | 16 +++-- test/gie/axisswap.gie | 3 + test/gigs/5103.1.gie | 75 ++++------------------ test/gigs/5110.gie | 8 +++ test/gigs/5111.1.gie | 12 +++- test/gigs/5112.gie | 39 +++++------- test/gigs/5201.gie | 168 ++++++++++++++++++++++++++------------------------ test/gigs/5208.gie | 100 +++++++++++++++++------------- 8 files changed, 202 insertions(+), 219 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a91492da..7475f715 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -7,18 +7,21 @@ proj_add_gie_test("Axisswap" "gie/axisswap.gie") proj_add_gie_test("Deformation" "gie/deformation.gie") proj_add_gie_test("Ellipsoid" "gie/ellipsoid.gie") proj_add_gie_test("GDA" "gie/GDA.gie") +proj_add_gie_test("4D-API-cs2cs-style" "gie/4D-API_cs2cs-style.gie") +# GIGS tests. Uncommented tests are expected to fail due to issues with +# various projections. Should be investigated further and fixed. proj_add_gie_test("GIGS-5101.1-jhs" "gigs/5101.1-jhs.gie") proj_add_gie_test("GIGS-5101.2-jhs" "gigs/5101.2-jhs.gie") proj_add_gie_test("GIGS-5101.3-jhs" "gigs/5101.3-jhs.gie") proj_add_gie_test("GIGS-5101.4-jhs-etmerc" "gigs/5101.4-jhs-etmerc.gie") -#proj_add_gie_test("GIGS-5101.4-jhs" "gigs/5101.4-jhs.gie") +#proj_add_gie_test("GIGS-5101.4-jhs" "gigs/5101.4-jhs.gie") # Same as above, but using etmerc instead of tmerc proj_add_gie_test("GIGS-5102.1" "gigs/5102.1.gie") #proj_add_gie_test("GIGS-5102.2" "gigs/5102.2.gie") proj_add_gie_test("GIGS-5103.1" "gigs/5103.1.gie") proj_add_gie_test("GIGS-5103.2" "gigs/5103.2.gie") proj_add_gie_test("GIGS-5103.3" "gigs/5103.3.gie") -proj_add_gie_test("GIGS-5104" "gigs/5104.gie") +#proj_add_gie_test("GIGS-5104" "gigs/5104.gie") #proj_add_gie_test("GIGS-5105.1" "gigs/5105.1.gie") proj_add_gie_test("GIGS-5105.2" "gigs/5105.2.gie") proj_add_gie_test("GIGS-5106" "gigs/5106.gie") @@ -29,12 +32,15 @@ proj_add_gie_test("GIGS-5109" "gigs/5109.gie") proj_add_gie_test("GIGS-5111.1" "gigs/5111.1.gie") #proj_add_gie_test("GIGS-5111.2" "gigs/5111.2.gie") proj_add_gie_test("GIGS-5112" "gigs/5112.gie") -#proj_add_gie_test("GIGS-5113" "gigs/5113.gie") -#proj_add_gie_test("GIGS-5201" "gigs/5201.gie") +proj_add_gie_test("GIGS-5113" "gigs/5113.gie") +proj_add_gie_test("GIGS-5201" "gigs/5201.gie") #proj_add_gie_test("GIGS-5203" "gigs/5203.1.gie") #proj_add_gie_test("GIGS-5204.1" "gigs/5204.1.gie") #proj_add_gie_test("GIGS-5205.1" "gigs/5205.1.gie") #proj_add_gie_test("GIGS-5206" "gigs/5206.gie") #proj_add_gie_test("GIGS-5207.1" "gigs/5207.1.gie") #proj_add_gie_test("GIGS-5207.2" "gigs/5207.2.gie") -#proj_add_gie_test("GIGS-5208" "gigs/5208.gie") +proj_add_gie_test("GIGS-5208" "gigs/5208.gie") + + + diff --git a/test/gie/axisswap.gie b/test/gie/axisswap.gie index 190ca3e7..5fe86200 100644 --- a/test/gie/axisswap.gie +++ b/test/gie/axisswap.gie @@ -57,6 +57,9 @@ tolerance 0 m accept 1 2 3 expect 2 1 3 +# when using the +axis parameter we specify the order of the INPUT coordinate, +# as opposed to +order which relates to the OUTPUT coordinate. Here we test +# that n(1), u(2) and e(3) are swapped correctly to enu ordering. operation proj=axisswap axis=nue tolerance 0 m accept 1 2 3 diff --git a/test/gigs/5103.1.gie b/test/gigs/5103.1.gie index f00ed019..c972b738 100644 --- a/test/gigs/5103.1.gie +++ b/test/gigs/5103.1.gie @@ -10,254 +10,201 @@ Test 5103 (part 1), Lambert Conic Conformal (2SP), v2-0_2011-06-28. operation +proj=pipeline +step +init=epsg:4313 +inv +step +init=epsg:31370 + +tolerance 30 mm -------------------------------------------------------------------------------- -tolerance 0.03 m accept 5 58 expect 187742.7 969521.653 -tolerance 0.03 m accept 5 57 expect 188698.877 857277.135 -tolerance 0.03 m accept 5 56 expect 189652.853 745291.184 -tolerance 0.03 m accept 5 55 expect 190604.967 633523.672 -tolerance 0.03 m accept 5 54 expect 191555.55 521935.9 -tolerance 0.03 m accept 5 53 expect 192504.921 410490.433 -tolerance 0.03 m accept 5.3876389 52.1561606 expect 219843.841 316827.604 -tolerance 0.03 m accept 4 51 expect 124202.936 187756.876 -tolerance 0.03 m accept 4 50 expect 123652.406 76521.628 -tolerance 0.03 m accept 4 49 expect 123101.889 -34711.068 -tolerance 0.03 m accept 3.3137281 47.9752611 expect 71254.553 -148236.592 -tolerance 0.03 m accept 3 53 expect 58108.966 411155.591 -tolerance 0.03 m accept 4 53 expect 125304.704 410370.504 -tolerance 0.03 m accept 5 53 expect 192504.921 410490.433 -tolerance 0.03 m accept 6 53 expect 259697.429 411515.356 -tolerance 0.03 m accept 7 53 expect 326870.04 413445.087 -tolerance 0.03 m accept 8 53 expect 394010.571 416279.276 -tolerance 0.03 m accept 9 53 expect 461106.844 420017.408 -tolerance 0.03 m accept 10 53 expect 528146.69 424658.807 -tolerance 0.03 m accept 11 53 expect 595117.95 430202.63 + -------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:31370 +inv - +step +init=epsg:4313 +operation proj=pipeline + step init=epsg:31370 inv + step init=epsg:4313 + +tolerance 30 mm -------------------------------------------------------------------------------- -tolerance 0.03 m accept 187742.7 969521.653 expect 5 58 -tolerance 0.03 m accept 188698.877 857277.135 expect 5 57 -tolerance 0.03 m accept 189652.853 745291.184 expect 5 56 -tolerance 0.03 m accept 190604.967 633523.672 expect 5 55 -tolerance 0.03 m accept 191555.55 521935.9 expect 5 54 -tolerance 0.03 m accept 192504.921 410490.433 expect 5 53 -tolerance 0.03 m accept 219843.841 316827.604 expect 5.3876389 52.1561606 -tolerance 0.03 m accept 124202.936 187756.876 expect 4 51 -tolerance 0.03 m accept 123652.406 76521.628 expect 4 50 -tolerance 0.03 m accept 123101.889 -34711.068 expect 4 49 -tolerance 0.03 m accept 71254.553 -148236.592 expect 3.3137281 47.9752611 -tolerance 0.03 m accept 58108.966 411155.591 expect 3 53 -tolerance 0.03 m accept 125304.704 410370.504 expect 4 53 -tolerance 0.03 m accept 192504.921 410490.433 expect 5 53 -tolerance 0.03 m accept 259697.429 411515.356 expect 6 53 -tolerance 0.03 m accept 326870.04 413445.087 expect 7 53 -tolerance 0.03 m accept 394010.571 416279.276 expect 8 53 -tolerance 0.03 m accept 461106.844 420017.408 expect 9 53 -tolerance 0.03 m accept 528146.69 424658.807 expect 10 53 -tolerance 0.03 m accept 595117.95 430202.63 expect 11 53 -------------------------------------------------------------------------------- -operation +proj=pipeline +operation +proj=pipeline towgs84=0,0,0 # turn off dual datum shift +step +init=epsg:4313 +inv +step +init=epsg:31370 + +tolerance 6 mm -------------------------------------------------------------------------------- -tolerance 0.006 m accept 5 58 roundtrip 1000 -tolerance 0.006 m accept 5 57 roundtrip 1000 -tolerance 0.006 m accept 5 56 roundtrip 1000 -tolerance 0.006 m accept 5 55 roundtrip 1000 -tolerance 0.006 m accept 5 54 roundtrip 1000 -tolerance 0.006 m accept 5 53 roundtrip 1000 -tolerance 0.006 m accept 5.3876389 52.1561606 roundtrip 1000 -tolerance 0.006 m accept 4 51 roundtrip 1000 -tolerance 0.006 m accept 4 50 roundtrip 1000 -tolerance 0.006 m accept 4 49 roundtrip 1000 -tolerance 0.006 m accept 3.3137281 47.9752611 roundtrip 1000 -tolerance 0.006 m accept 3 53 roundtrip 1000 -tolerance 0.006 m accept 4 53 roundtrip 1000 -tolerance 0.006 m accept 5 53 roundtrip 1000 -tolerance 0.006 m accept 6 53 roundtrip 1000 -tolerance 0.006 m accept 7 53 roundtrip 1000 -tolerance 0.006 m accept 8 53 roundtrip 1000 -tolerance 0.006 m accept 9 53 roundtrip 1000 -tolerance 0.006 m accept 10 53 roundtrip 1000 -tolerance 0.006 m accept 11 53 roundtrip 1000 diff --git a/test/gigs/5110.gie b/test/gigs/5110.gie index 031dfac9..2d26d1ab 100644 --- a/test/gigs/5110.gie +++ b/test/gigs/5110.gie @@ -4,6 +4,14 @@ Test 5110, Lambert Azimuthal Equal Area, v2-0_2011-06-28. -------------------------------------------------------------------------------- +# ETRS89 +<4258> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <> + +# ETRS89 / LAEA Europe +<3035> +proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 + +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> + + -------------------------------------------------------------------------------- diff --git a/test/gigs/5111.1.gie b/test/gigs/5111.1.gie index 2517b185..335e1d68 100644 --- a/test/gigs/5111.1.gie +++ b/test/gigs/5111.1.gie @@ -4,10 +4,16 @@ Test 5111 (part 1), Mercator (variant A), v2-0_2011-06-28. -------------------------------------------------------------------------------- +# Batavia +<4211> +proj=longlat +ellps=bessel +towgs84=-377,681,-50,0,0,0,0 +no_defs <> +# Batavia / NEIEZ +<3001> +proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +towgs84=-377,681,-50,0,0,0,0 +units=m +no_defs <> + + -------------------------------------------------------------------------------- -operation +proj=pipeline +operation +proj=pipeline towgs84=0,0,0 +step +init=epsg:4211 +inv +step +init=epsg:3001 -------------------------------------------------------------------------------- @@ -152,7 +158,7 @@ accept -69.0 -2.0 expect -15964105.84 679490.65 -------------------------------------------------------------------------------- -operation +proj=pipeline +operation +proj=pipeline towgs84=0,0,0 +step +init=epsg:3001 +inv +step +init=epsg:4211 -------------------------------------------------------------------------------- @@ -297,7 +303,7 @@ accept -15964105.84 679490.65 expect -69.0 -2.0 -------------------------------------------------------------------------------- -operation +proj=pipeline +operation +proj=pipeline towgs84=0,0,0 +step +init=epsg:4211 +inv +step +init=epsg:3001 -------------------------------------------------------------------------------- diff --git a/test/gigs/5112.gie b/test/gigs/5112.gie index 3c4bb367..207632d2 100644 --- a/test/gigs/5112.gie +++ b/test/gigs/5112.gie @@ -7,77 +7,68 @@ Test 5112, Mercator (variant B), v2-0_2011-06-28. -------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4284 +inv - +step +init=epsg:3388 +operation proj=pipeline + step init=epsg:4284 inv + step init=epsg:3388 + +tolerance 50 mm -------------------------------------------------------------------------------- -tolerance 0.05 m accept 51.0 42.0 expect 0.0 3819897.85 -tolerance 0.05 m accept 51.0 0.0 expect 0.0 0.0 -tolerance 0.05 m accept 57.0 0.0 expect 497112.88 0.0 -tolerance 0.05 m accept 54.0 20.5 expect 248556.44 1724781.5 -tolerance 0.05 m accept 67.0 -41.0 expect 1325634.35 -3709687.25 -------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:3388 +inv - +step +init=epsg:4284 +operation proj=pipeline + step init=epsg:3388 inv + step init=epsg:4284 + +tolerance 50 mm -------------------------------------------------------------------------------- -tolerance 0.05 m accept 0.0 3819897.85 expect 51.0 42.0 -tolerance 0.05 m accept 0.0 0.0 expect 51.0 0.0 -tolerance 0.05 m accept 497112.88 0.0 expect 57.0 0.0 -tolerance 0.05 m accept 248556.44 1724781.5 expect 54.0 20.5 -tolerance 0.05 m accept 1325634.35 -3709687.25 expect 67.0 -41.0 -------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4284 +inv - +step +init=epsg:3388 +operation proj=pipeline towgs84=0,0,0 + step init=epsg:4284 inv + step init=epsg:3388 + +tolerance 6 mm -------------------------------------------------------------------------------- -tolerance 0.006 m accept 51.0 42.0 roundtrip 1000 -tolerance 0.006 m accept 51.0 0.0 roundtrip 1000 -tolerance 0.006 m accept 57.0 0.0 roundtrip 1000 -tolerance 0.006 m accept 54.0 20.5 roundtrip 1000 -tolerance 0.006 m accept 67.0 -41.0 roundtrip 1000 diff --git a/test/gigs/5201.gie b/test/gigs/5201.gie index e7bdcb1e..532443a9 100644 --- a/test/gigs/5201.gie +++ b/test/gigs/5201.gie @@ -4,6 +4,12 @@ Test 5201, Geographic Geocentric conversions, v2.0_2011-09-28. (EPSG 4979 - WGS8 -------------------------------------------------------------------------------- +# WGS 84 +<4978> +proj=geocent +datum=WGS84 +units=m +no_defs <> +# WGS 84 +<4326> +proj=longlat +datum=WGS84 +no_defs <> + + -------------------------------------------------------------------------------- @@ -11,111 +17,111 @@ operation +proj=pipeline +step +init=epsg:4978 +inv +step +init=epsg:4326 -------------------------------------------------------------------------------- -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -962479.5924 555687.8517 6260738.6526 expect 150 80 1214.137 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -962297.0059 555582.4354 6259542.961 expect 150 80 0 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -1598248.169 2768777.623 5501278.468 expect 119.99524538 60.00475191 619.6317 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -1598023.169 2768387.912 5500499.045 expect 119.9952447 60.00475258 -280.3683 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 2764210.4054 4787752.865 3170468.5199 expect 60 30 189.569 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 2764128.3196 4787610.6883 3170373.7354 expect 60 30 0 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 6377934.396 -112 434 expect -0.00100615 0.00392509 -202.5882 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 6374934.396 -112 434 expect -0.00100662 0.00392695 -3202.5881 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 6367934.396 -112 434 expect -0.00100773 0.00393129 -10202.5881 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 2764128.3196 -4787610.6883 -3170373.7354 expect -60 -30 0 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 2763900.3489 -4787215.8313 -3170110.4974 expect -60 -30 -526.476 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 2763880.8633 -4787182.0813 -3170087.9974 expect -60 -30 -571.476 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -1598023.169 -2768611.912 -5499631.045 expect -119.99323757 -59.99934884 -935.0995 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -1597798.169 -2768222.201 -5498851.622 expect -119.99323663 -59.99934874 -1835.0995 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -962297.0059 -555582.4354 -6259542.961 expect -150 -80 0 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -962150.945 -555498.1071 -6258586.4616 expect -150 -80 -971.255 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -961798.2951 -555294.5046 -6256277.0874 expect -150 -80 -3316.255 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -2187336.719 -112 5971017.093 expect -179.99706624 70.00490733 -223.6178 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -2904698.5551 -2904698.5551 4862789.0377 expect -135 50 0 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 371 -5783593.614 2679326.11 expect -89.99632465 25.00366329 -274.7286 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 6378137 0 0 expect 0 0 0 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -4087095.478 2977467.559 -3875457.429 expect 143.92649252 -37.65282217 737.7182 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -4085919.959 2976611.233 -3874335.274 expect 143.92649211 -37.65282206 -1099.2288 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -4084000.165 2975212.729 -3872502.631 expect 143.92649143 -37.65282187 -4099.2288 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -4079520.647 2971949.553 -3868226.465 expect 143.92648984 -37.65282143 -11099.2288 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -2904698.5551 2904698.5551 -4862789.0377 expect 135 -50 0 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -2187336.719 -112 -5970149.093 expect -179.99706624 -70.00224647 -1039.2896 @@ -124,111 +130,111 @@ operation +proj=pipeline +step +init=epsg:4326 +inv +step +init=epsg:4978 -------------------------------------------------------------------------------- -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 150 80 1214.137 expect -962479.5924 555687.8517 6260738.6526 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 150 80 0 expect -962297.0059 555582.4354 6259542.961 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 119.99524538 60.00475191 619.6317 expect -1598248.169 2768777.623 5501278.468 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 119.9952447 60.00475258 -280.3683 expect -1598023.169 2768387.912 5500499.045 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 60 30 189.569 expect 2764210.4054 4787752.865 3170468.5199 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 60 30 0 expect 2764128.3196 4787610.6883 3170373.7354 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -0.00100615 0.00392509 -202.5882 expect 6377934.396 -112 434 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -0.00100662 0.00392695 -3202.5881 expect 6374934.396 -112 434 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -0.00100773 0.00393129 -10202.5881 expect 6367934.396 -112 434 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -60 -30 0 expect 2764128.3196 -4787610.6883 -3170373.7354 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -60 -30 -526.476 expect 2763900.3489 -4787215.8313 -3170110.4974 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -60 -30 -571.476 expect 2763880.8633 -4787182.0813 -3170087.9974 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -119.99323757 -59.99934884 -935.0995 expect -1598023.169 -2768611.912 -5499631.045 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -119.99323663 -59.99934874 -1835.0995 expect -1597798.169 -2768222.201 -5498851.622 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -150 -80 0 expect -962297.0059 -555582.4354 -6259542.961 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -150 -80 -971.255 expect -962150.945 -555498.1071 -6258586.4616 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -150 -80 -3316.255 expect -961798.2951 -555294.5046 -6256277.0874 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -179.99706624 70.00490733 -223.6178 expect -2187336.719 -112 5971017.093 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -135 50 0 expect -2904698.5551 -2904698.5551 4862789.0377 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -89.99632465 25.00366329 -274.7286 expect 371 -5783593.614 2679326.11 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 0 0 0 expect 6378137 0 0 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 143.92649252 -37.65282217 737.7182 expect -4087095.478 2977467.559 -3875457.429 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 143.92649211 -37.65282206 -1099.2288 expect -4085919.959 2976611.233 -3874335.274 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 143.92649143 -37.65282187 -4099.2288 expect -4084000.165 2975212.729 -3872502.631 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 143.92648984 -37.65282143 -11099.2288 expect -4079520.647 2971949.553 -3868226.465 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept 135 -50 0 expect -2904698.5551 2904698.5551 -4862789.0377 -tolerance [8.333333333333333e-08, 8.333333333333333e-08, 0.01] m +tolerance 0.01 m accept -179.99706624 -70.00224647 -1039.2896 expect -2187336.719 -112 -5970149.093 @@ -237,111 +243,111 @@ operation +proj=pipeline +step +init=epsg:4978 +inv +step +init=epsg:4326 -------------------------------------------------------------------------------- -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept -962479.5924 555687.8517 6260738.6526 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept -962297.0059 555582.4354 6259542.961 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept -1598248.169 2768777.623 5501278.468 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept -1598023.169 2768387.912 5500499.045 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept 2764210.4054 4787752.865 3170468.5199 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept 2764128.3196 4787610.6883 3170373.7354 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept 6377934.396 -112 434 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept 6374934.396 -112 434 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept 6367934.396 -112 434 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept 2764128.3196 -4787610.6883 -3170373.7354 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept 2763900.3489 -4787215.8313 -3170110.4974 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept 2763880.8633 -4787182.0813 -3170087.9974 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept -1598023.169 -2768611.912 -5499631.045 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept -1597798.169 -2768222.201 -5498851.622 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept -962297.0059 -555582.4354 -6259542.961 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept -962150.945 -555498.1071 -6258586.4616 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept -961798.2951 -555294.5046 -6256277.0874 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept -2187336.719 -112 5971017.093 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept -2904698.5551 -2904698.5551 4862789.0377 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept 371 -5783593.614 2679326.11 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept 6378137 0 0 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept -4087095.478 2977467.559 -3875457.429 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept -4085919.959 2976611.233 -3874335.274 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept -4084000.165 2975212.729 -3872502.631 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept -4079520.647 2971949.553 -3868226.465 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept -2904698.5551 2904698.5551 -4862789.0377 roundtrip 1000 -tolerance [5.555555555555556e-08, 5.555555555555556e-08, 0.006] m +tolerance 0.01 m accept -2187336.719 -112 -5970149.093 roundtrip 1000 diff --git a/test/gigs/5208.gie b/test/gigs/5208.gie index 5d94474a..25a10b96 100644 --- a/test/gigs/5208.gie +++ b/test/gigs/5208.gie @@ -2,8 +2,24 @@ Test 5208, Longitude Rotation, v2.0_2011-06-28. +The test tolerance is 0.01". Since gie can only use linear tolerances we +convert that to an approximate liniar distance instead, by multiplying with +111km: + + 0.01" * 111 km = 2.777777778-7 * 111000 m = 0.03 m + +To be on the safe side we, use 0.01 m as the tolerance. + -------------------------------------------------------------------------------- +# NTF +<4275> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +no_defs <> + +# NTF (Paris) +<4807> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +no_defs <> + + + -------------------------------------------------------------------------------- @@ -11,59 +27,59 @@ operation +proj=pipeline +step +init=epsg:4275 +inv +step +init=epsg:4807 -------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 5 58 expect 2.66277083 58 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 5 56 expect 2.66277083 56 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 5 55 expect 2.66277083 55 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 5 53 expect 2.66277083 53 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 4 51 expect 1.66277083 51 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 4 49 expect 1.66277083 49 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 2.33722917 46.8 expect 0 46.8 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 3 53 expect 0.66277083 53 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 4 53 expect 1.66277083 53 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 6 53 expect 3.66277083 53 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 7 53 expect 4.66277083 53 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 9 53 expect 6.66277083 53 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 10 53 expect 7.66277083 53 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 11 53 expect 8.66277083 53 @@ -72,59 +88,59 @@ operation +proj=pipeline +step +init=epsg:4807 +inv +step +init=epsg:4275 -------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 2.66277083 58 expect 5 58 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 2.66277083 56 expect 5 56 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 2.66277083 55 expect 5 55 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 2.66277083 53 expect 5 53 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 1.66277083 51 expect 4 51 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 1.66277083 49 expect 4 49 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 0 46.8 expect 2.33722917 46.8 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 0.66277083 53 expect 3 53 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 1.66277083 53 expect 4 53 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 3.66277083 53 expect 6 53 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 4.66277083 53 expect 7 53 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 6.66277083 53 expect 9 53 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 7.66277083 53 expect 10 53 -tolerance 2.77777777778e-07 m +tolerance 0.01 m accept 8.66277083 53 expect 11 53 @@ -133,59 +149,59 @@ operation +proj=pipeline +step +init=epsg:4275 +inv +step +init=epsg:4807 -------------------------------------------------------------------------------- -tolerance 5.55555555556e-08 m +tolerance 0.01 m accept 5 58 roundtrip 1000 -tolerance 5.55555555556e-08 m +tolerance 0.01 m accept 5 56 roundtrip 1000 -tolerance 5.55555555556e-08 m +tolerance 0.01 m accept 5 55 roundtrip 1000 -tolerance 5.55555555556e-08 m +tolerance 0.01 m accept 5 53 roundtrip 1000 -tolerance 5.55555555556e-08 m +tolerance 0.01 m accept 4 51 roundtrip 1000 -tolerance 5.55555555556e-08 m +tolerance 0.01 m accept 4 49 roundtrip 1000 -tolerance 5.55555555556e-08 m +tolerance 0.01 m accept 2.33722917 46.8 roundtrip 1000 -tolerance 5.55555555556e-08 m +tolerance 0.01 m accept 3 53 roundtrip 1000 -tolerance 5.55555555556e-08 m +tolerance 0.01 m accept 4 53 roundtrip 1000 -tolerance 5.55555555556e-08 m +tolerance 0.01 m accept 6 53 roundtrip 1000 -tolerance 5.55555555556e-08 m +tolerance 0.01 m accept 7 53 roundtrip 1000 -tolerance 5.55555555556e-08 m +tolerance 0.01 m accept 9 53 roundtrip 1000 -tolerance 5.55555555556e-08 m +tolerance 0.01 m accept 10 53 roundtrip 1000 -tolerance 5.55555555556e-08 m +tolerance 0.01 m accept 11 53 roundtrip 1000 -- cgit v1.2.3 From 52c20a2e095c63fab6e4158c92b8995d882cbe62 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Mon, 29 Jan 2018 20:47:44 +0100 Subject: Renamed PJ_IO_UNITS_RADIANS to PJ_IO_UNITS_ANGULAR --- src/PJ_axisswap.c | 4 ++-- src/PJ_cart.c | 2 +- src/PJ_geoc.c | 4 ++-- src/PJ_hgridshift.c | 4 ++-- src/PJ_latlong.c | 4 ++-- src/PJ_molodensky.c | 4 ++-- src/PJ_ob_tran.c | 2 +- src/PJ_vgridshift.c | 4 ++-- src/pj_fwd.c | 6 +++--- src/pj_geocent.c | 2 +- src/pj_inv.c | 8 ++++---- src/proj.c | 6 +++--- src/proj_4D_api.c | 4 ++-- src/proj_internal.h | 2 +- src/projects.h | 4 ++-- 15 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/PJ_axisswap.c b/src/PJ_axisswap.c index d57834fc..44446d9c 100644 --- a/src/PJ_axisswap.c +++ b/src/PJ_axisswap.c @@ -274,8 +274,8 @@ PJ *CONVERSION(axisswap,0) { } if (pj_param(P->ctx, P->params, "tangularunits").i) { - P->left = PJ_IO_UNITS_RADIANS; - P->right = PJ_IO_UNITS_RADIANS; + P->left = PJ_IO_UNITS_ANGULAR; + P->right = PJ_IO_UNITS_ANGULAR; } else { P->left = PJ_IO_UNITS_PROJECTED; P->right = PJ_IO_UNITS_PROJECTED; diff --git a/src/PJ_cart.c b/src/PJ_cart.c index 8e11c030..0746ec08 100644 --- a/src/PJ_cart.c +++ b/src/PJ_cart.c @@ -213,7 +213,7 @@ PJ *CONVERSION(cart,1) { P->inv3d = geodetic; P->fwd = cart_forward; P->inv = cart_reverse; - P->left = PJ_IO_UNITS_RADIANS; + P->left = PJ_IO_UNITS_ANGULAR; P->right = PJ_IO_UNITS_CARTESIAN; return P; } diff --git a/src/PJ_geoc.c b/src/PJ_geoc.c index 865b1089..20064f65 100644 --- a/src/PJ_geoc.c +++ b/src/PJ_geoc.c @@ -48,8 +48,8 @@ static PJ *CONVERSION(geoc, 1) { P->inv4d = inverse; P->fwd4d = forward; - P->left = PJ_IO_UNITS_RADIANS; - P->right = PJ_IO_UNITS_RADIANS; + P->left = PJ_IO_UNITS_ANGULAR; + P->right = PJ_IO_UNITS_ANGULAR; P->is_latlong = 1; return P; diff --git a/src/PJ_hgridshift.c b/src/PJ_hgridshift.c index 5c2b944d..54440822 100644 --- a/src/PJ_hgridshift.c +++ b/src/PJ_hgridshift.c @@ -54,8 +54,8 @@ PJ *TRANSFORMATION(hgridshift,0) { P->fwd = 0; P->inv = 0; - P->left = PJ_IO_UNITS_RADIANS; - P->right = PJ_IO_UNITS_RADIANS; + P->left = PJ_IO_UNITS_ANGULAR; + P->right = PJ_IO_UNITS_ANGULAR; if (0==pj_param(P->ctx, P->params, "tgrids").i) { proj_log_error(P, "hgridshift: +grids parameter missing."); diff --git a/src/PJ_latlong.c b/src/PJ_latlong.c index b1909954..1331d59a 100644 --- a/src/PJ_latlong.c +++ b/src/PJ_latlong.c @@ -98,8 +98,8 @@ static PJ *latlong_setup (PJ *P) { P->fwd3d = latlong_forward_3d; P->inv4d = latlong_inverse_4d; P->fwd4d = latlong_forward_4d; - P->left = PJ_IO_UNITS_RADIANS; - P->right = PJ_IO_UNITS_RADIANS; + P->left = PJ_IO_UNITS_ANGULAR; + P->right = PJ_IO_UNITS_ANGULAR; return P; } diff --git a/src/PJ_molodensky.c b/src/PJ_molodensky.c index 765e1d50..b537e802 100644 --- a/src/PJ_molodensky.c +++ b/src/PJ_molodensky.c @@ -281,8 +281,8 @@ PJ *TRANSFORMATION(molodensky,1) { P->fwd = forward_2d; P->inv = reverse_2d; - P->left = PJ_IO_UNITS_RADIANS; - P->right = PJ_IO_UNITS_RADIANS; + P->left = PJ_IO_UNITS_ANGULAR; + P->right = PJ_IO_UNITS_ANGULAR; /* read args */ if (pj_param(P->ctx, P->params, "tdx").i) diff --git a/src/PJ_ob_tran.c b/src/PJ_ob_tran.c index debb211c..c447ac08 100644 --- a/src/PJ_ob_tran.c +++ b/src/PJ_ob_tran.c @@ -232,7 +232,7 @@ PJ *PROJECTION(ob_tran) { /* Support some rather speculative test cases, where the rotated projection */ /* is actually latlong. We do not want scaling in that case... */ - if (Q->link->right==PJ_IO_UNITS_RADIANS) + if (Q->link->right==PJ_IO_UNITS_ANGULAR) P->right = PJ_IO_UNITS_PROJECTED; diff --git a/src/PJ_vgridshift.c b/src/PJ_vgridshift.c index 850734fc..bb8b4d4d 100644 --- a/src/PJ_vgridshift.c +++ b/src/PJ_vgridshift.c @@ -69,8 +69,8 @@ PJ *TRANSFORMATION(vgridshift,0) { P->fwd = 0; P->inv = 0; - P->left = PJ_IO_UNITS_RADIANS; - P->right = PJ_IO_UNITS_RADIANS; + P->left = PJ_IO_UNITS_ANGULAR; + P->right = PJ_IO_UNITS_ANGULAR; return P; } diff --git a/src/pj_fwd.c b/src/pj_fwd.c index 2293cf2e..0509858a 100644 --- a/src/pj_fwd.c +++ b/src/pj_fwd.c @@ -45,7 +45,7 @@ static PJ_COORD pj_fwd_prepare (PJ *P, PJ_COORD coo) { if (HUGE_VAL==coo.v[3] && P->helmert) coo.v[3] = 0.0; /* Check validity of angular input coordinates */ - if (INPUT_UNITS==PJ_IO_UNITS_RADIANS) { + if (INPUT_UNITS==PJ_IO_UNITS_ANGULAR) { double t; /* check for latitude or longitude over-range */ @@ -130,8 +130,8 @@ static PJ_COORD pj_fwd_finalize (PJ *P, PJ_COORD coo) { case PJ_IO_UNITS_WHATEVER: break; - case PJ_IO_UNITS_RADIANS: - if (INPUT_UNITS==PJ_IO_UNITS_RADIANS) + case PJ_IO_UNITS_ANGULAR: + if (INPUT_UNITS==PJ_IO_UNITS_ANGULAR) break; /* adjust longitude to central meridian */ diff --git a/src/pj_geocent.c b/src/pj_geocent.c index e676b735..6530b103 100644 --- a/src/pj_geocent.c +++ b/src/pj_geocent.c @@ -54,7 +54,7 @@ PJ *PROJECTION(geocent) { P->y0 = 0.0; P->inv = inverse; P->fwd = forward; - P->left = PJ_IO_UNITS_RADIANS; + P->left = PJ_IO_UNITS_ANGULAR; P->right = PJ_IO_UNITS_CARTESIAN; return P; diff --git a/src/pj_inv.c b/src/pj_inv.c index 02a2ca53..45e43820 100644 --- a/src/pj_inv.c +++ b/src/pj_inv.c @@ -49,7 +49,7 @@ static PJ_COORD pj_inv_prepare (PJ *P, PJ_COORD coo) { coo = proj_trans (P->axisswap, PJ_INV, coo); /* Check validity of angular input coordinates */ - if (INPUT_UNITS==PJ_IO_UNITS_RADIANS) { + if (INPUT_UNITS==PJ_IO_UNITS_ANGULAR) { double t; /* check for latitude or longitude over-range */ @@ -120,7 +120,7 @@ static PJ_COORD pj_inv_prepare (PJ *P, PJ_COORD coo) { coo.xyz.x *= P->ra; coo.xyz.y *= P->ra; return coo; - /* Silence some compiler warnings about PJ_IO_UNITS_RADIANS not handled */ + /* Silence some compiler warnings about PJ_IO_UNITS_ANGULAR not handled */ default: break; } @@ -137,9 +137,9 @@ static PJ_COORD pj_inv_finalize (PJ *P, PJ_COORD coo) { return proj_coord_error (); } - if (OUTPUT_UNITS==PJ_IO_UNITS_RADIANS) { + if (OUTPUT_UNITS==PJ_IO_UNITS_ANGULAR) { - if (INPUT_UNITS!=PJ_IO_UNITS_RADIANS) { + if (INPUT_UNITS!=PJ_IO_UNITS_ANGULAR) { /* Distance from central meridian, taking system zero meridian into account */ coo.lp.lam = coo.lp.lam + P->from_greenwich + P->lam0; diff --git a/src/proj.c b/src/proj.c index 1d702ea4..1c86854e 100644 --- a/src/proj.c +++ b/src/proj.c @@ -152,12 +152,12 @@ static void process(FILE *fid) { } } else { /* x-y or decimal degree ascii output, scale if warranted by output units */ if (inverse) { - if (Proj->left == PJ_IO_UNITS_RADIANS) { + if (Proj->left == PJ_IO_UNITS_ANGULAR) { data.uv.v *= RAD_TO_DEG; data.uv.u *= RAD_TO_DEG; } } else { - if (Proj->right == PJ_IO_UNITS_RADIANS) { + if (Proj->right == PJ_IO_UNITS_ANGULAR) { data.uv.v *= RAD_TO_DEG; data.uv.u *= RAD_TO_DEG; } @@ -262,7 +262,7 @@ static void vprocess(FILE *fid) { } /* apply rad->deg scaling in case the output from a pipeline has degrees as units */ - if (!inverse && Proj->right == PJ_IO_UNITS_RADIANS) { + if (!inverse && Proj->right == PJ_IO_UNITS_ANGULAR) { dat_xy.x *= RAD_TO_DEG; dat_xy.y *= RAD_TO_DEG; } diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index 6654522c..2b250398 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -52,8 +52,8 @@ int proj_angular_input (PJ *P, enum PJ_DIRECTION dir) { dir: {PJ_FWD, PJ_INV} ******************************************************************************/ if (PJ_FWD==dir) - return pj_left (P)==PJ_IO_UNITS_RADIANS; - return pj_right (P)==PJ_IO_UNITS_RADIANS; + return pj_left (P)==PJ_IO_UNITS_ANGULAR; + return pj_right (P)==PJ_IO_UNITS_ANGULAR; } /*****************************************************************************/ diff --git a/src/proj_internal.h b/src/proj_internal.h index 2c6cbee2..1b98c346 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -68,7 +68,7 @@ enum pj_io_units { PJ_IO_UNITS_CLASSIC = 1, /* Scaled meters (right), projected system */ PJ_IO_UNITS_PROJECTED = 2, /* Meters, projected system */ PJ_IO_UNITS_CARTESIAN = 3, /* Meters, 3D cartesian system */ - PJ_IO_UNITS_RADIANS = 4 /* Radians */ + PJ_IO_UNITS_ANGULAR = 4 /* Radians */ }; enum pj_io_units pj_left (PJ *P); enum pj_io_units pj_right (PJ *P); diff --git a/src/projects.h b/src/projects.h index aeaf09ae..e4bdca4f 100644 --- a/src/projects.h +++ b/src/projects.h @@ -196,7 +196,7 @@ enum pj_io_units { PJ_IO_UNITS_CLASSIC = 1, /* Scaled meters (right), projected system */ PJ_IO_UNITS_PROJECTED = 2, /* Meters, projected system */ PJ_IO_UNITS_CARTESIAN = 3, /* Meters, 3D cartesian system */ - PJ_IO_UNITS_RADIANS = 4 /* Radians */ + PJ_IO_UNITS_ANGULAR = 4 /* Radians */ }; #endif #ifndef PROJ_H @@ -623,7 +623,7 @@ C_NAMESPACE PJ *pj_##name (PJ *P) { \ P->destructor = pj_default_destructor; \ P->descr = des_##name; \ P->need_ellps = NEED_ELLPS; \ - P->left = PJ_IO_UNITS_RADIANS; \ + P->left = PJ_IO_UNITS_ANGULAR; \ P->right = PJ_IO_UNITS_CLASSIC; \ return P; \ } \ -- cgit v1.2.3 From 28d6b3a2cbf28f4820961f5a736ba9fe939da5c2 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Thu, 1 Feb 2018 14:14:15 +0100 Subject: Remove unnecessary functions and restructure proj.def. Closes #728 --- src/proj.def | 129 +++++++++++++++++++++++++--------------------------- src/proj_internal.h | 1 + src/projects.h | 1 - 3 files changed, 63 insertions(+), 68 deletions(-) diff --git a/src/proj.def b/src/proj.def index 099a78a5..17300395 100644 --- a/src/proj.def +++ b/src/proj.def @@ -90,70 +90,65 @@ EXPORTS geod_polygon_clear @88 pj_find_file @89 - - proj_create @90 - proj_create_argv @91 - proj_create_crs_to_crs @92 - proj_destroy @93 - - proj_trans @94 - proj_trans_array @95 - proj_trans_generic @96 - proj_roundtrip @97 - - proj_coord @98 - proj_coord_error @99 - - proj_errno @100 - proj_errno_set @101 - proj_errno_reset @102 - proj_errno_restore @103 - proj_context_errno_set @104 - - proj_context_create @105 - proj_context_set @106 - proj_context_inherit @107 - proj_context_destroy @108 - - proj_lp_dist @109 - proj_lpz_dist @110 - proj_xy_dist @111 - proj_xyz_dist @112 - - proj_log_level @113 - proj_log_func @114 - proj_log_error @115 - proj_log_debug @116 - proj_log_trace @117 - - proj_info @118 - proj_pj_info @119 - proj_grid_info @120 - proj_init_info @121 - - proj_torad @122 - proj_todeg @123 - proj_geoc_lat @124 - proj_rtodms @125 - proj_dmstor @126 - - proj_factors @127 - - proj_list_operations @128 - proj_list_ellps @129 - proj_list_units @130 - proj_list_prime_meridians @131 - - proj_angular_input @132 - proj_angular_output @133 - - pj_ellipsoid @134 - pj_calc_ellipsoid_params @135 - pj_chomp @136 - pj_shrink @137 - - pj_approx_2D_trans @138 - pj_approx_3D_trans @139 - pj_has_inverse @140 - pj_param_exists @141 - + pj_chomp @90 + pj_shrink @91 + pj_approx_2D_trans @92 + pj_approx_3D_trans @93 + pj_has_inverse @94 + pj_param_exists @95 + + proj_create @96 + proj_create_argv @97 + proj_create_crs_to_crs @98 + proj_destroy @99 + + proj_trans @100 + proj_trans_array @101 + proj_trans_generic @102 + proj_roundtrip @103 + + proj_coord @104 + proj_coord_error @105 + + proj_errno @106 + proj_errno_set @107 + proj_errno_reset @108 + proj_errno_restore @109 + proj_context_errno_set @110 + + proj_context_create @111 + proj_context_set @112 + proj_context_inherit @113 + proj_context_destroy @114 + + proj_lp_dist @115 + proj_lpz_dist @116 + proj_xy_dist @117 + proj_xyz_dist @118 + + proj_log_level @119 + proj_log_func @120 + proj_log_error @121 + proj_log_debug @122 + proj_log_trace @123 + + proj_info @124 + proj_pj_info @125 + proj_grid_info @126 + proj_init_info @127 + + proj_torad @128 + proj_todeg @129 + proj_geoc_lat @130 + proj_rtodms @131 + proj_dmstor @132 + + proj_factors @133 + + proj_list_operations @134 + proj_list_ellps @135 + proj_list_units @136 + proj_list_prime_meridians @137 + + proj_angular_input @138 + proj_angular_output @139 diff --git a/src/proj_internal.h b/src/proj_internal.h index 1b98c346..3e0ecbe9 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -115,6 +115,7 @@ void proj_log_debug (PJ *P, const char *fmt, ...); void proj_log_trace (PJ *P, const char *fmt, ...); void proj_log_func (PJ_CONTEXT *ctx, void *app_data, PJ_LOG_FUNCTION log); +int pj_ellipsoid (PJ *); void pj_inherit_ellipsoid_def (const PJ *src, PJ *dst); void pj_erase_ellipsoid_def (PJ *P); int pj_calc_ellipsoid_params (PJ *P, double a, double es); diff --git a/src/projects.h b/src/projects.h index e4bdca4f..f22ae3a5 100644 --- a/src/projects.h +++ b/src/projects.h @@ -703,7 +703,6 @@ paralist *pj_mkparam(char *); paralist *pj_mkparam_ws (char *str); -int pj_ellipsoid (PJ *); int pj_ell_set(projCtx ctx, paralist *, double *, double *); int pj_datum_set(projCtx,paralist *, PJ *); int pj_prime_meridian_set(paralist *, PJ *); -- cgit v1.2.3 From 5c132e5be1a38a0ec018edcec86b3d889d6e33fa Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Thu, 1 Feb 2018 15:49:30 +0100 Subject: make local derivatives available in PJ_FACTOR --- src/proj.h | 3 +++ src/proj_4D_api.c | 12 +++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/proj.h b/src/proj.h index 67c28b8d..0921eb51 100644 --- a/src/proj.h +++ b/src/proj.h @@ -167,6 +167,9 @@ struct P5_FACTORS { /* Common designation */ double tissot_semimajor; /* a */ double tissot_semiminor; /* b */ + + double dx_dlam, dx_dphi; + double dy_dlam, dy_dphi; }; typedef struct P5_FACTORS PJ_FACTORS; diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index 2b250398..c91b0786 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -940,11 +940,11 @@ PJ_FACTORS proj_factors(PJ *P, LP lp) { Characteristics include meridian, parallel and areal scales, angular distortion, meridian/parallel, meridian convergence and scale error. - returns PJ_FACTORS. If unsuccessfull error number is set and the returned - struct contains NULL data. + returns PJ_FACTORS. If unsuccessfull, error number is set and the + struct returned contains NULL data. ******************************************************************************/ - PJ_FACTORS factors = {0,0,0, 0,0,0, 0,0}; + PJ_FACTORS factors = {0,0,0, 0,0,0, 0,0, 0,0,0,0}; struct FACTORS f; if (0==P) @@ -964,6 +964,12 @@ PJ_FACTORS proj_factors(PJ *P, LP lp) { factors.tissot_semimajor = f.a; factors.tissot_semiminor = f.b; + /* Raw derivatives, for completeness's sake */ + factors.dx_dlam = f.der.x_l; + factors.dx_dphi = f.der.x_p; + factors.dy_dlam = f.der.y_l; + factors.dy_dphi = f.der.y_p; + return factors; } -- cgit v1.2.3 From dd9cd3f821295f4095d3a261bfd9be26065e60b7 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Thu, 1 Feb 2018 16:52:10 +0100 Subject: expand proj_geoc_lat to proj_geocentric_latitude (#751) --- src/PJ_geoc.c | 4 ++-- src/pj_factors.c | 2 +- src/pj_fwd.c | 4 ++-- src/pj_inv.c | 4 ++-- src/proj.def | 2 +- src/proj.h | 2 +- src/proj_4D_api.c | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/PJ_geoc.c b/src/PJ_geoc.c index 20064f65..038da600 100644 --- a/src/PJ_geoc.c +++ b/src/PJ_geoc.c @@ -35,12 +35,12 @@ PROJ_HEAD(geoc, "Geocentric Latitude"); /* Geographical to geocentric */ static PJ_COORD forward(PJ_COORD coo, PJ *P) { - return proj_geoc_lat (P, PJ_FWD, coo); + return proj_geocentric_latitude (P, PJ_FWD, coo); } /* Geocentric to geographical */ static PJ_COORD inverse(PJ_COORD coo, PJ *P) { - return proj_geoc_lat (P, PJ_INV, coo); + return proj_geocentric_latitude (P, PJ_INV, coo); } diff --git a/src/pj_factors.c b/src/pj_factors.c index 6ba993b9..17b39c10 100644 --- a/src/pj_factors.c +++ b/src/pj_factors.c @@ -47,7 +47,7 @@ int pj_factors(LP lp, const PJ *P, double h, struct FACTORS *fac) { /* If input latitudes are geocentric, convert to geographic */ if (P->geoc) - lp = proj_geoc_lat (P, PJ_INV, coo).lp; + lp = proj_geocentric_latitude (P, PJ_INV, coo).lp; /* If latitude + one step overshoots the pole, move it slightly inside, */ /* so the numerical derivative still exists */ diff --git a/src/pj_fwd.c b/src/pj_fwd.c index 0509858a..66b86aab 100644 --- a/src/pj_fwd.c +++ b/src/pj_fwd.c @@ -63,7 +63,7 @@ static PJ_COORD pj_fwd_prepare (PJ *P, PJ_COORD coo) { /* If input latitude is geocentrical, convert to geographical */ if (P->geoc) - coo = proj_geoc_lat (P, PJ_INV, coo); + coo = proj_geocentric_latitude (P, PJ_INV, coo); /* Ensure longitude is in the -pi:pi range */ if (0==P->over) @@ -150,7 +150,7 @@ static PJ_COORD pj_fwd_finalize (PJ *P, PJ_COORD coo) { /* If input latitude was geocentrical, convert back to geocentrical */ if (P->geoc) - coo = proj_geoc_lat (P, PJ_FWD, coo); + coo = proj_geocentric_latitude (P, PJ_FWD, coo); /* Distance from central meridian, taking system zero meridian into account */ diff --git a/src/pj_inv.c b/src/pj_inv.c index 45e43820..5e44eb34 100644 --- a/src/pj_inv.c +++ b/src/pj_inv.c @@ -67,7 +67,7 @@ static PJ_COORD pj_inv_prepare (PJ *P, PJ_COORD coo) { /* If input latitude is geocentrical, convert to geographical */ if (P->geoc) - coo = proj_geoc_lat (P, PJ_INV, coo); + coo = proj_geocentric_latitude (P, PJ_INV, coo); /* Distance from central meridian, taking system zero meridian into account */ coo.lp.lam = (coo.lp.lam + P->from_greenwich) - P->lam0; @@ -160,7 +160,7 @@ static PJ_COORD pj_inv_finalize (PJ *P, PJ_COORD coo) { /* If input latitude was geocentrical, convert back to geocentrical */ if (P->geoc) - coo = proj_geoc_lat (P, PJ_FWD, coo); + coo = proj_geocentric_latitude (P, PJ_FWD, coo); } return coo; diff --git a/src/proj.def b/src/proj.def index 17300395..f2936edb 100644 --- a/src/proj.def +++ b/src/proj.def @@ -139,7 +139,7 @@ EXPORTS proj_torad @128 proj_todeg @129 - proj_geoc_lat @130 + proj_geocentric_latitude @130 proj_rtodms @131 proj_dmstor @132 diff --git a/src/proj.h b/src/proj.h index 0921eb51..c3165cfe 100644 --- a/src/proj.h +++ b/src/proj.h @@ -375,7 +375,7 @@ double proj_torad (double angle_in_degrees); double proj_todeg (double angle_in_radians); /* Geographical to geocentric latitude - another of the "simple, but useful" */ -PJ_COORD proj_geoc_lat (const PJ *P, PJ_DIRECTION direction, PJ_COORD coo); +PJ_COORD proj_geocentric_latitude (const PJ *P, PJ_DIRECTION direction, PJ_COORD coo); double proj_dmstor(const char *is, char **rs); char* proj_rtodms(char *s, double r, int pos, int neg); diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index c91b0786..af4bae45 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -342,7 +342,7 @@ size_t proj_trans_generic ( /*************************************************************************************/ -PJ_COORD proj_geoc_lat (const PJ *P, PJ_DIRECTION direction, PJ_COORD coo) { +PJ_COORD proj_geocentric_latitude (const PJ *P, PJ_DIRECTION direction, PJ_COORD coo) { /************************************************************************************** Convert geographical latitude to geocentric (or the other way round if direction = PJ_INV) -- cgit v1.2.3 From 56600aadd345a984c1f5a1f42b7932e67c9bee03 Mon Sep 17 00:00:00 2001 From: Mateusz Loskot Date: Thu, 1 Feb 2018 20:09:08 +0100 Subject: Remove Windows CE cruft (wince/msvc80) Closes #582 --- src/pj_open_lib.c | 5 - src/pj_strtod.c | 2 +- src/proj_config.h.wince | 66 ----- src/projects.h | 12 +- wince/msvc80/README.txt | 77 ------ wince/msvc80/projce_common.vsprops | 15 -- wince/msvc80/projce_dll/projce_dll.sln | 43 ---- wince/msvc80/projce_dll/projce_dll.vcproj | 411 ------------------------------ wince/msvc80/projce_lib/projce_lib.sln | 43 ---- wince/msvc80/projce_lib/projce_lib.vcproj | 411 ------------------------------ 10 files changed, 3 insertions(+), 1082 deletions(-) delete mode 100644 src/proj_config.h.wince delete mode 100644 wince/msvc80/README.txt delete mode 100644 wince/msvc80/projce_common.vsprops delete mode 100644 wince/msvc80/projce_dll/projce_dll.sln delete mode 100644 wince/msvc80/projce_dll/projce_dll.vcproj delete mode 100644 wince/msvc80/projce_lib/projce_lib.sln delete mode 100644 wince/msvc80/projce_lib/projce_lib.vcproj diff --git a/src/pj_open_lib.c b/src/pj_open_lib.c index 4eaefba1..054853c6 100644 --- a/src/pj_open_lib.c +++ b/src/pj_open_lib.c @@ -118,8 +118,6 @@ pj_open_lib_ex(projCtx ctx, const char *name, const char *mode, static const char dir_chars[] = "/"; #endif -#ifndef _WIN32_WCE - if( out_full_filename != NULL && out_full_filename_size > 0 ) out_full_filename[0] = '\0'; @@ -205,9 +203,6 @@ pj_open_lib_ex(projCtx ctx, const char *name, const char *mode, fid == NULL ? "failed" : "succeeded" ); return(fid); -#else - return NULL; -#endif /* _WIN32_WCE */ } /************************************************************************/ diff --git a/src/pj_strtod.c b/src/pj_strtod.c index 4c03a661..90d0b2e5 100644 --- a/src/pj_strtod.c +++ b/src/pj_strtod.c @@ -75,7 +75,7 @@ double pj_atof( const char* nptr ) static char* pj_replace_point_by_locale_point(const char* pszNumber, char point, char* pszWorkBuffer) { -#if !defined(HAVE_LOCALECONV) || defined(_WIN32_WCE) +#if !defined(HAVE_LOCALECONV) #if defined(_MSC_VER) /* Visual C++ */ #pragma message("localeconv not available") diff --git a/src/proj_config.h.wince b/src/proj_config.h.wince deleted file mode 100644 index 9e2c8a67..00000000 --- a/src/proj_config.h.wince +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Windows CE platform config. - */ -#ifndef _WIN32_WCE -# error This version of proj_config.h header is dedicated for Windows CE platform! -#endif - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `m' library (-lm). */ -#undef HAVE_LIBM - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Enabled for Java/JNI Support */ -#undef JNI_ENABLED - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION diff --git a/src/projects.h b/src/projects.h index f22ae3a5..41f4aa3c 100644 --- a/src/projects.h +++ b/src/projects.h @@ -97,14 +97,6 @@ typedef long pj_int32; extern double hypot(double, double); #endif -#ifdef _WIN32_WCE -# include -# include -# define rewind wceex_rewind -# define getenv wceex_getenv -# define hypot _hypot -#endif - /* If we still haven't got M_PI*, we rely on our own defines. * For example, this is necessary when compiling with gcc and * the -ansi flag. @@ -136,11 +128,11 @@ extern double hypot(double, double); #endif /* Use WIN32 as a standard windows 32 bit declaration */ -#if defined(_WIN32) && !defined(WIN32) && !defined(_WIN32_WCE) +#if defined(_WIN32) && !defined(WIN32) # define WIN32 #endif -#if defined(_WINDOWS) && !defined(WIN32) && !defined(_WIN32_WCE) +#if defined(_WINDOWS) && !defined(WIN32) # define WIN32 #endif diff --git a/wince/msvc80/README.txt b/wince/msvc80/README.txt deleted file mode 100644 index 46f42ba6..00000000 --- a/wince/msvc80/README.txt +++ /dev/null @@ -1,77 +0,0 @@ -------------------------------------------------------------------------------- -PROJ.4 port for Windows CE -Author: Mateusz Loskot (mateusz@loskot.net) -------------------------------------------------------------------------------- - -This readme explains how to build PROJ.4 for Windows CE based -operating systems like Windows Mobile and custom versions. - ------------------------------------ -Building PROJ.4 for Windows CE ------------------------------------ - -Currently, project files for Microsoft Visual C++ 2005 are provided. -Although, PROJ.4 will build using Microsoft eMbedded Visual C++ 3.0 or 4.0 as well. - -1. Requirements - -In order to build PROJ.4 for Windows CE you need to download WCELIBCEX library - -http://sourceforge.net/projects/wcelibcex - -The WCELIBCEX is a library providing helpful features while -porting Windows/Unix libraries to Windows CE and can be downloaded -directly from Subversion repository: - -svn co https://wcelibcex.svn.sourceforge.net/svnroot/wcelibcex/trunk/ wcelibcex - -or as a source distribution package - wcelibcex-1.0.zip - from Download link. - -Next, you will find project file of static library for Visual C+ 2005 -located in wcelibcex/msvc80. - -2. Configure WCELIBCEX - -2.1 Open one of solutions for PROJ.4: projce_dll.sln or projce_lib.sln - in the Visual C++ 2005 IDE. - -2.2 Add WCELIBCEX project to the PORJ.4 solution by selecting wcelibcex_lib.vcproj file. - -2.3 Configure WCELIBCEX_DIR path in projce_common.vsprops Property Sheet: - - 1. Open View -> Property Manager. - 2. Expand one of node under projce_dll or projce_lib project - 3. Double-click on projce_common property sheet - 4. Go to User Macros - 5. Select WCELIBCEX_DIR macro and set path pointing directly to directory - where you downloaded the WCELIBCEX library sources tree. - 6. Click OK and close the dialog box - -3. Build - -Select Build -> Build Solution - -4. Output binaries: - -4.1 projce_lib.sln - static library - -projced.lib - Debug configuration -projce.lib - Release configuration - -4.2 projce_dll.sln - Dynamic-link library - -proj_i.lib - import library -proj.dll - dynamic-link library - -NOTE: There is no 'ced' or 'ce' token in DLL binaries names. - This is intentional and don't change it. - GDAL requires PROJ.4 DLL named as proj.dll. - ------------------------------------ -Notes ------------------------------------ - -Preferable place to ask for help, is the official mailing -list - proj@lists.maptools.org - -Author: Mateusz Loskot diff --git a/wince/msvc80/projce_common.vsprops b/wince/msvc80/projce_common.vsprops deleted file mode 100644 index d90192bb..00000000 --- a/wince/msvc80/projce_common.vsprops +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/wince/msvc80/projce_dll/projce_dll.sln b/wince/msvc80/projce_dll/projce_dll.sln deleted file mode 100644 index 1f005aff..00000000 --- a/wince/msvc80/projce_dll/projce_dll.sln +++ /dev/null @@ -1,43 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "projce_dll", "projce_dll.vcproj", "{A5AFA635-6DD3-4437-9115-13C9B57138BE}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E123D79D-AEC4-4122-8F53-14BCA5E575E7}" - ProjectSection(SolutionItems) = preProject - ..\README.txt = ..\README.txt - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Pocket PC 2003 (ARMV4) = Debug|Pocket PC 2003 (ARMV4) - Debug|Smartphone 2003 (ARMV4) = Debug|Smartphone 2003 (ARMV4) - Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) - Release|Pocket PC 2003 (ARMV4) = Release|Pocket PC 2003 (ARMV4) - Release|Smartphone 2003 (ARMV4) = Release|Smartphone 2003 (ARMV4) - Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A5AFA635-6DD3-4437-9115-13C9B57138BE}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) - {A5AFA635-6DD3-4437-9115-13C9B57138BE}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) - {A5AFA635-6DD3-4437-9115-13C9B57138BE}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) - {A5AFA635-6DD3-4437-9115-13C9B57138BE}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {A5AFA635-6DD3-4437-9115-13C9B57138BE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {A5AFA635-6DD3-4437-9115-13C9B57138BE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {A5AFA635-6DD3-4437-9115-13C9B57138BE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {A5AFA635-6DD3-4437-9115-13C9B57138BE}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {A5AFA635-6DD3-4437-9115-13C9B57138BE}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) - {A5AFA635-6DD3-4437-9115-13C9B57138BE}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) - {A5AFA635-6DD3-4437-9115-13C9B57138BE}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) - {A5AFA635-6DD3-4437-9115-13C9B57138BE}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {A5AFA635-6DD3-4437-9115-13C9B57138BE}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {A5AFA635-6DD3-4437-9115-13C9B57138BE}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {A5AFA635-6DD3-4437-9115-13C9B57138BE}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {A5AFA635-6DD3-4437-9115-13C9B57138BE}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/wince/msvc80/projce_dll/projce_dll.vcproj b/wince/msvc80/projce_dll/projce_dll.vcproj deleted file mode 100644 index fceb5802..00000000 --- a/wince/msvc80/projce_dll/projce_dll.vcproj +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wince/msvc80/projce_lib/projce_lib.sln b/wince/msvc80/projce_lib/projce_lib.sln deleted file mode 100644 index df950009..00000000 --- a/wince/msvc80/projce_lib/projce_lib.sln +++ /dev/null @@ -1,43 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "projce_lib", "projce_lib.vcproj", "{E33BA2AA-25D9-48B1-A9FB-F77EB915AD72}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1619681D-2192-42F6-AF3E-7016F3735D5E}" - ProjectSection(SolutionItems) = preProject - ..\README.txt = ..\README.txt - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Pocket PC 2003 (ARMV4) = Debug|Pocket PC 2003 (ARMV4) - Debug|Smartphone 2003 (ARMV4) = Debug|Smartphone 2003 (ARMV4) - Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) - Release|Pocket PC 2003 (ARMV4) = Release|Pocket PC 2003 (ARMV4) - Release|Smartphone 2003 (ARMV4) = Release|Smartphone 2003 (ARMV4) - Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E33BA2AA-25D9-48B1-A9FB-F77EB915AD72}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) - {E33BA2AA-25D9-48B1-A9FB-F77EB915AD72}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) - {E33BA2AA-25D9-48B1-A9FB-F77EB915AD72}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) - {E33BA2AA-25D9-48B1-A9FB-F77EB915AD72}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {E33BA2AA-25D9-48B1-A9FB-F77EB915AD72}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {E33BA2AA-25D9-48B1-A9FB-F77EB915AD72}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {E33BA2AA-25D9-48B1-A9FB-F77EB915AD72}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {E33BA2AA-25D9-48B1-A9FB-F77EB915AD72}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {E33BA2AA-25D9-48B1-A9FB-F77EB915AD72}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) - {E33BA2AA-25D9-48B1-A9FB-F77EB915AD72}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) - {E33BA2AA-25D9-48B1-A9FB-F77EB915AD72}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) - {E33BA2AA-25D9-48B1-A9FB-F77EB915AD72}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {E33BA2AA-25D9-48B1-A9FB-F77EB915AD72}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {E33BA2AA-25D9-48B1-A9FB-F77EB915AD72}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {E33BA2AA-25D9-48B1-A9FB-F77EB915AD72}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {E33BA2AA-25D9-48B1-A9FB-F77EB915AD72}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/wince/msvc80/projce_lib/projce_lib.vcproj b/wince/msvc80/projce_lib/projce_lib.vcproj deleted file mode 100644 index c5c962d7..00000000 --- a/wince/msvc80/projce_lib/projce_lib.vcproj +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3 From c6bcc0e4b806179c4f904a2df2652f51b27068f1 Mon Sep 17 00:00:00 2001 From: Mateusz Loskot Date: Thu, 1 Feb 2018 20:14:55 +0100 Subject: Remove COM/VB6 cruft --- com/COMTest1.aps | Bin 3224 -> 0 bytes com/COMTest1.cpp | 72 ------- com/COMTest1.def | 9 - com/COMTest1.dsp | 350 -------------------------------- com/COMTest1.dsw | 29 --- com/COMTest1.idl | 44 ----- com/COMTest1.ncb | Bin 74751 -> 0 bytes com/COMTest1.opt | Bin 51712 -> 0 bytes com/COMTest1.plg | 89 --------- com/COMTest1.rc | 128 ------------ com/COMTest1_p.c | 571 ----------------------------------------------------- com/COMTest1ps.def | 11 -- com/COMTest1ps.mk | 16 -- com/ProjDef.cpp | 115 ----------- com/ProjDef.h | 49 ----- com/ProjDef.rgs | 26 --- com/README.TXT | 41 ---- com/StdAfx.cpp | 12 -- com/StdAfx.h | 27 --- com/VB6Test.frm | 50 ----- com/dlldata.c | 38 ---- com/resource.h | 17 -- 22 files changed, 1694 deletions(-) delete mode 100644 com/COMTest1.aps delete mode 100644 com/COMTest1.cpp delete mode 100644 com/COMTest1.def delete mode 100644 com/COMTest1.dsp delete mode 100644 com/COMTest1.dsw delete mode 100644 com/COMTest1.idl delete mode 100644 com/COMTest1.ncb delete mode 100644 com/COMTest1.opt delete mode 100644 com/COMTest1.plg delete mode 100644 com/COMTest1.rc delete mode 100644 com/COMTest1_p.c delete mode 100644 com/COMTest1ps.def delete mode 100644 com/COMTest1ps.mk delete mode 100644 com/ProjDef.cpp delete mode 100644 com/ProjDef.h delete mode 100644 com/ProjDef.rgs delete mode 100644 com/README.TXT delete mode 100644 com/StdAfx.cpp delete mode 100644 com/StdAfx.h delete mode 100644 com/VB6Test.frm delete mode 100644 com/dlldata.c delete mode 100644 com/resource.h diff --git a/com/COMTest1.aps b/com/COMTest1.aps deleted file mode 100644 index e1c63e9d..00000000 Binary files a/com/COMTest1.aps and /dev/null differ diff --git a/com/COMTest1.cpp b/com/COMTest1.cpp deleted file mode 100644 index 4939b8b4..00000000 --- a/com/COMTest1.cpp +++ /dev/null @@ -1,72 +0,0 @@ -// COMTest1.cpp : Implementation of DLL Exports. - - -// Note: Proxy/Stub Information -// To build a separate proxy/stub DLL, -// run nmake -f COMTest1ps.mk in the project directory. - -#include "stdafx.h" -#include "resource.h" -#include -#include "COMTest1.h" - -#include "COMTest1_i.c" -#include "ProjDef.h" - - -CComModule _Module; - -BEGIN_OBJECT_MAP(ObjectMap) -OBJECT_ENTRY(CLSID_ProjDef, CProjDef) -END_OBJECT_MAP() - -///////////////////////////////////////////////////////////////////////////// -// DLL Entry Point - -extern "C" -BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) -{ - if (dwReason == DLL_PROCESS_ATTACH) - { - _Module.Init(ObjectMap, hInstance, &LIBID_PROJ4Lib); - DisableThreadLibraryCalls(hInstance); - } - else if (dwReason == DLL_PROCESS_DETACH) - _Module.Term(); - return TRUE; // ok -} - -///////////////////////////////////////////////////////////////////////////// -// Used to determine whether the DLL can be unloaded by OLE - -STDAPI DllCanUnloadNow(void) -{ - return (_Module.GetLockCount()==0) ? S_OK : S_FALSE; -} - -///////////////////////////////////////////////////////////////////////////// -// Returns a class factory to create an object of the requested type - -STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) -{ - return _Module.GetClassObject(rclsid, riid, ppv); -} - -///////////////////////////////////////////////////////////////////////////// -// DllRegisterServer - Adds entries to the system registry - -STDAPI DllRegisterServer(void) -{ - // registers object, typelib and all interfaces in typelib - return _Module.RegisterServer(TRUE); -} - -///////////////////////////////////////////////////////////////////////////// -// DllUnregisterServer - Removes entries from the system registry - -STDAPI DllUnregisterServer(void) -{ - return _Module.UnregisterServer(TRUE); -} - - diff --git a/com/COMTest1.def b/com/COMTest1.def deleted file mode 100644 index a14e3f8b..00000000 --- a/com/COMTest1.def +++ /dev/null @@ -1,9 +0,0 @@ -; COMTest1.def : Declares the module parameters. - -LIBRARY "PROJ4COM.DLL" - -EXPORTS - DllCanUnloadNow @1 PRIVATE - DllGetClassObject @2 PRIVATE - DllRegisterServer @3 PRIVATE - DllUnregisterServer @4 PRIVATE diff --git a/com/COMTest1.dsp b/com/COMTest1.dsp deleted file mode 100644 index 5a2115db..00000000 --- a/com/COMTest1.dsp +++ /dev/null @@ -1,350 +0,0 @@ -# Microsoft Developer Studio Project File - Name="COMTest1" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=COMTest1 - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "COMTest1.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "COMTest1.mak" CFG="COMTest1 - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "COMTest1 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "COMTest1 - Win32 Unicode Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "COMTest1 - Win32 Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "COMTest1 - Win32 Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "COMTest1 - Win32 Unicode Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "COMTest1 - Win32 Unicode Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "COMTest1 - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "C:\warmerda\proj\src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib C:\warmerda\proj\src\proj_i.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"Debug/PROJ4COM.dll" /pdbtype:sept -# Begin Custom Build - Performing registration -OutDir=.\Debug -TargetPath=.\Debug\PROJ4COM.dll -InputPath=.\Debug\PROJ4COM.dll -SOURCE="$(InputPath)" - -"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - regsvr32 /s /c "$(TargetPath)" - echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" - -# End Custom Build - -!ELSEIF "$(CFG)" == "COMTest1 - Win32 Unicode Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "DebugU" -# PROP BASE Intermediate_Dir "DebugU" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "DebugU" -# PROP Intermediate_Dir "DebugU" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept -# Begin Custom Build - Performing registration -OutDir=.\DebugU -TargetPath=.\DebugU\COMTest1.dll -InputPath=.\DebugU\COMTest1.dll -SOURCE="$(InputPath)" - -"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - if "%OS%"=="" goto NOTNT - if not "%OS%"=="Windows_NT" goto NOTNT - regsvr32 /s /c "$(TargetPath)" - echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" - goto end - :NOTNT - echo Warning : Cannot register Unicode DLL on Windows 95 - :end - -# End Custom Build - -!ELSEIF "$(CFG)" == "COMTest1 - Win32 Release MinSize" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "ReleaseMinSize" -# PROP BASE Intermediate_Dir "ReleaseMinSize" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "ReleaseMinSize" -# PROP Intermediate_Dir "ReleaseMinSize" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# Begin Custom Build - Performing registration -OutDir=.\ReleaseMinSize -TargetPath=.\ReleaseMinSize\COMTest1.dll -InputPath=.\ReleaseMinSize\COMTest1.dll -SOURCE="$(InputPath)" - -"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - regsvr32 /s /c "$(TargetPath)" - echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" - -# End Custom Build - -!ELSEIF "$(CFG)" == "COMTest1 - Win32 Release MinDependency" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "ReleaseMinDependency" -# PROP BASE Intermediate_Dir "ReleaseMinDependency" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "ReleaseMinDependency" -# PROP Intermediate_Dir "ReleaseMinDependency" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# Begin Custom Build - Performing registration -OutDir=.\ReleaseMinDependency -TargetPath=.\ReleaseMinDependency\COMTest1.dll -InputPath=.\ReleaseMinDependency\COMTest1.dll -SOURCE="$(InputPath)" - -"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - regsvr32 /s /c "$(TargetPath)" - echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" - -# End Custom Build - -!ELSEIF "$(CFG)" == "COMTest1 - Win32 Unicode Release MinSize" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "ReleaseUMinSize" -# PROP BASE Intermediate_Dir "ReleaseUMinSize" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "ReleaseUMinSize" -# PROP Intermediate_Dir "ReleaseUMinSize" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# Begin Custom Build - Performing registration -OutDir=.\ReleaseUMinSize -TargetPath=.\ReleaseUMinSize\COMTest1.dll -InputPath=.\ReleaseUMinSize\COMTest1.dll -SOURCE="$(InputPath)" - -"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - if "%OS%"=="" goto NOTNT - if not "%OS%"=="Windows_NT" goto NOTNT - regsvr32 /s /c "$(TargetPath)" - echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" - goto end - :NOTNT - echo Warning : Cannot register Unicode DLL on Windows 95 - :end - -# End Custom Build - -!ELSEIF "$(CFG)" == "COMTest1 - Win32 Unicode Release MinDependency" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "ReleaseUMinDependency" -# PROP BASE Intermediate_Dir "ReleaseUMinDependency" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "ReleaseUMinDependency" -# PROP Intermediate_Dir "ReleaseUMinDependency" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# Begin Custom Build - Performing registration -OutDir=.\ReleaseUMinDependency -TargetPath=.\ReleaseUMinDependency\COMTest1.dll -InputPath=.\ReleaseUMinDependency\COMTest1.dll -SOURCE="$(InputPath)" - -"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - if "%OS%"=="" goto NOTNT - if not "%OS%"=="Windows_NT" goto NOTNT - regsvr32 /s /c "$(TargetPath)" - echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" - goto end - :NOTNT - echo Warning : Cannot register Unicode DLL on Windows 95 - :end - -# End Custom Build - -!ENDIF - -# Begin Target - -# Name "COMTest1 - Win32 Debug" -# Name "COMTest1 - Win32 Unicode Debug" -# Name "COMTest1 - Win32 Release MinSize" -# Name "COMTest1 - Win32 Release MinDependency" -# Name "COMTest1 - Win32 Unicode Release MinSize" -# Name "COMTest1 - Win32 Unicode Release MinDependency" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\COMTest1.cpp -# End Source File -# Begin Source File - -SOURCE=.\COMTest1.def -# End Source File -# Begin Source File - -SOURCE=.\COMTest1.idl - -!IF "$(CFG)" == "COMTest1 - Win32 Debug" - -# ADD MTL /tlb ".\PROJ4COM.tlb" /h "COMTest1.h" /iid "COMTest1_i.c" /Oicf - -!ELSEIF "$(CFG)" == "COMTest1 - Win32 Unicode Debug" - -# ADD MTL /tlb ".\COMTest1.tlb" /h "COMTest1.h" /iid "COMTest1_i.c" /Oicf - -!ELSEIF "$(CFG)" == "COMTest1 - Win32 Release MinSize" - -# ADD MTL /tlb ".\COMTest1.tlb" /h "COMTest1.h" /iid "COMTest1_i.c" /Oicf - -!ELSEIF "$(CFG)" == "COMTest1 - Win32 Release MinDependency" - -# ADD MTL /tlb ".\COMTest1.tlb" /h "COMTest1.h" /iid "COMTest1_i.c" /Oicf - -!ELSEIF "$(CFG)" == "COMTest1 - Win32 Unicode Release MinSize" - -# ADD MTL /tlb ".\COMTest1.tlb" /h "COMTest1.h" /iid "COMTest1_i.c" /Oicf - -!ELSEIF "$(CFG)" == "COMTest1 - Win32 Unicode Release MinDependency" - -# ADD MTL /tlb ".\COMTest1.tlb" /h "COMTest1.h" /iid "COMTest1_i.c" /Oicf - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\COMTest1.rc -# End Source File -# Begin Source File - -SOURCE=.\ProjDef.cpp -# End Source File -# Begin Source File - -SOURCE=.\StdAfx.cpp -# ADD CPP /Yc"stdafx.h" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\ProjDef.h -# End Source File -# Begin Source File - -SOURCE=.\Resource.h -# End Source File -# Begin Source File - -SOURCE=.\StdAfx.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=.\ProjDef.rgs -# End Source File -# End Group -# End Target -# End Project diff --git a/com/COMTest1.dsw b/com/COMTest1.dsw deleted file mode 100644 index 9a011802..00000000 --- a/com/COMTest1.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "COMTest1"=.\COMTest1.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/com/COMTest1.idl b/com/COMTest1.idl deleted file mode 100644 index ed5bc023..00000000 --- a/com/COMTest1.idl +++ /dev/null @@ -1,44 +0,0 @@ -// COMTest1.idl : IDL source for COMTest1.dll -// - -// This file will be processed by the MIDL tool to -// produce the type library (COMTest1.tlb) and marshalling code. - -import "oaidl.idl"; -import "ocidl.idl"; - [ - object, - uuid(28849AA6-E8FB-4077-8D7A-D83CDFC2DC44), - dual, - helpstring("IProjDef Interface"), - pointer_default(unique) - ] - interface IProjDef : IDispatch - { - [id(1), helpstring("method Initialize")] HRESULT Initialize([in] BSTR proj_string, [out, retval] int *success ); - [id(2), helpstring("method TransformPoint3D")] HRESULT TransformPoint3D([in] IUnknown *srcProj, - [in,out] double *x, [in, out] double *y, [in, out] double *z, [out, retval] int *success ); - [id(3), helpstring("method GetHandle")] HRESULT GetHandle([out, retval] long *pHandle ); - [id(4), helpstring("method IsLatLong")] HRESULT IsLatLong([out, retval] int *result); - [id(5), helpstring("method GetLastError")] HRESULT GetLastError([out, retval] BSTR *error ); - }; - -[ - uuid(A0ADE3D8-9A85-4BD3-AD56-BFEF42495130), - version(1.0), - helpstring("PROJ.4") -] -library PROJ4Lib -{ - importlib("stdole32.tlb"); - importlib("stdole2.tlb"); - - [ - uuid(B9B8F0A3-D9F8-4537-9A03-329DC9AE144C), - helpstring("ProjDef Class") - ] - coclass ProjDef - { - [default] interface IProjDef; - }; -}; diff --git a/com/COMTest1.ncb b/com/COMTest1.ncb deleted file mode 100644 index 8c766c6f..00000000 Binary files a/com/COMTest1.ncb and /dev/null differ diff --git a/com/COMTest1.opt b/com/COMTest1.opt deleted file mode 100644 index a494b3df..00000000 Binary files a/com/COMTest1.opt and /dev/null differ diff --git a/com/COMTest1.plg b/com/COMTest1.plg deleted file mode 100644 index 9a540520..00000000 --- a/com/COMTest1.plg +++ /dev/null @@ -1,89 +0,0 @@ - - -
-

Build Log

-

---------------------Configuration: COMTest1 - Win32 Debug-------------------- -

-

Command Lines

-Creating command line "midl.exe /tlb ".\PROJ4COM.tlb" /h "COMTest1.h" /iid "COMTest1_i.c" /Oicf "C:\warmerda\proj\com\COMTest1.idl"" -Creating command line "rc.exe /l 0x409 /fo"Debug/COMTest1.res" /d "_DEBUG" "C:\warmerda\proj\com\COMTest1.rc"" -Creating temporary file "C:\DOCUME~1\warmerda\LOCALS~1\Temp\RSP2F4.tmp" with contents -[ -/nologo /MTd /W3 /Gm /ZI /Od /I "C:\warmerda\proj\src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Fp"Debug/COMTest1.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c -"C:\warmerda\proj\com\COMTest1.cpp" -"C:\warmerda\proj\com\ProjDef.cpp" -] -Creating command line "cl.exe @C:\DOCUME~1\warmerda\LOCALS~1\Temp\RSP2F4.tmp" -Creating temporary file "C:\DOCUME~1\warmerda\LOCALS~1\Temp\RSP2F5.tmp" with contents -[ -/nologo /MTd /W3 /Gm /ZI /Od /I "C:\warmerda\proj\src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Fp"Debug/COMTest1.pch" /Yc"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c -"C:\warmerda\proj\com\StdAfx.cpp" -] -Creating command line "cl.exe @C:\DOCUME~1\warmerda\LOCALS~1\Temp\RSP2F5.tmp" -Creating temporary file "C:\DOCUME~1\warmerda\LOCALS~1\Temp\RSP2F6.tmp" with contents -[ -kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib C:\warmerda\proj\src\proj_i.lib /nologo /subsystem:windows /dll /incremental:yes /pdb:"Debug/PROJ4COM.pdb" /debug /machine:I386 /def:".\COMTest1.def" /out:"Debug/PROJ4COM.dll" /implib:"Debug/PROJ4COM.lib" /pdbtype:sept -.\Debug\COMTest1.obj -.\Debug\ProjDef.obj -.\Debug\StdAfx.obj -.\Debug\COMTest1.res -] -Creating command line "link.exe @C:\DOCUME~1\warmerda\LOCALS~1\Temp\RSP2F6.tmp" -Creating temporary file "C:\DOCUME~1\warmerda\LOCALS~1\Temp\RSP2F7.bat" with contents -[ -@echo off -regsvr32 /s /c ".\Debug\PROJ4COM.dll" -echo regsvr32 exec. time > ".\Debug\regsvr32.trg" -] -Creating command line "C:\DOCUME~1\warmerda\LOCALS~1\Temp\RSP2F7.bat" -Creating Type Library... -Microsoft (R) MIDL Compiler Version 5.01.0164 -Copyright (c) Microsoft Corp 1991-1997. All rights reserved. -Processing C:\warmerda\proj\com\COMTest1.idl -COMTest1.idl -Processing C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\oaidl.idl -oaidl.idl -Processing C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\objidl.idl -objidl.idl -Processing C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\unknwn.idl -unknwn.idl -Processing C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\wtypes.idl -wtypes.idl -Processing C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\basetsd.h -basetsd.h -Processing C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\guiddef.h -guiddef.h -Processing C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\ocidl.idl -ocidl.idl -Processing C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\oleidl.idl -oleidl.idl -Processing C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\servprov.idl -servprov.idl -Processing C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\urlmon.idl -urlmon.idl -Processing C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\msxml.idl -msxml.idl -Processing C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\oaidl.acf -oaidl.acf -Processing C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\ocidl.acf -ocidl.acf -Compiling resources... -Compiling... -StdAfx.cpp -Compiling... -COMTest1.cpp -ProjDef.cpp -Generating Code... -Linking... - Creating library Debug/PROJ4COM.lib and object Debug/PROJ4COM.exp -

Output Window

-Performing registration - - - -

Results

-PROJ4COM.dll - 0 error(s), 0 warning(s) -
- - diff --git a/com/COMTest1.rc b/com/COMTest1.rc deleted file mode 100644 index 5e554d0f..00000000 --- a/com/COMTest1.rc +++ /dev/null @@ -1,128 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "1 TYPELIB ""COMTest1.tlb""\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "\0" - VALUE "CompanyName", "\0" - VALUE "FileDescription", "PROJ.4 COM Module\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "PROJ4\0" - VALUE "LegalCopyright", "Copyright 2005\0" - VALUE "LegalTrademarks", "\0" - VALUE "OLESelfRegister", "\0" - VALUE "OriginalFilename", "PROJ4COM.DLL\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "PROJ.4 COM\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - VALUE "SpecialBuild", "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // !_MAC - - -///////////////////////////////////////////////////////////////////////////// -// -// REGISTRY -// - -IDR_PROJDEF REGISTRY DISCARDABLE "ProjDef.rgs" - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE DISCARDABLE -BEGIN - IDS_PROJNAME "PROJ4COM" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -1 TYPELIB "PROJ4COM.tlb" - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/com/COMTest1_p.c b/com/COMTest1_p.c deleted file mode 100644 index a7ba7777..00000000 --- a/com/COMTest1_p.c +++ /dev/null @@ -1,571 +0,0 @@ -/* this ALWAYS GENERATED file contains the proxy stub code */ - - -/* File created by MIDL compiler version 5.01.0164 */ -/* at Tue Oct 18 23:21:00 2005 - */ -/* Compiler settings for C:\warmerda\proj\com\COMTest1.idl: - Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext - error checks: allocation ref bounds_check enum stub_data -*/ -//@@MIDL_FILE_HEADING( ) - -#define USE_STUBLESS_PROXY - - -/* verify that the version is high enough to compile this file*/ -#ifndef __REDQ_RPCPROXY_H_VERSION__ -#define __REQUIRED_RPCPROXY_H_VERSION__ 440 -#endif - - -#include "rpcproxy.h" -#ifndef __RPCPROXY_H_VERSION__ -#error this stub requires an updated version of -#endif // __RPCPROXY_H_VERSION__ - - -#include "COMTest1.h" - -#define TYPE_FORMAT_STRING_SIZE 81 -#define PROC_FORMAT_STRING_SIZE 171 - -typedef struct _MIDL_TYPE_FORMAT_STRING - { - short Pad; - unsigned char Format[ TYPE_FORMAT_STRING_SIZE ]; - } MIDL_TYPE_FORMAT_STRING; - -typedef struct _MIDL_PROC_FORMAT_STRING - { - short Pad; - unsigned char Format[ PROC_FORMAT_STRING_SIZE ]; - } MIDL_PROC_FORMAT_STRING; - - -extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString; -extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString; - - -/* Object interface: IUnknown, ver. 0.0, - GUID={0x00000000,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */ - - -/* Object interface: IDispatch, ver. 0.0, - GUID={0x00020400,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */ - - -/* Object interface: IProjDef, ver. 0.0, - GUID={0x28849AA6,0xE8FB,0x4077,{0x8D,0x7A,0xD8,0x3C,0xDF,0xC2,0xDC,0x44}} */ - - -extern const MIDL_STUB_DESC Object_StubDesc; - - -extern const MIDL_SERVER_INFO IProjDef_ServerInfo; - -#pragma code_seg(".orpc") -extern const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[1]; - -static const MIDL_STUB_DESC Object_StubDesc = - { - 0, - NdrOleAllocate, - NdrOleFree, - 0, - 0, - 0, - 0, - 0, - __MIDL_TypeFormatString.Format, - 1, /* -error bounds_check flag */ - 0x20000, /* Ndr library version */ - 0, - 0x50100a4, /* MIDL Version 5.1.164 */ - 0, - UserMarshalRoutines, - 0, /* notify & notify_flag routine table */ - 1, /* Flags */ - 0, /* Reserved3 */ - 0, /* Reserved4 */ - 0 /* Reserved5 */ - }; - -static const unsigned short IProjDef_FormatStringOffsetTable[] = - { - (unsigned short) -1, - (unsigned short) -1, - (unsigned short) -1, - (unsigned short) -1, - 0, - 34, - 86, - 114, - 142 - }; - -static const MIDL_SERVER_INFO IProjDef_ServerInfo = - { - &Object_StubDesc, - 0, - __MIDL_ProcFormatString.Format, - &IProjDef_FormatStringOffsetTable[-3], - 0, - 0, - 0, - 0 - }; - -static const MIDL_STUBLESS_PROXY_INFO IProjDef_ProxyInfo = - { - &Object_StubDesc, - __MIDL_ProcFormatString.Format, - &IProjDef_FormatStringOffsetTable[-3], - 0, - 0, - 0 - }; - -CINTERFACE_PROXY_VTABLE(12) _IProjDefProxyVtbl = -{ - &IProjDef_ProxyInfo, - &IID_IProjDef, - IUnknown_QueryInterface_Proxy, - IUnknown_AddRef_Proxy, - IUnknown_Release_Proxy , - 0 /* (void *)-1 /* IDispatch::GetTypeInfoCount */ , - 0 /* (void *)-1 /* IDispatch::GetTypeInfo */ , - 0 /* (void *)-1 /* IDispatch::GetIDsOfNames */ , - 0 /* IDispatch_Invoke_Proxy */ , - (void *)-1 /* IProjDef::Initialize */ , - (void *)-1 /* IProjDef::TransformPoint3D */ , - (void *)-1 /* IProjDef::GetHandle */ , - (void *)-1 /* IProjDef::IsLatLong */ , - (void *)-1 /* IProjDef::GetLastError */ -}; - - -static const PRPC_STUB_FUNCTION IProjDef_table[] = -{ - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2 -}; - -CInterfaceStubVtbl _IProjDefStubVtbl = -{ - &IID_IProjDef, - &IProjDef_ServerInfo, - 12, - &IProjDef_table[-3], - CStdStubBuffer_DELEGATING_METHODS -}; - -#pragma data_seg(".rdata") - -static const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[1] = - { - - { - BSTR_UserSize - ,BSTR_UserMarshal - ,BSTR_UserUnmarshal - ,BSTR_UserFree - } - - }; - - -#if !defined(__RPC_WIN32__) -#error Invalid build platform for this stub. -#endif - -#if !(TARGET_IS_NT40_OR_LATER) -#error You need a Windows NT 4.0 or later to run this stub because it uses these features: -#error -Oif or -Oicf, [wire_marshal] or [user_marshal] attribute, more than 32 methods in the interface. -#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems. -#error This app will die there with the RPC_X_WRONG_STUB_VERSION error. -#endif - - -static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString = - { - 0, - { - - /* Procedure Initialize */ - - 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 2 */ NdrFcLong( 0x0 ), /* 0 */ -/* 6 */ NdrFcShort( 0x7 ), /* 7 */ -#ifndef _ALPHA_ -/* 8 */ NdrFcShort( 0x10 ), /* x86, MIPS, PPC Stack size/offset = 16 */ -#else - NdrFcShort( 0x20 ), /* Alpha Stack size/offset = 32 */ -#endif -/* 10 */ NdrFcShort( 0x0 ), /* 0 */ -/* 12 */ NdrFcShort( 0x10 ), /* 16 */ -/* 14 */ 0x6, /* Oi2 Flags: clt must size, has return, */ - 0x3, /* 3 */ - - /* Parameter proj_string */ - -/* 16 */ NdrFcShort( 0x8b ), /* Flags: must size, must free, in, by val, */ -#ifndef _ALPHA_ -/* 18 */ NdrFcShort( 0x4 ), /* x86, MIPS, PPC Stack size/offset = 4 */ -#else - NdrFcShort( 0x8 ), /* Alpha Stack size/offset = 8 */ -#endif -/* 20 */ NdrFcShort( 0x1a ), /* Type Offset=26 */ - - /* Parameter success */ - -/* 22 */ NdrFcShort( 0x2150 ), /* Flags: out, base type, simple ref, srv alloc size=8 */ -#ifndef _ALPHA_ -/* 24 */ NdrFcShort( 0x8 ), /* x86, MIPS, PPC Stack size/offset = 8 */ -#else - NdrFcShort( 0x10 ), /* Alpha Stack size/offset = 16 */ -#endif -/* 26 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Return value */ - -/* 28 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -#ifndef _ALPHA_ -/* 30 */ NdrFcShort( 0xc ), /* x86, MIPS, PPC Stack size/offset = 12 */ -#else - NdrFcShort( 0x18 ), /* Alpha Stack size/offset = 24 */ -#endif -/* 32 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure TransformPoint3D */ - -/* 34 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 36 */ NdrFcLong( 0x0 ), /* 0 */ -/* 40 */ NdrFcShort( 0x8 ), /* 8 */ -#ifndef _ALPHA_ -/* 42 */ NdrFcShort( 0x1c ), /* x86, MIPS, PPC Stack size/offset = 28 */ -#else - NdrFcShort( 0x38 ), /* Alpha Stack size/offset = 56 */ -#endif -/* 44 */ NdrFcShort( 0x30 ), /* 48 */ -/* 46 */ NdrFcShort( 0x40 ), /* 64 */ -/* 48 */ 0x6, /* Oi2 Flags: clt must size, has return, */ - 0x6, /* 6 */ - - /* Parameter srcProj */ - -/* 50 */ NdrFcShort( 0xb ), /* Flags: must size, must free, in, */ -#ifndef _ALPHA_ -/* 52 */ NdrFcShort( 0x4 ), /* x86, MIPS, PPC Stack size/offset = 4 */ -#else - NdrFcShort( 0x8 ), /* Alpha Stack size/offset = 8 */ -#endif -/* 54 */ NdrFcShort( 0x28 ), /* Type Offset=40 */ - - /* Parameter x */ - -/* 56 */ NdrFcShort( 0x158 ), /* Flags: in, out, base type, simple ref, */ -#ifndef _ALPHA_ -/* 58 */ NdrFcShort( 0x8 ), /* x86, MIPS, PPC Stack size/offset = 8 */ -#else - NdrFcShort( 0x10 ), /* Alpha Stack size/offset = 16 */ -#endif -/* 60 */ 0xc, /* FC_DOUBLE */ - 0x0, /* 0 */ - - /* Parameter y */ - -/* 62 */ NdrFcShort( 0x158 ), /* Flags: in, out, base type, simple ref, */ -#ifndef _ALPHA_ -/* 64 */ NdrFcShort( 0xc ), /* x86, MIPS, PPC Stack size/offset = 12 */ -#else - NdrFcShort( 0x18 ), /* Alpha Stack size/offset = 24 */ -#endif -/* 66 */ 0xc, /* FC_DOUBLE */ - 0x0, /* 0 */ - - /* Parameter z */ - -/* 68 */ NdrFcShort( 0x158 ), /* Flags: in, out, base type, simple ref, */ -#ifndef _ALPHA_ -/* 70 */ NdrFcShort( 0x10 ), /* x86, MIPS, PPC Stack size/offset = 16 */ -#else - NdrFcShort( 0x20 ), /* Alpha Stack size/offset = 32 */ -#endif -/* 72 */ 0xc, /* FC_DOUBLE */ - 0x0, /* 0 */ - - /* Parameter success */ - -/* 74 */ NdrFcShort( 0x2150 ), /* Flags: out, base type, simple ref, srv alloc size=8 */ -#ifndef _ALPHA_ -/* 76 */ NdrFcShort( 0x14 ), /* x86, MIPS, PPC Stack size/offset = 20 */ -#else - NdrFcShort( 0x28 ), /* Alpha Stack size/offset = 40 */ -#endif -/* 78 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Return value */ - -/* 80 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -#ifndef _ALPHA_ -/* 82 */ NdrFcShort( 0x18 ), /* x86, MIPS, PPC Stack size/offset = 24 */ -#else - NdrFcShort( 0x30 ), /* Alpha Stack size/offset = 48 */ -#endif -/* 84 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure GetHandle */ - -/* 86 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 88 */ NdrFcLong( 0x0 ), /* 0 */ -/* 92 */ NdrFcShort( 0x9 ), /* 9 */ -#ifndef _ALPHA_ -/* 94 */ NdrFcShort( 0xc ), /* x86, MIPS, PPC Stack size/offset = 12 */ -#else - NdrFcShort( 0x18 ), /* Alpha Stack size/offset = 24 */ -#endif -/* 96 */ NdrFcShort( 0x0 ), /* 0 */ -/* 98 */ NdrFcShort( 0x10 ), /* 16 */ -/* 100 */ 0x4, /* Oi2 Flags: has return, */ - 0x2, /* 2 */ - - /* Parameter pHandle */ - -/* 102 */ NdrFcShort( 0x2150 ), /* Flags: out, base type, simple ref, srv alloc size=8 */ -#ifndef _ALPHA_ -/* 104 */ NdrFcShort( 0x4 ), /* x86, MIPS, PPC Stack size/offset = 4 */ -#else - NdrFcShort( 0x8 ), /* Alpha Stack size/offset = 8 */ -#endif -/* 106 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Return value */ - -/* 108 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -#ifndef _ALPHA_ -/* 110 */ NdrFcShort( 0x8 ), /* x86, MIPS, PPC Stack size/offset = 8 */ -#else - NdrFcShort( 0x10 ), /* Alpha Stack size/offset = 16 */ -#endif -/* 112 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure IsLatLong */ - -/* 114 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 116 */ NdrFcLong( 0x0 ), /* 0 */ -/* 120 */ NdrFcShort( 0xa ), /* 10 */ -#ifndef _ALPHA_ -/* 122 */ NdrFcShort( 0xc ), /* x86, MIPS, PPC Stack size/offset = 12 */ -#else - NdrFcShort( 0x18 ), /* Alpha Stack size/offset = 24 */ -#endif -/* 124 */ NdrFcShort( 0x0 ), /* 0 */ -/* 126 */ NdrFcShort( 0x10 ), /* 16 */ -/* 128 */ 0x4, /* Oi2 Flags: has return, */ - 0x2, /* 2 */ - - /* Parameter result */ - -/* 130 */ NdrFcShort( 0x2150 ), /* Flags: out, base type, simple ref, srv alloc size=8 */ -#ifndef _ALPHA_ -/* 132 */ NdrFcShort( 0x4 ), /* x86, MIPS, PPC Stack size/offset = 4 */ -#else - NdrFcShort( 0x8 ), /* Alpha Stack size/offset = 8 */ -#endif -/* 134 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Return value */ - -/* 136 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -#ifndef _ALPHA_ -/* 138 */ NdrFcShort( 0x8 ), /* x86, MIPS, PPC Stack size/offset = 8 */ -#else - NdrFcShort( 0x10 ), /* Alpha Stack size/offset = 16 */ -#endif -/* 140 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure GetLastError */ - -/* 142 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 144 */ NdrFcLong( 0x0 ), /* 0 */ -/* 148 */ NdrFcShort( 0xb ), /* 11 */ -#ifndef _ALPHA_ -/* 150 */ NdrFcShort( 0xc ), /* x86, MIPS, PPC Stack size/offset = 12 */ -#else - NdrFcShort( 0x18 ), /* Alpha Stack size/offset = 24 */ -#endif -/* 152 */ NdrFcShort( 0x0 ), /* 0 */ -/* 154 */ NdrFcShort( 0x8 ), /* 8 */ -/* 156 */ 0x5, /* Oi2 Flags: srv must size, has return, */ - 0x2, /* 2 */ - - /* Parameter error */ - -/* 158 */ NdrFcShort( 0x2113 ), /* Flags: must size, must free, out, simple ref, srv alloc size=8 */ -#ifndef _ALPHA_ -/* 160 */ NdrFcShort( 0x4 ), /* x86, MIPS, PPC Stack size/offset = 4 */ -#else - NdrFcShort( 0x8 ), /* Alpha Stack size/offset = 8 */ -#endif -/* 162 */ NdrFcShort( 0x46 ), /* Type Offset=70 */ - - /* Return value */ - -/* 164 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -#ifndef _ALPHA_ -/* 166 */ NdrFcShort( 0x8 ), /* x86, MIPS, PPC Stack size/offset = 8 */ -#else - NdrFcShort( 0x10 ), /* Alpha Stack size/offset = 16 */ -#endif -/* 168 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - 0x0 - } - }; - -static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString = - { - 0, - { - NdrFcShort( 0x0 ), /* 0 */ -/* 2 */ - 0x12, 0x0, /* FC_UP */ -/* 4 */ NdrFcShort( 0xc ), /* Offset= 12 (16) */ -/* 6 */ - 0x1b, /* FC_CARRAY */ - 0x1, /* 1 */ -/* 8 */ NdrFcShort( 0x2 ), /* 2 */ -/* 10 */ 0x9, /* Corr desc: FC_ULONG */ - 0x0, /* */ -/* 12 */ NdrFcShort( 0xfffc ), /* -4 */ -/* 14 */ 0x6, /* FC_SHORT */ - 0x5b, /* FC_END */ -/* 16 */ - 0x17, /* FC_CSTRUCT */ - 0x3, /* 3 */ -/* 18 */ NdrFcShort( 0x8 ), /* 8 */ -/* 20 */ NdrFcShort( 0xfffffff2 ), /* Offset= -14 (6) */ -/* 22 */ 0x8, /* FC_LONG */ - 0x8, /* FC_LONG */ -/* 24 */ 0x5c, /* FC_PAD */ - 0x5b, /* FC_END */ -/* 26 */ 0xb4, /* FC_USER_MARSHAL */ - 0x83, /* 131 */ -/* 28 */ NdrFcShort( 0x0 ), /* 0 */ -/* 30 */ NdrFcShort( 0x4 ), /* 4 */ -/* 32 */ NdrFcShort( 0x0 ), /* 0 */ -/* 34 */ NdrFcShort( 0xffffffe0 ), /* Offset= -32 (2) */ -/* 36 */ - 0x11, 0xc, /* FC_RP [alloced_on_stack] [simple_pointer] */ -/* 38 */ 0x8, /* FC_LONG */ - 0x5c, /* FC_PAD */ -/* 40 */ - 0x2f, /* FC_IP */ - 0x5a, /* FC_CONSTANT_IID */ -/* 42 */ NdrFcLong( 0x0 ), /* 0 */ -/* 46 */ NdrFcShort( 0x0 ), /* 0 */ -/* 48 */ NdrFcShort( 0x0 ), /* 0 */ -/* 50 */ 0xc0, /* 192 */ - 0x0, /* 0 */ -/* 52 */ 0x0, /* 0 */ - 0x0, /* 0 */ -/* 54 */ 0x0, /* 0 */ - 0x0, /* 0 */ -/* 56 */ 0x0, /* 0 */ - 0x46, /* 70 */ -/* 58 */ - 0x11, 0x8, /* FC_RP [simple_pointer] */ -/* 60 */ 0xc, /* FC_DOUBLE */ - 0x5c, /* FC_PAD */ -/* 62 */ - 0x11, 0x4, /* FC_RP [alloced_on_stack] */ -/* 64 */ NdrFcShort( 0x6 ), /* Offset= 6 (70) */ -/* 66 */ - 0x13, 0x0, /* FC_OP */ -/* 68 */ NdrFcShort( 0xffffffcc ), /* Offset= -52 (16) */ -/* 70 */ 0xb4, /* FC_USER_MARSHAL */ - 0x83, /* 131 */ -/* 72 */ NdrFcShort( 0x0 ), /* 0 */ -/* 74 */ NdrFcShort( 0x4 ), /* 4 */ -/* 76 */ NdrFcShort( 0x0 ), /* 0 */ -/* 78 */ NdrFcShort( 0xfffffff4 ), /* Offset= -12 (66) */ - - 0x0 - } - }; - -const CInterfaceProxyVtbl * _COMTest1_ProxyVtblList[] = -{ - ( CInterfaceProxyVtbl *) &_IProjDefProxyVtbl, - 0 -}; - -const CInterfaceStubVtbl * _COMTest1_StubVtblList[] = -{ - ( CInterfaceStubVtbl *) &_IProjDefStubVtbl, - 0 -}; - -PCInterfaceName const _COMTest1_InterfaceNamesList[] = -{ - "IProjDef", - 0 -}; - -const IID * _COMTest1_BaseIIDList[] = -{ - &IID_IDispatch, - 0 -}; - - -#define _COMTest1_CHECK_IID(n) IID_GENERIC_CHECK_IID( _COMTest1, pIID, n) - -int __stdcall _COMTest1_IID_Lookup( const IID * pIID, int * pIndex ) -{ - - if(!_COMTest1_CHECK_IID(0)) - { - *pIndex = 0; - return 1; - } - - return 0; -} - -const ExtendedProxyFileInfo COMTest1_ProxyFileInfo = -{ - (PCInterfaceProxyVtblList *) & _COMTest1_ProxyVtblList, - (PCInterfaceStubVtblList *) & _COMTest1_StubVtblList, - (const PCInterfaceName * ) & _COMTest1_InterfaceNamesList, - (const IID ** ) & _COMTest1_BaseIIDList, - & _COMTest1_IID_Lookup, - 1, - 2, - 0, /* table of [async_uuid] interfaces */ - 0, /* Filler1 */ - 0, /* Filler2 */ - 0 /* Filler3 */ -}; diff --git a/com/COMTest1ps.def b/com/COMTest1ps.def deleted file mode 100644 index 1eb26051..00000000 --- a/com/COMTest1ps.def +++ /dev/null @@ -1,11 +0,0 @@ - -LIBRARY "COMTest1PS" - -DESCRIPTION 'Proxy/Stub DLL' - -EXPORTS - DllGetClassObject @1 PRIVATE - DllCanUnloadNow @2 PRIVATE - GetProxyDllInfo @3 PRIVATE - DllRegisterServer @4 PRIVATE - DllUnregisterServer @5 PRIVATE diff --git a/com/COMTest1ps.mk b/com/COMTest1ps.mk deleted file mode 100644 index c55034d1..00000000 --- a/com/COMTest1ps.mk +++ /dev/null @@ -1,16 +0,0 @@ - -COMTest1ps.dll: dlldata.obj COMTest1_p.obj COMTest1_i.obj - link /dll /out:COMTest1ps.dll /def:COMTest1ps.def /entry:DllMain dlldata.obj COMTest1_p.obj COMTest1_i.obj \ - kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib \ - -.c.obj: - cl /c /Ox /DWIN32 /D_WIN32_WINNT=0x0400 /DREGISTER_PROXY_DLL \ - $< - -clean: - @del COMTest1ps.dll - @del COMTest1ps.lib - @del COMTest1ps.exp - @del dlldata.obj - @del COMTest1_p.obj - @del COMTest1_i.obj diff --git a/com/ProjDef.cpp b/com/ProjDef.cpp deleted file mode 100644 index c64a6e19..00000000 --- a/com/ProjDef.cpp +++ /dev/null @@ -1,115 +0,0 @@ -// ProjDef.cpp : Implementation of CProjDef -#include "stdafx.h" -#include "COMTest1.h" -#include "ProjDef.h" -#include "proj_api.h" - -///////////////////////////////////////////////////////////////////////////// -// CProjDef - - -STDMETHODIMP CProjDef::Initialize(BSTR proj_string, int *success) -{ - USES_CONVERSION; - psProj = pj_init_plus( W2A(proj_string) ); - - if( psProj != NULL ) - *success = 1; - else - { - SetProjError( "pj_init_plus failed." ); - //SetError( (const char *) W2A(proj_string) ); - *success = 0; - } - - return S_OK; -} - -STDMETHODIMP CProjDef::TransformPoint3D(IUnknown *srcProj, double *x, double *y, double *z, int *success) -{ - void *psProjOther; - IProjDef *srcProjReal; - - srcProj->QueryInterface( IID_IProjDef, (void **) &srcProjReal ); - srcProjReal->GetHandle( (long *) &psProjOther ); - - if( psProjOther == NULL || psProj == NULL ) - { - SetError( "One of projections not set." ); - *success = 0; - return E_FAIL; - } - - if( pj_is_latlong( psProjOther ) ) - { - *x *= DEG_TO_RAD; - *y *= DEG_TO_RAD; - } - - *success = pj_transform( psProjOther, psProj, 1, 0, x, y, z ) == 0; - if( ! *success ) - SetProjError( "pj_transform failed." ); - - else if( pj_is_latlong( psProj ) ) - { - *x *= RAD_TO_DEG; - *y *= RAD_TO_DEG; - } - - return S_OK; -} - -STDMETHODIMP CProjDef::GetHandle(long *pHandle) -{ - *pHandle = (long) psProj; - - return S_OK; -} - -STDMETHODIMP CProjDef::IsLatLong(int *result) -{ - if( psProj != NULL ) - { - *result = pj_is_latlong( (projPJ) psProj ); - return S_OK; - } - else - { - SetError( "Projection is null" ); - return E_FAIL; - } -} - -STDMETHODIMP CProjDef::GetLastError( BSTR *error ) -{ - *error = SysAllocString( sLastError ); - - return S_OK; -} - -void CProjDef::SetError( const char *pszMessage ) - -{ - USES_CONVERSION; - - if( sLastError != NULL ) - { - SysFreeString( sLastError ); - sLastError = NULL; - } - - sLastError = SysAllocString( A2BSTR( pszMessage ) ); -} - -void CProjDef::SetProjError( const char *pszMessage ) - -{ - int *pj_errno = pj_get_errno_ref(); - - if( *pj_errno > 0 ) - SetError( strerror( *pj_errno ) ); - else if( *pj_errno < 0 ) - SetError( pj_strerrno( *pj_errno ) ); - else - SetError( pszMessage ); -} diff --git a/com/ProjDef.h b/com/ProjDef.h deleted file mode 100644 index 017bf48f..00000000 --- a/com/ProjDef.h +++ /dev/null @@ -1,49 +0,0 @@ -// ProjDef.h : Declaration of the CProjDef - -#ifndef __PROJDEF_H_ -#define __PROJDEF_H_ - -#include "resource.h" // main symbols - -///////////////////////////////////////////////////////////////////////////// -// CProjDef -class ATL_NO_VTABLE CProjDef : - public CComObjectRootEx, - public CComCoClass, - public IDispatchImpl -{ -public: - CProjDef() - { - psProj = NULL; - sLastError = NULL; - SetError(""); - } - -DECLARE_REGISTRY_RESOURCEID(IDR_PROJDEF) - -DECLARE_PROTECT_FINAL_CONSTRUCT() - -BEGIN_COM_MAP(CProjDef) - COM_INTERFACE_ENTRY(IProjDef) - COM_INTERFACE_ENTRY(IDispatch) -END_COM_MAP() - -// IProjDef -public: - STDMETHOD(GetLastError)( BSTR *error ); - STDMETHOD(IsLatLong)(/*[out]*/ int *result); - STDMETHOD(GetHandle)(long *pHandle); - STDMETHOD(TransformPoint3D)(IUnknown *srcProj, double *x, double *y, double *z, int *success); - STDMETHOD(Initialize)(BSTR proj_string, int *success); - -private: - void SetError( const char *pszMessage ); - void SetProjError( const char *pszMessage ); - - BSTR sLastError; - void *psProj; - -}; - -#endif //__PROJDEF_H_ diff --git a/com/ProjDef.rgs b/com/ProjDef.rgs deleted file mode 100644 index 76d519e3..00000000 --- a/com/ProjDef.rgs +++ /dev/null @@ -1,26 +0,0 @@ -HKCR -{ - COMTest1.ProjDef.1 = s 'ProjDef Class' - { - CLSID = s '{B9B8F0A3-D9F8-4537-9A03-329DC9AE144C}' - } - COMTest1.ProjDef = s 'ProjDef Class' - { - CLSID = s '{B9B8F0A3-D9F8-4537-9A03-329DC9AE144C}' - CurVer = s 'PROJ4.ProjDef.1' - } - NoRemove CLSID - { - ForceRemove {B9B8F0A3-D9F8-4537-9A03-329DC9AE144C} = s 'ProjDef Class' - { - ProgID = s 'PROJ4.ProjDef.1' - VersionIndependentProgID = s 'PROJ4.ProjDef' - ForceRemove 'Programmable' - InprocServer32 = s '%MODULE%' - { - val ThreadingModel = s 'Both' - } - 'TypeLib' = s '{A0ADE3D8-9A85-4BD3-AD56-BFEF42495130}' - } - } -} diff --git a/com/README.TXT b/com/README.TXT deleted file mode 100644 index 08ca7cb7..00000000 --- a/com/README.TXT +++ /dev/null @@ -1,41 +0,0 @@ - PROJ.4 COM Interface - ==================== - -This directory contains a Visual Studio 6 project to build -a COM object with a partial interface to PROJ.4. - -Once built, you should be able to: - - regsvr32 debug\proj4com.dll - -Then in VB6: - - o Add the type library as a resource and enable it. - - o Setup code like the following: - -Private Sub Command1_Click() - Dim pUTM As PROJ4Lib.IProjDef - Dim pLL As PROJ4Lib.IProjDef - - Set pUTM = New PROJ4Lib.ProjDef - Set pLL = New PROJ4Lib.ProjDef - - pUTM.Initialize ("+proj=utm +zone=11 +datum=WGS84") - pLL.Initialize ("+proj=latlong +datum=WGS84") - - Dim X As Double, Y As Double, Z As Double - - X = 25000 - Y = 3000000 - Z = 0 - - MsgBox X & " " & Y - - If pLL.TransformPoint3D(pUTM, X, Y, Z) = 0 Then - MsgBox "TransformPoint3D " & pLL.GetLastError() - End If - - MsgBox X & " " & Y - -End Sub \ No newline at end of file diff --git a/com/StdAfx.cpp b/com/StdAfx.cpp deleted file mode 100644 index a5eea178..00000000 --- a/com/StdAfx.cpp +++ /dev/null @@ -1,12 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// stdafx.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - -#ifdef _ATL_STATIC_REGISTRY -#include -#include -#endif - -#include diff --git a/com/StdAfx.h b/com/StdAfx.h deleted file mode 100644 index 6661a145..00000000 --- a/com/StdAfx.h +++ /dev/null @@ -1,27 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, -// but are changed infrequently - -#if !defined(AFX_STDAFX_H__760250DA_0BD5_40FD_AC2A_6DDA09FFA21E__INCLUDED_) -#define AFX_STDAFX_H__760250DA_0BD5_40FD_AC2A_6DDA09FFA21E__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#define STRICT -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0400 -#endif -#define _ATL_APARTMENT_THREADED - -#include -//You may derive a class from CComModule and use it if you want to override -//something, but do not change the name of _Module -extern CComModule _Module; -#include - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_STDAFX_H__760250DA_0BD5_40FD_AC2A_6DDA09FFA21E__INCLUDED) diff --git a/com/VB6Test.frm b/com/VB6Test.frm deleted file mode 100644 index 9fd7ce07..00000000 --- a/com/VB6Test.frm +++ /dev/null @@ -1,50 +0,0 @@ -VERSION 5.00 -Begin VB.Form Form1 - Caption = "Form1" - ClientHeight = 3090 - ClientLeft = 60 - ClientTop = 450 - ClientWidth = 4680 - LinkTopic = "Form1" - ScaleHeight = 3090 - ScaleWidth = 4680 - StartUpPosition = 3 'Windows Default - Begin VB.CommandButton Command1 - Caption = "Command1" - Height = 615 - Left = 1680 - TabIndex = 0 - Top = 2160 - Width = 975 - End -End -Attribute VB_Name = "Form1" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Private Sub Command1_Click() - Dim pUTM As PROJ4Lib.IProjDef - Dim pLL As PROJ4Lib.IProjDef - - Set pUTM = New PROJ4Lib.ProjDef - Set pLL = New PROJ4Lib.ProjDef - - pUTM.Initialize ("+proj=utm +zone=11 +datum=WGS84") - pLL.Initialize ("+proj=latlong +datum=WGS84") - - Dim X As Double, Y As Double, Z As Double - - X = 25000 - Y = 3000000 - Z = 0 - - MsgBox X & " " & Y - - If pLL.TransformPoint3D(pUTM, X, Y, Z) = 0 Then - MsgBox "TransformPoint3D " & pLL.GetLastError() - End If - - MsgBox X & " " & Y - -End Sub diff --git a/com/dlldata.c b/com/dlldata.c deleted file mode 100644 index 94bcbfc0..00000000 --- a/com/dlldata.c +++ /dev/null @@ -1,38 +0,0 @@ -/********************************************************* - DllData file -- generated by MIDL compiler - - DO NOT ALTER THIS FILE - - This file is regenerated by MIDL on every IDL file compile. - - To completely reconstruct this file, delete it and rerun MIDL - on all the IDL files in this DLL, specifying this file for the - /dlldata command line option - -*********************************************************/ - -#define PROXY_DELEGATION - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -EXTERN_PROXY_FILE( COMTest1 ) - - -PROXYFILE_LIST_START -/* Start of list */ - REFERENCE_PROXY_FILE( COMTest1 ), -/* End of list */ -PROXYFILE_LIST_END - - -DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID ) - -#ifdef __cplusplus -} /*extern "C" */ -#endif - -/* end of generated dlldata file */ diff --git a/com/resource.h b/com/resource.h deleted file mode 100644 index 2c9c2c5e..00000000 --- a/com/resource.h +++ /dev/null @@ -1,17 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by COMTest1.rc -// -#define IDS_PROJNAME 100 -#define IDR_PROJDEF 101 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 201 -#define _APS_NEXT_COMMAND_VALUE 32768 -#define _APS_NEXT_CONTROL_VALUE 201 -#define _APS_NEXT_SYMED_VALUE 102 -#endif -#endif -- cgit v1.2.3 From f1c3cbd8401356cbcc513ee02c88bc22273af251 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Tue, 9 Jan 2018 16:24:00 +0100 Subject: Updated NEWS for version 5.0.0 release. --- NEWS | 295 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 295 insertions(+) diff --git a/NEWS b/NEWS index 8d554a9b..1f9aef27 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,298 @@ +5.0.0 Release Notes +------------------- + +This version of PROJ introduces some significant extensions and +improvements to (primarily) the geodetic functionality of the system. + +The main driver for introducing the new features is the emergence of +dynamic reference frames, the increasing use of high accuracy GNNS, +and the related growing demand for accurate coordinate +transformations. While older versions of PROJ included some geodetic +functionality, the new framework lays the foundation for turning PROJ +into a generic geospatial coordinate transformation engine. + +The core of the library is still the well established projection code. +The new functionality is primarily exposed in a new programming +interface and a new command line utility, "cct" (for "Coordinate +Conversion and Transformation"). The old programming interface is +still available and can - to some extent - use the new geodetic +transformation features. + +The internal architecture has also seen many changes and much +improvement. So far, these improvements respect the existing +programming interface. But the process has revealed a need to simplify +and reduce the code base, in order to support sustained active +development. + +!!! +!!! Therefore we have scheduled regular releases over the coming years +!!! which will gradually remove the old programming interface. +!!! +!!! This will cause breaking changes with the next two major version +!!! releases, which will affect all projects that depend on PROJ +!!! (cf. section "deprecations" below). +!!! + +The decision to break the existing API has not been easy, but has +ultimately been deemed necessary to ensure the long term survival of +the project. Not only by improving the maintainability immensely, but +also by extending the potential user (and hence developer) community. + +The end goal is to deliver a generic coordinate transformation +software package with a clean and concise code base appealing to +both users and developers. + + +VERSIONING AND NAMING +--------------------- + +For the first time in more than 25 years the major version number of +the software is changed. The decision to do this is based on the many +new features and new API. While backwards compatibility remains - +except in a few rare corner cases - the addition of a new and improved +programming interface warrants a new major release. + +The new major version number unfortunately leaves the project in a bit +of a conundrum regarding the name. For the majority of the life-time +of the product it has been known as PROJ.4, but since we have now +reached version 5 the name is no longer aligned with the version +number. + +Hence we have decided to decouple the name from the version number and +from this version and onwards the product will simply be called PROJ. + +In recognition of the history of the software we are keeping PROJ.4 as +the *name of the organizing project*. The same project team also +produces the datum-grid package. + +In summary: + +o The PROJ.4 project provides the product PROJ, which is now at + version 5.0.0. + +o The foundational component of PROJ is the library libproj. + +o Other PROJ components include the application proj, which provides + a command line interface to libproj. + +o The PROJ.4 project also distributes the datum-grid package, + which at the time of writing is at version 1.6.0. + + + UPDATES + ------- + + o Introduced new API in proj.h. + - The new API is orthogonal to the existing proj_api.h API and the + internally used projects.h API. + - The new API adds the ability to transform spatiotemporal (4D) + coordinates. + - Functions in the new API use the "proj_" namespace. + - Data types in the new API use the "PJ_" namespace, with a few + historic exceptions such as XY, XYZ, LP and LPZ. + + o Introduced the concept of "transformation pipelines" that makes it + possible to do complex geodetic transformations of spatiotemporal + coordinates by daisy chaining simple coordinate operations. + + o Introduced cct, the Coordinate Conversion and Transformation + application. + + o Introduced gie, the Geospatial Integrity Investigation Environment. + - Selftest invoked by -C flag in proj has been removed + - Ported approx. 1300 built-in selftests to gie format + - Ported approx. 1000 tests from the gigs test framework + - Added approx. 200 new tests + + o Adopted terminology from the OGC/ISO-19100 geospatial standards + series. Key definitions are: + - At the most generic level, a *coordinate operation* is a change + of coordinates, based on a one-to-one relationship, from one + coordinate reference system to another. + - A *transformation* is a coordinate operation in which the two + coordinate reference systems are based on different datums, e.g. + a change from a global reference frame to a regional frame. + - A *conversion* is a coordinate operation in which both + coordinate reference systems are based on the same datum, + e.g. change of units of coordinates. + - A *projection* is a coordinate conversion from an ellipsoidal + coordinate system to a plane. Although projections are simply + conversions according to the standard, they are treated as + separate entities in PROJ as they make up the vast majority + of operations in the library. + + o New operations: + - The pipeline operator (pipeline) + - Transformations: + + Helmert transform (helmert) + + Horner real and complex polynomial evaluation (horner) + + Horizontal gridshift (hgridshift) + + Vertical gridshift (vgridshift) + + Molodensky transform (molodensky) + + Kinematic gridshift with deformation model (deformation) + - Conversions: + + Unit conversion (unitconvert) + + Axis swap (axisswap) + - Projections: + + Central Conic projection (ccon) + + o Significant documentation updates, including + - Overhaul of the structure of the documentation + - A better introduction to the use of PROJ + - A complete reference to the new proj.h API + - a complete rewrite of the section on geodesic calculations + - Figures for all projections + + o New "free format" option for operation definitions, which + permits separating tokens by whitespace when specifying key/value- + pairs, e.g. "proj = merc lat_0 = 45". + + o Added metadata to init-files that can be read with the + proj_init_info() function in the new proj.h API. + + o Added ITRF2000, ITRF2008 and ITRF2014 init-files with ITRF + transformation parameters, including plate motion model + parameters. + + o Added ellipsoid parameters for GSK2011, PZ90 and "danish". The + latter is similar to the already supported andrae ellipsoid, + but has a slightly different semimajor axis. + + o Added Copenhagen prime meridian. + + o Updated EPSG database to version 9.2.0. + + o Geodesic library updated to version 1.49.1-c. + + o Support for analytical partial derivatives has been removed. + + o Improved performance in Winkel Tripel and Aitoff. + + o Introduced pj_has_inverse() function to proj_api.h. Checks if an + operation has an inverse. Use this instead of checking whether + P->inv exists, since that can no longer be relied on. + + o Removed support for Windows CE. + + o Removed the VB6 COM interface. + + BUG FIXES + ------------ + + All bug fix numbers refer to issues indexed at + https://github.com/OSGeo/proj.4/issues/ + + o Fixed incorrect convergence calculation in Lambert Conformal + Conic. #16. + + o Handle ellipsoid parameters correctly when using +nadgrids=@null. + #22. + + o Return correct latitude when using negative northings in + Transverse Mercator (tmerc). #138. + + o Return correct result at origin in inverse Mod. Stererographic + of Alaska. #161. + + o Return correct result at origin in inverse Mod. Stererographic + of 48 U.S. #162. + + o Return correct result at origin in inverse Mod. Stererographic + of 50 U.S. #163. + + o Return correct result at origin in inverse Lee Oblated + Stereographic. #164. + + o Return correct result at origin in inverse Miller Oblated + Stereographic. #164. + + o Fixed scaling and wrap-around issues in Oblique Cylindrical + Equal Area. #166. + + o Corrected a coefficient error in inverse Transverse Mercator. #174. + + o Respect -r flag when calling proj with -V. #184. + + o Remove multiplication by 2 at the equator error in Stereographic + projection. #194. + + o Allow +alpha=0 and +gamma=0 when using Oblique Mercator. #195. + + o Return correct result of inverse Oblique Mercator when alpha is + between 90 and 270. #331. + + o Avoid segmentation fault when accessing point outside grid. #369. + + o Avoid segmentation fault on NaN input in Robin inverse. #463. + + o Very verbose use of proj (-V) on Windows is fixed. #484. + + o Fixed memory leak in General Oblique Transformation. #497. + + o Equations for meridian convergence and partial derivatives have + been corrected for non-conformal projections. #526. + + o Fixed scaling of cartesian coordiantes in pj_transform(). #726. + + o Additional bug fixes courtesy of Googles OSS-Fuzz program: + https://bugs.chromium.org/p/oss-fuzz/issues/list?can=1&q=proj4 + + + DEPRECATIONS + ------------ + + o The projects.h header and the functions related to it is + considered deprecated from version 5.0.0 and onwards. + + + !!! PROJECTS.H WILL BE REMOVED FROM THE LIBRARY !!! + !!! WITH VERSION 6.0.0 !!! + + o The nmake build system on Windows will not be supported from + version 6.0.0 on onwards. Use CMake instead. + + !!! NMAKE BUILD SYSTEM WILL BE REMOVED FROM THE LIBRARY !!! + !!! WITH VERSION 6.0.0 !!! + + o The proj_api.h header and the functions related to it is + consided deprecated from version 5.0.0 and onwards. + + !!! PROJ_API.H WILL BE REMOVED FROM THE LIBRARY !!! + !!! WITH VERSION 7.0.0 !!! + + + THANKS TO + ------------ + + Version 5.0.0 is made possible by the following contributors: + + Lukasz Komsta + Maxim Churilin + edechaux + dusanjovic + Zoltan Siki + Tom Fili + Nicolas David + Mike Toews + Micah Cochran + Luke Campbell + Ilya Oshchepkov + Adam Wulkiewicz + Jonas Tittmann + Mateusz Loskot + Etienne Jacques + Bas Couwenberg + Elliott Sales de Andrade + Charles Karney + Aaron Puchert + Julien Moquet + Charles Karney + Howard Butler + Even Rouault + Thomas Knudsen + Kristian Evers + + 4.9.3 Release Notes ------------------- -- cgit v1.2.3 From b7a09245e753b708eff4b105297a93c106bf0119 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Tue, 9 Jan 2018 16:45:52 +0100 Subject: Updated README for version 5.0.0 release. --- README | 128 ++++++++++++++++++++++------------------------------------------- 1 file changed, 42 insertions(+), 86 deletions(-) diff --git a/README b/README index aafd2dce..e2a9c713 100644 --- a/README +++ b/README @@ -1,61 +1,70 @@ - -------------------- P R O J . 4 -------------------- + -------------------- P R O J -------------------- -PROJ.4 is a cartographic projection software. +PROJ is a generic coordinate transformation software, that transforms +coordinates from one coordinate reference system (CRS) to another. This +includes cartographic projections as well as geodetic transformations. -PLEASE read the following information as well as READMEs in the src -and nad directories. +For more information on the PROJ.4 project please see the web page at: -For more information on PROJ.4 maintenance please see the web page at: + http://proj4.org/ - http://proj4.org/ +The PROJ.4 mailing list can be found at: -PROJ.4 mailing list can be found at: + http://lists.maptools.org/mailman/listinfo/proj - http://lists.maptools.org/mailman/listinfo/proj +See the NEWS file for changes between versions. - --------------------------------------------------- +The following command line utilities are included in the PROJ package: -Installation: -------------- + - proj, for cartographic projection of geodetic coordinates + - cs2cs, for transformation from one CRS to another CRS. + - geod, for geodesic (great circle) computations. + - cct, for generic Coordinate Conversions and Transformations. + - gie, the Geospatial Integrity Investigation Environment. + + + +UNIX/Linux build and installation: +--------------------------------- FSF's configuration procedure is used to ease installation of the -PROJ.4 system. +PROJ system. The default destination path prefix for installed files is /usr/local. Results from the installation script will be placed into subdirectories bin, include, lib, man/man1 and man/man3. If this default path prefix is proper, then execute: - ./configure + ./configure If another path prefix is required, then execute: - ./configure --prefix=/my/path + ./configure --prefix=/my/path In either case, the directory of the prefix path must exist and be writable by the installer. After executing configure, execute: - make - make install + make + make install The install target will create, if necessary, all required sub-directories. -Windows Build -------------- -PROJ.4 can be built with Microsoft Visual C/C++ using the makefile.vc +Windows build and installation: +------------------------------- + +PROJ can be built with Microsoft Visual C/C++ using the makefile.vc in the PROJ directory. First edit the PROJ\nmake.opt and modify the INSTDIR value at the top to point to the directory where the PROJ tree shall be installed. If you want to install into C:\PROJ, it can remain unchanged. -Then use the makefile.vc to build the software: +Then use the makefile.vc to build the software e.g.: -eg. -C:\> cd proj -C:\PROJ> nmake /f makefile.vc -C:\PROJ> nmake /f makefile.vc install-all + C:\> cd proj + C:\PROJ> nmake /f makefile.vc + C:\PROJ> nmake /f makefile.vc install-all Note that you have to have the VC++ environment variables, and path setup properly. This may involve running the VCVARS32.BAT script out @@ -63,70 +72,17 @@ of the Visual C++ tree. The makefile.vc builds proj.exe, proj.dll and proj.lib. -It should also be possible to build using the Unix instructions -and Cygwin32, but this hasn't been tested recently. - - - --------------------------------------------------- Distribution files and format. ------------------------------ Sources are distributed in one or more files. The principle elements -of the system are in a compress tar file named `PROJ.4.x.tar.gz' where -"x" will indicate level.sub-level of the release. For U.S. users -interested in NADCON datum shifting procedures, additional files -containing conversion matricies are distributed with the name -`PROJ.4.x.y.tar' where y is an uppercase letter starting with "A." -These supplementary files will contain compressed files and thus -the tar file is not compressed. - -Interim reports on Rel. 4 proj are available in PostScript form as -*.ps.gz . New and old users are strongly recommended to carefully read -these manuals. They are supplements and NOT a replacement for the full -manual OF 90-284 (which new users should also obtain). - - --------------------------------------------------- - -Principle new aspects of system: --------------------------------- - -ANSI X3.159-1989 C code. Site must have ANSI C compiler and header files. - -Several method of determining radius from specified ellipsoid. - -Use of initialization files through +init=file:key. Default projection -specifications also may be defined in an ASCII file. - -+inv option REMOVED and -I may be used in its place. Use of invproj -alias of proj still functions as per Rel.3. - -+ellps=list and +proj=list REMOVED. Use respective -le and -lp. - -+units= to specify cartesian coordinate system units. To get list -use -lu. - --v added to dump final cartographic parameters employed. - -Addition of computing scale factors and angular distortion added through --S option. Valuable for designing new projection parameter details. - --V option which verbosely lists projected point characteristics. - -Programmers may use projection library with calls to pj_init, -pj_fwd, pj_inv and pj_transform. - -Program nad2nad for conversion of data to and from NAD27 and NAD83 -datums. - -Program cs2cs for converting between coordinate systems, with optional -datum translation. - -------------------------------------------------------------- - -Things currently left undone: ----------------------------- - -proj_def.dat NOT fully in place. Needs additional settings for -many of the projections. Probably will not be completed until main -manual rewritten. +of the system are in a compress tar file named `PROJ-x.y.z.tar.gz' where +"x" will indicate major release number, "y" indicates minor release +number and "z" indicates the patch number of the release. + +In addition to the PROJ software package, a distribution of datum +conversion grid files is also available. The grid package is +distributed under the name `PROJ-datumgrid-x.y.zip', where "x" is the +major release version and "y" the minor release version numbers. The +grid package can be downloaded from the PROJ.4 website. -- cgit v1.2.3 From 4ffec0f7a70f344e34b9863ca8e07b88178f4241 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Wed, 10 Jan 2018 11:41:29 +0100 Subject: Bump various version numbers in preparation for v. 5.0.0 --- CMakeLists.txt | 6 +++--- configure.ac | 2 +- man/man1/cs2cs.1 | 4 ++-- man/man1/geod.1 | 2 +- man/man1/nad2nad.1 | 4 ++-- man/man1/proj.1 | 9 ++------- man/man3/geodesic.3 | 2 +- man/man3/pj_init.3 | 4 ++-- proj.spec | 18 +++++++++--------- src/Makefile.am | 2 +- src/pj_release.c | 2 +- 11 files changed, 25 insertions(+), 30 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f998011..1d1baef0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,9 +49,9 @@ colormsg(_HIBLUE_ "Configuring PROJ:") #PROJ version information ################################################################################# include(Proj4Version) -proj_version(MAJOR 4 MINOR 9 PATCH 3) -set(PROJ_API_VERSION "12") -set(PROJ_BUILD_VERSION "12.0.0") +proj_version(MAJOR 5 MINOR 0 PATCH 0) +set(PROJ_API_VERSION "13") +set(PROJ_BUILD_VERSION "13.0.1") ################################################################################# # Build features and variants diff --git a/configure.ac b/configure.ac index e99389ee..072b27d0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([PROJ.4 Projections], 4.9.3, [warmerdam@pobox.com], proj) +AC_INIT([PROJ.4 Projections], 5.0.0, [warmerdam@pobox.com], proj) AC_CONFIG_MACRO_DIR([m4]) AC_LANG(C) diff --git a/man/man1/cs2cs.1 b/man/man1/cs2cs.1 index bfebe8ea..5d4d36d0 100644 --- a/man/man1/cs2cs.1 +++ b/man/man1/cs2cs.1 @@ -1,8 +1,8 @@ -.\" release 4 +.\" release 5 .nr LL 5.5i .ad b .hy 1 -.TH CS2CS 1 "2000/03/21 Rel. 4.4" +.TH CS2CS 1 "2018/02/15 Rel. 5.0.0" .SH NAME cs2cs \- cartographic coordinate system filter .SH SYNOPSIS diff --git a/man/man1/geod.1 b/man/man1/geod.1 index 74587612..8e4c18db 100644 --- a/man/man1/geod.1 +++ b/man/man1/geod.1 @@ -2,7 +2,7 @@ .nr LL 7.0i .ad b .hy 1 -.TH GEOD 1 "2017/04/09 Rel. 4.9.3" +.TH GEOD 1 "2018/02/15 Rel. 5.0.0" .SH NAME geod \- direct geodesic computations .br diff --git a/man/man1/nad2nad.1 b/man/man1/nad2nad.1 index c5f57c8f..c25630dc 100644 --- a/man/man1/nad2nad.1 +++ b/man/man1/nad2nad.1 @@ -1,8 +1,8 @@ -.\" release 4 +.\" release 5 .nr LL 5.5i .ad b .hy 1 -.TH NAD2NAD 1 "2000/03/21 Rel. 4.4" +.TH NAD2NAD 1 "2018/02/15 Rel. 5.0.0" .SH NAME nad2nad \- North American Datum conversion filter .SH SYNOPSIS diff --git a/man/man1/proj.1 b/man/man1/proj.1 index 6cb8ad41..44bc08b6 100644 --- a/man/man1/proj.1 +++ b/man/man1/proj.1 @@ -1,8 +1,8 @@ -.\" release 4 +.\" release 5 .nr LL 5.5i .ad b .hy 1 -.TH PROJ 1 "2000/03/21 Rel. 4.4" +.TH PROJ 1 "2018/02/25 Rel. 5.0.0" .SH NAME proj \- forward cartographic projection filter .br @@ -52,11 +52,6 @@ process and allows bypassing formatting operations. Selects binary input only (see .B \-b option). .TP -.BI \-C -Check. Invoke all built in self tests and report. -Get more verbose report by preceding with the -.B \-V option). -.TP .BI \-I alternate method to specify inverse projection. Redundant when used with diff --git a/man/man3/geodesic.3 b/man/man3/geodesic.3 index 52f9b042..6e3c9447 100644 --- a/man/man3/geodesic.3 +++ b/man/man3/geodesic.3 @@ -1,6 +1,6 @@ .\" @(#)geodesic.3 .nr LL 7.0i -.TH GEODESIC 3 "2017/04/09 Rel. 4.9.3" +.TH GEODESIC 3 "2018/02/15 Rel. 5.0.0" .ad b .hy 1 .SH NAME diff --git a/man/man3/pj_init.3 b/man/man3/pj_init.3 index 4c989ced..ae830e71 100644 --- a/man/man3/pj_init.3 +++ b/man/man3/pj_init.3 @@ -1,6 +1,6 @@ -.\" @(#)pj_init.3 - 4.1 +.\" @(#)pj_init.3 - 5.0.0 .nr LL 5.5i -.TH PJ_INIT 3U "2001/04/05 Rel. 4.4" +.TH PJ_INIT 3U "2018/02/15 Rel. 5.0.0" .ad b .hy 1 .SH NAME diff --git a/proj.spec b/proj.spec index 3d0714cb..2e050c41 100644 --- a/proj.spec +++ b/proj.spec @@ -1,13 +1,13 @@ %define PACKAGE_NAME proj -%define PACKAGE_VERSION 4.9.3 -%define PACKAGE_URL http://trac.osgeo.org/proj +%define PACKAGE_VERSION 5.0.0 +%define PACKAGE_URL http://proj4.org %define _prefix /usr -Summary: Cartographic projection software +Summary: Cartographic projection and geodetic transformation software Name: %PACKAGE_NAME Version: %PACKAGE_VERSION Release: 1 -Source0: proj-4.9.3.tar.gz +Source0: proj-5.0.0.tar.gz License: MIT, Copyright (c) 2000, Frank Warmerdam Group: Applications/GIS Vendor: Intevation GmbH @@ -19,12 +19,12 @@ BuildRequires: libtool Conflicts: PROJ.4 %description -This package offers commandline tools and a library for performing respective -forward and inverse transformation of cartographic data to or from cartesian -data with a wide range of selectable projection functions. +PROJ is a generic coordinate transformation software, that transforms +coordinates from one coordinate reference system (CRS) to another. This +includes cartographic projections as well as geodetic transformations. %prep -%setup -D -n proj-4.9.3 +%setup -D -n proj-5.0.0 %{_builddir}/%{name}-%{version}/autogen.sh %configure @@ -36,7 +36,7 @@ rm -rf $RPM_BUILD_ROOT %makeinstall %clean -rm -rf %{_builddir}/proj-4.9.3 +rm -rf %{_builddir}/proj-5.0.0 rm -rf $RPM_BUILD_ROOT %files diff --git a/src/Makefile.am b/src/Makefile.am index e7e53394..aebfc22b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -40,7 +40,7 @@ geodtest_LDADD = libproj.la lib_LTLIBRARIES = libproj.la -libproj_la_LDFLAGS = -no-undefined -version-info 12:0:0 +libproj_la_LDFLAGS = -no-undefined -version-info 13:0:1 libproj_la_SOURCES = \ pj_list.h proj_internal.h\ diff --git a/src/pj_release.c b/src/pj_release.c index 41d02a8b..fdd66f90 100644 --- a/src/pj_release.c +++ b/src/pj_release.c @@ -2,7 +2,7 @@ #include -char const pj_release[]="Rel. 5.0.0, development version"; +char const pj_release[]="Rel. 5.0.0, 15 february 2018"; const char *pj_get_release() -- cgit v1.2.3 From 22f5b764f35febf66293c81189a55e20939cea04 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Wed, 10 Jan 2018 11:42:21 +0100 Subject: Updated HOWTO-RELEASE to reflect the current state of affairs [skip ci] --- HOWTO-RELEASE | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/HOWTO-RELEASE b/HOWTO-RELEASE index d9b2f693..d862c8ab 100644 --- a/HOWTO-RELEASE +++ b/HOWTO-RELEASE @@ -1,18 +1,21 @@ Preparing a PROJ.4 Release ========================== -1) Update the version number in configure.in (in AC_INIT()). +1) Update the version number in configure.ac (in AC_INIT()). 1a) Update the version number in PROJ_BUILD_VERSION in CMakeLists.txt 1b) Update the version number in doc/source/conf.py + 1c) Update version numbers in man pages in man/man1/ and man/man3/ 2) Update the version number in proj_api.h (#define PJ_VERSION). + 2a) Update PROJ_VERSION_MAJOR, PROJ_VERSION_MINOR and PROJ_VERSION_PATCH + in src/proj.h + 3) Update the version number, and date in src/pj_release.c. 4) Update the version number in the -version-info definition in - src/Makefile.am. It consists of "current:revision:age". Set - the same in the PROJ_SOVERSION variable in CMakeLists.txt + src/Makefile.am. It consists of "current:revision:age". 4a) Increment PROJ_BUILD_VERSION in CMakeLists.txt to follow libtool versioning @@ -44,13 +47,11 @@ 8) If this is a major release, prepare a branch. - svn copy https://svn.osgeo.org/metacrs/proj/trunk \ - https://svn.osgeo.org/metacrs/proj/branches/4.7 + git checkout -b 5.0 -9) Tag the release set in SVN +9) Tag the release - svn copy https://svn.osgeo.org/metacrs/proj/branches/4.7 \ - https://svn.osgeo.org/metacrs/proj/tags/4.7.0 + git tag 5.0.0 10) Do a "make dist-all" in the proj root directory. After some grinding this should result in files like proj-4.4.3.tar.gz and proj-4.4.3.zip @@ -64,9 +65,9 @@ 12) Announce the new release on the PROJ.4 and MetaCRS mailing lists. -13) Issue a new release report on Freshmeat. +13) Issue a new release report on GitHub: - http://freshmeat.net/projects/proj.4/ + https://github.com/OSGeo/proj.4/releases/new NOTES: -- cgit v1.2.3 From c0099e5ad4515e4ee1d672328731b004071489f4 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Thu, 1 Feb 2018 20:01:52 +0100 Subject: Make sure to mark parameters used when found with pj_param_exists. Closes #752 --- src/pj_init.c | 1 - src/pj_param.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pj_init.c b/src/pj_init.c index 51a742c7..0acc6c71 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -554,7 +554,6 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { curr = pj_param_exists (start, "proj"); if (0==curr) return pj_dealloc_params (ctx, start, PJD_ERR_PROJ_NOT_NAMED); - curr->used = 1; name = curr->param; if (strlen (name) < 6) return pj_dealloc_params (ctx, start, PJD_ERR_PROJ_NOT_NAMED); diff --git a/src/pj_param.c b/src/pj_param.c index 72175ed9..133f3ea6 100644 --- a/src/pj_param.c +++ b/src/pj_param.c @@ -75,8 +75,10 @@ paralist *pj_param_exists (paralist *list, const char *parameter) { return 0; for (next = list; next; next = next->next) { - if (0==strncmp (parameter, next->param, len) && (next->param[len]=='=' || next->param[len]==0)) + if (0==strncmp (parameter, next->param, len) && (next->param[len]=='=' || next->param[len]==0)) { + next->used = 1; return next; + } if (0==strcmp (parameter, "step")) return 0; } -- cgit v1.2.3 From 85cf25a6c293c3805fb7133f4c583dd36e7e57c5 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Fri, 2 Feb 2018 10:33:40 +0100 Subject: PJ_omerc: Guard against asin calls with arg numerically greater than 1 --- src/PJ_omerc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PJ_omerc.c b/src/PJ_omerc.c index 22f0daca..eca5b241 100644 --- a/src/PJ_omerc.c +++ b/src/PJ_omerc.c @@ -177,12 +177,12 @@ PJ *PROJECTION(omerc) { } if (alp || gam) { if (alp) { - gamma0 = asin(sin(alpha_c) / D); + gamma0 = aasin(P->ctx, sin(alpha_c) / D); if (!gam) gamma = alpha_c; } else - alpha_c = asin(D*sin(gamma0 = gamma)); - P->lam0 = lamc - asin(.5 * (F - 1. / F) * + alpha_c = aasin(P->ctx, D*sin(gamma0 = gamma)); + P->lam0 = lamc - aasin(P->ctx, .5 * (F - 1. / F) * tan(gamma0)) / Q->B; } else { H = pow(pj_tsfn(phi1, sin(phi1), P->e), Q->B); @@ -199,7 +199,7 @@ PJ *PROJECTION(omerc) { J * tan(.5 * Q->B * (lam1 - lam2)) / p) / Q->B); gamma0 = atan(2. * sin(Q->B * adjlon(lam1 - P->lam0)) / (F - 1. / F)); - gamma = alpha_c = asin(D * sin(gamma0)); + gamma = alpha_c = aasin(P->ctx, D * sin(gamma0)); } Q->singam = sin(gamma0); Q->cosgam = cos(gamma0); -- cgit v1.2.3 From c75d1879e5c465f168fcd8800b11044ee3738dee Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Fri, 2 Feb 2018 01:03:25 +0100 Subject: Improve tests and add test files to automake setup. Make sure that the gie files in test/gie and test/gigs are included in the distribution tarball. Tests with gie are set up to run all available files matching *.gie in the gie and gigs directories. For this reason tests that are known to fail in gigs/ have been renamed to *.gie_failing, so that "make check" can be run in-tree in local copies of the git repository. --- Makefile.am | 2 +- configure.ac | 1 + nad/Makefile.am | 7 +- test/Makefile.am | 12 + test/gie/Makefile.am | 9 + test/gigs/5101.4-jhs.gie | 300 ---------------------- test/gigs/5101.4-jhs.gie_failing | 300 ++++++++++++++++++++++ test/gigs/5102.2.gie | 252 ------------------ test/gigs/5102.2.gie_failing | 252 ++++++++++++++++++ test/gigs/5104.gie | 264 ------------------- test/gigs/5104.gie_failing | 264 +++++++++++++++++++ test/gigs/5105.1.gie | 300 ---------------------- test/gigs/5105.1.gie_failing | 300 ++++++++++++++++++++++ test/gigs/5108.gie | 228 ----------------- test/gigs/5108.gie_failing | 228 +++++++++++++++++ test/gigs/5110.gie | 164 ------------ test/gigs/5110.gie_failing | 164 ++++++++++++ test/gigs/5111.2.gie | 444 -------------------------------- test/gigs/5111.2.gie_failing | 444 ++++++++++++++++++++++++++++++++ test/gigs/5203.1.gie | 192 -------------- test/gigs/5203.1.gie_failing | 192 ++++++++++++++ test/gigs/5204.1.gie | 192 -------------- test/gigs/5204.1.gie_failing | 192 ++++++++++++++ test/gigs/5205.1.gie | 192 -------------- test/gigs/5205.1.gie_failing | 192 ++++++++++++++ test/gigs/5206.gie | 540 --------------------------------------- test/gigs/5206.gie_failing | 540 +++++++++++++++++++++++++++++++++++++++ test/gigs/5207.1.gie | 252 ------------------ test/gigs/5207.1.gie_failing | 252 ++++++++++++++++++ test/gigs/5207.2.gie | 456 --------------------------------- test/gigs/5207.2.gie_failing | 456 +++++++++++++++++++++++++++++++++ test/gigs/Makefile.am | 18 ++ 32 files changed, 3818 insertions(+), 3783 deletions(-) create mode 100644 test/Makefile.am create mode 100644 test/gie/Makefile.am delete mode 100644 test/gigs/5101.4-jhs.gie create mode 100644 test/gigs/5101.4-jhs.gie_failing delete mode 100644 test/gigs/5102.2.gie create mode 100644 test/gigs/5102.2.gie_failing delete mode 100644 test/gigs/5104.gie create mode 100644 test/gigs/5104.gie_failing delete mode 100644 test/gigs/5105.1.gie create mode 100644 test/gigs/5105.1.gie_failing delete mode 100644 test/gigs/5108.gie create mode 100644 test/gigs/5108.gie_failing delete mode 100644 test/gigs/5110.gie create mode 100644 test/gigs/5110.gie_failing delete mode 100644 test/gigs/5111.2.gie create mode 100644 test/gigs/5111.2.gie_failing delete mode 100644 test/gigs/5203.1.gie create mode 100644 test/gigs/5203.1.gie_failing delete mode 100644 test/gigs/5204.1.gie create mode 100644 test/gigs/5204.1.gie_failing delete mode 100644 test/gigs/5205.1.gie create mode 100644 test/gigs/5205.1.gie_failing delete mode 100644 test/gigs/5206.gie create mode 100644 test/gigs/5206.gie_failing delete mode 100644 test/gigs/5207.1.gie create mode 100644 test/gigs/5207.1.gie_failing delete mode 100644 test/gigs/5207.2.gie create mode 100644 test/gigs/5207.2.gie_failing create mode 100644 test/gigs/Makefile.am diff --git a/Makefile.am b/Makefile.am index 3795cfdb..692e8a21 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = src man nad jniwrap cmake +SUBDIRS = src man nad jniwrap cmake test EXTRA_DIST = makefile.vc nmake.opt CMakeLists.txt diff --git a/configure.ac b/configure.ac index 072b27d0..4893646e 100644 --- a/configure.ac +++ b/configure.ac @@ -131,6 +131,7 @@ AC_SUBST(MUTEX_SETTING,$MUTEX_SETTING) AC_SUBST(THREAD_LIB,$THREAD_LIB) AC_CONFIG_FILES([Makefile cmake/Makefile src/Makefile + test/Makefile test/gie/Makefile test/gigs/Makefile man/Makefile man/man1/Makefile man/man3/Makefile nad/Makefile jniwrap/Makefile jniwrap/org/Makefile jniwrap/org/proj4/Makefile]) AC_CONFIG_FILES([nad/install], [chmod +x nad/install]) diff --git a/nad/Makefile.am b/nad/Makefile.am index af466df8..99d00da3 100644 --- a/nad/Makefile.am +++ b/nad/Makefile.am @@ -1,11 +1,8 @@ # Executables paths passed to test scripts NADPATH = $(top_srcdir)/nad -GIETESTPATH = $(top_srcdir)/test/gie -GIGSTESTPATH = $(top_srcdir)/test/gigs EXEPATH = ../src PROJEXE = $(EXEPATH)/proj CS2CSEXE = $(EXEPATH)/cs2cs -GIEEXE = $(EXEPATH)/gie # PROJ.4 test scripts TEST27 = $(NADPATH)/test27 @@ -26,7 +23,7 @@ EXTRA_DIST = GL27 nad.lst proj_def.dat nad27 nad83 pj_out27.dist pj_out83.dist t testflaky testvarious testdatumfile testntv2 ntv2_out.dist \ esri.extra other.extra \ CH IGNF testIGNF proj_outIGNF.dist \ - ITRF2000 ITRF2008 ITRF2014 + ITRF2000 ITRF2008 ITRF2014 \ makefile.vc CMakeLists.txt process-nad2bin: @@ -90,8 +87,6 @@ check-local: process-nad2bin export PROJ_LIB=. ; \ $(TESTNTV2) $(CS2CSEXE) ; \ fi - $(GIEEXE) $(GIETESTPATH)/*.gie -#$(GIEEXE) $(GIGSTESTPATH)/*.gie clean-local: $(RM) $(TEST_DB) diff --git a/test/Makefile.am b/test/Makefile.am new file mode 100644 index 00000000..0cb83342 --- /dev/null +++ b/test/Makefile.am @@ -0,0 +1,12 @@ +EXEPATH = ../src +GIEEXE = $(EXEPATH)/gie +GIETESTS = gie +GIGSTESTS = gigs + +SUBDIRS = gie gigs + +EXTRA_DIST = CMakeLists.txt + +check-local: + $(GIEEXE) $(GIETESTS)/*.gie + $(GIEEXE) $(GIGSTESTS)/*.gie diff --git a/test/gie/Makefile.am b/test/gie/Makefile.am new file mode 100644 index 00000000..291bc3f7 --- /dev/null +++ b/test/gie/Makefile.am @@ -0,0 +1,9 @@ +EXTRA_DIST = 4D-API_cs2cs-style.gie \ + GDA.gie \ + Makefile.am \ + axisswap.gie \ + builtins.gie \ + deformation.gie \ + ellipsoid.gie \ + more_builtins.gie \ + unitconvert.gie diff --git a/test/gigs/5101.4-jhs.gie b/test/gigs/5101.4-jhs.gie deleted file mode 100644 index 615bf60b..00000000 --- a/test/gigs/5101.4-jhs.gie +++ /dev/null @@ -1,300 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5101 (part 4), Transverse Mercator, v2-0_2011-06-28, recommended JHS formula - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4190 +inv - +step +init=epsg:22175 --------------------------------------------------------------------------------- -tolerance 0.03 m -accept -63.9993433 80.0002644 -expect 5422500.0 18889800.0 - -tolerance 0.03 m -accept -63.9998472 60.0001191 -expect 5276900.0 16662800.0 - -tolerance 0.03 m -accept -63.9997361 40.0003081 -expect 5158399.999 14439199.99 - -tolerance 0.03 m -accept -64.0004605 19.9996448 -expect 5081100.0 12219300.0 - -tolerance 0.03 m -accept -63.9996186 0.0003092 -expect 5054400.005 10002000.0 - -tolerance 0.03 m -accept -64.0004675 -19.9999283 -expect 5081100.017 7784599.993 - -tolerance 0.03 m -accept -63.9997001 -39.9996924 -expect 5158400.0 5564800.0 - -tolerance 0.03 m -accept -63.9998814 -60.0004008 -expect 5276899.994 3341099.995 - -tolerance 0.03 m -accept -63.9991006 -79.9996521 -expect 5422500.0 1114200.0 - -tolerance 0.03 m -accept -70.0002089 -40.000215 -expect 4645300.113 5524200.123 - -tolerance 0.03 m -accept -69.0001441 -40.0002935 -expect 4730900.0 5533400.0 - -tolerance 0.03 m -accept -67.9995333 -39.9996136 -expect 4816500.043 5541700.028 - -tolerance 0.03 m -accept -66.9998073 -39.9999313 -expect 4902000.0 5548900.0 - -tolerance 0.03 m -accept -65.9996522 -39.9995894 -expect 4987500.009 5555200.001 - -tolerance 0.03 m -accept -64.9992796 -40.000411 -expect 5073000.0 5560400.0 - -tolerance 0.03 m -accept -63.9997 -39.9996925 -expect 5158400.01 5564799.987 - -tolerance 0.03 m -accept -62.9999842 -40.0002087 -expect 5243800.0 5568100.0 - -tolerance 0.03 m -accept -62.0000778 -40.0001803 -expect 5329199.995 5570500.009 - -tolerance 0.03 m -accept -61.0000574 -39.9996182 -expect 5414600.0 5572000.0 - -tolerance 0.03 m -accept -60 -40.0003306 -expect 5500000.0 5572399.996 - -tolerance 0.03 m -accept -58.9999426 -39.9996182 -expect 5585400.0 5572000.0 - -tolerance 0.03 m -accept -57.9999222 -40.0001803 -expect 5670800.005 5570500.009 - -tolerance 0.03 m -accept -57.0000158 -40.0002087 -expect 5756200.0 5568100.0 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:22175 +inv - +step +init=epsg:4190 --------------------------------------------------------------------------------- -tolerance 0.03 m -accept 5422500.0 18889800.0 -expect -63.9993433 80.0002644 - -tolerance 0.03 m -accept 5276900.0 16662800.0 -expect -63.9998472 60.0001191 - -tolerance 0.03 m -accept 5158399.999 14439199.99 -expect -63.9997361 40.0003081 - -tolerance 0.03 m -accept 5081100.0 12219300.0 -expect -64.0004605 19.9996448 - -tolerance 0.03 m -accept 5054400.005 10002000.0 -expect -63.9996186 0.0003092 - -tolerance 0.03 m -accept 5081100.017 7784599.993 -expect -64.0004675 -19.9999283 - -tolerance 0.03 m -accept 5158400.0 5564800.0 -expect -63.9997001 -39.9996924 - -tolerance 0.03 m -accept 5276899.994 3341099.995 -expect -63.9998814 -60.0004008 - -tolerance 0.03 m -accept 5422500.0 1114200.0 -expect -63.9991006 -79.9996521 - -tolerance 0.03 m -accept 4645300.113 5524200.123 -expect -70.0002089 -40.000215 - -tolerance 0.03 m -accept 4730900.0 5533400.0 -expect -69.0001441 -40.0002935 - -tolerance 0.03 m -accept 4816500.043 5541700.028 -expect -67.9995333 -39.9996136 - -tolerance 0.03 m -accept 4902000.0 5548900.0 -expect -66.9998073 -39.9999313 - -tolerance 0.03 m -accept 4987500.009 5555200.001 -expect -65.9996522 -39.9995894 - -tolerance 0.03 m -accept 5073000.0 5560400.0 -expect -64.9992796 -40.000411 - -tolerance 0.03 m -accept 5158400.01 5564799.987 -expect -63.9997 -39.9996925 - -tolerance 0.03 m -accept 5243800.0 5568100.0 -expect -62.9999842 -40.0002087 - -tolerance 0.03 m -accept 5329199.995 5570500.009 -expect -62.0000778 -40.0001803 - -tolerance 0.03 m -accept 5414600.0 5572000.0 -expect -61.0000574 -39.9996182 - -tolerance 0.03 m -accept 5500000.0 5572399.996 -expect -60 -40.0003306 - -tolerance 0.03 m -accept 5585400.0 5572000.0 -expect -58.9999426 -39.9996182 - -tolerance 0.03 m -accept 5670800.005 5570500.009 -expect -57.9999222 -40.0001803 - -tolerance 0.03 m -accept 5756200.0 5568100.0 -expect -57.0000158 -40.0002087 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4190 +inv - +step +init=epsg:22175 --------------------------------------------------------------------------------- -tolerance 0.006 m -accept -63.9993433 80.0002644 -roundtrip 1000 - -tolerance 0.006 m -accept -63.9998472 60.0001191 -roundtrip 1000 - -tolerance 0.006 m -accept -63.9997361 40.0003081 -roundtrip 1000 - -tolerance 0.006 m -accept -64.0004605 19.9996448 -roundtrip 1000 - -tolerance 0.006 m -accept -63.9996186 0.0003092 -roundtrip 1000 - -tolerance 0.006 m -accept -64.0004675 -19.9999283 -roundtrip 1000 - -tolerance 0.006 m -accept -63.9997001 -39.9996924 -roundtrip 1000 - -tolerance 0.006 m -accept -63.9998814 -60.0004008 -roundtrip 1000 - -tolerance 0.006 m -accept -63.9991006 -79.9996521 -roundtrip 1000 - -tolerance 0.006 m -accept -70.0002089 -40.000215 -roundtrip 1000 - -tolerance 0.006 m -accept -69.0001441 -40.0002935 -roundtrip 1000 - -tolerance 0.006 m -accept -67.9995333 -39.9996136 -roundtrip 1000 - -tolerance 0.006 m -accept -66.9998073 -39.9999313 -roundtrip 1000 - -tolerance 0.006 m -accept -65.9996522 -39.9995894 -roundtrip 1000 - -tolerance 0.006 m -accept -64.9992796 -40.000411 -roundtrip 1000 - -tolerance 0.006 m -accept -63.9997 -39.9996925 -roundtrip 1000 - -tolerance 0.006 m -accept -62.9999842 -40.0002087 -roundtrip 1000 - -tolerance 0.006 m -accept -62.0000778 -40.0001803 -roundtrip 1000 - -tolerance 0.006 m -accept -61.0000574 -39.9996182 -roundtrip 1000 - -tolerance 0.006 m -accept -60 -40.0003306 -roundtrip 1000 - -tolerance 0.006 m -accept -58.9999426 -39.9996182 -roundtrip 1000 - -tolerance 0.006 m -accept -57.9999222 -40.0001803 -roundtrip 1000 - -tolerance 0.006 m -accept -57.0000158 -40.0002087 -roundtrip 1000 - - diff --git a/test/gigs/5101.4-jhs.gie_failing b/test/gigs/5101.4-jhs.gie_failing new file mode 100644 index 00000000..615bf60b --- /dev/null +++ b/test/gigs/5101.4-jhs.gie_failing @@ -0,0 +1,300 @@ +-------------------------------------------------------------------------------- + +Test 5101 (part 4), Transverse Mercator, v2-0_2011-06-28, recommended JHS formula + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4190 +inv + +step +init=epsg:22175 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept -63.9993433 80.0002644 +expect 5422500.0 18889800.0 + +tolerance 0.03 m +accept -63.9998472 60.0001191 +expect 5276900.0 16662800.0 + +tolerance 0.03 m +accept -63.9997361 40.0003081 +expect 5158399.999 14439199.99 + +tolerance 0.03 m +accept -64.0004605 19.9996448 +expect 5081100.0 12219300.0 + +tolerance 0.03 m +accept -63.9996186 0.0003092 +expect 5054400.005 10002000.0 + +tolerance 0.03 m +accept -64.0004675 -19.9999283 +expect 5081100.017 7784599.993 + +tolerance 0.03 m +accept -63.9997001 -39.9996924 +expect 5158400.0 5564800.0 + +tolerance 0.03 m +accept -63.9998814 -60.0004008 +expect 5276899.994 3341099.995 + +tolerance 0.03 m +accept -63.9991006 -79.9996521 +expect 5422500.0 1114200.0 + +tolerance 0.03 m +accept -70.0002089 -40.000215 +expect 4645300.113 5524200.123 + +tolerance 0.03 m +accept -69.0001441 -40.0002935 +expect 4730900.0 5533400.0 + +tolerance 0.03 m +accept -67.9995333 -39.9996136 +expect 4816500.043 5541700.028 + +tolerance 0.03 m +accept -66.9998073 -39.9999313 +expect 4902000.0 5548900.0 + +tolerance 0.03 m +accept -65.9996522 -39.9995894 +expect 4987500.009 5555200.001 + +tolerance 0.03 m +accept -64.9992796 -40.000411 +expect 5073000.0 5560400.0 + +tolerance 0.03 m +accept -63.9997 -39.9996925 +expect 5158400.01 5564799.987 + +tolerance 0.03 m +accept -62.9999842 -40.0002087 +expect 5243800.0 5568100.0 + +tolerance 0.03 m +accept -62.0000778 -40.0001803 +expect 5329199.995 5570500.009 + +tolerance 0.03 m +accept -61.0000574 -39.9996182 +expect 5414600.0 5572000.0 + +tolerance 0.03 m +accept -60 -40.0003306 +expect 5500000.0 5572399.996 + +tolerance 0.03 m +accept -58.9999426 -39.9996182 +expect 5585400.0 5572000.0 + +tolerance 0.03 m +accept -57.9999222 -40.0001803 +expect 5670800.005 5570500.009 + +tolerance 0.03 m +accept -57.0000158 -40.0002087 +expect 5756200.0 5568100.0 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:22175 +inv + +step +init=epsg:4190 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 5422500.0 18889800.0 +expect -63.9993433 80.0002644 + +tolerance 0.03 m +accept 5276900.0 16662800.0 +expect -63.9998472 60.0001191 + +tolerance 0.03 m +accept 5158399.999 14439199.99 +expect -63.9997361 40.0003081 + +tolerance 0.03 m +accept 5081100.0 12219300.0 +expect -64.0004605 19.9996448 + +tolerance 0.03 m +accept 5054400.005 10002000.0 +expect -63.9996186 0.0003092 + +tolerance 0.03 m +accept 5081100.017 7784599.993 +expect -64.0004675 -19.9999283 + +tolerance 0.03 m +accept 5158400.0 5564800.0 +expect -63.9997001 -39.9996924 + +tolerance 0.03 m +accept 5276899.994 3341099.995 +expect -63.9998814 -60.0004008 + +tolerance 0.03 m +accept 5422500.0 1114200.0 +expect -63.9991006 -79.9996521 + +tolerance 0.03 m +accept 4645300.113 5524200.123 +expect -70.0002089 -40.000215 + +tolerance 0.03 m +accept 4730900.0 5533400.0 +expect -69.0001441 -40.0002935 + +tolerance 0.03 m +accept 4816500.043 5541700.028 +expect -67.9995333 -39.9996136 + +tolerance 0.03 m +accept 4902000.0 5548900.0 +expect -66.9998073 -39.9999313 + +tolerance 0.03 m +accept 4987500.009 5555200.001 +expect -65.9996522 -39.9995894 + +tolerance 0.03 m +accept 5073000.0 5560400.0 +expect -64.9992796 -40.000411 + +tolerance 0.03 m +accept 5158400.01 5564799.987 +expect -63.9997 -39.9996925 + +tolerance 0.03 m +accept 5243800.0 5568100.0 +expect -62.9999842 -40.0002087 + +tolerance 0.03 m +accept 5329199.995 5570500.009 +expect -62.0000778 -40.0001803 + +tolerance 0.03 m +accept 5414600.0 5572000.0 +expect -61.0000574 -39.9996182 + +tolerance 0.03 m +accept 5500000.0 5572399.996 +expect -60 -40.0003306 + +tolerance 0.03 m +accept 5585400.0 5572000.0 +expect -58.9999426 -39.9996182 + +tolerance 0.03 m +accept 5670800.005 5570500.009 +expect -57.9999222 -40.0001803 + +tolerance 0.03 m +accept 5756200.0 5568100.0 +expect -57.0000158 -40.0002087 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4190 +inv + +step +init=epsg:22175 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept -63.9993433 80.0002644 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9998472 60.0001191 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9997361 40.0003081 +roundtrip 1000 + +tolerance 0.006 m +accept -64.0004605 19.9996448 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9996186 0.0003092 +roundtrip 1000 + +tolerance 0.006 m +accept -64.0004675 -19.9999283 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9997001 -39.9996924 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9998814 -60.0004008 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9991006 -79.9996521 +roundtrip 1000 + +tolerance 0.006 m +accept -70.0002089 -40.000215 +roundtrip 1000 + +tolerance 0.006 m +accept -69.0001441 -40.0002935 +roundtrip 1000 + +tolerance 0.006 m +accept -67.9995333 -39.9996136 +roundtrip 1000 + +tolerance 0.006 m +accept -66.9998073 -39.9999313 +roundtrip 1000 + +tolerance 0.006 m +accept -65.9996522 -39.9995894 +roundtrip 1000 + +tolerance 0.006 m +accept -64.9992796 -40.000411 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9997 -39.9996925 +roundtrip 1000 + +tolerance 0.006 m +accept -62.9999842 -40.0002087 +roundtrip 1000 + +tolerance 0.006 m +accept -62.0000778 -40.0001803 +roundtrip 1000 + +tolerance 0.006 m +accept -61.0000574 -39.9996182 +roundtrip 1000 + +tolerance 0.006 m +accept -60 -40.0003306 +roundtrip 1000 + +tolerance 0.006 m +accept -58.9999426 -39.9996182 +roundtrip 1000 + +tolerance 0.006 m +accept -57.9999222 -40.0001803 +roundtrip 1000 + +tolerance 0.006 m +accept -57.0000158 -40.0002087 +roundtrip 1000 + + diff --git a/test/gigs/5102.2.gie b/test/gigs/5102.2.gie deleted file mode 100644 index db812dbd..00000000 --- a/test/gigs/5102.2.gie +++ /dev/null @@ -1,252 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5102 (part 2), Lambert Conic Conformal (1SP), v2-0_2011-06-28. - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4807 +inv - +step +init=epsg:27572 --------------------------------------------------------------------------------- -tolerance 0.03 m -accept 2.9586342556 64.4444444444 -expect 760724.023 3457334.864 - -tolerance 0.03 m -accept 2.9586342556 63.3333333333 -expect 764567.882 3343917.044 - -tolerance 0.03 m -accept 2.9586342556 62.2222222222 -expect 768397.648 3230915.06 - -tolerance 0.03 m -accept 2.9586342556 61.1111111111 -expect 772214.859 3118283.535 - -tolerance 0.03 m -accept 2.9586342556 60 -expect 776020.989 3005978.979 - -tolerance 0.03 m -accept 2.9586342556 58.8888888889 -expect 779817.454 2893959.584 - -tolerance 0.03 m -accept 1.8475231444 56.6666666667 -expect 717027.602 2668679.866 - -tolerance 0.03 m -accept 1.8475231444 55.5555555556 -expect 719385.487 2557240.347 - -tolerance 0.03 m -accept 1.8475231444 54.4444444444 -expect 721740.59 2445932.319 - -tolerance 0.03 m -accept 1.8475231444 52 -expect 726915.726 2201342.51839 - -tolerance 0.03 m -accept 0.7364120333 58.8888888889 -expect 644765.081 2891102.088 - -tolerance 0.03 m -accept 1.8475231444 58.8888888889 -expect 712300.356 2892101.266 - -tolerance 0.03 m -accept 2.9586342556 58.8888888889 -expect 779817.454 2893959.584 - -tolerance 0.03 m -accept 4.0697453667 58.8888888889 -expect 847305.444 2896676.742 - -tolerance 0.03 m -accept 5.1808564778 58.8888888889 -expect 914753.403 2900252.301 - -tolerance 0.03 m -accept 6.2919675889 58.8888888889 -expect 982150.413 2904685.68 - -tolerance 0.03 m -accept 7.4030787 58.8888888889 -expect 1049485.565 2909976.163 - -tolerance 0.03 m -accept 8.5141898111 58.8888888889 -expect 1116747.958 2916122.894 - -tolerance 0.03 m -accept 9.6253009222 58.8888888889 -expect 1183926.705 2923124.876 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:27572 +inv - +step +init=epsg:4807 --------------------------------------------------------------------------------- -tolerance 0.03 m -accept 760724.023 3457334.864 -expect 2.9586342556 64.4444444444 - -tolerance 0.03 m -accept 764567.882 3343917.044 -expect 2.9586342556 63.3333333333 - -tolerance 0.03 m -accept 768397.648 3230915.06 -expect 2.9586342556 62.2222222222 - -tolerance 0.03 m -accept 772214.859 3118283.535 -expect 2.9586342556 61.1111111111 - -tolerance 0.03 m -accept 776020.989 3005978.979 -expect 2.9586342556 60 - -tolerance 0.03 m -accept 779817.454 2893959.584 -expect 2.9586342556 58.8888888889 - -tolerance 0.03 m -accept 717027.602 2668679.866 -expect 1.8475231444 56.6666666667 - -tolerance 0.03 m -accept 719385.487 2557240.347 -expect 1.8475231444 55.5555555556 - -tolerance 0.03 m -accept 721740.59 2445932.319 -expect 1.8475231444 54.4444444444 - -tolerance 0.03 m -accept 726915.726 2201342.51839 -expect 1.8475231444 52 - -tolerance 0.03 m -accept 644765.081 2891102.088 -expect 0.7364120333 58.8888888889 - -tolerance 0.03 m -accept 712300.356 2892101.266 -expect 1.8475231444 58.8888888889 - -tolerance 0.03 m -accept 779817.454 2893959.584 -expect 2.9586342556 58.8888888889 - -tolerance 0.03 m -accept 847305.444 2896676.742 -expect 4.0697453667 58.8888888889 - -tolerance 0.03 m -accept 914753.403 2900252.301 -expect 5.1808564778 58.8888888889 - -tolerance 0.03 m -accept 982150.413 2904685.68 -expect 6.2919675889 58.8888888889 - -tolerance 0.03 m -accept 1049485.565 2909976.163 -expect 7.4030787 58.8888888889 - -tolerance 0.03 m -accept 1116747.958 2916122.894 -expect 8.5141898111 58.8888888889 - -tolerance 0.03 m -accept 1183926.705 2923124.876 -expect 9.6253009222 58.8888888889 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4807 +inv - +step +init=epsg:27572 --------------------------------------------------------------------------------- -tolerance 0.006 m -accept 2.9586342556 64.4444444444 -roundtrip 1000 - -tolerance 0.006 m -accept 2.9586342556 63.3333333333 -roundtrip 1000 - -tolerance 0.006 m -accept 2.9586342556 62.2222222222 -roundtrip 1000 - -tolerance 0.006 m -accept 2.9586342556 61.1111111111 -roundtrip 1000 - -tolerance 0.006 m -accept 2.9586342556 60 -roundtrip 1000 - -tolerance 0.006 m -accept 2.9586342556 58.8888888889 -roundtrip 1000 - -tolerance 0.006 m -accept 1.8475231444 56.6666666667 -roundtrip 1000 - -tolerance 0.006 m -accept 1.8475231444 55.5555555556 -roundtrip 1000 - -tolerance 0.006 m -accept 1.8475231444 54.4444444444 -roundtrip 1000 - -tolerance 0.006 m -accept 1.8475231444 52 -roundtrip 1000 - -tolerance 0.006 m -accept 0.7364120333 58.8888888889 -roundtrip 1000 - -tolerance 0.006 m -accept 1.8475231444 58.8888888889 -roundtrip 1000 - -tolerance 0.006 m -accept 2.9586342556 58.8888888889 -roundtrip 1000 - -tolerance 0.006 m -accept 4.0697453667 58.8888888889 -roundtrip 1000 - -tolerance 0.006 m -accept 5.1808564778 58.8888888889 -roundtrip 1000 - -tolerance 0.006 m -accept 6.2919675889 58.8888888889 -roundtrip 1000 - -tolerance 0.006 m -accept 7.4030787 58.8888888889 -roundtrip 1000 - -tolerance 0.006 m -accept 8.5141898111 58.8888888889 -roundtrip 1000 - -tolerance 0.006 m -accept 9.6253009222 58.8888888889 -roundtrip 1000 - - diff --git a/test/gigs/5102.2.gie_failing b/test/gigs/5102.2.gie_failing new file mode 100644 index 00000000..db812dbd --- /dev/null +++ b/test/gigs/5102.2.gie_failing @@ -0,0 +1,252 @@ +-------------------------------------------------------------------------------- + +Test 5102 (part 2), Lambert Conic Conformal (1SP), v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4807 +inv + +step +init=epsg:27572 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 2.9586342556 64.4444444444 +expect 760724.023 3457334.864 + +tolerance 0.03 m +accept 2.9586342556 63.3333333333 +expect 764567.882 3343917.044 + +tolerance 0.03 m +accept 2.9586342556 62.2222222222 +expect 768397.648 3230915.06 + +tolerance 0.03 m +accept 2.9586342556 61.1111111111 +expect 772214.859 3118283.535 + +tolerance 0.03 m +accept 2.9586342556 60 +expect 776020.989 3005978.979 + +tolerance 0.03 m +accept 2.9586342556 58.8888888889 +expect 779817.454 2893959.584 + +tolerance 0.03 m +accept 1.8475231444 56.6666666667 +expect 717027.602 2668679.866 + +tolerance 0.03 m +accept 1.8475231444 55.5555555556 +expect 719385.487 2557240.347 + +tolerance 0.03 m +accept 1.8475231444 54.4444444444 +expect 721740.59 2445932.319 + +tolerance 0.03 m +accept 1.8475231444 52 +expect 726915.726 2201342.51839 + +tolerance 0.03 m +accept 0.7364120333 58.8888888889 +expect 644765.081 2891102.088 + +tolerance 0.03 m +accept 1.8475231444 58.8888888889 +expect 712300.356 2892101.266 + +tolerance 0.03 m +accept 2.9586342556 58.8888888889 +expect 779817.454 2893959.584 + +tolerance 0.03 m +accept 4.0697453667 58.8888888889 +expect 847305.444 2896676.742 + +tolerance 0.03 m +accept 5.1808564778 58.8888888889 +expect 914753.403 2900252.301 + +tolerance 0.03 m +accept 6.2919675889 58.8888888889 +expect 982150.413 2904685.68 + +tolerance 0.03 m +accept 7.4030787 58.8888888889 +expect 1049485.565 2909976.163 + +tolerance 0.03 m +accept 8.5141898111 58.8888888889 +expect 1116747.958 2916122.894 + +tolerance 0.03 m +accept 9.6253009222 58.8888888889 +expect 1183926.705 2923124.876 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:27572 +inv + +step +init=epsg:4807 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 760724.023 3457334.864 +expect 2.9586342556 64.4444444444 + +tolerance 0.03 m +accept 764567.882 3343917.044 +expect 2.9586342556 63.3333333333 + +tolerance 0.03 m +accept 768397.648 3230915.06 +expect 2.9586342556 62.2222222222 + +tolerance 0.03 m +accept 772214.859 3118283.535 +expect 2.9586342556 61.1111111111 + +tolerance 0.03 m +accept 776020.989 3005978.979 +expect 2.9586342556 60 + +tolerance 0.03 m +accept 779817.454 2893959.584 +expect 2.9586342556 58.8888888889 + +tolerance 0.03 m +accept 717027.602 2668679.866 +expect 1.8475231444 56.6666666667 + +tolerance 0.03 m +accept 719385.487 2557240.347 +expect 1.8475231444 55.5555555556 + +tolerance 0.03 m +accept 721740.59 2445932.319 +expect 1.8475231444 54.4444444444 + +tolerance 0.03 m +accept 726915.726 2201342.51839 +expect 1.8475231444 52 + +tolerance 0.03 m +accept 644765.081 2891102.088 +expect 0.7364120333 58.8888888889 + +tolerance 0.03 m +accept 712300.356 2892101.266 +expect 1.8475231444 58.8888888889 + +tolerance 0.03 m +accept 779817.454 2893959.584 +expect 2.9586342556 58.8888888889 + +tolerance 0.03 m +accept 847305.444 2896676.742 +expect 4.0697453667 58.8888888889 + +tolerance 0.03 m +accept 914753.403 2900252.301 +expect 5.1808564778 58.8888888889 + +tolerance 0.03 m +accept 982150.413 2904685.68 +expect 6.2919675889 58.8888888889 + +tolerance 0.03 m +accept 1049485.565 2909976.163 +expect 7.4030787 58.8888888889 + +tolerance 0.03 m +accept 1116747.958 2916122.894 +expect 8.5141898111 58.8888888889 + +tolerance 0.03 m +accept 1183926.705 2923124.876 +expect 9.6253009222 58.8888888889 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4807 +inv + +step +init=epsg:27572 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 2.9586342556 64.4444444444 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9586342556 63.3333333333 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9586342556 62.2222222222 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9586342556 61.1111111111 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9586342556 60 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9586342556 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 1.8475231444 56.6666666667 +roundtrip 1000 + +tolerance 0.006 m +accept 1.8475231444 55.5555555556 +roundtrip 1000 + +tolerance 0.006 m +accept 1.8475231444 54.4444444444 +roundtrip 1000 + +tolerance 0.006 m +accept 1.8475231444 52 +roundtrip 1000 + +tolerance 0.006 m +accept 0.7364120333 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 1.8475231444 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9586342556 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 4.0697453667 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 5.1808564778 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 6.2919675889 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 7.4030787 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 8.5141898111 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 9.6253009222 58.8888888889 +roundtrip 1000 + + diff --git a/test/gigs/5104.gie b/test/gigs/5104.gie deleted file mode 100644 index 10c42935..00000000 --- a/test/gigs/5104.gie +++ /dev/null @@ -1,264 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5104, Oblique stereographic, v2-0_2011-06-28. - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4289 +inv - +step +init=epsg:28992 --------------------------------------------------------------------------------- -tolerance 0.05 m -accept 5 58 -expect 132023.27 1114054.87 - -tolerance 0.05 m -accept 5 57 -expect 131405.466 1002468.081 - -tolerance 0.05 m -accept 5 56 -expect 130792.264 890981.281 - -tolerance 0.05 m -accept 5 55 -expect 130183.56 779577.7 - -tolerance 0.05 m -accept 5 54 -expect 129579.26 668240.58 - -tolerance 0.05 m -accept 5 53 -expect 128979.26 556953.19 - -tolerance 0.05 m -accept 5.38763888889 52.1561605556 -expect 155000 463000 - -tolerance 0.05 m -accept 4 51 -expect 57605.946 335312.662 - -tolerance 0.05 m -accept 4 50 -expect 55502.306 224086.514 - -tolerance 0.05 m -accept 4.0 49.0 -expect 53412.76 112842.73 - -tolerance 0.05 m -accept 3.31372805556 47.9752611111 -expect 0 0 - -tolerance 0.05 m -accept 3 53 -expect -5253.06 559535.55 - -tolerance 0.05 m -accept 4 53 -expect 61856.78 557779.12 - -tolerance 0.05 m -accept 5 53 -expect 128979.26 556953.19 - -tolerance 0.05 m -accept 6 53 -expect 196105.28 557057.74 - -tolerance 0.05 m -accept 7 53 -expect 263225.72 558092.77 - -tolerance 0.05 m -accept 8 53 -expect 330331.46 560058.31 - -tolerance 0.05 m -accept 9 53 -expect 397413.385 562954.436 - -tolerance 0.05 m -accept 10 53 -expect 464462.35 566781.24 - -tolerance 0.05 m -accept 11 53 -expect 531469.2 571538.84 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:28992 +inv - +step +init=epsg:4289 --------------------------------------------------------------------------------- -tolerance 0.05 m -accept 132023.27 1114054.87 -expect 5 58 - -tolerance 0.05 m -accept 131405.466 1002468.081 -expect 5 57 - -tolerance 0.05 m -accept 130792.264 890981.281 -expect 5 56 - -tolerance 0.05 m -accept 130183.56 779577.7 -expect 5 55 - -tolerance 0.05 m -accept 129579.26 668240.58 -expect 5 54 - -tolerance 0.05 m -accept 128979.26 556953.19 -expect 5 53 - -tolerance 0.05 m -accept 155000 463000 -expect 5.38763888889 52.1561605556 - -tolerance 0.05 m -accept 57605.946 335312.662 -expect 4 51 - -tolerance 0.05 m -accept 55502.306 224086.514 -expect 4 50 - -tolerance 0.05 m -accept 53412.76 112842.73 -expect 4.0 49.0 - -tolerance 0.05 m -accept 0 0 -expect 3.31372805556 47.9752611111 - -tolerance 0.05 m -accept -5253.06 559535.55 -expect 3 53 - -tolerance 0.05 m -accept 61856.78 557779.12 -expect 4 53 - -tolerance 0.05 m -accept 128979.26 556953.19 -expect 5 53 - -tolerance 0.05 m -accept 196105.28 557057.74 -expect 6 53 - -tolerance 0.05 m -accept 263225.72 558092.77 -expect 7 53 - -tolerance 0.05 m -accept 330331.46 560058.31 -expect 8 53 - -tolerance 0.05 m -accept 397413.385 562954.436 -expect 9 53 - -tolerance 0.05 m -accept 464462.35 566781.24 -expect 10 53 - -tolerance 0.05 m -accept 531469.2 571538.84 -expect 11 53 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4289 +inv - +step +init=epsg:28992 --------------------------------------------------------------------------------- -tolerance 0.006 m -accept 5 58 -roundtrip 1000 - -tolerance 0.006 m -accept 5 57 -roundtrip 1000 - -tolerance 0.006 m -accept 5 56 -roundtrip 1000 - -tolerance 0.006 m -accept 5 55 -roundtrip 1000 - -tolerance 0.006 m -accept 5 54 -roundtrip 1000 - -tolerance 0.006 m -accept 5 53 -roundtrip 1000 - -tolerance 0.006 m -accept 5.38763888889 52.1561605556 -roundtrip 1000 - -tolerance 0.006 m -accept 4 51 -roundtrip 1000 - -tolerance 0.006 m -accept 4 50 -roundtrip 1000 - -tolerance 0.006 m -accept 4.0 49.0 -roundtrip 1000 - -tolerance 0.006 m -accept 3.31372805556 47.9752611111 -roundtrip 1000 - -tolerance 0.006 m -accept 3 53 -roundtrip 1000 - -tolerance 0.006 m -accept 4 53 -roundtrip 1000 - -tolerance 0.006 m -accept 5 53 -roundtrip 1000 - -tolerance 0.006 m -accept 6 53 -roundtrip 1000 - -tolerance 0.006 m -accept 7 53 -roundtrip 1000 - -tolerance 0.006 m -accept 8 53 -roundtrip 1000 - -tolerance 0.006 m -accept 9 53 -roundtrip 1000 - -tolerance 0.006 m -accept 10 53 -roundtrip 1000 - -tolerance 0.006 m -accept 11 53 -roundtrip 1000 - - diff --git a/test/gigs/5104.gie_failing b/test/gigs/5104.gie_failing new file mode 100644 index 00000000..10c42935 --- /dev/null +++ b/test/gigs/5104.gie_failing @@ -0,0 +1,264 @@ +-------------------------------------------------------------------------------- + +Test 5104, Oblique stereographic, v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4289 +inv + +step +init=epsg:28992 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 5 58 +expect 132023.27 1114054.87 + +tolerance 0.05 m +accept 5 57 +expect 131405.466 1002468.081 + +tolerance 0.05 m +accept 5 56 +expect 130792.264 890981.281 + +tolerance 0.05 m +accept 5 55 +expect 130183.56 779577.7 + +tolerance 0.05 m +accept 5 54 +expect 129579.26 668240.58 + +tolerance 0.05 m +accept 5 53 +expect 128979.26 556953.19 + +tolerance 0.05 m +accept 5.38763888889 52.1561605556 +expect 155000 463000 + +tolerance 0.05 m +accept 4 51 +expect 57605.946 335312.662 + +tolerance 0.05 m +accept 4 50 +expect 55502.306 224086.514 + +tolerance 0.05 m +accept 4.0 49.0 +expect 53412.76 112842.73 + +tolerance 0.05 m +accept 3.31372805556 47.9752611111 +expect 0 0 + +tolerance 0.05 m +accept 3 53 +expect -5253.06 559535.55 + +tolerance 0.05 m +accept 4 53 +expect 61856.78 557779.12 + +tolerance 0.05 m +accept 5 53 +expect 128979.26 556953.19 + +tolerance 0.05 m +accept 6 53 +expect 196105.28 557057.74 + +tolerance 0.05 m +accept 7 53 +expect 263225.72 558092.77 + +tolerance 0.05 m +accept 8 53 +expect 330331.46 560058.31 + +tolerance 0.05 m +accept 9 53 +expect 397413.385 562954.436 + +tolerance 0.05 m +accept 10 53 +expect 464462.35 566781.24 + +tolerance 0.05 m +accept 11 53 +expect 531469.2 571538.84 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:28992 +inv + +step +init=epsg:4289 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 132023.27 1114054.87 +expect 5 58 + +tolerance 0.05 m +accept 131405.466 1002468.081 +expect 5 57 + +tolerance 0.05 m +accept 130792.264 890981.281 +expect 5 56 + +tolerance 0.05 m +accept 130183.56 779577.7 +expect 5 55 + +tolerance 0.05 m +accept 129579.26 668240.58 +expect 5 54 + +tolerance 0.05 m +accept 128979.26 556953.19 +expect 5 53 + +tolerance 0.05 m +accept 155000 463000 +expect 5.38763888889 52.1561605556 + +tolerance 0.05 m +accept 57605.946 335312.662 +expect 4 51 + +tolerance 0.05 m +accept 55502.306 224086.514 +expect 4 50 + +tolerance 0.05 m +accept 53412.76 112842.73 +expect 4.0 49.0 + +tolerance 0.05 m +accept 0 0 +expect 3.31372805556 47.9752611111 + +tolerance 0.05 m +accept -5253.06 559535.55 +expect 3 53 + +tolerance 0.05 m +accept 61856.78 557779.12 +expect 4 53 + +tolerance 0.05 m +accept 128979.26 556953.19 +expect 5 53 + +tolerance 0.05 m +accept 196105.28 557057.74 +expect 6 53 + +tolerance 0.05 m +accept 263225.72 558092.77 +expect 7 53 + +tolerance 0.05 m +accept 330331.46 560058.31 +expect 8 53 + +tolerance 0.05 m +accept 397413.385 562954.436 +expect 9 53 + +tolerance 0.05 m +accept 464462.35 566781.24 +expect 10 53 + +tolerance 0.05 m +accept 531469.2 571538.84 +expect 11 53 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4289 +inv + +step +init=epsg:28992 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 5 58 +roundtrip 1000 + +tolerance 0.006 m +accept 5 57 +roundtrip 1000 + +tolerance 0.006 m +accept 5 56 +roundtrip 1000 + +tolerance 0.006 m +accept 5 55 +roundtrip 1000 + +tolerance 0.006 m +accept 5 54 +roundtrip 1000 + +tolerance 0.006 m +accept 5 53 +roundtrip 1000 + +tolerance 0.006 m +accept 5.38763888889 52.1561605556 +roundtrip 1000 + +tolerance 0.006 m +accept 4 51 +roundtrip 1000 + +tolerance 0.006 m +accept 4 50 +roundtrip 1000 + +tolerance 0.006 m +accept 4.0 49.0 +roundtrip 1000 + +tolerance 0.006 m +accept 3.31372805556 47.9752611111 +roundtrip 1000 + +tolerance 0.006 m +accept 3 53 +roundtrip 1000 + +tolerance 0.006 m +accept 4 53 +roundtrip 1000 + +tolerance 0.006 m +accept 5 53 +roundtrip 1000 + +tolerance 0.006 m +accept 6 53 +roundtrip 1000 + +tolerance 0.006 m +accept 7 53 +roundtrip 1000 + +tolerance 0.006 m +accept 8 53 +roundtrip 1000 + +tolerance 0.006 m +accept 9 53 +roundtrip 1000 + +tolerance 0.006 m +accept 10 53 +roundtrip 1000 + +tolerance 0.006 m +accept 11 53 +roundtrip 1000 + + diff --git a/test/gigs/5105.1.gie b/test/gigs/5105.1.gie deleted file mode 100644 index a0803d2b..00000000 --- a/test/gigs/5105.1.gie +++ /dev/null @@ -1,300 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5105 (part 1), Oblique Mercator (variant B), v2-0_2011-06-28. - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4742 +inv - +step +proj=somerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +no_uoff +gamma=53.13010236111111 +ellps=GRS80 +units=m +no_defs --------------------------------------------------------------------------------- -tolerance 0.05 m -accept 117 12 -expect 807919.14 1329535.33 - -tolerance 0.05 m -accept 117 10 -expect 808784.98 1107678.47 - -tolerance 0.05 m -accept 117 9 -expect 809334.18 996918.21 - -tolerance 0.05 m -accept 117 8 -expect 809939.3 886240.18 - -tolerance 0.05 m -accept 116.8465522 6.8784583 -expect 793704.63 762081.05 - -tolerance 0.05 m -accept 117 6 -expect 811253.3 665041.27 - -tolerance 0.05 m -accept 117 5 -expect 811930.35 554475.63 - -tolerance 0.05 m -accept 117 4 -expect 812599.58 443902.71 - -tolerance 0.05 m -accept 115 4 -expect 590521.15 442890.86 - -tolerance 0.05 m -accept 117 3 -expect 813245.13 333300.13 - -tolerance 0.05 m -accept 117 2 -expect 813851.07 222645.51 - -tolerance 0.05 m -accept 117.0 1.0 -expect 814401.38 111916.45 - -tolerance 0.05 m -accept 109.6858208 -0.0001733 -expect 0 0 - -tolerance 0.05 m -accept 123 6 -expect 1475669.28 673118.57 - -tolerance 0.05 m -accept 122 6 -expect 1364854.86 671146.25 - -tolerance 0.05 m -accept 121 6 -expect 1254086.17 669446.25 - -tolerance 0.05 m -accept 120.0 6.0 -expect 1143352.6 668002.07 - -tolerance 0.05 m -accept 119.0 6.0 -expect 1032643.31 666797.35 - -tolerance 0.05 m -accept 118.0 6.0 -expect 921947.29 665815.82 - -tolerance 0.05 m -accept 117.0 6.0 -expect 811253.3 665041.27 - -tolerance 0.05 m -accept 116.0 6.0 -expect 700549.97 664457.59 - -tolerance 0.05 m -accept 115.0 6.0 -expect 589825.71 664048.72 - -tolerance 0.05 m -accept 114 6 -expect 479068.802 663798.63 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +proj=somerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +no_uoff +gamma=53.13010236111111 +ellps=GRS80 +units=m +no_defs +inv - +step +init=epsg:4742 --------------------------------------------------------------------------------- -tolerance 0.05 m -accept 807919.14 1329535.33 -expect 117 12 - -tolerance 0.05 m -accept 808784.98 1107678.47 -expect 117 10 - -tolerance 0.05 m -accept 809334.18 996918.21 -expect 117 9 - -tolerance 0.05 m -accept 809939.3 886240.18 -expect 117 8 - -tolerance 0.05 m -accept 793704.63 762081.05 -expect 116.8465522 6.8784583 - -tolerance 0.05 m -accept 811253.3 665041.27 -expect 117 6 - -tolerance 0.05 m -accept 811930.35 554475.63 -expect 117 5 - -tolerance 0.05 m -accept 812599.58 443902.71 -expect 117 4 - -tolerance 0.05 m -accept 590521.15 442890.86 -expect 115 4 - -tolerance 0.05 m -accept 813245.13 333300.13 -expect 117 3 - -tolerance 0.05 m -accept 813851.07 222645.51 -expect 117 2 - -tolerance 0.05 m -accept 814401.38 111916.45 -expect 117.0 1.0 - -tolerance 0.05 m -accept 0 0 -expect 109.6858208 -0.0001733 - -tolerance 0.05 m -accept 1475669.28 673118.57 -expect 123 6 - -tolerance 0.05 m -accept 1364854.86 671146.25 -expect 122 6 - -tolerance 0.05 m -accept 1254086.17 669446.25 -expect 121 6 - -tolerance 0.05 m -accept 1143352.6 668002.07 -expect 120.0 6.0 - -tolerance 0.05 m -accept 1032643.31 666797.35 -expect 119.0 6.0 - -tolerance 0.05 m -accept 921947.29 665815.82 -expect 118.0 6.0 - -tolerance 0.05 m -accept 811253.3 665041.27 -expect 117.0 6.0 - -tolerance 0.05 m -accept 700549.97 664457.59 -expect 116.0 6.0 - -tolerance 0.05 m -accept 589825.71 664048.72 -expect 115.0 6.0 - -tolerance 0.05 m -accept 479068.802 663798.63 -expect 114 6 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4742 +inv - +step +proj=somerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +no_uoff +gamma=53.13010236111111 +ellps=GRS80 +units=m +no_defs --------------------------------------------------------------------------------- -tolerance 0.006 m -accept 117 12 -roundtrip 1000 - -tolerance 0.006 m -accept 117 10 -roundtrip 1000 - -tolerance 0.006 m -accept 117 9 -roundtrip 1000 - -tolerance 0.006 m -accept 117 8 -roundtrip 1000 - -tolerance 0.006 m -accept 116.8465522 6.8784583 -roundtrip 1000 - -tolerance 0.006 m -accept 117 6 -roundtrip 1000 - -tolerance 0.006 m -accept 117 5 -roundtrip 1000 - -tolerance 0.006 m -accept 117 4 -roundtrip 1000 - -tolerance 0.006 m -accept 115 4 -roundtrip 1000 - -tolerance 0.006 m -accept 117 3 -roundtrip 1000 - -tolerance 0.006 m -accept 117 2 -roundtrip 1000 - -tolerance 0.006 m -accept 117.0 1.0 -roundtrip 1000 - -tolerance 0.006 m -accept 109.6858208 -0.0001733 -roundtrip 1000 - -tolerance 0.006 m -accept 123 6 -roundtrip 1000 - -tolerance 0.006 m -accept 122 6 -roundtrip 1000 - -tolerance 0.006 m -accept 121 6 -roundtrip 1000 - -tolerance 0.006 m -accept 120.0 6.0 -roundtrip 1000 - -tolerance 0.006 m -accept 119.0 6.0 -roundtrip 1000 - -tolerance 0.006 m -accept 118.0 6.0 -roundtrip 1000 - -tolerance 0.006 m -accept 117.0 6.0 -roundtrip 1000 - -tolerance 0.006 m -accept 116.0 6.0 -roundtrip 1000 - -tolerance 0.006 m -accept 115.0 6.0 -roundtrip 1000 - -tolerance 0.006 m -accept 114 6 -roundtrip 1000 - - diff --git a/test/gigs/5105.1.gie_failing b/test/gigs/5105.1.gie_failing new file mode 100644 index 00000000..a0803d2b --- /dev/null +++ b/test/gigs/5105.1.gie_failing @@ -0,0 +1,300 @@ +-------------------------------------------------------------------------------- + +Test 5105 (part 1), Oblique Mercator (variant B), v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4742 +inv + +step +proj=somerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +no_uoff +gamma=53.13010236111111 +ellps=GRS80 +units=m +no_defs +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 117 12 +expect 807919.14 1329535.33 + +tolerance 0.05 m +accept 117 10 +expect 808784.98 1107678.47 + +tolerance 0.05 m +accept 117 9 +expect 809334.18 996918.21 + +tolerance 0.05 m +accept 117 8 +expect 809939.3 886240.18 + +tolerance 0.05 m +accept 116.8465522 6.8784583 +expect 793704.63 762081.05 + +tolerance 0.05 m +accept 117 6 +expect 811253.3 665041.27 + +tolerance 0.05 m +accept 117 5 +expect 811930.35 554475.63 + +tolerance 0.05 m +accept 117 4 +expect 812599.58 443902.71 + +tolerance 0.05 m +accept 115 4 +expect 590521.15 442890.86 + +tolerance 0.05 m +accept 117 3 +expect 813245.13 333300.13 + +tolerance 0.05 m +accept 117 2 +expect 813851.07 222645.51 + +tolerance 0.05 m +accept 117.0 1.0 +expect 814401.38 111916.45 + +tolerance 0.05 m +accept 109.6858208 -0.0001733 +expect 0 0 + +tolerance 0.05 m +accept 123 6 +expect 1475669.28 673118.57 + +tolerance 0.05 m +accept 122 6 +expect 1364854.86 671146.25 + +tolerance 0.05 m +accept 121 6 +expect 1254086.17 669446.25 + +tolerance 0.05 m +accept 120.0 6.0 +expect 1143352.6 668002.07 + +tolerance 0.05 m +accept 119.0 6.0 +expect 1032643.31 666797.35 + +tolerance 0.05 m +accept 118.0 6.0 +expect 921947.29 665815.82 + +tolerance 0.05 m +accept 117.0 6.0 +expect 811253.3 665041.27 + +tolerance 0.05 m +accept 116.0 6.0 +expect 700549.97 664457.59 + +tolerance 0.05 m +accept 115.0 6.0 +expect 589825.71 664048.72 + +tolerance 0.05 m +accept 114 6 +expect 479068.802 663798.63 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +proj=somerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +no_uoff +gamma=53.13010236111111 +ellps=GRS80 +units=m +no_defs +inv + +step +init=epsg:4742 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 807919.14 1329535.33 +expect 117 12 + +tolerance 0.05 m +accept 808784.98 1107678.47 +expect 117 10 + +tolerance 0.05 m +accept 809334.18 996918.21 +expect 117 9 + +tolerance 0.05 m +accept 809939.3 886240.18 +expect 117 8 + +tolerance 0.05 m +accept 793704.63 762081.05 +expect 116.8465522 6.8784583 + +tolerance 0.05 m +accept 811253.3 665041.27 +expect 117 6 + +tolerance 0.05 m +accept 811930.35 554475.63 +expect 117 5 + +tolerance 0.05 m +accept 812599.58 443902.71 +expect 117 4 + +tolerance 0.05 m +accept 590521.15 442890.86 +expect 115 4 + +tolerance 0.05 m +accept 813245.13 333300.13 +expect 117 3 + +tolerance 0.05 m +accept 813851.07 222645.51 +expect 117 2 + +tolerance 0.05 m +accept 814401.38 111916.45 +expect 117.0 1.0 + +tolerance 0.05 m +accept 0 0 +expect 109.6858208 -0.0001733 + +tolerance 0.05 m +accept 1475669.28 673118.57 +expect 123 6 + +tolerance 0.05 m +accept 1364854.86 671146.25 +expect 122 6 + +tolerance 0.05 m +accept 1254086.17 669446.25 +expect 121 6 + +tolerance 0.05 m +accept 1143352.6 668002.07 +expect 120.0 6.0 + +tolerance 0.05 m +accept 1032643.31 666797.35 +expect 119.0 6.0 + +tolerance 0.05 m +accept 921947.29 665815.82 +expect 118.0 6.0 + +tolerance 0.05 m +accept 811253.3 665041.27 +expect 117.0 6.0 + +tolerance 0.05 m +accept 700549.97 664457.59 +expect 116.0 6.0 + +tolerance 0.05 m +accept 589825.71 664048.72 +expect 115.0 6.0 + +tolerance 0.05 m +accept 479068.802 663798.63 +expect 114 6 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4742 +inv + +step +proj=somerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +no_uoff +gamma=53.13010236111111 +ellps=GRS80 +units=m +no_defs +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 117 12 +roundtrip 1000 + +tolerance 0.006 m +accept 117 10 +roundtrip 1000 + +tolerance 0.006 m +accept 117 9 +roundtrip 1000 + +tolerance 0.006 m +accept 117 8 +roundtrip 1000 + +tolerance 0.006 m +accept 116.8465522 6.8784583 +roundtrip 1000 + +tolerance 0.006 m +accept 117 6 +roundtrip 1000 + +tolerance 0.006 m +accept 117 5 +roundtrip 1000 + +tolerance 0.006 m +accept 117 4 +roundtrip 1000 + +tolerance 0.006 m +accept 115 4 +roundtrip 1000 + +tolerance 0.006 m +accept 117 3 +roundtrip 1000 + +tolerance 0.006 m +accept 117 2 +roundtrip 1000 + +tolerance 0.006 m +accept 117.0 1.0 +roundtrip 1000 + +tolerance 0.006 m +accept 109.6858208 -0.0001733 +roundtrip 1000 + +tolerance 0.006 m +accept 123 6 +roundtrip 1000 + +tolerance 0.006 m +accept 122 6 +roundtrip 1000 + +tolerance 0.006 m +accept 121 6 +roundtrip 1000 + +tolerance 0.006 m +accept 120.0 6.0 +roundtrip 1000 + +tolerance 0.006 m +accept 119.0 6.0 +roundtrip 1000 + +tolerance 0.006 m +accept 118.0 6.0 +roundtrip 1000 + +tolerance 0.006 m +accept 117.0 6.0 +roundtrip 1000 + +tolerance 0.006 m +accept 116.0 6.0 +roundtrip 1000 + +tolerance 0.006 m +accept 115.0 6.0 +roundtrip 1000 + +tolerance 0.006 m +accept 114 6 +roundtrip 1000 + + diff --git a/test/gigs/5108.gie b/test/gigs/5108.gie deleted file mode 100644 index a5273a65..00000000 --- a/test/gigs/5108.gie +++ /dev/null @@ -1,228 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5108, Cassini-Soldner, v2-0_2011-06-28. - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4742 +inv - +step +init=epsg:3377 --------------------------------------------------------------------------------- -tolerance 0.05 m -accept 106 10 -expect 267186.017 881108.902 - -tolerance 0.05 m -accept 106 9 -expect 268006.024 770398.186 - -tolerance 0.05 m -accept 106 8 -expect 268740.351 659692.254 - -tolerance 0.05 m -accept 106 7 -expect 269388.786 548990.588 - -tolerance 0.05 m -accept 106 6 -expect 269951.141 438292.666 - -tolerance 0.05 m -accept 106 5 -expect 270427.255 327597.962 - -tolerance 0.05 m -accept 106 4 -expect 270816.99 216905.945 - -tolerance 0.05 m -accept 106 3 -expect 271120.234 106216.081 - -tolerance 0.05 m -accept 103.561065778 2.0424676812 -expect 0 0 - -tolerance 0.05 m -accept 103.64025984 1.82776484381 -expect 8813.252 -23740.095 - -tolerance 0.05 m -accept 106 1 -expect 271466.923 -115159.332 - -tolerance 0.05 m -accept 109 5 -expect 603116.703 329668.599 - -tolerance 0.05 m -accept 108 5 -expect 492221.308 328807.336 - -tolerance 0.05 m -accept 107 5 -expect 381324.74 328117.472 - -tolerance 0.05 m -accept 106 5 -expect 270427.255 327597.962 - -tolerance 0.05 m -accept 105 5 -expect 159529.111 327248.012 - -tolerance 0.05 m -accept 104 5 -expect 48630.563 327067.097 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:3377 +inv - +step +init=epsg:4742 --------------------------------------------------------------------------------- -tolerance 0.05 m -accept 267186.017 881108.902 -expect 106 10 - -tolerance 0.05 m -accept 268006.024 770398.186 -expect 106 9 - -tolerance 0.05 m -accept 268740.351 659692.254 -expect 106 8 - -tolerance 0.05 m -accept 269388.786 548990.588 -expect 106 7 - -tolerance 0.05 m -accept 269951.141 438292.666 -expect 106 6 - -tolerance 0.05 m -accept 270427.255 327597.962 -expect 106 5 - -tolerance 0.05 m -accept 270816.99 216905.945 -expect 106 4 - -tolerance 0.05 m -accept 271120.234 106216.081 -expect 106 3 - -tolerance 0.05 m -accept 0 0 -expect 103.561065778 2.0424676812 - -tolerance 0.05 m -accept 8813.252 -23740.095 -expect 103.64025984 1.82776484381 - -tolerance 0.05 m -accept 271466.923 -115159.332 -expect 106 1 - -tolerance 0.05 m -accept 603116.703 329668.599 -expect 109 5 - -tolerance 0.05 m -accept 492221.308 328807.336 -expect 108 5 - -tolerance 0.05 m -accept 381324.74 328117.472 -expect 107 5 - -tolerance 0.05 m -accept 270427.255 327597.962 -expect 106 5 - -tolerance 0.05 m -accept 159529.111 327248.012 -expect 105 5 - -tolerance 0.05 m -accept 48630.563 327067.097 -expect 104 5 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4742 +inv - +step +init=epsg:3377 --------------------------------------------------------------------------------- -tolerance 0.006 m -accept 106 10 -roundtrip 1000 - -tolerance 0.006 m -accept 106 9 -roundtrip 1000 - -tolerance 0.006 m -accept 106 8 -roundtrip 1000 - -tolerance 0.006 m -accept 106 7 -roundtrip 1000 - -tolerance 0.006 m -accept 106 6 -roundtrip 1000 - -tolerance 0.006 m -accept 106 5 -roundtrip 1000 - -tolerance 0.006 m -accept 106 4 -roundtrip 1000 - -tolerance 0.006 m -accept 106 3 -roundtrip 1000 - -tolerance 0.006 m -accept 103.561065778 2.0424676812 -roundtrip 1000 - -tolerance 0.006 m -accept 103.64025984 1.82776484381 -roundtrip 1000 - -tolerance 0.006 m -accept 106 1 -roundtrip 1000 - -tolerance 0.006 m -accept 109 5 -roundtrip 1000 - -tolerance 0.006 m -accept 108 5 -roundtrip 1000 - -tolerance 0.006 m -accept 107 5 -roundtrip 1000 - -tolerance 0.006 m -accept 106 5 -roundtrip 1000 - -tolerance 0.006 m -accept 105 5 -roundtrip 1000 - -tolerance 0.006 m -accept 104 5 -roundtrip 1000 - - diff --git a/test/gigs/5108.gie_failing b/test/gigs/5108.gie_failing new file mode 100644 index 00000000..a5273a65 --- /dev/null +++ b/test/gigs/5108.gie_failing @@ -0,0 +1,228 @@ +-------------------------------------------------------------------------------- + +Test 5108, Cassini-Soldner, v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4742 +inv + +step +init=epsg:3377 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 106 10 +expect 267186.017 881108.902 + +tolerance 0.05 m +accept 106 9 +expect 268006.024 770398.186 + +tolerance 0.05 m +accept 106 8 +expect 268740.351 659692.254 + +tolerance 0.05 m +accept 106 7 +expect 269388.786 548990.588 + +tolerance 0.05 m +accept 106 6 +expect 269951.141 438292.666 + +tolerance 0.05 m +accept 106 5 +expect 270427.255 327597.962 + +tolerance 0.05 m +accept 106 4 +expect 270816.99 216905.945 + +tolerance 0.05 m +accept 106 3 +expect 271120.234 106216.081 + +tolerance 0.05 m +accept 103.561065778 2.0424676812 +expect 0 0 + +tolerance 0.05 m +accept 103.64025984 1.82776484381 +expect 8813.252 -23740.095 + +tolerance 0.05 m +accept 106 1 +expect 271466.923 -115159.332 + +tolerance 0.05 m +accept 109 5 +expect 603116.703 329668.599 + +tolerance 0.05 m +accept 108 5 +expect 492221.308 328807.336 + +tolerance 0.05 m +accept 107 5 +expect 381324.74 328117.472 + +tolerance 0.05 m +accept 106 5 +expect 270427.255 327597.962 + +tolerance 0.05 m +accept 105 5 +expect 159529.111 327248.012 + +tolerance 0.05 m +accept 104 5 +expect 48630.563 327067.097 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:3377 +inv + +step +init=epsg:4742 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 267186.017 881108.902 +expect 106 10 + +tolerance 0.05 m +accept 268006.024 770398.186 +expect 106 9 + +tolerance 0.05 m +accept 268740.351 659692.254 +expect 106 8 + +tolerance 0.05 m +accept 269388.786 548990.588 +expect 106 7 + +tolerance 0.05 m +accept 269951.141 438292.666 +expect 106 6 + +tolerance 0.05 m +accept 270427.255 327597.962 +expect 106 5 + +tolerance 0.05 m +accept 270816.99 216905.945 +expect 106 4 + +tolerance 0.05 m +accept 271120.234 106216.081 +expect 106 3 + +tolerance 0.05 m +accept 0 0 +expect 103.561065778 2.0424676812 + +tolerance 0.05 m +accept 8813.252 -23740.095 +expect 103.64025984 1.82776484381 + +tolerance 0.05 m +accept 271466.923 -115159.332 +expect 106 1 + +tolerance 0.05 m +accept 603116.703 329668.599 +expect 109 5 + +tolerance 0.05 m +accept 492221.308 328807.336 +expect 108 5 + +tolerance 0.05 m +accept 381324.74 328117.472 +expect 107 5 + +tolerance 0.05 m +accept 270427.255 327597.962 +expect 106 5 + +tolerance 0.05 m +accept 159529.111 327248.012 +expect 105 5 + +tolerance 0.05 m +accept 48630.563 327067.097 +expect 104 5 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4742 +inv + +step +init=epsg:3377 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 106 10 +roundtrip 1000 + +tolerance 0.006 m +accept 106 9 +roundtrip 1000 + +tolerance 0.006 m +accept 106 8 +roundtrip 1000 + +tolerance 0.006 m +accept 106 7 +roundtrip 1000 + +tolerance 0.006 m +accept 106 6 +roundtrip 1000 + +tolerance 0.006 m +accept 106 5 +roundtrip 1000 + +tolerance 0.006 m +accept 106 4 +roundtrip 1000 + +tolerance 0.006 m +accept 106 3 +roundtrip 1000 + +tolerance 0.006 m +accept 103.561065778 2.0424676812 +roundtrip 1000 + +tolerance 0.006 m +accept 103.64025984 1.82776484381 +roundtrip 1000 + +tolerance 0.006 m +accept 106 1 +roundtrip 1000 + +tolerance 0.006 m +accept 109 5 +roundtrip 1000 + +tolerance 0.006 m +accept 108 5 +roundtrip 1000 + +tolerance 0.006 m +accept 107 5 +roundtrip 1000 + +tolerance 0.006 m +accept 106 5 +roundtrip 1000 + +tolerance 0.006 m +accept 105 5 +roundtrip 1000 + +tolerance 0.006 m +accept 104 5 +roundtrip 1000 + + diff --git a/test/gigs/5110.gie b/test/gigs/5110.gie deleted file mode 100644 index 2d26d1ab..00000000 --- a/test/gigs/5110.gie +++ /dev/null @@ -1,164 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5110, Lambert Azimuthal Equal Area, v2-0_2011-06-28. - --------------------------------------------------------------------------------- - -# ETRS89 -<4258> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <> - -# ETRS89 / LAEA Europe -<3035> +proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 - +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> - - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4258 +inv - +step +init=epsg:3035 --------------------------------------------------------------------------------- -tolerance 0.05 m -accept 5 70 -expect 4127824.65822 5214090.649 - -tolerance 0.05 m -accept 5 60 -expect 4041548.13 4109791.66 - -tolerance 0.05 m -accept 5 50 -expect 3962799.45 2999718.853 - -tolerance 0.05 m -accept 5 40 -expect 3892127.02 1892578.962 - -tolerance 0.05 m -accept 5 30 -expect 3830117.9 796781.677 - -tolerance 0.05 m -accept 10 52 -expect 4321000.0 3210000.0 - -tolerance 0.05 m -accept 0.0 50.0 -expect 3606514.43 3036305.967 - -tolerance 0.05 m -accept 3.0 50.0 -expect 3819948.288 3011432.894 - -tolerance 0.05 m -accept 5.0 50.0 -expect 3962799.451 2999718.853 - -tolerance 0.05 m -accept 8.0 50.0 -expect 4177612.521 2989464.315 - -tolerance 0.05 m -accept 10.0 50.0 -expect 4321000.0 2987510.567 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:3035 +inv - +step +init=epsg:4258 --------------------------------------------------------------------------------- -tolerance 0.05 m -accept 4127824.65822 5214090.649 -expect 5 70 - -tolerance 0.05 m -accept 4041548.13 4109791.66 -expect 5 60 - -tolerance 0.05 m -accept 3962799.45 2999718.853 -expect 5 50 - -tolerance 0.05 m -accept 3892127.02 1892578.962 -expect 5 40 - -tolerance 0.05 m -accept 3830117.9 796781.677 -expect 5 30 - -tolerance 0.05 m -accept 4321000.0 3210000.0 -expect 10 52 - -tolerance 0.05 m -accept 3606514.43 3036305.967 -expect 0.0 50.0 - -tolerance 0.05 m -accept 3819948.288 3011432.894 -expect 3.0 50.0 - -tolerance 0.05 m -accept 3962799.451 2999718.853 -expect 5.0 50.0 - -tolerance 0.05 m -accept 4177612.521 2989464.315 -expect 8.0 50.0 - -tolerance 0.05 m -accept 4321000.0 2987510.567 -expect 10.0 50.0 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4258 +inv - +step +init=epsg:3035 --------------------------------------------------------------------------------- -tolerance 0.006 m -accept 5 70 -roundtrip 1000 - -tolerance 0.006 m -accept 5 60 -roundtrip 1000 - -tolerance 0.006 m -accept 5 50 -roundtrip 1000 - -tolerance 0.006 m -accept 5 40 -roundtrip 1000 - -tolerance 0.006 m -accept 5 30 -roundtrip 1000 - -tolerance 0.006 m -accept 10 52 -roundtrip 1000 - -tolerance 0.006 m -accept 0.0 50.0 -roundtrip 1000 - -tolerance 0.006 m -accept 3.0 50.0 -roundtrip 1000 - -tolerance 0.006 m -accept 5.0 50.0 -roundtrip 1000 - -tolerance 0.006 m -accept 8.0 50.0 -roundtrip 1000 - -tolerance 0.006 m -accept 10.0 50.0 -roundtrip 1000 - - diff --git a/test/gigs/5110.gie_failing b/test/gigs/5110.gie_failing new file mode 100644 index 00000000..2d26d1ab --- /dev/null +++ b/test/gigs/5110.gie_failing @@ -0,0 +1,164 @@ +-------------------------------------------------------------------------------- + +Test 5110, Lambert Azimuthal Equal Area, v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + +# ETRS89 +<4258> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <> + +# ETRS89 / LAEA Europe +<3035> +proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 + +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> + + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4258 +inv + +step +init=epsg:3035 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 5 70 +expect 4127824.65822 5214090.649 + +tolerance 0.05 m +accept 5 60 +expect 4041548.13 4109791.66 + +tolerance 0.05 m +accept 5 50 +expect 3962799.45 2999718.853 + +tolerance 0.05 m +accept 5 40 +expect 3892127.02 1892578.962 + +tolerance 0.05 m +accept 5 30 +expect 3830117.9 796781.677 + +tolerance 0.05 m +accept 10 52 +expect 4321000.0 3210000.0 + +tolerance 0.05 m +accept 0.0 50.0 +expect 3606514.43 3036305.967 + +tolerance 0.05 m +accept 3.0 50.0 +expect 3819948.288 3011432.894 + +tolerance 0.05 m +accept 5.0 50.0 +expect 3962799.451 2999718.853 + +tolerance 0.05 m +accept 8.0 50.0 +expect 4177612.521 2989464.315 + +tolerance 0.05 m +accept 10.0 50.0 +expect 4321000.0 2987510.567 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:3035 +inv + +step +init=epsg:4258 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 4127824.65822 5214090.649 +expect 5 70 + +tolerance 0.05 m +accept 4041548.13 4109791.66 +expect 5 60 + +tolerance 0.05 m +accept 3962799.45 2999718.853 +expect 5 50 + +tolerance 0.05 m +accept 3892127.02 1892578.962 +expect 5 40 + +tolerance 0.05 m +accept 3830117.9 796781.677 +expect 5 30 + +tolerance 0.05 m +accept 4321000.0 3210000.0 +expect 10 52 + +tolerance 0.05 m +accept 3606514.43 3036305.967 +expect 0.0 50.0 + +tolerance 0.05 m +accept 3819948.288 3011432.894 +expect 3.0 50.0 + +tolerance 0.05 m +accept 3962799.451 2999718.853 +expect 5.0 50.0 + +tolerance 0.05 m +accept 4177612.521 2989464.315 +expect 8.0 50.0 + +tolerance 0.05 m +accept 4321000.0 2987510.567 +expect 10.0 50.0 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4258 +inv + +step +init=epsg:3035 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 5 70 +roundtrip 1000 + +tolerance 0.006 m +accept 5 60 +roundtrip 1000 + +tolerance 0.006 m +accept 5 50 +roundtrip 1000 + +tolerance 0.006 m +accept 5 40 +roundtrip 1000 + +tolerance 0.006 m +accept 5 30 +roundtrip 1000 + +tolerance 0.006 m +accept 10 52 +roundtrip 1000 + +tolerance 0.006 m +accept 0.0 50.0 +roundtrip 1000 + +tolerance 0.006 m +accept 3.0 50.0 +roundtrip 1000 + +tolerance 0.006 m +accept 5.0 50.0 +roundtrip 1000 + +tolerance 0.006 m +accept 8.0 50.0 +roundtrip 1000 + +tolerance 0.006 m +accept 10.0 50.0 +roundtrip 1000 + + diff --git a/test/gigs/5111.2.gie b/test/gigs/5111.2.gie deleted file mode 100644 index dfa6bca2..00000000 --- a/test/gigs/5111.2.gie +++ /dev/null @@ -1,444 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5111 (part 2), Mercator (variant A), v2-0_2011-06-28. - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4813 +inv - +step +proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs --------------------------------------------------------------------------------- -tolerance 0.05 m -accept -6.7200711 77.6534822 -expect 2800000.0 15000000.0 - -tolerance 0.05 m -accept -6.7200711 73.1442856 -expect 2800000.0 13000000.0 - -tolerance 0.05 m -accept -6.7200711 67.0518325 -expect 2800000.0 11000000.0 - -tolerance 0.05 m -accept -6.7200711 58.9140458 -expect 2800000.0 9000000.0 - -tolerance 0.05 m -accept -6.7200711 48.2638981 -expect 2800000.0 7000000.0 - -tolerance 0.05 m -accept -6.7200711 34.8029044 -expect 2800000.0 5000000.0 - -tolerance 0.05 m -accept -6.7200711 18.7048581 -expect 2800000.0 3000000.0 - -tolerance 0.05 m -accept -6.7200711 0.9071392 -expect 2800000.0 1000000.0 - -tolerance 0.05 m -accept 3.1922806 0.0 -expect 3900000.0 900000.0 - -tolerance 0.05 m -accept -6.7200711 0.9071392 -expect 2800000.0 800000.0 - -tolerance 0.05 m -accept -6.7200711 1.8140483 -expect 2800000.0 700000.0 - -tolerance 0.05 m -accept -6.7200711 2.0 -expect 2800000.0 679490.65 - -tolerance 0.05 m -accept -6.7200711 3.6262553 -expect 2800000.0 500000.0 - -tolerance 0.05 m -accept -6.7200711 4.531095 -expect 2800000.0 400000.0 - -tolerance 0.05 m -accept -6.7200711 5.4347892 -expect 2800000.0 300000.0 - -tolerance 0.05 m -accept -6.7200711 6.3371111 -expect 2800000.0 200000.0 - -tolerance 0.05 m -accept -6.7200711 7.2378372 -expect 2800000.0 100000.0 - -tolerance 0.05 m -accept -31.9515111 8.136745 -expect 0.0 0.0 - -tolerance 0.05 m -accept -177.8077194 2.0 -expect 23764105.84 679490.65 - -tolerance 0.05 m -accept 163.1922806 2.0 -expect 21655625.33 679490.65 - -tolerance 0.05 m -accept 133.1922806 2.0 -expect 18326445.58 679490.65 - -tolerance 0.05 m -accept 103.1922806 2.0 -expect 14997265.83 679490.65 - -tolerance 0.05 m -accept 73.1922806 2.0 -expect 11668086.08 679490.65 - -tolerance 0.05 m -accept 43.1922806 2.0 -expect 8338906.33 679490.65 - -tolerance 0.05 m -accept 13.1922806 2.0 -expect 5009726.58 679490.65 - -tolerance 0.05 m -accept 3.1922806 2.0 -expect 3900000.0 679490.65 - -tolerance 0.05 m -accept 0.0 2.0 -expect 3545744.14 679490.65 - -tolerance 0.05 m -accept -6.7200711 2.0 -expect 2800000.0 679490.65 - -tolerance 0.05 m -accept -16.8077194 2.0 -expect 1680546.83 679490.65 - -tolerance 0.05 m -accept -46.8077194 2.0 -expect -1648632.92 679490.65 - -tolerance 0.05 m -accept -76.8077194 2.0 -expect -4977812.67 679490.65 - -tolerance 0.05 m -accept -106.8077194 2.0 -expect -8306992.42 679490.65 - -tolerance 0.05 m -accept -136.8077194 2.0 -expect -11636172.17 679490.65 - -tolerance 0.05 m -accept -166.8077194 2.0 -expect -14965351.92 679490.65 - -tolerance 0.05 m -accept -175.8077194 2.0 -expect -15964105.84 679490.65 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs +inv - +step +init=epsg:4813 --------------------------------------------------------------------------------- -tolerance 0.05 m -accept 2800000.0 15000000.0 -expect -6.7200711 77.6534822 - -tolerance 0.05 m -accept 2800000.0 13000000.0 -expect -6.7200711 73.1442856 - -tolerance 0.05 m -accept 2800000.0 11000000.0 -expect -6.7200711 67.0518325 - -tolerance 0.05 m -accept 2800000.0 9000000.0 -expect -6.7200711 58.9140458 - -tolerance 0.05 m -accept 2800000.0 7000000.0 -expect -6.7200711 48.2638981 - -tolerance 0.05 m -accept 2800000.0 5000000.0 -expect -6.7200711 34.8029044 - -tolerance 0.05 m -accept 2800000.0 3000000.0 -expect -6.7200711 18.7048581 - -tolerance 0.05 m -accept 2800000.0 1000000.0 -expect -6.7200711 0.9071392 - -tolerance 0.05 m -accept 3900000.0 900000.0 -expect 3.1922806 0.0 - -tolerance 0.05 m -accept 2800000.0 800000.0 -expect -6.7200711 0.9071392 - -tolerance 0.05 m -accept 2800000.0 700000.0 -expect -6.7200711 1.8140483 - -tolerance 0.05 m -accept 2800000.0 679490.65 -expect -6.7200711 2.0 - -tolerance 0.05 m -accept 2800000.0 500000.0 -expect -6.7200711 3.6262553 - -tolerance 0.05 m -accept 2800000.0 400000.0 -expect -6.7200711 4.531095 - -tolerance 0.05 m -accept 2800000.0 300000.0 -expect -6.7200711 5.4347892 - -tolerance 0.05 m -accept 2800000.0 200000.0 -expect -6.7200711 6.3371111 - -tolerance 0.05 m -accept 2800000.0 100000.0 -expect -6.7200711 7.2378372 - -tolerance 0.05 m -accept 0.0 0.0 -expect -31.9515111 8.136745 - -tolerance 0.05 m -accept 23764105.84 679490.65 -expect -177.8077194 2.0 - -tolerance 0.05 m -accept 21655625.33 679490.65 -expect 163.1922806 2.0 - -tolerance 0.05 m -accept 18326445.58 679490.65 -expect 133.1922806 2.0 - -tolerance 0.05 m -accept 14997265.83 679490.65 -expect 103.1922806 2.0 - -tolerance 0.05 m -accept 11668086.08 679490.65 -expect 73.1922806 2.0 - -tolerance 0.05 m -accept 8338906.33 679490.65 -expect 43.1922806 2.0 - -tolerance 0.05 m -accept 5009726.58 679490.65 -expect 13.1922806 2.0 - -tolerance 0.05 m -accept 3900000.0 679490.65 -expect 3.1922806 2.0 - -tolerance 0.05 m -accept 3545744.14 679490.65 -expect 0.0 2.0 - -tolerance 0.05 m -accept 2800000.0 679490.65 -expect -6.7200711 2.0 - -tolerance 0.05 m -accept 1680546.83 679490.65 -expect -16.8077194 2.0 - -tolerance 0.05 m -accept -1648632.92 679490.65 -expect -46.8077194 2.0 - -tolerance 0.05 m -accept -4977812.67 679490.65 -expect -76.8077194 2.0 - -tolerance 0.05 m -accept -8306992.42 679490.65 -expect -106.8077194 2.0 - -tolerance 0.05 m -accept -11636172.17 679490.65 -expect -136.8077194 2.0 - -tolerance 0.05 m -accept -14965351.92 679490.65 -expect -166.8077194 2.0 - -tolerance 0.05 m -accept -15964105.84 679490.65 -expect -175.8077194 2.0 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4813 +inv - +step +proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs --------------------------------------------------------------------------------- -tolerance 0.006 m -accept -6.7200711 77.6534822 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 73.1442856 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 67.0518325 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 58.9140458 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 48.2638981 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 34.8029044 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 18.7048581 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 0.9071392 -roundtrip 1000 - -tolerance 0.006 m -accept 3.1922806 0.0 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 0.9071392 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 1.8140483 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 3.6262553 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 4.531095 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 5.4347892 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 6.3371111 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 7.2378372 -roundtrip 1000 - -tolerance 0.006 m -accept -31.9515111 8.136745 -roundtrip 1000 - -tolerance 0.006 m -accept -177.8077194 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept 163.1922806 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept 133.1922806 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept 103.1922806 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept 73.1922806 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept 43.1922806 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept 13.1922806 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept 3.1922806 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept 0.0 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept -16.8077194 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept -46.8077194 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept -76.8077194 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept -106.8077194 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept -136.8077194 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept -166.8077194 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept -175.8077194 2.0 -roundtrip 1000 - - diff --git a/test/gigs/5111.2.gie_failing b/test/gigs/5111.2.gie_failing new file mode 100644 index 00000000..dfa6bca2 --- /dev/null +++ b/test/gigs/5111.2.gie_failing @@ -0,0 +1,444 @@ +-------------------------------------------------------------------------------- + +Test 5111 (part 2), Mercator (variant A), v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4813 +inv + +step +proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept -6.7200711 77.6534822 +expect 2800000.0 15000000.0 + +tolerance 0.05 m +accept -6.7200711 73.1442856 +expect 2800000.0 13000000.0 + +tolerance 0.05 m +accept -6.7200711 67.0518325 +expect 2800000.0 11000000.0 + +tolerance 0.05 m +accept -6.7200711 58.9140458 +expect 2800000.0 9000000.0 + +tolerance 0.05 m +accept -6.7200711 48.2638981 +expect 2800000.0 7000000.0 + +tolerance 0.05 m +accept -6.7200711 34.8029044 +expect 2800000.0 5000000.0 + +tolerance 0.05 m +accept -6.7200711 18.7048581 +expect 2800000.0 3000000.0 + +tolerance 0.05 m +accept -6.7200711 0.9071392 +expect 2800000.0 1000000.0 + +tolerance 0.05 m +accept 3.1922806 0.0 +expect 3900000.0 900000.0 + +tolerance 0.05 m +accept -6.7200711 0.9071392 +expect 2800000.0 800000.0 + +tolerance 0.05 m +accept -6.7200711 1.8140483 +expect 2800000.0 700000.0 + +tolerance 0.05 m +accept -6.7200711 2.0 +expect 2800000.0 679490.65 + +tolerance 0.05 m +accept -6.7200711 3.6262553 +expect 2800000.0 500000.0 + +tolerance 0.05 m +accept -6.7200711 4.531095 +expect 2800000.0 400000.0 + +tolerance 0.05 m +accept -6.7200711 5.4347892 +expect 2800000.0 300000.0 + +tolerance 0.05 m +accept -6.7200711 6.3371111 +expect 2800000.0 200000.0 + +tolerance 0.05 m +accept -6.7200711 7.2378372 +expect 2800000.0 100000.0 + +tolerance 0.05 m +accept -31.9515111 8.136745 +expect 0.0 0.0 + +tolerance 0.05 m +accept -177.8077194 2.0 +expect 23764105.84 679490.65 + +tolerance 0.05 m +accept 163.1922806 2.0 +expect 21655625.33 679490.65 + +tolerance 0.05 m +accept 133.1922806 2.0 +expect 18326445.58 679490.65 + +tolerance 0.05 m +accept 103.1922806 2.0 +expect 14997265.83 679490.65 + +tolerance 0.05 m +accept 73.1922806 2.0 +expect 11668086.08 679490.65 + +tolerance 0.05 m +accept 43.1922806 2.0 +expect 8338906.33 679490.65 + +tolerance 0.05 m +accept 13.1922806 2.0 +expect 5009726.58 679490.65 + +tolerance 0.05 m +accept 3.1922806 2.0 +expect 3900000.0 679490.65 + +tolerance 0.05 m +accept 0.0 2.0 +expect 3545744.14 679490.65 + +tolerance 0.05 m +accept -6.7200711 2.0 +expect 2800000.0 679490.65 + +tolerance 0.05 m +accept -16.8077194 2.0 +expect 1680546.83 679490.65 + +tolerance 0.05 m +accept -46.8077194 2.0 +expect -1648632.92 679490.65 + +tolerance 0.05 m +accept -76.8077194 2.0 +expect -4977812.67 679490.65 + +tolerance 0.05 m +accept -106.8077194 2.0 +expect -8306992.42 679490.65 + +tolerance 0.05 m +accept -136.8077194 2.0 +expect -11636172.17 679490.65 + +tolerance 0.05 m +accept -166.8077194 2.0 +expect -14965351.92 679490.65 + +tolerance 0.05 m +accept -175.8077194 2.0 +expect -15964105.84 679490.65 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs +inv + +step +init=epsg:4813 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 2800000.0 15000000.0 +expect -6.7200711 77.6534822 + +tolerance 0.05 m +accept 2800000.0 13000000.0 +expect -6.7200711 73.1442856 + +tolerance 0.05 m +accept 2800000.0 11000000.0 +expect -6.7200711 67.0518325 + +tolerance 0.05 m +accept 2800000.0 9000000.0 +expect -6.7200711 58.9140458 + +tolerance 0.05 m +accept 2800000.0 7000000.0 +expect -6.7200711 48.2638981 + +tolerance 0.05 m +accept 2800000.0 5000000.0 +expect -6.7200711 34.8029044 + +tolerance 0.05 m +accept 2800000.0 3000000.0 +expect -6.7200711 18.7048581 + +tolerance 0.05 m +accept 2800000.0 1000000.0 +expect -6.7200711 0.9071392 + +tolerance 0.05 m +accept 3900000.0 900000.0 +expect 3.1922806 0.0 + +tolerance 0.05 m +accept 2800000.0 800000.0 +expect -6.7200711 0.9071392 + +tolerance 0.05 m +accept 2800000.0 700000.0 +expect -6.7200711 1.8140483 + +tolerance 0.05 m +accept 2800000.0 679490.65 +expect -6.7200711 2.0 + +tolerance 0.05 m +accept 2800000.0 500000.0 +expect -6.7200711 3.6262553 + +tolerance 0.05 m +accept 2800000.0 400000.0 +expect -6.7200711 4.531095 + +tolerance 0.05 m +accept 2800000.0 300000.0 +expect -6.7200711 5.4347892 + +tolerance 0.05 m +accept 2800000.0 200000.0 +expect -6.7200711 6.3371111 + +tolerance 0.05 m +accept 2800000.0 100000.0 +expect -6.7200711 7.2378372 + +tolerance 0.05 m +accept 0.0 0.0 +expect -31.9515111 8.136745 + +tolerance 0.05 m +accept 23764105.84 679490.65 +expect -177.8077194 2.0 + +tolerance 0.05 m +accept 21655625.33 679490.65 +expect 163.1922806 2.0 + +tolerance 0.05 m +accept 18326445.58 679490.65 +expect 133.1922806 2.0 + +tolerance 0.05 m +accept 14997265.83 679490.65 +expect 103.1922806 2.0 + +tolerance 0.05 m +accept 11668086.08 679490.65 +expect 73.1922806 2.0 + +tolerance 0.05 m +accept 8338906.33 679490.65 +expect 43.1922806 2.0 + +tolerance 0.05 m +accept 5009726.58 679490.65 +expect 13.1922806 2.0 + +tolerance 0.05 m +accept 3900000.0 679490.65 +expect 3.1922806 2.0 + +tolerance 0.05 m +accept 3545744.14 679490.65 +expect 0.0 2.0 + +tolerance 0.05 m +accept 2800000.0 679490.65 +expect -6.7200711 2.0 + +tolerance 0.05 m +accept 1680546.83 679490.65 +expect -16.8077194 2.0 + +tolerance 0.05 m +accept -1648632.92 679490.65 +expect -46.8077194 2.0 + +tolerance 0.05 m +accept -4977812.67 679490.65 +expect -76.8077194 2.0 + +tolerance 0.05 m +accept -8306992.42 679490.65 +expect -106.8077194 2.0 + +tolerance 0.05 m +accept -11636172.17 679490.65 +expect -136.8077194 2.0 + +tolerance 0.05 m +accept -14965351.92 679490.65 +expect -166.8077194 2.0 + +tolerance 0.05 m +accept -15964105.84 679490.65 +expect -175.8077194 2.0 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4813 +inv + +step +proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept -6.7200711 77.6534822 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 73.1442856 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 67.0518325 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 58.9140458 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 48.2638981 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 34.8029044 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 18.7048581 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 0.9071392 +roundtrip 1000 + +tolerance 0.006 m +accept 3.1922806 0.0 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 0.9071392 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 1.8140483 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 3.6262553 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 4.531095 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 5.4347892 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 6.3371111 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 7.2378372 +roundtrip 1000 + +tolerance 0.006 m +accept -31.9515111 8.136745 +roundtrip 1000 + +tolerance 0.006 m +accept -177.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 163.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 133.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 103.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 73.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 43.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 13.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 3.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 0.0 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -16.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -46.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -76.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -106.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -136.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -166.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -175.8077194 2.0 +roundtrip 1000 + + diff --git a/test/gigs/5203.1.gie b/test/gigs/5203.1.gie deleted file mode 100644 index 960b9171..00000000 --- a/test/gigs/5203.1.gie +++ /dev/null @@ -1,192 +0,0 @@ --------------------------------------------------------------------------------- - -GIGS Test 5203 (part 1), Position Vector 7-parameter transformation, v2.0_2011-06-28. Geographic 2D domain (EPSG method code 9606). - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4277 +inv - +step +init=epsg:4326 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept 150.00567472 79.99487333 -expect 150.0 80.0 - -tolerance 2.77777777778e-07 m -accept 120.0 60.0 -expect 119.99435889 60.00569306 - -tolerance 2.77777777778e-07 m -accept 60.00446778 29.99566778 -expect 60.0 30.0 - -tolerance 2.77777777778e-07 m -accept 0.0 0.0 -expect -0.00089056 0.00483333 - -tolerance 2.77777777778e-07 m -accept -60.00357056 -30.00504639 -expect -60.0 -30.0 - -tolerance 2.77777777778e-07 m -accept -120.0 -60.0 -expect -119.9918525 -59.99907361 - -tolerance 2.77777777778e-07 m -accept -150.01693111 -79.99778139 -expect -150.0 -80.0 - -tolerance 2.77777777778e-07 m -accept -180.0 70.0 -expect -179.99637361 70.005945 - -tolerance 2.77777777778e-07 m -accept -135.00596333 49.99458694 -expect -135.0 50.0 - -tolerance 2.77777777778e-07 m -accept -90.0 25.0 -expect -89.99531139 25.00445833 - -tolerance 2.77777777778e-07 m -accept 0.00089056 -0.00483333 -expect 0.0 0.0 - -tolerance 2.77777777778e-07 m -accept 143.9279419 -37.6532236 -expect 143.92634806 -37.65235306 - -tolerance 2.77777777778e-07 m -accept 135.00291194 -49.99973028 -expect 135.0 -50.0 - -tolerance 2.77777777778e-07 m -accept 180.0 -70.0 -expect -179.99660139 -70.002485 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4326 +inv - +step +init=epsg:4277 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept 150.0 80.0 -expect 150.00567472 79.99487333 - -tolerance 2.77777777778e-07 m -accept 119.99435889 60.00569306 -expect 120.0 60.0 - -tolerance 2.77777777778e-07 m -accept 60.0 30.0 -expect 60.00446778 29.99566778 - -tolerance 2.77777777778e-07 m -accept -0.00089056 0.00483333 -expect 0.0 0.0 - -tolerance 2.77777777778e-07 m -accept -60.0 -30.0 -expect -60.00357056 -30.00504639 - -tolerance 2.77777777778e-07 m -accept -119.9918525 -59.99907361 -expect -120.0 -60.0 - -tolerance 2.77777777778e-07 m -accept -150.0 -80.0 -expect -150.01693111 -79.99778139 - -tolerance 2.77777777778e-07 m -accept -179.99637361 70.005945 -expect -180.0 70.0 - -tolerance 2.77777777778e-07 m -accept -135.0 50.0 -expect -135.00596333 49.99458694 - -tolerance 2.77777777778e-07 m -accept -89.99531139 25.00445833 -expect -90.0 25.0 - -tolerance 2.77777777778e-07 m -accept 0.0 0.0 -expect 0.00089056 -0.00483333 - -tolerance 2.77777777778e-07 m -accept 143.92634806 -37.65235306 -expect 143.9279419 -37.6532236 - -tolerance 2.77777777778e-07 m -accept 135.0 -50.0 -expect 135.00291194 -49.99973028 - -tolerance 2.77777777778e-07 m -accept -179.99660139 -70.002485 -expect 180.0 -70.0 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4277 +inv - +step +init=epsg:4326 --------------------------------------------------------------------------------- -tolerance 5.55555555556e-08 m -accept 150.00567472 79.99487333 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 120.0 60.0 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 60.00446778 29.99566778 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 0.0 0.0 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -60.00357056 -30.00504639 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -120.0 -60.0 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -150.01693111 -79.99778139 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -180.0 70.0 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -135.00596333 49.99458694 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -90.0 25.0 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 0.00089056 -0.00483333 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 143.9279419 -37.6532236 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 135.00291194 -49.99973028 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 180.0 -70.0 -roundtrip 1000 - - diff --git a/test/gigs/5203.1.gie_failing b/test/gigs/5203.1.gie_failing new file mode 100644 index 00000000..960b9171 --- /dev/null +++ b/test/gigs/5203.1.gie_failing @@ -0,0 +1,192 @@ +-------------------------------------------------------------------------------- + +GIGS Test 5203 (part 1), Position Vector 7-parameter transformation, v2.0_2011-06-28. Geographic 2D domain (EPSG method code 9606). + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4277 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 150.00567472 79.99487333 +expect 150.0 80.0 + +tolerance 2.77777777778e-07 m +accept 120.0 60.0 +expect 119.99435889 60.00569306 + +tolerance 2.77777777778e-07 m +accept 60.00446778 29.99566778 +expect 60.0 30.0 + +tolerance 2.77777777778e-07 m +accept 0.0 0.0 +expect -0.00089056 0.00483333 + +tolerance 2.77777777778e-07 m +accept -60.00357056 -30.00504639 +expect -60.0 -30.0 + +tolerance 2.77777777778e-07 m +accept -120.0 -60.0 +expect -119.9918525 -59.99907361 + +tolerance 2.77777777778e-07 m +accept -150.01693111 -79.99778139 +expect -150.0 -80.0 + +tolerance 2.77777777778e-07 m +accept -180.0 70.0 +expect -179.99637361 70.005945 + +tolerance 2.77777777778e-07 m +accept -135.00596333 49.99458694 +expect -135.0 50.0 + +tolerance 2.77777777778e-07 m +accept -90.0 25.0 +expect -89.99531139 25.00445833 + +tolerance 2.77777777778e-07 m +accept 0.00089056 -0.00483333 +expect 0.0 0.0 + +tolerance 2.77777777778e-07 m +accept 143.9279419 -37.6532236 +expect 143.92634806 -37.65235306 + +tolerance 2.77777777778e-07 m +accept 135.00291194 -49.99973028 +expect 135.0 -50.0 + +tolerance 2.77777777778e-07 m +accept 180.0 -70.0 +expect -179.99660139 -70.002485 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4326 +inv + +step +init=epsg:4277 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 150.0 80.0 +expect 150.00567472 79.99487333 + +tolerance 2.77777777778e-07 m +accept 119.99435889 60.00569306 +expect 120.0 60.0 + +tolerance 2.77777777778e-07 m +accept 60.0 30.0 +expect 60.00446778 29.99566778 + +tolerance 2.77777777778e-07 m +accept -0.00089056 0.00483333 +expect 0.0 0.0 + +tolerance 2.77777777778e-07 m +accept -60.0 -30.0 +expect -60.00357056 -30.00504639 + +tolerance 2.77777777778e-07 m +accept -119.9918525 -59.99907361 +expect -120.0 -60.0 + +tolerance 2.77777777778e-07 m +accept -150.0 -80.0 +expect -150.01693111 -79.99778139 + +tolerance 2.77777777778e-07 m +accept -179.99637361 70.005945 +expect -180.0 70.0 + +tolerance 2.77777777778e-07 m +accept -135.0 50.0 +expect -135.00596333 49.99458694 + +tolerance 2.77777777778e-07 m +accept -89.99531139 25.00445833 +expect -90.0 25.0 + +tolerance 2.77777777778e-07 m +accept 0.0 0.0 +expect 0.00089056 -0.00483333 + +tolerance 2.77777777778e-07 m +accept 143.92634806 -37.65235306 +expect 143.9279419 -37.6532236 + +tolerance 2.77777777778e-07 m +accept 135.0 -50.0 +expect 135.00291194 -49.99973028 + +tolerance 2.77777777778e-07 m +accept -179.99660139 -70.002485 +expect 180.0 -70.0 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4277 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept 150.00567472 79.99487333 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 120.0 60.0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 60.00446778 29.99566778 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 0.0 0.0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -60.00357056 -30.00504639 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -120.0 -60.0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -150.01693111 -79.99778139 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -180.0 70.0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -135.00596333 49.99458694 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -90.0 25.0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 0.00089056 -0.00483333 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 143.9279419 -37.6532236 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 135.00291194 -49.99973028 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 180.0 -70.0 +roundtrip 1000 + + diff --git a/test/gigs/5204.1.gie b/test/gigs/5204.1.gie deleted file mode 100644 index 3c7e3fff..00000000 --- a/test/gigs/5204.1.gie +++ /dev/null @@ -1,192 +0,0 @@ --------------------------------------------------------------------------------- - -GIGS Test 5204, Coordinate Frame 7-parameter transformation, v2.0_2011-06-28. Geographic 2D domain (EPSG method code 9607) - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4313 +inv - +step +init=epsg:4326 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept 149.99825389 80.00155167 -expect 150 80 - -tolerance 2.77777777778e-07 m -accept 120 60 -expect 120.00197111 59.99807333 - -tolerance 2.77777777778e-07 m -accept 59.99822194 30.00134083 -expect 60 30 - -tolerance 2.77777777778e-07 m -accept 0 0 -expect 0.00098139 -0.00081028 - -tolerance 2.77777777778e-07 m -accept -59.99991333 -29.99943917 -expect -60 -30 - -tolerance 2.77777777778e-07 m -accept -120 -60 -expect -120.00150694 -59.999835 - -tolerance 2.77777777778e-07 m -accept -149.99532167 -80.00054917 -expect -150 -80 - -tolerance 2.77777777778e-07 m -accept -180 70 -expect 179.99939778 69.99812806 - -tolerance 2.77777777778e-07 m -accept -134.99891389 50.00183 -expect -135 50 - -tolerance 2.77777777778e-07 m -accept -90 25 -expect -90.00060583 24.99862667 - -tolerance 2.77777777778e-07 m -accept -0.00098139 0.00081028 -expect 0 0 - -tolerance 2.77777777778e-07 m -accept 143.9279419 -37.6532236 -expect 143.92857222 -37.65257083 - -tolerance 2.77777777778e-07 m -accept 134.99913472 -50.00096139 -expect 135 -50 - -tolerance 2.77777777778e-07 m -accept 180 -70 -expect 179.99888667 -69.99901667 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4326 +inv - +step +init=epsg:4313 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept 150 80 -expect 149.99825389 80.00155167 - -tolerance 2.77777777778e-07 m -accept 120.00197111 59.99807333 -expect 120 60 - -tolerance 2.77777777778e-07 m -accept 60 30 -expect 59.99822194 30.00134083 - -tolerance 2.77777777778e-07 m -accept 0.00098139 -0.00081028 -expect 0 0 - -tolerance 2.77777777778e-07 m -accept -60 -30 -expect -59.99991333 -29.99943917 - -tolerance 2.77777777778e-07 m -accept -120.00150694 -59.999835 -expect -120 -60 - -tolerance 2.77777777778e-07 m -accept -150 -80 -expect -149.99532167 -80.00054917 - -tolerance 2.77777777778e-07 m -accept 179.99939778 69.99812806 -expect -180 70 - -tolerance 2.77777777778e-07 m -accept -135 50 -expect -134.99891389 50.00183 - -tolerance 2.77777777778e-07 m -accept -90.00060583 24.99862667 -expect -90 25 - -tolerance 2.77777777778e-07 m -accept 0 0 -expect -0.00098139 0.00081028 - -tolerance 2.77777777778e-07 m -accept 143.92857222 -37.65257083 -expect 143.9279419 -37.6532236 - -tolerance 2.77777777778e-07 m -accept 135 -50 -expect 134.99913472 -50.00096139 - -tolerance 2.77777777778e-07 m -accept 179.99888667 -69.99901667 -expect 180 -70 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4313 +inv - +step +init=epsg:4326 --------------------------------------------------------------------------------- -tolerance 5.55555555556e-08 m -accept 149.99825389 80.00155167 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 120 60 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 59.99822194 30.00134083 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 0 0 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -59.99991333 -29.99943917 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -120 -60 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -149.99532167 -80.00054917 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -180 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -134.99891389 50.00183 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -90 25 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -0.00098139 0.00081028 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 143.9279419 -37.6532236 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 134.99913472 -50.00096139 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 180 -70 -roundtrip 1000 - - diff --git a/test/gigs/5204.1.gie_failing b/test/gigs/5204.1.gie_failing new file mode 100644 index 00000000..3c7e3fff --- /dev/null +++ b/test/gigs/5204.1.gie_failing @@ -0,0 +1,192 @@ +-------------------------------------------------------------------------------- + +GIGS Test 5204, Coordinate Frame 7-parameter transformation, v2.0_2011-06-28. Geographic 2D domain (EPSG method code 9607) + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4313 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 149.99825389 80.00155167 +expect 150 80 + +tolerance 2.77777777778e-07 m +accept 120 60 +expect 120.00197111 59.99807333 + +tolerance 2.77777777778e-07 m +accept 59.99822194 30.00134083 +expect 60 30 + +tolerance 2.77777777778e-07 m +accept 0 0 +expect 0.00098139 -0.00081028 + +tolerance 2.77777777778e-07 m +accept -59.99991333 -29.99943917 +expect -60 -30 + +tolerance 2.77777777778e-07 m +accept -120 -60 +expect -120.00150694 -59.999835 + +tolerance 2.77777777778e-07 m +accept -149.99532167 -80.00054917 +expect -150 -80 + +tolerance 2.77777777778e-07 m +accept -180 70 +expect 179.99939778 69.99812806 + +tolerance 2.77777777778e-07 m +accept -134.99891389 50.00183 +expect -135 50 + +tolerance 2.77777777778e-07 m +accept -90 25 +expect -90.00060583 24.99862667 + +tolerance 2.77777777778e-07 m +accept -0.00098139 0.00081028 +expect 0 0 + +tolerance 2.77777777778e-07 m +accept 143.9279419 -37.6532236 +expect 143.92857222 -37.65257083 + +tolerance 2.77777777778e-07 m +accept 134.99913472 -50.00096139 +expect 135 -50 + +tolerance 2.77777777778e-07 m +accept 180 -70 +expect 179.99888667 -69.99901667 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4326 +inv + +step +init=epsg:4313 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 150 80 +expect 149.99825389 80.00155167 + +tolerance 2.77777777778e-07 m +accept 120.00197111 59.99807333 +expect 120 60 + +tolerance 2.77777777778e-07 m +accept 60 30 +expect 59.99822194 30.00134083 + +tolerance 2.77777777778e-07 m +accept 0.00098139 -0.00081028 +expect 0 0 + +tolerance 2.77777777778e-07 m +accept -60 -30 +expect -59.99991333 -29.99943917 + +tolerance 2.77777777778e-07 m +accept -120.00150694 -59.999835 +expect -120 -60 + +tolerance 2.77777777778e-07 m +accept -150 -80 +expect -149.99532167 -80.00054917 + +tolerance 2.77777777778e-07 m +accept 179.99939778 69.99812806 +expect -180 70 + +tolerance 2.77777777778e-07 m +accept -135 50 +expect -134.99891389 50.00183 + +tolerance 2.77777777778e-07 m +accept -90.00060583 24.99862667 +expect -90 25 + +tolerance 2.77777777778e-07 m +accept 0 0 +expect -0.00098139 0.00081028 + +tolerance 2.77777777778e-07 m +accept 143.92857222 -37.65257083 +expect 143.9279419 -37.6532236 + +tolerance 2.77777777778e-07 m +accept 135 -50 +expect 134.99913472 -50.00096139 + +tolerance 2.77777777778e-07 m +accept 179.99888667 -69.99901667 +expect 180 -70 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4313 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept 149.99825389 80.00155167 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 120 60 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 59.99822194 30.00134083 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 0 0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -59.99991333 -29.99943917 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -120 -60 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -149.99532167 -80.00054917 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -180 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -134.99891389 50.00183 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -90 25 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -0.00098139 0.00081028 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 143.9279419 -37.6532236 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 134.99913472 -50.00096139 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 180 -70 +roundtrip 1000 + + diff --git a/test/gigs/5205.1.gie b/test/gigs/5205.1.gie deleted file mode 100644 index df4cb674..00000000 --- a/test/gigs/5205.1.gie +++ /dev/null @@ -1,192 +0,0 @@ --------------------------------------------------------------------------------- - -GIGS Test 5205 (Part 1), Molodensky-Badekas 10-parameter transformation, v2.0_2011-06-28. Geographic 2D domain (EPSG method code 9636) - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4289 +inv - +step +init=epsg:4326 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept 150.01814371 79.99494639 -expect 150 80 - -tolerance 2.77777777778e-07 m -accept 120 60 -expect 119.99001559 60.00441792 - -tolerance 2.77777777778e-07 m -accept 60.00535007 29.99746103 -expect 60 30 - -tolerance 2.77777777778e-07 m -accept 0 0 -expect -7.025e-05 0.0041133 - -tolerance 2.77777777778e-07 m -accept -60.00473241 -30.0042486 -expect -60 -30 - -tolerance 2.77777777778e-07 m -accept -120 -60 -expect -119.9922412 -60.00081456 - -tolerance 2.77777777778e-07 m -accept -150.01209192 -79.99612229 -expect -150 -80 - -tolerance 2.77777777778e-07 m -accept -180 70 -expect 179.99786174 70.00666951 - -tolerance 2.77777777778e-07 m -accept -135.00454845 49.99357566 -expect -135 50 - -tolerance 2.77777777778e-07 m -accept -90 25 -expect -89.99487454 25.00457271 - -tolerance 2.77777777778e-07 m -accept 7.032e-05 -0.00411349 -expect 0 0 - -tolerance 2.77777777778e-07 m -accept 143.9279419 -37.6532236 -expect 143.92330599 -37.65282034 - -tolerance 2.77777777778e-07 m -accept 135.00641074 -49.99958243 -expect 135 -50 - -tolerance 2.77777777778e-07 m -accept 180 -70 -expect 179.99847886 -70.00362084 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4326 +inv - +step +init=epsg:4289 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept 150 80 -expect 150.01814371 79.99494639 - -tolerance 2.77777777778e-07 m -accept 119.99001559 60.00441792 -expect 120 60 - -tolerance 2.77777777778e-07 m -accept 60 30 -expect 60.00535007 29.99746103 - -tolerance 2.77777777778e-07 m -accept -7.025e-05 0.0041133 -expect 0 0 - -tolerance 2.77777777778e-07 m -accept -60 -30 -expect -60.00473241 -30.0042486 - -tolerance 2.77777777778e-07 m -accept -119.9922412 -60.00081456 -expect -120 -60 - -tolerance 2.77777777778e-07 m -accept -150 -80 -expect -150.01209192 -79.99612229 - -tolerance 2.77777777778e-07 m -accept 179.99786174 70.00666951 -expect -180 70 - -tolerance 2.77777777778e-07 m -accept -135 50 -expect -135.00454845 49.99357566 - -tolerance 2.77777777778e-07 m -accept -89.99487454 25.00457271 -expect -90 25 - -tolerance 2.77777777778e-07 m -accept 0 0 -expect 7.032e-05 -0.00411349 - -tolerance 2.77777777778e-07 m -accept 143.92330599 -37.65282034 -expect 143.9279419 -37.6532236 - -tolerance 2.77777777778e-07 m -accept 135 -50 -expect 135.00641074 -49.99958243 - -tolerance 2.77777777778e-07 m -accept 179.99847886 -70.00362084 -expect 180 -70 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4289 +inv - +step +init=epsg:4326 --------------------------------------------------------------------------------- -tolerance 5.55555555556e-08 m -accept 150.01814371 79.99494639 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 120 60 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 60.00535007 29.99746103 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 0 0 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -60.00473241 -30.0042486 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -120 -60 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -150.01209192 -79.99612229 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -180 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -135.00454845 49.99357566 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -90 25 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 7.032e-05 -0.00411349 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 143.9279419 -37.6532236 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 135.00641074 -49.99958243 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 180 -70 -roundtrip 1000 - - diff --git a/test/gigs/5205.1.gie_failing b/test/gigs/5205.1.gie_failing new file mode 100644 index 00000000..df4cb674 --- /dev/null +++ b/test/gigs/5205.1.gie_failing @@ -0,0 +1,192 @@ +-------------------------------------------------------------------------------- + +GIGS Test 5205 (Part 1), Molodensky-Badekas 10-parameter transformation, v2.0_2011-06-28. Geographic 2D domain (EPSG method code 9636) + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4289 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 150.01814371 79.99494639 +expect 150 80 + +tolerance 2.77777777778e-07 m +accept 120 60 +expect 119.99001559 60.00441792 + +tolerance 2.77777777778e-07 m +accept 60.00535007 29.99746103 +expect 60 30 + +tolerance 2.77777777778e-07 m +accept 0 0 +expect -7.025e-05 0.0041133 + +tolerance 2.77777777778e-07 m +accept -60.00473241 -30.0042486 +expect -60 -30 + +tolerance 2.77777777778e-07 m +accept -120 -60 +expect -119.9922412 -60.00081456 + +tolerance 2.77777777778e-07 m +accept -150.01209192 -79.99612229 +expect -150 -80 + +tolerance 2.77777777778e-07 m +accept -180 70 +expect 179.99786174 70.00666951 + +tolerance 2.77777777778e-07 m +accept -135.00454845 49.99357566 +expect -135 50 + +tolerance 2.77777777778e-07 m +accept -90 25 +expect -89.99487454 25.00457271 + +tolerance 2.77777777778e-07 m +accept 7.032e-05 -0.00411349 +expect 0 0 + +tolerance 2.77777777778e-07 m +accept 143.9279419 -37.6532236 +expect 143.92330599 -37.65282034 + +tolerance 2.77777777778e-07 m +accept 135.00641074 -49.99958243 +expect 135 -50 + +tolerance 2.77777777778e-07 m +accept 180 -70 +expect 179.99847886 -70.00362084 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4326 +inv + +step +init=epsg:4289 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 150 80 +expect 150.01814371 79.99494639 + +tolerance 2.77777777778e-07 m +accept 119.99001559 60.00441792 +expect 120 60 + +tolerance 2.77777777778e-07 m +accept 60 30 +expect 60.00535007 29.99746103 + +tolerance 2.77777777778e-07 m +accept -7.025e-05 0.0041133 +expect 0 0 + +tolerance 2.77777777778e-07 m +accept -60 -30 +expect -60.00473241 -30.0042486 + +tolerance 2.77777777778e-07 m +accept -119.9922412 -60.00081456 +expect -120 -60 + +tolerance 2.77777777778e-07 m +accept -150 -80 +expect -150.01209192 -79.99612229 + +tolerance 2.77777777778e-07 m +accept 179.99786174 70.00666951 +expect -180 70 + +tolerance 2.77777777778e-07 m +accept -135 50 +expect -135.00454845 49.99357566 + +tolerance 2.77777777778e-07 m +accept -89.99487454 25.00457271 +expect -90 25 + +tolerance 2.77777777778e-07 m +accept 0 0 +expect 7.032e-05 -0.00411349 + +tolerance 2.77777777778e-07 m +accept 143.92330599 -37.65282034 +expect 143.9279419 -37.6532236 + +tolerance 2.77777777778e-07 m +accept 135 -50 +expect 135.00641074 -49.99958243 + +tolerance 2.77777777778e-07 m +accept 179.99847886 -70.00362084 +expect 180 -70 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4289 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept 150.01814371 79.99494639 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 120 60 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 60.00535007 29.99746103 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 0 0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -60.00473241 -30.0042486 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -120 -60 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -150.01209192 -79.99612229 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -180 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -135.00454845 49.99357566 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -90 25 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 7.032e-05 -0.00411349 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 143.9279419 -37.6532236 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 135.00641074 -49.99958243 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 180 -70 +roundtrip 1000 + + diff --git a/test/gigs/5206.gie b/test/gigs/5206.gie deleted file mode 100644 index 5f3d6eb6..00000000 --- a/test/gigs/5206.gie +++ /dev/null @@ -1,540 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5206, NADCON transformation, v2.0_2011-06-28. Out of transform grid area error tests have been removed. - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4267 +inv - +step +init=epsg:4269 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept -89.5177272 29.9997978 -expect -89.5177778 30.0 - -tolerance 2.77777777778e-07 m -accept -90.5177778 29.2833333 -expect -90.5178639 29.2835592 - -tolerance 2.77777777778e-07 m -accept -91.5176758 28.2830864 -expect -91.5177778 28.2833333 - -tolerance 2.77777777778e-07 m -accept -92.5177778 27.2833333 -expect -92.5178811 27.2836106 - -tolerance 2.77777777778e-07 m -accept -93.5176731 26.2830225 -expect -93.5177778 26.2833333 - -tolerance 2.77777777778e-07 m -accept -94.5177778 25 -expect -94.5178744 25.0003486 - -tolerance 2.77777777778e-07 m -accept -142.9972522 70.0001631 -expect -143 70 - -tolerance 2.77777777778e-07 m -accept -142 70.0 -expect -142.0026922 69.9998422 - -tolerance 2.77777777778e-07 m -accept -141.9973078 70.0001578 -expect -142 70 - -tolerance 2.77777777778e-07 m -accept -140.9971981 70.0001481 -expect -141 70 - -tolerance 2.77777777778e-07 m -accept -140 70 -expect -140.0027922 69.9998617 - -tolerance 2.77777777778e-07 m -accept -138.9973075 70.0001297 -expect -139 70 - -tolerance 2.77777777778e-07 m -accept -138 70 -expect -138.0026767 69.9998867 - -tolerance 2.77777777778e-07 m -accept -134.9973733 70.000055 -expect -135 70 - -tolerance 2.77777777778e-07 m -accept -130 70 -expect -130.0025347 70.0000511 - -tolerance 2.77777777778e-07 m -accept -128.0009742 69.9999053 -expect -128.0034722 70 - -tolerance 2.77777777778e-07 m -accept -179 70 -expect -179.0035064 69.9990142 - -tolerance 2.77777777778e-07 m -accept -179.9964664 70.0010089 -expect 180 70 - -tolerance 2.77777777778e-07 m -accept 180 70 -expect 179.9964664 69.9989911 - -tolerance 2.77777777778e-07 m -accept 179 70 -expect 178.9964394 69.9989678 - -tolerance 2.77777777778e-07 m -accept -111.9991714 49.9999556 -expect -112 49.9999997 - -tolerance 2.77777777778e-07 m -accept -112 49.9999997 -expect -112.0008286 50.0000439 - -tolerance 2.77777777778e-07 m -accept -111.9991214 49.0000033 -expect -112 49 - -tolerance 2.77777777778e-07 m -accept -112 48 -expect -112.0008492 47.9999606 - -tolerance 2.77777777778e-07 m -accept -111.9991678 47.0000569 -expect -112 47 - -tolerance 2.77777777778e-07 m -accept -112 47 -expect -112.0008325 46.9999431 - -tolerance 2.77777777778e-07 m -accept -111.9991756 46.0000733 -expect -112 46 - -tolerance 2.77777777778e-07 m -accept -112 45 -expect -112.0008022 44.9999197 - -tolerance 2.77777777778e-07 m -accept -130.5177467 51 -expect -130.5193953 50.9997114 - -tolerance 2.77777777778e-07 m -accept -130.5160981 51.0002886 -expect -130.5177467 51 - -tolerance 2.77777777778e-07 m -accept -130.5161206 50.0002897 -expect -130.5177467 49.9999997 - -tolerance 2.77777777778e-07 m -accept -130.5177467 49.9999997 -expect -130.5193731 49.9997097 - -tolerance 2.77777777778e-07 m -accept -130.5161458 49.0002717 -expect -130.5177467 49 - -tolerance 2.77777777778e-07 m -accept -130.5177467 48.1166667 -expect -130.5193258 48.1164106 - -tolerance 2.77777777778e-07 m -accept -130.5161942 47.0002378 -expect -130.5177467 47 - -tolerance 2.77777777778e-07 m -accept -130.5177467 47 -expect -130.5192992 46.9997622 - -tolerance 2.77777777778e-07 m -accept -130.5162172 46.0002222 -expect -130.5177467 46 - -tolerance 2.77777777778e-07 m -accept -130.5177467 45 -expect -130.5192539 44.9997925 - -tolerance 2.77777777778e-07 m -accept -132.9984775 48.1169867 -expect -133 48.1166667 - -tolerance 2.77777777778e-07 m -accept -131.4555556 48.1166667 -expect -131.4571578 48.1163964 - -tolerance 2.77777777778e-07 m -accept -130.5161675 48.1169228 -expect -130.5177467 48.1166667 - -tolerance 2.77777777778e-07 m -accept -128.4555556 48.1166667 -expect -128.4570433 48.1164319 - -tolerance 2.77777777778e-07 m -accept -128.5444444 48.1166667 -expect -128.5459361 48.1164311 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4269 +inv - +step +init=epsg:4267 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept -89.5177778 30.0 -expect -89.5177272 29.9997978 - -tolerance 2.77777777778e-07 m -accept -90.5178639 29.2835592 -expect -90.5177778 29.2833333 - -tolerance 2.77777777778e-07 m -accept -91.5177778 28.2833333 -expect -91.5176758 28.2830864 - -tolerance 2.77777777778e-07 m -accept -92.5178811 27.2836106 -expect -92.5177778 27.2833333 - -tolerance 2.77777777778e-07 m -accept -93.5177778 26.2833333 -expect -93.5176731 26.2830225 - -tolerance 2.77777777778e-07 m -accept -94.5178744 25.0003486 -expect -94.5177778 25 - -tolerance 2.77777777778e-07 m -accept -143 70 -expect -142.9972522 70.0001631 - -tolerance 2.77777777778e-07 m -accept -142.0026922 69.9998422 -expect -142 70.0 - -tolerance 2.77777777778e-07 m -accept -142 70 -expect -141.9973078 70.0001578 - -tolerance 2.77777777778e-07 m -accept -141 70 -expect -140.9971981 70.0001481 - -tolerance 2.77777777778e-07 m -accept -140.0027922 69.9998617 -expect -140 70 - -tolerance 2.77777777778e-07 m -accept -139 70 -expect -138.9973075 70.0001297 - -tolerance 2.77777777778e-07 m -accept -138.0026767 69.9998867 -expect -138 70 - -tolerance 2.77777777778e-07 m -accept -135 70 -expect -134.9973733 70.000055 - -tolerance 2.77777777778e-07 m -accept -130.0025347 70.0000511 -expect -130 70 - -tolerance 2.77777777778e-07 m -accept -128.0034722 70 -expect -128.0009742 69.9999053 - -tolerance 2.77777777778e-07 m -accept -179.0035064 69.9990142 -expect -179 70 - -tolerance 2.77777777778e-07 m -accept 180 70 -expect -179.9964664 70.0010089 - -tolerance 2.77777777778e-07 m -accept 179.9964664 69.9989911 -expect 180 70 - -tolerance 2.77777777778e-07 m -accept 178.9964394 69.9989678 -expect 179 70 - -tolerance 2.77777777778e-07 m -accept -112 49.9999997 -expect -111.9991714 49.9999556 - -tolerance 2.77777777778e-07 m -accept -112.0008286 50.0000439 -expect -112 49.9999997 - -tolerance 2.77777777778e-07 m -accept -112 49 -expect -111.9991214 49.0000033 - -tolerance 2.77777777778e-07 m -accept -112.0008492 47.9999606 -expect -112 48 - -tolerance 2.77777777778e-07 m -accept -112 47 -expect -111.9991678 47.0000569 - -tolerance 2.77777777778e-07 m -accept -112.0008325 46.9999431 -expect -112 47 - -tolerance 2.77777777778e-07 m -accept -112 46 -expect -111.9991756 46.0000733 - -tolerance 2.77777777778e-07 m -accept -112.0008022 44.9999197 -expect -112 45 - -tolerance 2.77777777778e-07 m -accept -130.5193953 50.9997114 -expect -130.5177467 51 - -tolerance 2.77777777778e-07 m -accept -130.5177467 51 -expect -130.5160981 51.0002886 - -tolerance 2.77777777778e-07 m -accept -130.5177467 49.9999997 -expect -130.5161206 50.0002897 - -tolerance 2.77777777778e-07 m -accept -130.5193731 49.9997097 -expect -130.5177467 49.9999997 - -tolerance 2.77777777778e-07 m -accept -130.5177467 49 -expect -130.5161458 49.0002717 - -tolerance 2.77777777778e-07 m -accept -130.5193258 48.1164106 -expect -130.5177467 48.1166667 - -tolerance 2.77777777778e-07 m -accept -130.5177467 47 -expect -130.5161942 47.0002378 - -tolerance 2.77777777778e-07 m -accept -130.5192992 46.9997622 -expect -130.5177467 47 - -tolerance 2.77777777778e-07 m -accept -130.5177467 46 -expect -130.5162172 46.0002222 - -tolerance 2.77777777778e-07 m -accept -130.5192539 44.9997925 -expect -130.5177467 45 - -tolerance 2.77777777778e-07 m -accept -133 48.1166667 -expect -132.9984775 48.1169867 - -tolerance 2.77777777778e-07 m -accept -131.4571578 48.1163964 -expect -131.4555556 48.1166667 - -tolerance 2.77777777778e-07 m -accept -130.5177467 48.1166667 -expect -130.5161675 48.1169228 - -tolerance 2.77777777778e-07 m -accept -128.4570433 48.1164319 -expect -128.4555556 48.1166667 - -tolerance 2.77777777778e-07 m -accept -128.5459361 48.1164311 -expect -128.5444444 48.1166667 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4267 +inv - +step +init=epsg:4269 --------------------------------------------------------------------------------- -tolerance 5.55555555556e-08 m -accept -89.5177272 29.9997978 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -90.5177778 29.2833333 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -91.5176758 28.2830864 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -92.5177778 27.2833333 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -93.5176731 26.2830225 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -94.5177778 25 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -142.9972522 70.0001631 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -142 70.0 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -141.9973078 70.0001578 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -140.9971981 70.0001481 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -140 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.9973075 70.0001297 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -134.9973733 70.000055 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -128.0009742 69.9999053 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -179 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -179.9964664 70.0010089 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 180 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 179 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -111.9991714 49.9999556 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -112 49.9999997 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -111.9991214 49.0000033 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -112 48 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -111.9991678 47.0000569 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -112 47 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -111.9991756 46.0000733 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -112 45 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5177467 51 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5160981 51.0002886 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5161206 50.0002897 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5177467 49.9999997 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5161458 49.0002717 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5177467 48.1166667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5161942 47.0002378 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5177467 47 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5162172 46.0002222 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5177467 45 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -132.9984775 48.1169867 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -131.4555556 48.1166667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5161675 48.1169228 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -128.4555556 48.1166667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -128.5444444 48.1166667 -roundtrip 1000 - - diff --git a/test/gigs/5206.gie_failing b/test/gigs/5206.gie_failing new file mode 100644 index 00000000..5f3d6eb6 --- /dev/null +++ b/test/gigs/5206.gie_failing @@ -0,0 +1,540 @@ +-------------------------------------------------------------------------------- + +Test 5206, NADCON transformation, v2.0_2011-06-28. Out of transform grid area error tests have been removed. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4267 +inv + +step +init=epsg:4269 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept -89.5177272 29.9997978 +expect -89.5177778 30.0 + +tolerance 2.77777777778e-07 m +accept -90.5177778 29.2833333 +expect -90.5178639 29.2835592 + +tolerance 2.77777777778e-07 m +accept -91.5176758 28.2830864 +expect -91.5177778 28.2833333 + +tolerance 2.77777777778e-07 m +accept -92.5177778 27.2833333 +expect -92.5178811 27.2836106 + +tolerance 2.77777777778e-07 m +accept -93.5176731 26.2830225 +expect -93.5177778 26.2833333 + +tolerance 2.77777777778e-07 m +accept -94.5177778 25 +expect -94.5178744 25.0003486 + +tolerance 2.77777777778e-07 m +accept -142.9972522 70.0001631 +expect -143 70 + +tolerance 2.77777777778e-07 m +accept -142 70.0 +expect -142.0026922 69.9998422 + +tolerance 2.77777777778e-07 m +accept -141.9973078 70.0001578 +expect -142 70 + +tolerance 2.77777777778e-07 m +accept -140.9971981 70.0001481 +expect -141 70 + +tolerance 2.77777777778e-07 m +accept -140 70 +expect -140.0027922 69.9998617 + +tolerance 2.77777777778e-07 m +accept -138.9973075 70.0001297 +expect -139 70 + +tolerance 2.77777777778e-07 m +accept -138 70 +expect -138.0026767 69.9998867 + +tolerance 2.77777777778e-07 m +accept -134.9973733 70.000055 +expect -135 70 + +tolerance 2.77777777778e-07 m +accept -130 70 +expect -130.0025347 70.0000511 + +tolerance 2.77777777778e-07 m +accept -128.0009742 69.9999053 +expect -128.0034722 70 + +tolerance 2.77777777778e-07 m +accept -179 70 +expect -179.0035064 69.9990142 + +tolerance 2.77777777778e-07 m +accept -179.9964664 70.0010089 +expect 180 70 + +tolerance 2.77777777778e-07 m +accept 180 70 +expect 179.9964664 69.9989911 + +tolerance 2.77777777778e-07 m +accept 179 70 +expect 178.9964394 69.9989678 + +tolerance 2.77777777778e-07 m +accept -111.9991714 49.9999556 +expect -112 49.9999997 + +tolerance 2.77777777778e-07 m +accept -112 49.9999997 +expect -112.0008286 50.0000439 + +tolerance 2.77777777778e-07 m +accept -111.9991214 49.0000033 +expect -112 49 + +tolerance 2.77777777778e-07 m +accept -112 48 +expect -112.0008492 47.9999606 + +tolerance 2.77777777778e-07 m +accept -111.9991678 47.0000569 +expect -112 47 + +tolerance 2.77777777778e-07 m +accept -112 47 +expect -112.0008325 46.9999431 + +tolerance 2.77777777778e-07 m +accept -111.9991756 46.0000733 +expect -112 46 + +tolerance 2.77777777778e-07 m +accept -112 45 +expect -112.0008022 44.9999197 + +tolerance 2.77777777778e-07 m +accept -130.5177467 51 +expect -130.5193953 50.9997114 + +tolerance 2.77777777778e-07 m +accept -130.5160981 51.0002886 +expect -130.5177467 51 + +tolerance 2.77777777778e-07 m +accept -130.5161206 50.0002897 +expect -130.5177467 49.9999997 + +tolerance 2.77777777778e-07 m +accept -130.5177467 49.9999997 +expect -130.5193731 49.9997097 + +tolerance 2.77777777778e-07 m +accept -130.5161458 49.0002717 +expect -130.5177467 49 + +tolerance 2.77777777778e-07 m +accept -130.5177467 48.1166667 +expect -130.5193258 48.1164106 + +tolerance 2.77777777778e-07 m +accept -130.5161942 47.0002378 +expect -130.5177467 47 + +tolerance 2.77777777778e-07 m +accept -130.5177467 47 +expect -130.5192992 46.9997622 + +tolerance 2.77777777778e-07 m +accept -130.5162172 46.0002222 +expect -130.5177467 46 + +tolerance 2.77777777778e-07 m +accept -130.5177467 45 +expect -130.5192539 44.9997925 + +tolerance 2.77777777778e-07 m +accept -132.9984775 48.1169867 +expect -133 48.1166667 + +tolerance 2.77777777778e-07 m +accept -131.4555556 48.1166667 +expect -131.4571578 48.1163964 + +tolerance 2.77777777778e-07 m +accept -130.5161675 48.1169228 +expect -130.5177467 48.1166667 + +tolerance 2.77777777778e-07 m +accept -128.4555556 48.1166667 +expect -128.4570433 48.1164319 + +tolerance 2.77777777778e-07 m +accept -128.5444444 48.1166667 +expect -128.5459361 48.1164311 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4269 +inv + +step +init=epsg:4267 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept -89.5177778 30.0 +expect -89.5177272 29.9997978 + +tolerance 2.77777777778e-07 m +accept -90.5178639 29.2835592 +expect -90.5177778 29.2833333 + +tolerance 2.77777777778e-07 m +accept -91.5177778 28.2833333 +expect -91.5176758 28.2830864 + +tolerance 2.77777777778e-07 m +accept -92.5178811 27.2836106 +expect -92.5177778 27.2833333 + +tolerance 2.77777777778e-07 m +accept -93.5177778 26.2833333 +expect -93.5176731 26.2830225 + +tolerance 2.77777777778e-07 m +accept -94.5178744 25.0003486 +expect -94.5177778 25 + +tolerance 2.77777777778e-07 m +accept -143 70 +expect -142.9972522 70.0001631 + +tolerance 2.77777777778e-07 m +accept -142.0026922 69.9998422 +expect -142 70.0 + +tolerance 2.77777777778e-07 m +accept -142 70 +expect -141.9973078 70.0001578 + +tolerance 2.77777777778e-07 m +accept -141 70 +expect -140.9971981 70.0001481 + +tolerance 2.77777777778e-07 m +accept -140.0027922 69.9998617 +expect -140 70 + +tolerance 2.77777777778e-07 m +accept -139 70 +expect -138.9973075 70.0001297 + +tolerance 2.77777777778e-07 m +accept -138.0026767 69.9998867 +expect -138 70 + +tolerance 2.77777777778e-07 m +accept -135 70 +expect -134.9973733 70.000055 + +tolerance 2.77777777778e-07 m +accept -130.0025347 70.0000511 +expect -130 70 + +tolerance 2.77777777778e-07 m +accept -128.0034722 70 +expect -128.0009742 69.9999053 + +tolerance 2.77777777778e-07 m +accept -179.0035064 69.9990142 +expect -179 70 + +tolerance 2.77777777778e-07 m +accept 180 70 +expect -179.9964664 70.0010089 + +tolerance 2.77777777778e-07 m +accept 179.9964664 69.9989911 +expect 180 70 + +tolerance 2.77777777778e-07 m +accept 178.9964394 69.9989678 +expect 179 70 + +tolerance 2.77777777778e-07 m +accept -112 49.9999997 +expect -111.9991714 49.9999556 + +tolerance 2.77777777778e-07 m +accept -112.0008286 50.0000439 +expect -112 49.9999997 + +tolerance 2.77777777778e-07 m +accept -112 49 +expect -111.9991214 49.0000033 + +tolerance 2.77777777778e-07 m +accept -112.0008492 47.9999606 +expect -112 48 + +tolerance 2.77777777778e-07 m +accept -112 47 +expect -111.9991678 47.0000569 + +tolerance 2.77777777778e-07 m +accept -112.0008325 46.9999431 +expect -112 47 + +tolerance 2.77777777778e-07 m +accept -112 46 +expect -111.9991756 46.0000733 + +tolerance 2.77777777778e-07 m +accept -112.0008022 44.9999197 +expect -112 45 + +tolerance 2.77777777778e-07 m +accept -130.5193953 50.9997114 +expect -130.5177467 51 + +tolerance 2.77777777778e-07 m +accept -130.5177467 51 +expect -130.5160981 51.0002886 + +tolerance 2.77777777778e-07 m +accept -130.5177467 49.9999997 +expect -130.5161206 50.0002897 + +tolerance 2.77777777778e-07 m +accept -130.5193731 49.9997097 +expect -130.5177467 49.9999997 + +tolerance 2.77777777778e-07 m +accept -130.5177467 49 +expect -130.5161458 49.0002717 + +tolerance 2.77777777778e-07 m +accept -130.5193258 48.1164106 +expect -130.5177467 48.1166667 + +tolerance 2.77777777778e-07 m +accept -130.5177467 47 +expect -130.5161942 47.0002378 + +tolerance 2.77777777778e-07 m +accept -130.5192992 46.9997622 +expect -130.5177467 47 + +tolerance 2.77777777778e-07 m +accept -130.5177467 46 +expect -130.5162172 46.0002222 + +tolerance 2.77777777778e-07 m +accept -130.5192539 44.9997925 +expect -130.5177467 45 + +tolerance 2.77777777778e-07 m +accept -133 48.1166667 +expect -132.9984775 48.1169867 + +tolerance 2.77777777778e-07 m +accept -131.4571578 48.1163964 +expect -131.4555556 48.1166667 + +tolerance 2.77777777778e-07 m +accept -130.5177467 48.1166667 +expect -130.5161675 48.1169228 + +tolerance 2.77777777778e-07 m +accept -128.4570433 48.1164319 +expect -128.4555556 48.1166667 + +tolerance 2.77777777778e-07 m +accept -128.5459361 48.1164311 +expect -128.5444444 48.1166667 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4267 +inv + +step +init=epsg:4269 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept -89.5177272 29.9997978 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -90.5177778 29.2833333 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -91.5176758 28.2830864 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -92.5177778 27.2833333 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -93.5176731 26.2830225 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -94.5177778 25 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -142.9972522 70.0001631 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -142 70.0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -141.9973078 70.0001578 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -140.9971981 70.0001481 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -140 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.9973075 70.0001297 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -134.9973733 70.000055 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128.0009742 69.9999053 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -179 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -179.9964664 70.0010089 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 180 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 179 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.9991714 49.9999556 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 49.9999997 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.9991214 49.0000033 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 48 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.9991678 47.0000569 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 47 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.9991756 46.0000733 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 45 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5177467 51 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5160981 51.0002886 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5161206 50.0002897 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5177467 49.9999997 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5161458 49.0002717 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5177467 48.1166667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5161942 47.0002378 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5177467 47 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5162172 46.0002222 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5177467 45 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -132.9984775 48.1169867 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -131.4555556 48.1166667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5161675 48.1169228 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128.4555556 48.1166667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128.5444444 48.1166667 +roundtrip 1000 + + diff --git a/test/gigs/5207.1.gie b/test/gigs/5207.1.gie deleted file mode 100644 index 8384bf0e..00000000 --- a/test/gigs/5207.1.gie +++ /dev/null @@ -1,252 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5207, NTv2 transformation, v2.0_2011-06-28. Out of transform grid area error tests have been removed. - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4202 +inv - +step +init=epsg:4283 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept -115 -10.05 -expect -115.001251111 -10.0486372222 - -tolerance 2.77777777778e-07 m -accept -114.998744167 -11.0013594444 -expect -115 -11 - -tolerance 2.77777777778e-07 m -accept -115 -12 -expect -115.001261389 -11.9986441667 - -tolerance 2.77777777778e-07 m -accept -138.04 -9 -expect -138.041132778 -8.99854333333 - -tolerance 2.77777777778e-07 m -accept -138.043867222 -9.00145666667 -expect -138.045 -9 - -tolerance 2.77777777778e-07 m -accept -138.05 -9 -expect -138.051132778 -8.99854333333 - -tolerance 2.77777777778e-07 m -accept -138.048867222 -9.00145666667 -expect -138.05 -9 - -tolerance 2.77777777778e-07 m -accept -138.053867222 -9.00145666667 -expect -138.055 -9 - -tolerance 2.77777777778e-07 m -accept -138.06 -9 -expect -138.061132778 -8.99854333333 - -tolerance 2.77777777778e-07 m -accept -138.038730833 -27.1264763889 -expect -138.04 -27.125 - -tolerance 2.77777777778e-07 m -accept -138.045 -27.125 -expect -138.046268889 -27.1235236111 - -tolerance 2.77777777778e-07 m -accept -138.05 -27.125 -expect -138.051268889 -27.1235236111 - -tolerance 2.77777777778e-07 m -accept -138.048731111 -27.1264763889 -expect -138.05 -27.125 - -tolerance 2.77777777778e-07 m -accept -138.055 -27.125 -expect -138.056268889 -27.1235233333 - -tolerance 2.77777777778e-07 m -accept -138.058731111 -27.1264766667 -expect -138.06 -27.125 - -tolerance 2.77777777778e-07 m -accept -136.847222222 -28.05 -expect -136.848525278 -28.0485269444 - -tolerance 2.77777777778e-07 m -accept -137.847222222 -28.05 -expect -137.848505556 -28.0485311111 - -tolerance 2.77777777778e-07 m -accept -138.847222222 -28.05 -expect -138.8484925 -28.0485188889 - -tolerance 2.77777777778e-07 m -accept -139.847222222 -28.05 -expect -139.848475278 -28.0485072222 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4283 +inv - +step +init=epsg:4202 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept -115.001251111 -10.0486372222 -expect -115 -10.05 - -tolerance 2.77777777778e-07 m -accept -115 -11 -expect -114.998744167 -11.0013594444 - -tolerance 2.77777777778e-07 m -accept -115.001261389 -11.9986441667 -expect -115 -12 - -tolerance 2.77777777778e-07 m -accept -138.041132778 -8.99854333333 -expect -138.04 -9 - -tolerance 2.77777777778e-07 m -accept -138.045 -9 -expect -138.043867222 -9.00145666667 - -tolerance 2.77777777778e-07 m -accept -138.051132778 -8.99854333333 -expect -138.05 -9 - -tolerance 2.77777777778e-07 m -accept -138.05 -9 -expect -138.048867222 -9.00145666667 - -tolerance 2.77777777778e-07 m -accept -138.055 -9 -expect -138.053867222 -9.00145666667 - -tolerance 2.77777777778e-07 m -accept -138.061132778 -8.99854333333 -expect -138.06 -9 - -tolerance 2.77777777778e-07 m -accept -138.04 -27.125 -expect -138.038730833 -27.1264763889 - -tolerance 2.77777777778e-07 m -accept -138.046268889 -27.1235236111 -expect -138.045 -27.125 - -tolerance 2.77777777778e-07 m -accept -138.051268889 -27.1235236111 -expect -138.05 -27.125 - -tolerance 2.77777777778e-07 m -accept -138.05 -27.125 -expect -138.048731111 -27.1264763889 - -tolerance 2.77777777778e-07 m -accept -138.056268889 -27.1235233333 -expect -138.055 -27.125 - -tolerance 2.77777777778e-07 m -accept -138.06 -27.125 -expect -138.058731111 -27.1264766667 - -tolerance 2.77777777778e-07 m -accept -136.848525278 -28.0485269444 -expect -136.847222222 -28.05 - -tolerance 2.77777777778e-07 m -accept -137.848505556 -28.0485311111 -expect -137.847222222 -28.05 - -tolerance 2.77777777778e-07 m -accept -138.8484925 -28.0485188889 -expect -138.847222222 -28.05 - -tolerance 2.77777777778e-07 m -accept -139.848475278 -28.0485072222 -expect -139.847222222 -28.05 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4202 +inv - +step +init=epsg:4283 --------------------------------------------------------------------------------- -tolerance 5.55555555556e-08 m -accept -115 -10.05 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -114.998744167 -11.0013594444 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -115 -12 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.04 -9 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.043867222 -9.00145666667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.05 -9 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.048867222 -9.00145666667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.053867222 -9.00145666667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.06 -9 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.038730833 -27.1264763889 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.045 -27.125 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.05 -27.125 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.048731111 -27.1264763889 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.055 -27.125 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.058731111 -27.1264766667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -136.847222222 -28.05 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -137.847222222 -28.05 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.847222222 -28.05 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -139.847222222 -28.05 -roundtrip 1000 - - diff --git a/test/gigs/5207.1.gie_failing b/test/gigs/5207.1.gie_failing new file mode 100644 index 00000000..8384bf0e --- /dev/null +++ b/test/gigs/5207.1.gie_failing @@ -0,0 +1,252 @@ +-------------------------------------------------------------------------------- + +Test 5207, NTv2 transformation, v2.0_2011-06-28. Out of transform grid area error tests have been removed. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4202 +inv + +step +init=epsg:4283 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept -115 -10.05 +expect -115.001251111 -10.0486372222 + +tolerance 2.77777777778e-07 m +accept -114.998744167 -11.0013594444 +expect -115 -11 + +tolerance 2.77777777778e-07 m +accept -115 -12 +expect -115.001261389 -11.9986441667 + +tolerance 2.77777777778e-07 m +accept -138.04 -9 +expect -138.041132778 -8.99854333333 + +tolerance 2.77777777778e-07 m +accept -138.043867222 -9.00145666667 +expect -138.045 -9 + +tolerance 2.77777777778e-07 m +accept -138.05 -9 +expect -138.051132778 -8.99854333333 + +tolerance 2.77777777778e-07 m +accept -138.048867222 -9.00145666667 +expect -138.05 -9 + +tolerance 2.77777777778e-07 m +accept -138.053867222 -9.00145666667 +expect -138.055 -9 + +tolerance 2.77777777778e-07 m +accept -138.06 -9 +expect -138.061132778 -8.99854333333 + +tolerance 2.77777777778e-07 m +accept -138.038730833 -27.1264763889 +expect -138.04 -27.125 + +tolerance 2.77777777778e-07 m +accept -138.045 -27.125 +expect -138.046268889 -27.1235236111 + +tolerance 2.77777777778e-07 m +accept -138.05 -27.125 +expect -138.051268889 -27.1235236111 + +tolerance 2.77777777778e-07 m +accept -138.048731111 -27.1264763889 +expect -138.05 -27.125 + +tolerance 2.77777777778e-07 m +accept -138.055 -27.125 +expect -138.056268889 -27.1235233333 + +tolerance 2.77777777778e-07 m +accept -138.058731111 -27.1264766667 +expect -138.06 -27.125 + +tolerance 2.77777777778e-07 m +accept -136.847222222 -28.05 +expect -136.848525278 -28.0485269444 + +tolerance 2.77777777778e-07 m +accept -137.847222222 -28.05 +expect -137.848505556 -28.0485311111 + +tolerance 2.77777777778e-07 m +accept -138.847222222 -28.05 +expect -138.8484925 -28.0485188889 + +tolerance 2.77777777778e-07 m +accept -139.847222222 -28.05 +expect -139.848475278 -28.0485072222 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4283 +inv + +step +init=epsg:4202 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept -115.001251111 -10.0486372222 +expect -115 -10.05 + +tolerance 2.77777777778e-07 m +accept -115 -11 +expect -114.998744167 -11.0013594444 + +tolerance 2.77777777778e-07 m +accept -115.001261389 -11.9986441667 +expect -115 -12 + +tolerance 2.77777777778e-07 m +accept -138.041132778 -8.99854333333 +expect -138.04 -9 + +tolerance 2.77777777778e-07 m +accept -138.045 -9 +expect -138.043867222 -9.00145666667 + +tolerance 2.77777777778e-07 m +accept -138.051132778 -8.99854333333 +expect -138.05 -9 + +tolerance 2.77777777778e-07 m +accept -138.05 -9 +expect -138.048867222 -9.00145666667 + +tolerance 2.77777777778e-07 m +accept -138.055 -9 +expect -138.053867222 -9.00145666667 + +tolerance 2.77777777778e-07 m +accept -138.061132778 -8.99854333333 +expect -138.06 -9 + +tolerance 2.77777777778e-07 m +accept -138.04 -27.125 +expect -138.038730833 -27.1264763889 + +tolerance 2.77777777778e-07 m +accept -138.046268889 -27.1235236111 +expect -138.045 -27.125 + +tolerance 2.77777777778e-07 m +accept -138.051268889 -27.1235236111 +expect -138.05 -27.125 + +tolerance 2.77777777778e-07 m +accept -138.05 -27.125 +expect -138.048731111 -27.1264763889 + +tolerance 2.77777777778e-07 m +accept -138.056268889 -27.1235233333 +expect -138.055 -27.125 + +tolerance 2.77777777778e-07 m +accept -138.06 -27.125 +expect -138.058731111 -27.1264766667 + +tolerance 2.77777777778e-07 m +accept -136.848525278 -28.0485269444 +expect -136.847222222 -28.05 + +tolerance 2.77777777778e-07 m +accept -137.848505556 -28.0485311111 +expect -137.847222222 -28.05 + +tolerance 2.77777777778e-07 m +accept -138.8484925 -28.0485188889 +expect -138.847222222 -28.05 + +tolerance 2.77777777778e-07 m +accept -139.848475278 -28.0485072222 +expect -139.847222222 -28.05 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4202 +inv + +step +init=epsg:4283 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept -115 -10.05 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -114.998744167 -11.0013594444 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -115 -12 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.04 -9 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.043867222 -9.00145666667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.05 -9 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.048867222 -9.00145666667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.053867222 -9.00145666667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.06 -9 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.038730833 -27.1264763889 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.045 -27.125 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.05 -27.125 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.048731111 -27.1264763889 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.055 -27.125 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.058731111 -27.1264766667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -136.847222222 -28.05 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -137.847222222 -28.05 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.847222222 -28.05 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -139.847222222 -28.05 +roundtrip 1000 + + diff --git a/test/gigs/5207.2.gie b/test/gigs/5207.2.gie deleted file mode 100644 index bc76504a..00000000 --- a/test/gigs/5207.2.gie +++ /dev/null @@ -1,456 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5206, NADCON transformation, v2.0_2011-06-28. Out of transform grid area error tests have been removed. - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4267 +inv - +step +init=epsg:4269 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept -142 70 -expect -142.002804722 69.9998069444 - -tolerance 2.77777777778e-07 m -accept -141.997195278 70.0001930556 -expect -142 70 - -tolerance 2.77777777778e-07 m -accept -140.997219722 70.0001791667 -expect -141 70 - -tolerance 2.77777777778e-07 m -accept -140 70 -expect -140.002795278 69.9998280556 - -tolerance 2.77777777778e-07 m -accept -138.997199444 70.0001608333 -expect -139 70 - -tolerance 2.77777777778e-07 m -accept -138 70 -expect -138.002957222 69.9998755556 - -tolerance 2.77777777778e-07 m -accept -134.997081944 70.0000463889 -expect -135 70 - -tolerance 2.77777777778e-07 m -accept -130 70 -expect -130.002737222 70.0000533333 - -tolerance 2.77777777778e-07 m -accept -128.000734722 69.9998663889 -expect -128.003472222 70 - -tolerance 2.77777777778e-07 m -accept -128 70 -expect -128.002737778 70.0001336111 - -tolerance 2.77777777778e-07 m -accept -125.997388333 69.9997780556 -expect -126 70 - -tolerance 2.77777777778e-07 m -accept -88.005575 70 -expect -88.0056825 70.0006094444 - -tolerance 2.77777777778e-07 m -accept -88 70 -expect -88.0001072222 70.0006091667 - -tolerance 2.77777777778e-07 m -accept -87.9998933333 69.9993908333 -expect -88 70 - -tolerance 2.77777777778e-07 m -accept -87.6610917 70 -expect -87.6611716667 70.0006033333 - -tolerance 2.77777777778e-07 m -accept -112.165693333 51.0169555556 -expect -112.166607778 51.0170094444 - -tolerance 2.77777777778e-07 m -accept -111.999093889 50.9999491667 -expect -112 51 - -tolerance 2.77777777778e-07 m -accept -111.999095278 49.9999597222 -expect -112 49.9999997222 - -tolerance 2.77777777778e-07 m -accept -112 49.9999997222 -expect -112.000904639 50.0000396667 - -tolerance 2.77777777778e-07 m -accept -111.9991175 49.0000063889 -expect -112 49 - -tolerance 2.77777777778e-07 m -accept -112 48 -expect -112.0008525 47.9999888889 - -tolerance 2.77777777778e-07 m -accept -111.999174722 47.0000097222 -expect -112 47 - -tolerance 2.77777777778e-07 m -accept -112 47 -expect -112.000825278 46.9999902778 - -tolerance 2.77777777778e-07 m -accept -130.517746667 51 -expect -130.519401944 50.9997713889 - -tolerance 2.77777777778e-07 m -accept -130.516091667 51.0002286111 -expect -130.517746667 51 - -tolerance 2.77777777778e-07 m -accept -130.516041667 50.0002461111 -expect -130.517746667 49.9999997222 - -tolerance 2.77777777778e-07 m -accept -130.517746667 49.9999997222 -expect -130.519451667 49.9997533333 - -tolerance 2.77777777778e-07 m -accept -130.516067222 49.0002825 -expect -130.517746667 49 - -tolerance 2.77777777778e-07 m -accept -130.517746667 48 -expect -130.519391111 47.9996794444 - -tolerance 2.77777777778e-07 m -accept -130.516146944 47.0003611111 -expect -130.517746667 47 - -tolerance 2.77777777778e-07 m -accept -130.517746667 47 -expect -130.519346389 46.9996386111 - -tolerance 2.77777777778e-07 m -accept -132.998205278 48.1170263889 -expect -133 48.1166666667 - -tolerance 2.77777777778e-07 m -accept -131.455555556 48.1166666667 -expect -131.457260278 48.1163330556 - -tolerance 2.77777777778e-07 m -accept -130.516098056 48.1169827778 -expect -130.517746667 48.1166666667 - -tolerance 2.77777777778e-07 m -accept -128.455555556 48.1166666667 -expect -128.457086944 48.1163927778 - -tolerance 2.77777777778e-07 m -accept -128.5444 48.1167066 -expect -128.545936111 48.1164311111 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4269 +inv - +step +init=epsg:4267 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept -142.002804722 69.9998069444 -expect -142 70 - -tolerance 2.77777777778e-07 m -accept -142 70 -expect -141.997195278 70.0001930556 - -tolerance 2.77777777778e-07 m -accept -141 70 -expect -140.997219722 70.0001791667 - -tolerance 2.77777777778e-07 m -accept -140.002795278 69.9998280556 -expect -140 70 - -tolerance 2.77777777778e-07 m -accept -139 70 -expect -138.997199444 70.0001608333 - -tolerance 2.77777777778e-07 m -accept -138.002957222 69.9998755556 -expect -138 70 - -tolerance 2.77777777778e-07 m -accept -135 70 -expect -134.997081944 70.0000463889 - -tolerance 2.77777777778e-07 m -accept -130.002737222 70.0000533333 -expect -130 70 - -tolerance 2.77777777778e-07 m -accept -128.003472222 70 -expect -128.000734722 69.9998663889 - -tolerance 2.77777777778e-07 m -accept -128.002737778 70.0001336111 -expect -128 70 - -tolerance 2.77777777778e-07 m -accept -126 70 -expect -125.997388333 69.9997780556 - -tolerance 2.77777777778e-07 m -accept -88.0056825 70.0006094444 -expect -88.005575 70 - -tolerance 2.77777777778e-07 m -accept -88.0001072222 70.0006091667 -expect -88 70 - -tolerance 2.77777777778e-07 m -accept -88 70 -expect -87.9998933333 69.9993908333 - -tolerance 2.77777777778e-07 m -accept -87.6611716667 70.0006033333 -expect -87.6610917 70 - -tolerance 2.77777777778e-07 m -accept -112.166607778 51.0170094444 -expect -112.165693333 51.0169555556 - -tolerance 2.77777777778e-07 m -accept -112 51 -expect -111.999093889 50.9999491667 - -tolerance 2.77777777778e-07 m -accept -112 49.9999997222 -expect -111.999095278 49.9999597222 - -tolerance 2.77777777778e-07 m -accept -112.000904639 50.0000396667 -expect -112 49.9999997222 - -tolerance 2.77777777778e-07 m -accept -112 49 -expect -111.9991175 49.0000063889 - -tolerance 2.77777777778e-07 m -accept -112.0008525 47.9999888889 -expect -112 48 - -tolerance 2.77777777778e-07 m -accept -112 47 -expect -111.999174722 47.0000097222 - -tolerance 2.77777777778e-07 m -accept -112.000825278 46.9999902778 -expect -112 47 - -tolerance 2.77777777778e-07 m -accept -130.519401944 50.9997713889 -expect -130.517746667 51 - -tolerance 2.77777777778e-07 m -accept -130.517746667 51 -expect -130.516091667 51.0002286111 - -tolerance 2.77777777778e-07 m -accept -130.517746667 49.9999997222 -expect -130.516041667 50.0002461111 - -tolerance 2.77777777778e-07 m -accept -130.519451667 49.9997533333 -expect -130.517746667 49.9999997222 - -tolerance 2.77777777778e-07 m -accept -130.517746667 49 -expect -130.516067222 49.0002825 - -tolerance 2.77777777778e-07 m -accept -130.519391111 47.9996794444 -expect -130.517746667 48 - -tolerance 2.77777777778e-07 m -accept -130.517746667 47 -expect -130.516146944 47.0003611111 - -tolerance 2.77777777778e-07 m -accept -130.519346389 46.9996386111 -expect -130.517746667 47 - -tolerance 2.77777777778e-07 m -accept -133 48.1166666667 -expect -132.998205278 48.1170263889 - -tolerance 2.77777777778e-07 m -accept -131.457260278 48.1163330556 -expect -131.455555556 48.1166666667 - -tolerance 2.77777777778e-07 m -accept -130.517746667 48.1166666667 -expect -130.516098056 48.1169827778 - -tolerance 2.77777777778e-07 m -accept -128.457086944 48.1163927778 -expect -128.455555556 48.1166666667 - -tolerance 2.77777777778e-07 m -accept -128.545936111 48.1164311111 -expect -128.5444 48.1167066 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4267 +inv - +step +init=epsg:4269 --------------------------------------------------------------------------------- -tolerance 5.55555555556e-08 m -accept -142 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -141.997195278 70.0001930556 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -140.997219722 70.0001791667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -140 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.997199444 70.0001608333 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -134.997081944 70.0000463889 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -128.000734722 69.9998663889 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -128 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -125.997388333 69.9997780556 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -88.005575 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -88 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -87.9998933333 69.9993908333 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -87.6610917 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -112.165693333 51.0169555556 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -111.999093889 50.9999491667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -111.999095278 49.9999597222 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -112 49.9999997222 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -111.9991175 49.0000063889 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -112 48 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -111.999174722 47.0000097222 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -112 47 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.517746667 51 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.516091667 51.0002286111 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.516041667 50.0002461111 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.517746667 49.9999997222 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.516067222 49.0002825 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.517746667 48 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.516146944 47.0003611111 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.517746667 47 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -132.998205278 48.1170263889 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -131.455555556 48.1166666667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.516098056 48.1169827778 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -128.455555556 48.1166666667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -128.5444 48.1167066 -roundtrip 1000 - - diff --git a/test/gigs/5207.2.gie_failing b/test/gigs/5207.2.gie_failing new file mode 100644 index 00000000..bc76504a --- /dev/null +++ b/test/gigs/5207.2.gie_failing @@ -0,0 +1,456 @@ +-------------------------------------------------------------------------------- + +Test 5206, NADCON transformation, v2.0_2011-06-28. Out of transform grid area error tests have been removed. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4267 +inv + +step +init=epsg:4269 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept -142 70 +expect -142.002804722 69.9998069444 + +tolerance 2.77777777778e-07 m +accept -141.997195278 70.0001930556 +expect -142 70 + +tolerance 2.77777777778e-07 m +accept -140.997219722 70.0001791667 +expect -141 70 + +tolerance 2.77777777778e-07 m +accept -140 70 +expect -140.002795278 69.9998280556 + +tolerance 2.77777777778e-07 m +accept -138.997199444 70.0001608333 +expect -139 70 + +tolerance 2.77777777778e-07 m +accept -138 70 +expect -138.002957222 69.9998755556 + +tolerance 2.77777777778e-07 m +accept -134.997081944 70.0000463889 +expect -135 70 + +tolerance 2.77777777778e-07 m +accept -130 70 +expect -130.002737222 70.0000533333 + +tolerance 2.77777777778e-07 m +accept -128.000734722 69.9998663889 +expect -128.003472222 70 + +tolerance 2.77777777778e-07 m +accept -128 70 +expect -128.002737778 70.0001336111 + +tolerance 2.77777777778e-07 m +accept -125.997388333 69.9997780556 +expect -126 70 + +tolerance 2.77777777778e-07 m +accept -88.005575 70 +expect -88.0056825 70.0006094444 + +tolerance 2.77777777778e-07 m +accept -88 70 +expect -88.0001072222 70.0006091667 + +tolerance 2.77777777778e-07 m +accept -87.9998933333 69.9993908333 +expect -88 70 + +tolerance 2.77777777778e-07 m +accept -87.6610917 70 +expect -87.6611716667 70.0006033333 + +tolerance 2.77777777778e-07 m +accept -112.165693333 51.0169555556 +expect -112.166607778 51.0170094444 + +tolerance 2.77777777778e-07 m +accept -111.999093889 50.9999491667 +expect -112 51 + +tolerance 2.77777777778e-07 m +accept -111.999095278 49.9999597222 +expect -112 49.9999997222 + +tolerance 2.77777777778e-07 m +accept -112 49.9999997222 +expect -112.000904639 50.0000396667 + +tolerance 2.77777777778e-07 m +accept -111.9991175 49.0000063889 +expect -112 49 + +tolerance 2.77777777778e-07 m +accept -112 48 +expect -112.0008525 47.9999888889 + +tolerance 2.77777777778e-07 m +accept -111.999174722 47.0000097222 +expect -112 47 + +tolerance 2.77777777778e-07 m +accept -112 47 +expect -112.000825278 46.9999902778 + +tolerance 2.77777777778e-07 m +accept -130.517746667 51 +expect -130.519401944 50.9997713889 + +tolerance 2.77777777778e-07 m +accept -130.516091667 51.0002286111 +expect -130.517746667 51 + +tolerance 2.77777777778e-07 m +accept -130.516041667 50.0002461111 +expect -130.517746667 49.9999997222 + +tolerance 2.77777777778e-07 m +accept -130.517746667 49.9999997222 +expect -130.519451667 49.9997533333 + +tolerance 2.77777777778e-07 m +accept -130.516067222 49.0002825 +expect -130.517746667 49 + +tolerance 2.77777777778e-07 m +accept -130.517746667 48 +expect -130.519391111 47.9996794444 + +tolerance 2.77777777778e-07 m +accept -130.516146944 47.0003611111 +expect -130.517746667 47 + +tolerance 2.77777777778e-07 m +accept -130.517746667 47 +expect -130.519346389 46.9996386111 + +tolerance 2.77777777778e-07 m +accept -132.998205278 48.1170263889 +expect -133 48.1166666667 + +tolerance 2.77777777778e-07 m +accept -131.455555556 48.1166666667 +expect -131.457260278 48.1163330556 + +tolerance 2.77777777778e-07 m +accept -130.516098056 48.1169827778 +expect -130.517746667 48.1166666667 + +tolerance 2.77777777778e-07 m +accept -128.455555556 48.1166666667 +expect -128.457086944 48.1163927778 + +tolerance 2.77777777778e-07 m +accept -128.5444 48.1167066 +expect -128.545936111 48.1164311111 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4269 +inv + +step +init=epsg:4267 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept -142.002804722 69.9998069444 +expect -142 70 + +tolerance 2.77777777778e-07 m +accept -142 70 +expect -141.997195278 70.0001930556 + +tolerance 2.77777777778e-07 m +accept -141 70 +expect -140.997219722 70.0001791667 + +tolerance 2.77777777778e-07 m +accept -140.002795278 69.9998280556 +expect -140 70 + +tolerance 2.77777777778e-07 m +accept -139 70 +expect -138.997199444 70.0001608333 + +tolerance 2.77777777778e-07 m +accept -138.002957222 69.9998755556 +expect -138 70 + +tolerance 2.77777777778e-07 m +accept -135 70 +expect -134.997081944 70.0000463889 + +tolerance 2.77777777778e-07 m +accept -130.002737222 70.0000533333 +expect -130 70 + +tolerance 2.77777777778e-07 m +accept -128.003472222 70 +expect -128.000734722 69.9998663889 + +tolerance 2.77777777778e-07 m +accept -128.002737778 70.0001336111 +expect -128 70 + +tolerance 2.77777777778e-07 m +accept -126 70 +expect -125.997388333 69.9997780556 + +tolerance 2.77777777778e-07 m +accept -88.0056825 70.0006094444 +expect -88.005575 70 + +tolerance 2.77777777778e-07 m +accept -88.0001072222 70.0006091667 +expect -88 70 + +tolerance 2.77777777778e-07 m +accept -88 70 +expect -87.9998933333 69.9993908333 + +tolerance 2.77777777778e-07 m +accept -87.6611716667 70.0006033333 +expect -87.6610917 70 + +tolerance 2.77777777778e-07 m +accept -112.166607778 51.0170094444 +expect -112.165693333 51.0169555556 + +tolerance 2.77777777778e-07 m +accept -112 51 +expect -111.999093889 50.9999491667 + +tolerance 2.77777777778e-07 m +accept -112 49.9999997222 +expect -111.999095278 49.9999597222 + +tolerance 2.77777777778e-07 m +accept -112.000904639 50.0000396667 +expect -112 49.9999997222 + +tolerance 2.77777777778e-07 m +accept -112 49 +expect -111.9991175 49.0000063889 + +tolerance 2.77777777778e-07 m +accept -112.0008525 47.9999888889 +expect -112 48 + +tolerance 2.77777777778e-07 m +accept -112 47 +expect -111.999174722 47.0000097222 + +tolerance 2.77777777778e-07 m +accept -112.000825278 46.9999902778 +expect -112 47 + +tolerance 2.77777777778e-07 m +accept -130.519401944 50.9997713889 +expect -130.517746667 51 + +tolerance 2.77777777778e-07 m +accept -130.517746667 51 +expect -130.516091667 51.0002286111 + +tolerance 2.77777777778e-07 m +accept -130.517746667 49.9999997222 +expect -130.516041667 50.0002461111 + +tolerance 2.77777777778e-07 m +accept -130.519451667 49.9997533333 +expect -130.517746667 49.9999997222 + +tolerance 2.77777777778e-07 m +accept -130.517746667 49 +expect -130.516067222 49.0002825 + +tolerance 2.77777777778e-07 m +accept -130.519391111 47.9996794444 +expect -130.517746667 48 + +tolerance 2.77777777778e-07 m +accept -130.517746667 47 +expect -130.516146944 47.0003611111 + +tolerance 2.77777777778e-07 m +accept -130.519346389 46.9996386111 +expect -130.517746667 47 + +tolerance 2.77777777778e-07 m +accept -133 48.1166666667 +expect -132.998205278 48.1170263889 + +tolerance 2.77777777778e-07 m +accept -131.457260278 48.1163330556 +expect -131.455555556 48.1166666667 + +tolerance 2.77777777778e-07 m +accept -130.517746667 48.1166666667 +expect -130.516098056 48.1169827778 + +tolerance 2.77777777778e-07 m +accept -128.457086944 48.1163927778 +expect -128.455555556 48.1166666667 + +tolerance 2.77777777778e-07 m +accept -128.545936111 48.1164311111 +expect -128.5444 48.1167066 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4267 +inv + +step +init=epsg:4269 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept -142 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -141.997195278 70.0001930556 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -140.997219722 70.0001791667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -140 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.997199444 70.0001608333 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -134.997081944 70.0000463889 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128.000734722 69.9998663889 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -125.997388333 69.9997780556 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -88.005575 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -88 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -87.9998933333 69.9993908333 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -87.6610917 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112.165693333 51.0169555556 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.999093889 50.9999491667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.999095278 49.9999597222 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 49.9999997222 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.9991175 49.0000063889 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 48 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.999174722 47.0000097222 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 47 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.517746667 51 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.516091667 51.0002286111 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.516041667 50.0002461111 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.517746667 49.9999997222 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.516067222 49.0002825 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.517746667 48 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.516146944 47.0003611111 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.517746667 47 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -132.998205278 48.1170263889 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -131.455555556 48.1166666667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.516098056 48.1169827778 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128.455555556 48.1166666667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128.5444 48.1167066 +roundtrip 1000 + + diff --git a/test/gigs/Makefile.am b/test/gigs/Makefile.am new file mode 100644 index 00000000..4840c272 --- /dev/null +++ b/test/gigs/Makefile.am @@ -0,0 +1,18 @@ +EXTRA_DIST = \ + 5101.1-jhs.gie \ + 5101.2-jhs.gie \ + 5101.3-jhs.gie \ + 5101.4-jhs-etmerc.gie \ + 5102.1.gie \ + 5103.1.gie \ + 5103.2.gie \ + 5103.3.gie \ + 5105.2.gie \ + 5106.gie \ + 5107.gie \ + 5109.gie \ + 5111.1.gie \ + 5112.gie \ + 5113.gie \ + 5201.gie \ + 5208.gie -- cgit v1.2.3 From d723391dbc8f3f06e40b8b57edbc85df99f86bd6 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Fri, 2 Feb 2018 11:39:36 +0100 Subject: Remove GIGS Python test suite. All the GIGS JSON files have been converted to the gie format and are now covered by running "make check". Therefore we no longer need the Python setup. Removing it from the Travis CI setup should speed up the test execution time a bit. --- docs/plot/plotdefs.json | 1476 -------------------------------------- test/gigs/5101.1-jhs.json | 63 -- test/gigs/5101.2-jhs.json | 32 - test/gigs/5101.3-jhs.json | 33 - test/gigs/5101.4-jhs-etmerc.json | 31 - test/gigs/5101.4-jhs.json | 33 - test/gigs/5102.1.json | 29 - test/gigs/5102.2.json | 29 - test/gigs/5103.1.json | 29 - test/gigs/5103.2.json | 21 - test/gigs/5103.3.json | 20 - test/gigs/5104.json | 30 - test/gigs/5105.1.json | 26 - test/gigs/5105.2.json | 23 - test/gigs/5106.json | 35 - test/gigs/5107.json | 26 - test/gigs/5108.json | 26 - test/gigs/5109.json | 23 - test/gigs/5110.json | 12 - test/gigs/5111.1.json | 45 -- test/gigs/5111.2.json | 44 -- test/gigs/5112.json | 15 - test/gigs/5113.json | 12 - test/gigs/5201.json | 39 - test/gigs/5203.1.json | 25 - test/gigs/5204.1.json | 25 - test/gigs/5205.1.json | 25 - test/gigs/5206.json | 54 -- test/gigs/5207.1.json | 30 - test/gigs/5207.2.json | 47 -- test/gigs/5208.json | 25 - test/gigs/TESTNOTES.md | 225 ------ test/gigs/convert_to_gie.py | 69 -- test/gigs/test_json.py | 528 -------------- travis/before_install.sh | 15 - travis/install.sh | 17 - travis/osx/before_install.sh | 2 - 37 files changed, 3239 deletions(-) delete mode 100644 docs/plot/plotdefs.json delete mode 100644 test/gigs/5101.1-jhs.json delete mode 100644 test/gigs/5101.2-jhs.json delete mode 100644 test/gigs/5101.3-jhs.json delete mode 100644 test/gigs/5101.4-jhs-etmerc.json delete mode 100644 test/gigs/5101.4-jhs.json delete mode 100644 test/gigs/5102.1.json delete mode 100644 test/gigs/5102.2.json delete mode 100644 test/gigs/5103.1.json delete mode 100644 test/gigs/5103.2.json delete mode 100644 test/gigs/5103.3.json delete mode 100644 test/gigs/5104.json delete mode 100644 test/gigs/5105.1.json delete mode 100644 test/gigs/5105.2.json delete mode 100644 test/gigs/5106.json delete mode 100644 test/gigs/5107.json delete mode 100644 test/gigs/5108.json delete mode 100644 test/gigs/5109.json delete mode 100644 test/gigs/5110.json delete mode 100644 test/gigs/5111.1.json delete mode 100644 test/gigs/5111.2.json delete mode 100644 test/gigs/5112.json delete mode 100644 test/gigs/5113.json delete mode 100644 test/gigs/5201.json delete mode 100644 test/gigs/5203.1.json delete mode 100644 test/gigs/5204.1.json delete mode 100644 test/gigs/5205.1.json delete mode 100644 test/gigs/5206.json delete mode 100644 test/gigs/5207.1.json delete mode 100644 test/gigs/5207.2.json delete mode 100644 test/gigs/5208.json delete mode 100644 test/gigs/TESTNOTES.md delete mode 100644 test/gigs/convert_to_gie.py delete mode 100644 test/gigs/test_json.py diff --git a/docs/plot/plotdefs.json b/docs/plot/plotdefs.json deleted file mode 100644 index b61466f0..00000000 --- a/docs/plot/plotdefs.json +++ /dev/null @@ -1,1476 +0,0 @@ -[ - { - "filename": "aea.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "aea", - "projstring": "+proj=aea", - "res": "low", - "type": "poly" - }, - { - "filename": "aeqd.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "aeqd", - "projstring": "+proj=aeqd", - "res": "low", - "type": "poly" - }, - { - "filename": "airy.png", - "latmax": 90, - "latmin": -90, - "lonmax": 90, - "lonmin": -90, - "name": "airy", - "projstring": "+proj=airy", - "res": "low", - "type": "poly" - }, - { - "filename": "aitoff.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "aitoff", - "projstring": "+proj=aitoff", - "res": "low", - "type": "poly" - }, - { - "filename": "alsk.png", - "latmax": 75, - "latmin": 50, - "lonmax": -130, - "lonmin": -175, - "name": "alsk", - "projstring": "+proj=alsk", - "res": "med", - "type": "poly" - }, - { - "filename": "apian.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "apian", - "projstring": "+proj=apian", - "res": "low", - "type": "poly" - }, - { - "filename": "august.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "august", - "projstring": "+proj=august", - "res": "low", - "type": "poly" - }, - { - "filename": "bacon.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "bacon", - "projstring": "+proj=bacon", - "res": "low", - "type": "poly" - }, - { - "filename": "bipc.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "bipc", - "projstring": "+proj=bipc +ns", - "res": "low", - "type": "line" - }, - { - "filename": "boggs.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "boggs", - "projstring": "+proj=boggs", - "res": "low", - "type": "poly" - }, - { - "filename": "bonne.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "bonne", - "projstring": "+proj=bonne +lat_1=10", - "res": "low", - "type": "poly" - }, - { - "filename": "cass.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "cass", - "projstring": "+proj=cass", - "res": "low", - "type": "poly" - }, - { - "filename": "cc.png", - "latmax": 75, - "latmin": -75, - "lonmax": 180, - "lonmin": -180, - "name": "cc", - "projstring": "+proj=cc", - "res": "low", - "type": "poly" - }, - { - "filename": "ccon.png", - "latmax": 70, - "latmin": 34, - "lonmax": -30, - "lonmin": 68, - "name": "ccon", - "projstring": "+proj=ccon +lat_1=52 +lon_0=19", - "res": "med", - "type": "poly" - }, - { - "filename": "cea.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "cea", - "projstring": "+proj=cea", - "res": "low", - "type": "poly" - }, - { - "filename": "chamb.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "chamb", - "projstring": "+proj=chamb +lat_1=10 +lon_1=30 +lon_2=40", - "res": "low", - "type": "poly" - }, - { - "filename": "collg.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "collg", - "projstring": "+proj=collg", - "res": "low", - "type": "poly" - }, - { - "filename": "comill.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "comill", - "projstring": "+proj=comill", - "res": "low", - "type": "poly" - }, - { - "filename": "crast.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "crast", - "projstring": "+proj=crast", - "res": "low", - "type": "poly" - }, - { - "filename": "denoy.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "denoy", - "projstring": "+proj=denoy", - "res": "low", - "type": "poly" - }, - { - "filename": "eck1.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "eck1", - "projstring": "+proj=eck1", - "res": "low", - "type": "poly" - }, - { - "filename": "eck2.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "eck2", - "projstring": "+proj=eck2", - "res": "low", - "type": "poly" - }, - { - "filename": "eck3.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "eck3", - "projstring": "+proj=eck3", - "res": "low", - "type": "poly" - }, - { - "filename": "eck4.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "eck4", - "projstring": "+proj=eck4", - "res": "low", - "type": "poly" - }, - { - "filename": "eck5.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "eck5", - "projstring": "+proj=eck5", - "res": "low", - "type": "poly" - }, - { - "filename": "eck6.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "eck6", - "projstring": "+proj=eck6", - "res": "low", - "type": "poly" - }, - { - "filename": "eqc.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "eqc", - "projstring": "+proj=eqc", - "res": "low", - "type": "poly" - }, - { - "filename": "eqdc.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "eqdc", - "projstring": "+proj=eqdc +lat_1=55 +lat_2=60", - "res": "low", - "type": "poly" - }, - { - "filename": "euler.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "euler", - "projstring": "+proj=euler +lat_1=67 +lat_2=75", - "res": "low", - "type": "poly" - }, - { - "filename": "etmerc.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "etmerc", - "projstring": "+proj=etmerc +lon_0=-40", - "res": "low", - "type": "line" - }, - { - "filename": "fahey.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "fahey", - "projstring": "+proj=fahey", - "res": "low", - "type": "poly" - }, - { - "filename": "fouc.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "fouc", - "projstring": "+proj=fouc", - "res": "low", - "type": "poly" - }, - { - "filename": "fouc_s.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "fouc_s", - "projstring": "+proj=fouc_s", - "res": "low", - "type": "poly" - }, - { - "filename": "gall.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "gall", - "projstring": "+proj=gall", - "res": "low", - "type": "poly" - }, - { - "filename": "geos.png", - "latmax": 90, - "latmin": -90, - "lonmax": 15, - "lonmin": -135, - "name": "geos", - "projstring": "+proj=geos +h=35785831.0 +lon_0=-60 +sweep=y", - "res": "low", - "type": "poly" - }, - { - "filename": "gins8.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "gins8", - "projstring": "+proj=gins8", - "res": "low", - "type": "poly" - }, - { - "filename": "gn_sinu.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "gn_sinu", - "projstring": "+proj=gn_sinu +m=2 +n=3", - "res": "low", - "type": "poly" - }, - { - "filename": "gnom.png", - "latmax": 90, - "latmin": 50, - "lonmax": 180, - "lonmin": -180, - "name": "gnom", - "projstring": "+proj=gnom +lat_0=90 +lon_0=-50", - "res": "low", - "type": "poly" - }, - { - "filename": "goode.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "goode", - "projstring": "+proj=goode", - "res": "low", - "type": "poly" - }, - { - "filename": "gs48.png", - "latmax": 45, - "latmin": 25, - "lonmax": -70, - "lonmin": -125, - "name": "gs48", - "projstring": "+proj=gs48", - "res": "med", - "type": "poly" - }, - { - "filename": "gs50.png", - "latmax": 75, - "latmin": 15, - "lonmax": -55, - "lonmin": -170, - "name": "gs50", - "projstring": "+proj=gs50", - "res": "med", - "type": "poly" - }, - { - "filename": "hammer.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "hammer", - "projstring": "+proj=hammer", - "res": "low", - "type": "poly" - }, - { - "filename": "hatano.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "hatano", - "projstring": "+proj=hatano", - "res": "low", - "type": "poly" - }, - { - "filename": "igh.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "igh", - "projstring": "+proj=igh", - "res": "low", - "type": "line" - }, - { - "filename": "imw_p.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "imw_p", - "projstring": "+proj=imw_p +lat_1=30 +lat_2=-40", - "res": "low", - "type": "line" - }, - { - "filename": "isea.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "isea", - "projstring": "+proj=isea", - "res": "low", - "type": "line" - }, - { - "filename": "kav5.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "kav5", - "projstring": "+proj=kav5", - "res": "low", - "type": "poly" - }, - { - "filename": "kav7.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "kav7", - "projstring": "+proj=kav7", - "res": "low", - "type": "poly" - }, - { - "filename": "krovak.png", - "latmax": 58, - "latmin": 42, - "lonmax": 25, - "lonmin": 5, - "name": "krovak", - "projstring": "+proj=krovak", - "res": "med", - "type": "poly" - }, - { - "filename": "labrd.png", - "latmax": 0, - "latmin": -35, - "lonmax": 55, - "lonmin": 30, - "name": "labrd", - "projstring": "+proj=labrd +lon_0=40 +lat_0=-10", - "res": "med", - "type": "poly" - }, - { - "filename": "laea.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "laea", - "projstring": "+proj=laea", - "res": "low", - "type": "poly" - }, - { - "filename": "lagrng.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "lagrng", - "projstring": "+proj=lagrng", - "res": "low", - "type": "poly" - }, - { - "filename": "larr.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "larr", - "projstring": "+proj=larr", - "res": "low", - "type": "poly" - }, - { - "filename": "lask.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "lask", - "projstring": "+proj=lask", - "res": "low", - "type": "poly" - }, - { - "filename": "lcc.png", - "latmax": 90, - "latmin": 10, - "lonmax": -10, - "lonmin": -160, - "name": "lcc", - "projstring": "+proj=lcc +lon_0=-90", - "res": "med", - "type": "poly" - }, - { - "filename": "lcca.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "lcca", - "projstring": "+proj=lcca +lat_0=35", - "res": "low", - "type": "poly" - }, - { - "filename": "leac.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "leac", - "projstring": "+proj=leac", - "res": "low", - "type": "poly" - }, - { - "filename": "lee_os.png", - "latmax": 85, - "latmin": -85, - "lonmax": -80, - "lonmin": -180, - "name": "lee_os", - "projstring": "+proj=lee_os", - "res": "med", - "type": "poly" - }, - { - "filename": "loxim.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "loxim", - "projstring": "+proj=loxim", - "res": "low", - "type": "poly" - }, - { - "filename": "lsat.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "lsat", - "projstring": "+proj=lsat +ellps=GRS80 +lat_1=-60 +lat_2=60 +lsat=2 +path=2", - "res": "low", - "type": "line" - }, - { - "filename": "mbt_s.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "mbt_s", - "projstring": "+proj=mbt_s", - "res": "low", - "type": "poly" - }, - { - "filename": "mbt_fps.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "mbt_fps", - "projstring": "+proj=mbt_fps", - "res": "low", - "type": "poly" - }, - { - "filename": "mbtfpp.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "mbtfpp", - "projstring": "+proj=mbtfpp", - "res": "low", - "type": "poly" - }, - { - "filename": "mbtfpq.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "mbtfpq", - "projstring": "+proj=mbtfpq", - "res": "low", - "type": "poly" - }, - { - "filename": "mbtfps.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "mbtfps", - "projstring": "+proj=mbtfps", - "res": "low", - "type": "poly" - }, - { - "filename": "merc.png", - "latmax": 85, - "latmin": -85, - "lonmax": 180, - "lonmin": -180, - "name": "merc", - "projstring": "+proj=merc", - "res": "low", - "type": "poly" - }, - { - "filename": "mil_os.png", - "latmax": 80, - "latmin": -40, - "lonmax": 80, - "lonmin": -40, - "name": "mil_os", - "projstring": "+proj=mil_os", - "res": "low", - "type": "poly" - }, - { - "filename": "mill.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "mill", - "projstring": "+proj=mill", - "res": "low", - "type": "poly" - }, - { - "filename": "misrsom.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "misrsom", - "projstring": "+proj=misrsom +path=1", - "res": "low", - "type": "line" - }, - { - "filename": "moll.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "moll", - "projstring": "+proj=moll", - "res": "low", - "type": "poly" - }, - { - "filename": "murd1.png", - "latmax": 85, - "latmin": -40, - "lonmax": 180, - "lonmin": -180, - "name": "murd1", - "projstring": "+proj=murd1 +lat_1=30 +lat_2=50", - "res": "low", - "type": "poly" - }, - { - "filename": "murd2.png", - "latmax": 85, - "latmin": -40, - "lonmax": 180, - "lonmin": -180, - "name": "murd2", - "projstring": "+proj=murd2 +lat_1=30 +lat_2=50", - "res": "low", - "type": "poly" - }, - { - "filename": "murd3.png", - "latmax": 85, - "latmin": -40, - "lonmax": 180, - "lonmin": -180, - "name": "murd3", - "projstring": "+proj=murd3 +lat_1=30 +lat_2=50", - "res": "low", - "type": "poly" - }, - { - "filename": "natearth.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "natearth", - "projstring": "+proj=natearth", - "res": "low", - "type": "poly" - }, - { - "filename": "natearth2.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "natearth2", - "projstring": "+proj=natearth2", - "res": "low", - "type": "poly" - }, - { - "filename": "nell.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "nell", - "projstring": "+proj=nell", - "res": "low", - "type": "poly" - }, - { - "filename": "nell_h.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "nell_h", - "projstring": "+proj=nell_h", - "res": "low", - "type": "poly" - }, - { - "filename": "nicol.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "nicol", - "projstring": "+proj=nicol", - "res": "low", - "type": "poly" - }, - { - "filename": "nsper.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "nsper", - "projstring": "+proj=nsper +h=3000000 +lat_0=-20 +lon_0=145", - "res": "med", - "type": "poly" - }, - { - "filename": "nzmg.png", - "latmax": -32, - "latmin": -48, - "lonmax": 180, - "lonmin": 165, - "name": "nzmg", - "projstring": "+proj=nzmg", - "res": "med", - "type": "poly" - }, - { - "filename": "ob_tran.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "ob_tran", - "projstring": "+proj=ob_tran +o_proj=mill +o_lon_p=40 +o_lat_p=50 +lon_0=60", - "res": "low", - "type": "poly" - }, - { - "filename": "ocea.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "ocea", - "projstring": "+proj=ocea", - "res": "low", - "type": "poly" - }, - { - "filename": "oea.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "oea", - "projstring": "+proj=oea +m=1 +n=2", - "res": "low", - "type": "poly" - }, - { - "filename": "omerc.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "omerc", - "projstring": "+proj=omerc +lat_1=45 +lat_2=55", - "res": "low", - "type": "line" - }, - { - "filename": "ortel.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "ortel", - "projstring": "+proj=ortel", - "res": "low", - "type": "poly" - }, - { - "filename": "ortho.png", - "latmax": 90, - "latmin": -90, - "lonmax": 90, - "lonmin": -90, - "name": "ortho", - "projstring": "+proj=ortho", - "res": "low", - "type": "poly" - }, - { - "filename": "pconic.png", - "latmax": 90, - "latmin": 0, - "lonmax": 180, - "lonmin": -180, - "name": "pconic", - "projstring": "+proj=pconic +lat_1=25 +lat_2=75", - "res": "low", - "type": "poly" - }, - { - "filename": "patterson.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "patterson", - "projstring": "+proj=patterson", - "res": "low", - "type": "poly" - }, - { - "filename": "poly.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "poly", - "projstring": "+proj=poly", - "res": "low", - "type": "poly" - }, - { - "filename": "putp1.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "putp1", - "projstring": "+proj=putp1", - "res": "low", - "type": "poly" - }, - { - "filename": "putp2.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "putp2", - "projstring": "+proj=putp2", - "res": "low", - "type": "poly" - }, - { - "filename": "putp3.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "putp3", - "projstring": "+proj=putp3", - "res": "low", - "type": "poly" - }, - { - "filename": "putp3p.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "putp3p", - "projstring": "+proj=putp3p", - "res": "low", - "type": "poly" - }, - { - "filename": "putp4p.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "putp4p", - "projstring": "+proj=putp4p", - "res": "low", - "type": "poly" - }, - { - "filename": "putp5.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "putp5", - "projstring": "+proj=putp5", - "res": "low", - "type": "poly" - }, - { - "filename": "putp5p.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "putp5p", - "projstring": "+proj=putp5p", - "res": "low", - "type": "poly" - }, - { - "filename": "putp6.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "putp6", - "projstring": "+proj=putp6", - "res": "low", - "type": "poly" - }, - { - "filename": "putp6p.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "putp6p", - "projstring": "+proj=putp6p", - "res": "low", - "type": "poly" - }, - { - "filename": "qua_aut.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "qua_aut", - "projstring": "+proj=qua_aut", - "res": "low", - "type": "poly" - }, - { - "filename": "qsc.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "qsc", - "projstring": "+proj=qsc", - "res": "low", - "type": "poly" - }, - { - "filename": "robin.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "robin", - "projstring": "+proj=robin", - "res": "low", - "type": "poly" - }, - { - "filename": "rouss.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "rouss", - "projstring": "+proj=rouss", - "res": "low", - "type": "poly" - }, - { - "filename": "rpoly.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "rpoly", - "projstring": "+proj=rpoly", - "res": "low", - "type": "poly" - }, - { - "filename": "sinu.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "sinu", - "projstring": "+proj=sinu", - "res": "low", - "type": "poly" - }, - { - "filename": "somerc.png", - "latmax": 60, - "latmin": 30, - "lonmax": 30, - "lonmin": -15, - "name": "somerc", - "projstring": "+proj=somerc", - "res": "med", - "type": "poly" - }, - { - "filename": "stere.png", - "latmax": 90.0, - "latmin": 50.0, - "lonmax": 180, - "lonmin": -180, - "name": "stere", - "projstring": "+proj=stere +lat_0=90 +lat_ts=75", - "res": "low", - "type": "poly" - }, - { - "filename": "sterea.png", - "latmax": 90, - "latmin": 50, - "lonmax": 180, - "lonmin": -180, - "name": "sterea", - "projstring": "+proj=sterea +lat_0=90", - "res": "low", - "type": "poly" - }, - { - "filename": "gstmerc.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "gstmerc", - "projstring": "+proj=gstmerc", - "res": "low", - "type": "line" - }, - { - "filename": "tcc.png", - "latmax": 85, - "latmin": 30, - "lonmax": 45, - "lonmin": -45, - "name": "tcc", - "projstring": "+proj=tcc", - "res": "med", - "type": "poly" - }, - { - "filename": "tcea.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "tcea", - "projstring": "+proj=tcea", - "res": "low", - "type": "line" - }, - { - "filename": "tissot.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "tissot", - "projstring": "+proj=tissot +lat_1=60 +lat_2=65", - "res": "low", - "type": "poly" - }, - { - "filename": "tmerc.png", - "latmax": 90, - "latmin": -90, - "lonmax": 90, - "lonmin": -90, - "name": "tmerc", - "projstring": "+proj=tmerc", - "res": "low", - "type": "poly" - }, - { - "filename": "tpeqd.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "tpeqd", - "projstring": "+proj=tpeqd +lat_1=60 +lat_2=65", - "res": "low", - "type": "poly" - }, - { - "filename": "tpers.png", - "latmax": 90, - "latmin": 0, - "lonmax": 75, - "lonmin": -75, - "name": "tpers", - "projstring": "+proj=tpers +h=5500000 +lat_0=40", - "res": "low", - "type": "poly" - }, - { - "filename": "ups.png", - "latmax": 90, - "latmin": -20, - "lonmax": 180, - "lonmin": -180, - "name": "ups", - "projstring": "+proj=ups", - "res": "low", - "type": "poly" - }, - { - "filename": "urm5.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "urm5", - "projstring": "+proj=urm5 +n=0.9 +alpha=2 +q=4", - "res": "low", - "type": "poly" - }, - { - "filename": "urmfps.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "urmfps", - "projstring": "+proj=urmfps +n=0.5", - "res": "low", - "type": "poly" - }, - { - "filename": "utm.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "utm", - "projstring": "+proj=utm", - "res": "low", - "type": "line" - }, - { - "filename": "vandg.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "vandg", - "projstring": "+proj=vandg", - "res": "low", - "type": "poly" - }, - { - "filename": "vandg2.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "vandg2", - "projstring": "+proj=vandg2", - "res": "low", - "type": "poly" - }, - { - "filename": "vandg3.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "vandg3", - "projstring": "+proj=vandg3", - "res": "low", - "type": "poly" - }, - { - "filename": "vandg4.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "vandg4", - "projstring": "+proj=vandg4", - "res": "low", - "type": "poly" - }, - { - "filename": "vitk1.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "vitk1", - "projstring": "+proj=vitk1 +lat_1=45 +lat_2=55", - "res": "low", - "type": "poly" - }, - { - "filename": "wag1.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "wag1", - "projstring": "+proj=wag1", - "res": "low", - "type": "poly" - }, - { - "filename": "wag2.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "wag2", - "projstring": "+proj=wag2", - "res": "low", - "type": "poly" - }, - { - "filename": "wag3.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "wag3", - "projstring": "+proj=wag3", - "res": "low", - "type": "poly" - }, - { - "filename": "wag4.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "wag4", - "projstring": "+proj=wag4", - "res": "low", - "type": "poly" - }, - { - "filename": "wag5.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "wag5", - "projstring": "+proj=wag5", - "res": "low", - "type": "poly" - }, - { - "filename": "wag6.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "wag6", - "projstring": "+proj=wag6", - "res": "low", - "type": "poly" - }, - { - "filename": "wag7.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "wag7", - "projstring": "+proj=wag7", - "res": "low", - "type": "poly" - }, - { - "filename": "weren.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "weren", - "projstring": "+proj=weren", - "res": "low", - "type": "poly" - }, - { - "filename": "wink1.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "wink1", - "projstring": "+proj=wink1", - "res": "low", - "type": "poly" - }, - { - "filename": "wink2.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "wink2", - "projstring": "+proj=wink2", - "res": "low", - "type": "poly" - }, - { - "filename": "wintri.png", - "latmax": 90, - "latmin": -90, - "lonmax": 180, - "lonmin": -180, - "name": "wintri", - "projstring": "+proj=wintri", - "res": "low", - "type": "poly" - } -] diff --git a/test/gigs/5101.1-jhs.json b/test/gigs/5101.1-jhs.json deleted file mode 100644 index 95624c62..00000000 --- a/test/gigs/5101.1-jhs.json +++ /dev/null @@ -1,63 +0,0 @@ -{ -"coordinates": [ - [[3, 80], [496813.178, 3358297.326]], - [[2.9999999, 60], [678711.584, 1134498.83]], - [[3, 49], [765648.501, -87944.74]], - [[3.0000001, 40], [826893.845, -1087710.121]], - [[3, 20], [923539.353, -3308151.625]], - [[3, 0], [957087.829, -5527462.686]], - [[3, -20], [923539.353, -7746773.748]], - [[3, -40], [826893.845, -9967215.251]], - [[3, -60], [678711.584, -12189424.202]], - [[3, -80], [496813.178, -14413222.698]], - [[-2, 80], [400000, 3354134.429]], - [[-2, 60], [400000, 1123956.966]], - [[-2, 49], [400000, -100000]], - [[-2, 40], [400000, -1099699.834]], - [[-2, 20], [400000, -3315978.565]], - [[-2, 0], [400000, -5527462.686]], - [[-2, -20], [400000, -7738946.807]], - [[-2, -40], [400000, -9955225.538]], - [[-2, -60], [400000, -12178882.338]], - [[-2, -80], [400000, -14409059.801]], - [[-5, 80], [341867.711, 3355633.571]], - [[-5, 60], [232704.966, 1127751.264]], - [[-5, 49], [180586.02, -95662.911]], - [[-5, 40], [143900.026, -1095387.991]], - [[-5, 20], [86073.28, -3313165.843]], - [[-5, 0], [66021.018, -5527462.686]], - [[-5, -20], [86073.28, -7741759.529]], - [[-5, -40], [143900.026, -9959537.381]], - [[-5, -60], [232704.966, -12182676.637]], - [[-5, -80], [341867.711, -14410558.943]], - [[-7.5559037, 49.7661327], [0, 0]], - [[-5, 0], [66021.018, -5527462.686]], - [[-4, 0], [177404.277, -5527462.686]], - [[-3, 0], [288719.208, -5527462.686]], - [[-2, 0], [400000.0, -5527462.686]], - [[-1, 0], [511280.792, -5527462.686]], - [[0, 0], [622595.723, -5527462.686]], - [[1, 0], [733978.982, -5527462.686]], - [[2, 0], [845464.865, -5527462.686]], - [[3, 0], [957087.829, -5527462.686]], - [[4, 0], [1068882.539, -5527462.686]], - [[5, 0], [1180883.933, -5527462.686]], - [[6, 0], [1293127.266, -5527462.686]], - [[7, 0], [1405648.179, -5527462.686]], - [[8, 0], [1518482.747, -5527462.686]], - [[-5, 60], [232704.966, 1127751.264]], - [[-4, 60], [288455.816, 1125643.213]], - [[-3, 60], [344223.662, 1124378.512]], - [[-2, 60], [400000, 1123956.966]], - [[-1, 60], [455776.338, 1124378.512]], - [[0, 60], [511544.184, 1125643.213]], - [[1, 60], [567295.034, 1127751.264]], - [[2, 60], [623020.357, 1130702.987]], - [[3, 60], [678711.584, 1134498.83]], [[4.0, 60.0], [734360.093, 1139139.367]], [[5.0, 60.0], [789957.197, 1144625.296]], [[6.0, 60.0], [845494.132, 1150957.434]], [[7.0, 60.0], [900962.042, 1158136.713]], [[8.0, 60.0], - [956351.967, 1166164.18]] -], -"description": "Test 5101 (part 1), Transverse Mercator, v2-0_2011-06-28, recommended JHS formula", -"projections": ["+init=epsg:4326", "+proj=etmerc +lat_0=49 +lon_0=-2 +k_0=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=WGS84 +units=m +no_def"], -"tests": [{"tolerances": [2.7777777777777776e-07, 0.03], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"}] -} diff --git a/test/gigs/5101.2-jhs.json b/test/gigs/5101.2-jhs.json deleted file mode 100644 index c03929ab..00000000 --- a/test/gigs/5101.2-jhs.json +++ /dev/null @@ -1,32 +0,0 @@ -{ -"coordinates": [ - [[-2.0, 80.0], [403186.945, 8885748.708]], - [[-2.0, 60.0], [221288.77, 6661953.041]], - [[-2.0, 40.0], [73106.698, 4439746.917]], - [[-2.0, 20.0], [-23538.687, 2219308.238]], - [[-2.0, 0.0], [-57087.12, 0.0]], - [[-2.0, -20.0], [-23538.687, -2219308.238]], - [[-2.0, -40.0], [73106.698, -4439746.917]], - [[-2.0, -60.0], [221288.77, -6661953.041]], - [[-2.0, -80.0], [403186.945, -8885748.708]], - [[-5.0, 60.0], [54506.435, 6678411.623]], - [[-4.0, 60.0], [110043.299, 6672079.494]], - [[-3.0, 60.0], [165640.332, 6666593.572]], - [[-2.0, 60.0], [221288.77, 6661953.041]], - [[-1.0, 60.0], [276979.926, 6658157.202]], - [[0.0, 60.0], [332705.179, 6655205.484]], - [[1.0, 60.0], [388455.958, 6653097.435]], - [[2.0, 60.0], [444223.733, 6651832.735]], - [[3.0, 60.0], [500000.0, 6651411.19]], - [[4.0, 60.0], [555776.267, 6651832.735]], - [[5.0, 60.0], [611544.042, 6653097.435]], - [[6.0, 60.0], [667294.821, 6655205.484]], - [[7.0, 60.0], [723020.074, 6658157.202]], - [[8.0, 60.0], [778711.23, 6661953.041]] - ], -"description": "Test 5101 (part 2), Transverse Mercator, v2-0_2011-06-28, recommended JHS formula", -"projections": ["+init=epsg:4326", "+init=epsg:32631"], -"tests": [ - {"tolerances": [2.7777777777777776e-07, 0.03], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"}] -} diff --git a/test/gigs/5101.3-jhs.json b/test/gigs/5101.3-jhs.json deleted file mode 100644 index e7cc2dc3..00000000 --- a/test/gigs/5101.3-jhs.json +++ /dev/null @@ -1,33 +0,0 @@ -{ -"coordinates": [ - [[146, 80], [596813.055, 18885748.71]], - [[146, 60], [778711.23, 16661953.04]], - [[146, 40], [926893.302, 14439746.92]], - [[146, 20], [1023538.687, 12219308.24]], - [[146, 0], [1057087.12, 10000000.0]], - [[146, -20], [1023538.687, 7780691.762]], - [[146, -40], [926893.302, 5560253.083]], - [[146, -60], [778711.23, 3338046.96]], - [[146, -80], [596813.055, 1114251.292]], - [[136, -60], [221288.77, 3338046.96]], - [[137, -60], [276979.926, 3341842.798]], - [[138, -60], [332705.179, 3344794.516]], - [[139, -60], [388455.958, 3346902.565]], - [[140, -60], [444223.733, 3348167.265]], - [[141, -60], [500000.0, 3348588.81]], - [[142, -60], [555776.267, 3348167.265]], - [[143, -60], [611544.042, 3346902.565]], - [[144, -60], [667294.821, 3344794.516]], - [[145, -60], [723020.074, 3341842.798]], - [[146, -60], [778711.23, 3338046.96]], - [[147, -60], [834359.668, 3333406.428]], - [[148, -60], [889956.701, 3327920.506]], - [[149, -60], [945493.565, 3321588.377]] - ], -"description": "Test 5101 (part 3), Transverse Mercator, v2-0_2011-06-28, recommended JHS formula", -"projections": ["+init=epsg:4283", "+init=epsg:28354"], -"tests": [ - {"tolerances": [2.7777777777777776e-07, 0.03], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"} - ] -} diff --git a/test/gigs/5101.4-jhs-etmerc.json b/test/gigs/5101.4-jhs-etmerc.json deleted file mode 100644 index 1775f750..00000000 --- a/test/gigs/5101.4-jhs-etmerc.json +++ /dev/null @@ -1,31 +0,0 @@ -{ -"coordinates": [ - [[-63.9993433, 80.0002644], [5422500.0, 18889800.0]], - [[-63.9998472, 60.0001191], [5276900.0, 16662800.0]], - [[-63.9997361, 40.0003081], [5158399.999, 14439199.99]], - [[-64.0004605, 19.9996448], [5081100.0, 12219300.0]], - [[-63.9996186, 0.0003092], [5054400.005, 10002000.0]], - [[-64.0004675, -19.9999283], [5081100.017, 7784599.993]], - [[-63.9997001, -39.9996924], [5158400.0, 5564800.0]], - [[-63.9998814, -60.0004008], [5276899.994, 3341099.995]], - [[-63.9991006, -79.9996521], [5422500.0, 1114200.0]], - [[-70.0002089, -40.000215], [4645300.113, 5524200.123]], - [[-69.0001441, -40.0002935], [4730900.0, 5533400.0]], - [[-67.9995333, -39.9996136], [4816500.043, 5541700.028]], - [[-66.9998073, -39.9999313], [4902000.0, 5548900.0]], - [[-65.9996522, -39.9995894], [4987500.009, 5555200.001]], - [[-64.9992796, -40.000411], [5073000.0, 5560400.0]], - [[-63.9997, -39.9996925], [5158400.01, 5564799.987]], - [[-62.9999842, -40.0002087], [5243800.0, 5568100.0]], - [[-62.0000778, -40.0001803], [5329199.995, 5570500.009]], - [[-61.0000574, -39.9996182], [5414600.0, 5572000.0]], - [[-60.0, -40.0003306], [5500000.0, 5572399.996]], - [[-58.9999426, -39.9996182], [5585400.0, 5572000.0]], - [[-57.9999222, -40.0001803], [5670800.005, 5570500.009]], - [[-57.0000158, -40.0002087], [5756200.0, 5568100.0]] - ], -"description": "Test 5101 (part 4), Transverse Mercator, v2-0_2011-06-28, recommended JHS formula", -"projections": ["+init=epsg:4190", - "+proj=etmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"], -"tests": [{"tolerances": [2.7777777777777776e-07, 0.03], "type": "conversion"}, {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"}] -} diff --git a/test/gigs/5101.4-jhs.json b/test/gigs/5101.4-jhs.json deleted file mode 100644 index 81648735..00000000 --- a/test/gigs/5101.4-jhs.json +++ /dev/null @@ -1,33 +0,0 @@ -{ -"coordinates": [ - [[-63.9993433, 80.0002644], [5422500.0, 18889800.0]], - [[-63.9998472, 60.0001191], [5276900.0, 16662800.0]], - [[-63.9997361, 40.0003081], [5158399.999, 14439199.99]], - [[-64.0004605, 19.9996448], [5081100.0, 12219300.0]], - [[-63.9996186, 0.0003092], [5054400.005, 10002000.0]], - [[-64.0004675, -19.9999283], [5081100.017, 7784599.993]], - [[-63.9997001, -39.9996924], [5158400.0, 5564800.0]], - [[-63.9998814, -60.0004008], [5276899.994, 3341099.995]], - [[-63.9991006, -79.9996521], [5422500.0, 1114200.0]], - [[-70.0002089, -40.000215], [4645300.113, 5524200.123]], - [[-69.0001441, -40.0002935], [4730900.0, 5533400.0]], - [[-67.9995333, -39.9996136], [4816500.043, 5541700.028]], - [[-66.9998073, -39.9999313], [4902000.0, 5548900.0]], - [[-65.9996522, -39.9995894], [4987500.009, 5555200.001]], - [[-64.9992796, -40.000411], [5073000.0, 5560400.0]], - [[-63.9997, -39.9996925], [5158400.01, 5564799.987]], - [[-62.9999842, -40.0002087], [5243800.0, 5568100.0]], - [[-62.0000778, -40.0001803], [5329199.995, 5570500.009]], - [[-61.0000574, -39.9996182], [5414600.0, 5572000.0]], - [[-60, -40.0003306], [5500000.0, 5572399.996]], - [[-58.9999426, -39.9996182], [5585400.0, 5572000.0]], - [[-57.9999222, -40.0001803], [5670800.005, 5570500.009]], - [[-57.0000158, -40.0002087], [5756200.0, 5568100.0]] - ], -"description": "Test 5101 (part 4), Transverse Mercator, v2-0_2011-06-28, recommended JHS formula", -"projections": ["+init=epsg:4190", "+init=epsg:22175"], -"tests": [ - {"tolerances": [2.7777777777777776e-07, 0.03], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"} - ] -} diff --git a/test/gigs/5102.1.json b/test/gigs/5102.1.json deleted file mode 100644 index 28f74538..00000000 --- a/test/gigs/5102.1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ -"coordinates": [ - [[5, 58], [760722.92, 3457368.68]], - [[5, 57], [764566.844, 3343948.93]], - [[5, 56], [768396.683, 3230944.812]], - [[5, 55], [772213.973, 3118310.947]], - [[5, 54], [776020.189, 3006003.839]], - [[5, 53], [779816.748, 2893981.68]], - [[4, 51], [717027.292, 2668695.784]], - [[4, 50], [719385.249, 2557252.841]], - [[4, 49], [721740.43, 2445941.161]], - [[4, 46.8], [726915.752, 2201342.519]], - [[3, 53], [644764.905, 2891124.195]], - [[4, 53], [712299.916, 2892123.369]], - [[5, 53], [779816.748, 2893981.68]], - [[6, 53], [847304.473, 2896698.827]], - [[7, 53], [914752.168, 2900274.371]], - [[8, 53], [982148.913, 2904707.734]], - [[9, 53], [1049483.8, 2909998.196]], - [[10, 53], [1116745.929, 2916144.902]], - [[11, 53], [1183924.412, 2923146.858]] - ], -"description": "Test 5102, Lambert Conic Conformal (1SP), v2-0_2011-06-28.", -"projections": ["+init=epsg:4230", "+init=epsg:2192"], -"tests": [ - {"tolerances": [2.7777777777777776e-07, 0.03], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"} - ] -} diff --git a/test/gigs/5102.2.json b/test/gigs/5102.2.json deleted file mode 100644 index 3916733a..00000000 --- a/test/gigs/5102.2.json +++ /dev/null @@ -1,29 +0,0 @@ -{ -"coordinates": [ - [[2.9586342556, 64.4444444444], [760724.023, 3457334.864]], - [[2.9586342556, 63.3333333333], [764567.882, 3343917.044]], - [[2.9586342556, 62.2222222222], [768397.648, 3230915.06]], - [[2.9586342556, 61.1111111111], [772214.859, 3118283.535]], - [[2.9586342556, 60], [776020.989, 3005978.979]], - [[2.9586342556, 58.8888888889], [779817.454, 2893959.584]], - [[1.8475231444, 56.6666666667], [717027.602, 2668679.866]], - [[1.8475231444, 55.5555555556], [719385.487, 2557240.347]], - [[1.8475231444, 54.4444444444], [721740.59, 2445932.319]], - [[1.8475231444, 52], [726915.726, 2201342.51838845]], - [[0.7364120333, 58.8888888889], [644765.081, 2891102.088]], - [[1.8475231444, 58.8888888889], [712300.356, 2892101.266]], - [[2.9586342556, 58.8888888889], [779817.454, 2893959.584]], - [[4.0697453667, 58.8888888889], [847305.444, 2896676.742]], - [[5.1808564778, 58.8888888889], [914753.403, 2900252.301]], - [[6.2919675889, 58.8888888889], [982150.413, 2904685.68]], - [[7.4030787, 58.8888888889], [1049485.565, 2909976.163]], - [[8.5141898111, 58.8888888889], [1116747.958, 2916122.894]], - [[9.6253009222, 58.8888888889], [1183926.705, 2923124.876]] - ], -"description": "Test 5102 (part 2), Lambert Conic Conformal (1SP), v2-0_2011-06-28.", -"projections": ["+init=epsg:4807", "+init=epsg:27572"], -"tests": [ - {"tolerances": [2.7777777777777776e-07, 0.03], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"} - ] -} diff --git a/test/gigs/5103.1.json b/test/gigs/5103.1.json deleted file mode 100644 index e2fdf9a1..00000000 --- a/test/gigs/5103.1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ -"coordinates": [ - [[5, 58], [187742.7, 969521.653]], - [[5, 57], [188698.877, 857277.135]], - [[5, 56], [189652.853, 745291.184]], - [[5, 55], [190604.967, 633523.672]], - [[5, 54], [191555.55, 521935.9]], - [[5, 53], [192504.921, 410490.433]], - [[5.3876389, 52.1561606], [219843.841, 316827.604]], - [[4, 51], [124202.936, 187756.876]], - [[4, 50], [123652.406, 76521.628]], - [[4, 49], [123101.889, -34711.068]], - [[3.3137281, 47.9752611], [71254.553, -148236.592]], - [[3, 53], [58108.966, 411155.591]], - [[4, 53], [125304.704, 410370.504]], - [[5, 53], [192504.921, 410490.433]], - [[6, 53], [259697.429, 411515.356]], - [[7, 53], [326870.04, 413445.087]], - [[8, 53], [394010.571, 416279.276]], - [[9, 53], [461106.844, 420017.408]], - [[10, 53], [528146.69, 424658.807]], - [[11, 53], [595117.95, 430202.63]] -], - -"description": "Test 5103 (part 1), Lambert Conic Conformal (2SP), v2-0_2011-06-28.", -"projections": ["+init=epsg:4313", "+init=epsg:31370"], -"tests": [ {"tolerances": [2.7777777777777776e-07, 0.03], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"}] -} diff --git a/test/gigs/5103.2.json b/test/gigs/5103.2.json deleted file mode 100644 index c882393c..00000000 --- a/test/gigs/5103.2.json +++ /dev/null @@ -1,21 +0,0 @@ -{ -"coordinates": [ - [[-110, 49], [2003937.27, 6452491.7]], - [[-110, 47], [2016621.93, 5717728.61]], - [[-110, 45], [2029255.57, 4985920.56]], - [[-110, 43], [2041855.08, 4256089.74]], - [[-110, 41], [2054436.57, 3527302.73]], - [[-110, 41], [2054436.57, 3527302.73]], - [[-108, 41], [2606245.52, 3543182.55]], - [[-106, 41], [3157542.86, 3571757.39]], - [[-104, 41], [3708036.57, 3613012.12]], - [[-102, 41], [4257435.06, 3666924.89]] - ], -"description": "Test 5103 (part 2), Lambert Conic Conformal (2SP), v2-0_2011-06-28.", -"projections": ["+init=epsg:4152", "+init=epsg:2921"], - -"tests": [ - {"tolerances": [2.7777777777777776e-07, 0.03], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"} - ] -} diff --git a/test/gigs/5103.3.json b/test/gigs/5103.3.json deleted file mode 100644 index 9a388af2..00000000 --- a/test/gigs/5103.3.json +++ /dev/null @@ -1,20 +0,0 @@ -{ -"coordinates": [ - [[-110, 49], [2003933.27, 6452478.8]], - [[-110, 47], [2016617.9, 5717717.18]], - [[-110, 45], [2029251.51, 4985910.59]], - [[-110, 43], [2041851.0, 4256081.23]], - [[-110, 41], [2054432.46, 3527295.67]], - [[-110, 41], [2054432.46, 3527295.67]], - [[-108, 41], [2606240.3, 3543175.46]], - [[-106, 41], [3157536.54, 3571750.25]], - [[-104, 41], [3708029.16, 3613004.9]], - [[-102, 41], [4257426.54, 3666917.56]] - ], -"description": "Test 5103 (part 3), Lambert Conic Conformal (2SP), v2-0_2011-06-28.", -"projections": ["+init=epsg:4152", "+init=epsg:3568"], -"tests": [ - {"tolerances": [2.7777777777777776e-07, 0.03], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"} - ] -} diff --git a/test/gigs/5104.json b/test/gigs/5104.json deleted file mode 100644 index 973f832f..00000000 --- a/test/gigs/5104.json +++ /dev/null @@ -1,30 +0,0 @@ -{ -"coordinates": [ - [[5, 58], [132023.27, 1114054.87]], - [[5, 57], [131405.466, 1002468.081]], - [[5, 56], [130792.264, 890981.281]], - [[5, 55], [130183.56, 779577.7]], - [[5, 54], [129579.26, 668240.58]], - [[5, 53], [128979.26, 556953.19]], - [[5.38763888888889, 52.1561605555556], [155000, 463000]], - [[4, 51], [57605.946, 335312.662]], - [[4, 50], [55502.306, 224086.514]], - [[4.0, 49.0], [53412.76, 112842.73]], - [[3.31372805555556, 47.9752611111111], [0, 0]], - [[3, 53], [-5253.06, 559535.55]], - [[4, 53], [61856.78, 557779.12]], - [[5, 53], [128979.26, 556953.19]], - [[6, 53], [196105.28, 557057.74]], - [[7, 53], [263225.72, 558092.77]], - [[8, 53], [330331.46, 560058.31]], - [[9, 53], [397413.385, 562954.436]], - [[10, 53], [464462.35, 566781.24]], - [[11, 53], [531469.2, 571538.84]] -], -"description": "Test 5104, Oblique stereographic, v2-0_2011-06-28.", -"projections": ["+init=epsg:4289", "+init=epsg:28992"], -"tests": [ - {"tolerances": [5.555555555555555e-07, 0.05], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"} - ] -} diff --git a/test/gigs/5105.1.json b/test/gigs/5105.1.json deleted file mode 100644 index 48b5a2fe..00000000 --- a/test/gigs/5105.1.json +++ /dev/null @@ -1,26 +0,0 @@ -{ -"coordinates": [ - [[117, 12], [807919.14, 1329535.33]], - [[117, 10], [808784.98, 1107678.47]], - [[117, 9], [809334.18, 996918.21]], - [[117, 8], [809939.3, 886240.18]], - [[116.8465522, 6.8784583], [793704.63, 762081.05]], - [[117, 6], [811253.3, 665041.27]], - [[117, 5], [811930.35, 554475.63]], - [[117, 4], [812599.58, 443902.71]], - [[115, 4], [590521.15, 442890.86]], - [[117, 3], [813245.13, 333300.13]], - [[117, 2], [813851.07, 222645.51]], - [[117.0, 1.0], [814401.38, 111916.45]], - [[109.6858208, -0.0001733], [0, 0]], - [[123, 6], [1475669.28, 673118.57]], - [[122, 6], [1364854.86, 671146.25]], - [[121, 6], [1254086.17, 669446.25]], [[120.0, 6.0], [1143352.6, 668002.07]], [[119.0, 6.0], [1032643.31, 666797.35]], [[118.0, 6.0], [921947.29, 665815.82]], [[117.0, 6.0], [811253.3, 665041.27]], [[116.0, 6.0], [700549.97, 664457.59]], [[115.0, 6.0], [589825.71, 664048.72]], - [[114, 6], [479068.802, 663798.63]] -], -"description": "Test 5105 (part 1), Oblique Mercator (variant B), v2-0_2011-06-28.", -"projections": ["+init=epsg:4742", - "+proj=somerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +no_uoff +gamma=53.13010236111111 +ellps=GRS80 +units=m +no_defs"], -"tests": [{"tolerances": [5.555555555555555e-07, 0.05], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"}] -} diff --git a/test/gigs/5105.2.json b/test/gigs/5105.2.json deleted file mode 100644 index d811108d..00000000 --- a/test/gigs/5105.2.json +++ /dev/null @@ -1,23 +0,0 @@ -{ -"coordinates": [ - [[16, 48.5], [424714.235, 355124.6]], - [[17.2, 48.0], [512056.188, 296756.716]], - [[17.582650555556, 47.636134722222], [539847.765, 255701.086]], - [[19.048571666667, 47.144393611111], [650000, 200000]], - [[19.223429444445, 46.875668333333], [663329.053, 170142.318]], - [[20.135740555556, 46.370301111111], [733651.455, 114532.099]], - [[21.4, 45.7], [833148.855, 42191.482]], - [[22.3, 49.3], [886565.935, 444656.613]], - [[21.294198611111, 48.489974722222], [815999.993, 351999.998]], - [[19.223429444445, 46.875668333333], [663329.053, 170142.318]], - [[17.619153611111, 46.068746388889], [539403.958, 81440.103]], - [[16.36, 45.5], [439836.709, 20816.456]] -], - -"description": "Test 5105 (part 2), Oblique Mercator (variant B), v2-0_2011-06-28.", -"projections": ["+init=epsg:4237", "+init=epsg:23700"], -"tests": [ - {"tolerances": [5.555555555555555e-07, 0.05], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"} - ] -} diff --git a/test/gigs/5106.json b/test/gigs/5106.json deleted file mode 100644 index cc741478..00000000 --- a/test/gigs/5106.json +++ /dev/null @@ -1,35 +0,0 @@ -{ -"coordinates": [ - [[117, 12], [807919.144, 1329535.334]], - [[117, 10], [808784.981, 1107678.473]], - [[117, 9], [809334.177, 996918.212]], - [[117, 8], [809939.302, 886240.183]], - [[116.8465522222222222224906494, 6.878458333333333334122825262], [793704.631, 762081.047]], - [[117, 6], [811253.303, 665041.265]], - [[117, 5], [811930.345, 554475.627]], - [[117, 4], [812599.582, 443902.706]], - [[115, 4], [590521.147, 442890.861]], - [[117, 3], [813245.133, 333300.13]], - [[117, 2], [813851.067, 222645.511]], - [[117, 1], [814401.375, 111916.452]], - [[109.6858208333333333333530706, -0.0001733333333333333330866171056], [0, 0]], - [[123, 6], [1475669.281, 673118.573]], - [[122, 6], [1364854.862, 671146.254]], - [[121, 6], [1254086.173, 669446.249]], - [[120, 6], [1143352.598, 668002.074]], - [[119, 6], [1032643.312, 666797.354]], - [[118, 6], [921947.286, 665815.815]], - [[117, 6], [811253.303, 665041.265]], - [[116, 6], [700549.965, 664457.586]], - [[115, 6], [589825.706, 664048.715]], - [[114, 6], [479068.802, 663798.63]] -], - -"description": "Test 5106, Hotine Oblique Mercator (variant A), v2-0_2011-06-28.", - -"projections": ["+init=epsg:4742", "+init=epsg:3376"], -"tests": [ - {"tolerances": [5.555555555555555e-07, 0.05], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"} - ] -} diff --git a/test/gigs/5107.json b/test/gigs/5107.json deleted file mode 100644 index 58440028..00000000 --- a/test/gigs/5107.json +++ /dev/null @@ -1,26 +0,0 @@ -{ -"projections": [ - "+init=epsg:4674", - "+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs " -], -"tests": [ - {"type": "conversion", "tolerances": [5.555555555555555e-07, 0.05]}, - {"type": "roundtrip", "times": 1000, "tolerances": [5.555555555555556e-08, 0.006]} - ], -"coordinates": [ - [[-54, 0], [5000000.0, 10000000.0]], - [[-45, 6], [5996378.70981775, 10671650.0559245]], - [[-45, 0], [6001875.41713946, 10000000.0]], - [[-45, -6], [5996378.70981775, 9328349.94407546]], - [[-41, -13], [6409689.58687533, 8526306.26193173]], - [[-38, -20], [6671808.91962898, 7707735.72987798]], - [[-37, -24], [6725584.49172815, 7240461.99578364]], - [[-36, -30], [6729619.73995286, 6543762.57643596]], - [[-57, -30], [4710574.22343996, 6676097.81116979]], - [[-54, -29.3674766667], [5000000.0, 6750000.0]], - [[-47, -27.5], [5691318.14688622, 6937461.05067494]], - [[-37, -24], [6725584.49172815, 7240461.99578364]], - [[-30, 22.5], [7458947.7013321, 7313327.31691123]] -], -"description": "Test 5107, American Polyconic, v2-0_2011-06-28." -} diff --git a/test/gigs/5108.json b/test/gigs/5108.json deleted file mode 100644 index 2ff48e23..00000000 --- a/test/gigs/5108.json +++ /dev/null @@ -1,26 +0,0 @@ -{ -"coordinates": [ - [[106, 10], [267186.017, 881108.902]], - [[106, 9], [268006.024, 770398.186]], - [[106, 8], [268740.351, 659692.254]], - [[106, 7], [269388.786, 548990.588]], - [[106, 6], [269951.141, 438292.666]], - [[106, 5], [270427.255, 327597.962]], - [[106, 4], [270816.99, 216905.945]], - [[106, 3], [271120.234, 106216.081]], - [[103.561065778024, 2.04246768119792], [0, 0]], - [[103.640259839629, 1.8277648438075], [8813.252, -23740.095]], - [[106, 1], [271466.923, -115159.332]], - [[109, 5], [603116.703, 329668.599]], - [[108, 5], [492221.308, 328807.336]], - [[107, 5], [381324.74, 328117.472]], - [[106, 5], [270427.255, 327597.962]], - [[105, 5], [159529.111, 327248.012]], - [[104, 5], [48630.563, 327067.097]] -], - -"description": "Test 5108, Cassini-Soldner, v2-0_2011-06-28.", -"projections": ["+init=epsg:4742", "+init=epsg:3377"], -"tests": [{"tolerances": [5.555555555555555e-07, 0.05], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"}] -} diff --git a/test/gigs/5109.json b/test/gigs/5109.json deleted file mode 100644 index 62614164..00000000 --- a/test/gigs/5109.json +++ /dev/null @@ -1,23 +0,0 @@ -{ -"coordinates": [ - [[132, 0], [0, 0]], - [[132, -27], [0, -2926820.89]], - [[140, 0], [966973.98, -30285.6]], - [[140, -20], [832799.36, -2170181.93]], - [[140, -40], [693250.21, -4395794.49]], - [[140, -60], [567313.29, -6404311.16]], - [[140, -80], [486878.674, -7687130.029]], - [[120, -60], [-850274.75, -6426505.13]], - [[130, -60], [-141915.26, -6387653.78]], - [[140, -60], [567313.29, -6404311.16]], - [[150, -60], [1273067.747, -6476375.276]], - [[160, -60], [1971026.26, -6603404.82]], - [[170, -60], [2656914.716, -6784621.89]] -], -"description": "Test 5109, Albers Equal Area, v2-0_2011-06-28.", -"projections": ["+init=epsg:4283", "+init=epsg:3577"], -"tests": [ - {"tolerances": [5.555555555555555e-07, 0.05], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"} - ] -} diff --git a/test/gigs/5110.json b/test/gigs/5110.json deleted file mode 100644 index e9812ecf..00000000 --- a/test/gigs/5110.json +++ /dev/null @@ -1,12 +0,0 @@ -{ -"coordinates": [ - [[5, 70], [4127824.65822105, 5214090.649]], - [[5, 60], [4041548.13, 4109791.66]], - [[5, 50], [3962799.45, 2999718.853]], - [[5, 40], [3892127.02, 1892578.962]], - [[5, 30], [3830117.9, 796781.677]], - [[10, 52], [4321000.0, 3210000.0]], [[0.0, 50.0], [3606514.43, 3036305.967]], [[3.0, 50.0], [3819948.288, 3011432.894]], [[5.0, 50.0], [3962799.451, 2999718.853]], [[8.0, 50.0], [4177612.521, 2989464.315]], [[10.0, 50.0], [4321000.0, 2987510.567]]], "description": "Test 5110, Lambert Azimuthal Equal Area, v2-0_2011-06-28.", -"projections": ["+init=epsg:4258", "+init=epsg:3035"], -"tests": [{"tolerances": [5.555555555555555e-07, 0.05], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"}] -} diff --git a/test/gigs/5111.1.json b/test/gigs/5111.1.json deleted file mode 100644 index 25ca8572..00000000 --- a/test/gigs/5111.1.json +++ /dev/null @@ -1,45 +0,0 @@ -{ -"coordinates": [ - [[100.0876483, 77.6534822], [2800000.0, 15000000.0]], - [[100.0876483, 73.1442856], [2800000.0, 13000000.0]], - [[100.0876483, 67.0518325], [2800000.0, 11000000.0]], - [[100.0876483, 58.9140458], [2800000.0, 9000000.0]], - [[100.0876483, 48.2638981], [2800000.0, 7000000.0]], - [[100.0876483, 34.8029044], [2800000.0, 5000000.0]], - [[100.0876483, 18.7048581], [2800000.0, 3000000.0]], - [[100.0876483, 0.9071392], [2800000.0, 1000000.0]], - [[110.0, 0.0], [3900000.0, 900000.0]], - [[100.0876483, -0.9071392], [2800000.0, 800000.0]], - [[100.0876483, -1.8140483], [2800000.0, 700000.0]], - [[100.0876483, -2.0], [2800000.0, 679490.65]], - [[100.0876483, -3.6262553], [2800000.0, 500000.0]], - [[100.0876483, -4.531095], [2800000.0, 400000.0]], - [[100.0876483, -5.4347892], [2800000.0, 300000.0]], - [[100.0876483, -6.3371111], [2800000.0, 200000.0]], - [[100.0876483, -7.2378372], [2800000.0, 100000.0]], - [[74.8562083, -8.136745], [0.0, 0.0]], - [[-71.0, -2.0], [23764105.84, 679490.65]], - [[-90.0, -2.0], [21655625.33, 679490.65]], - [[-120.0, -2.0], [18326445.58, 679490.65]], - [[-150.0, -2.0], [14997265.83, 679490.65]], - [[180.0, -2.0], [11668086.08, 679490.65]], - [[150.0, -2.0], [8338906.33, 679490.65]], - [[120.0, -2.0], [5009726.58, 679490.65]], - [[110.0, -2.0], [3900000.0, 679490.65]], - [[106.8077194, -2.0], [3545744.14, 679490.65]], - [[100.0876483, -2.0], [2800000.0, 679490.65]], - [[90.0, -2.0], [1680546.83, 679490.65]], - [[60.0, -2.0], [-1648632.92, 679490.65]], - [[30.0, -2.0], [-4977812.67, 679490.65]], - [[0.0, -2.0], [-8306992.42, 679490.65]], - [[-30.0, -2.0], [-11636172.17, 679490.65]], - [[-60.0, -2.0], [-14965351.92, 679490.65]], - [[-69.0, -2.0], [-15964105.84, 679490.65]] -], -"description": "Test 5111 (part 1), Mercator (variant A), v2-0_2011-06-28.", -"projections": ["+init=epsg:4211", "+init=epsg:3001"], -"tests": [ - {"tolerances": [5.555555555555555e-07, 0.05], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"} - ] -} diff --git a/test/gigs/5111.2.json b/test/gigs/5111.2.json deleted file mode 100644 index 03d43f41..00000000 --- a/test/gigs/5111.2.json +++ /dev/null @@ -1,44 +0,0 @@ -{ -"coordinates": [ - [[-6.7200711, 77.6534822], [2800000.0, 15000000.0]], - [[-6.7200711, 73.1442856], [2800000.0, 13000000.0]], - [[-6.7200711, 67.0518325], [2800000.0, 11000000.0]], - [[-6.7200711, 58.9140458], [2800000.0, 9000000.0]], - [[-6.7200711, 48.2638981], [2800000.0, 7000000.0]], - [[-6.7200711, 34.8029044], [2800000.0, 5000000.0]], - [[-6.7200711, 18.7048581], [2800000.0, 3000000.0]], - [[-6.7200711, 0.9071392], [2800000.0, 1000000.0]], - [[3.1922806, 0.0], [3900000.0, 900000.0]], - [[-6.7200711, 0.9071392], [2800000.0, 800000.0]], - [[-6.7200711, 1.8140483], [2800000.0, 700000.0]], - [[-6.7200711, 2.0], [2800000.0, 679490.65]], - [[-6.7200711, 3.6262553], [2800000.0, 500000.0]], - [[-6.7200711, 4.531095], [2800000.0, 400000.0]], - [[-6.7200711, 5.4347892], [2800000.0, 300000.0]], - [[-6.7200711, 6.3371111], [2800000.0, 200000.0]], - [[-6.7200711, 7.2378372], [2800000.0, 100000.0]], - [[-31.9515111, 8.136745], [0.0, 0.0]], - [[-177.8077194, 2.0], [23764105.84, 679490.65]], - [[163.1922806, 2.0], [21655625.33, 679490.65]], - [[133.1922806, 2.0], [18326445.58, 679490.65]], - [[103.1922806, 2.0], [14997265.83, 679490.65]], - [[73.1922806, 2.0], [11668086.08, 679490.65]], - [[43.1922806, 2.0], [8338906.33, 679490.65]], - [[13.1922806, 2.0], [5009726.58, 679490.65]], - [[3.1922806, 2.0], [3900000.0, 679490.65]], - [[0.0, 2.0], [3545744.14, 679490.65]], - [[-6.7200711, 2.0], [2800000.0, 679490.65]], - [[-16.8077194, 2.0], [1680546.83, 679490.65]], - [[-46.8077194, 2.0], [-1648632.92, 679490.65]], - [[-76.8077194, 2.0], [-4977812.67, 679490.65]], - [[-106.8077194, 2.0], [-8306992.42, 679490.65]], - [[-136.8077194, 2.0], [-11636172.17, 679490.65]], - [[-166.8077194, 2.0], [-14965351.92, 679490.65]], - [[-175.8077194, 2.0], [-15964105.84, 679490.65]] -], -"description": "Test 5111 (part 2), Mercator (variant A), v2-0_2011-06-28.", -"projections": ["+init=epsg:4813", - "+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs"], -"tests": [ {"tolerances": [5.555555555555555e-07, 0.05], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"} ] -} diff --git a/test/gigs/5112.json b/test/gigs/5112.json deleted file mode 100644 index 2b652933..00000000 --- a/test/gigs/5112.json +++ /dev/null @@ -1,15 +0,0 @@ -{ -"coordinates": [ - [[51.0, 42.0], [0.0, 3819897.85]], - [[51.0, 0.0], [0.0, 0.0]], - [[57.0, 0.0], [497112.88, 0.0]], - [[54.0, 20.5], [248556.44, 1724781.5]], - [[67.0, -41.0], [1325634.35, -3709687.25]] - ], -"description": "Test 5112, Mercator (variant B), v2-0_2011-06-28.", -"projections": ["+init=epsg:4284", "+init=epsg:3388"], -"tests": [ - {"tolerances": [5.555555555555555e-07, 0.05], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"} - ] -} diff --git a/test/gigs/5113.json b/test/gigs/5113.json deleted file mode 100644 index 945e4c44..00000000 --- a/test/gigs/5113.json +++ /dev/null @@ -1,12 +0,0 @@ -{ -"description": "Test 5113, Transverse Mercator (South Oriented), v2-0_2011-06-28.", -"coordinates": [ [[22.5, 0.0], [-166998.44, 0.0]], - [[21.5, -25.0], [-50475.46, 2766147.25]], - [[20.5, -30.0], [48243.45, 3320218.65]], - [[19.5, -35.0], [136937.65, 3875621.18]], - [[19.5, -35.0], [136937.65, 3875621.18]] - ], -"projections": ["+init=epsg:4148", "+init=epsg:2049"], -"tests": [{"tolerances": [2.7777777777777776e-07, 0.03], "type": "conversion"}, - {"times": 1000, "tolerances": [5.555555555555556e-08, 0.006], "type": "roundtrip"}] -} diff --git a/test/gigs/5201.json b/test/gigs/5201.json deleted file mode 100644 index e1ffdd77..00000000 --- a/test/gigs/5201.json +++ /dev/null @@ -1,39 +0,0 @@ -{ -"description" : "Test 5201, Geographic Geocentric conversions, v2.0_2011-09-28. (EPSG 4979 - WGS84 3d has been replaced with EPSG code 4326 WGS84 2d).", -"projections" : [ "+init=epsg:4978", "+init=epsg:4326" ], - -"coordinates": [ - [ [-962479.5924, 555687.8517, 6260738.6526], [150, 80, 1214.137] ], - [ [-962297.0059, 555582.4354, 6259542.961], [150, 80, 0] ], - [ [-1598248.169, 2768777.623, 5501278.468], [119.99524538, 60.00475191, 619.6317] ], - [ [-1598023.169, 2768387.912, 5500499.045], [119.99524470, 60.00475258, -280.3683] ], - [ [2764210.4054, 4787752.865, 3170468.5199], [60, 30, 189.569] ], - [ [2764128.3196, 4787610.6883, 3170373.7354], [60, 30, 0] ], - [ [6377934.396, -112, 434], [-0.00100615, 0.00392509, -202.5882] ], - [ [6374934.396, -112, 434], [-0.00100662, 0.00392695, -3202.5881] ], - [ [6367934.396, -112, 434], [-0.00100773, 0.00393129, -10202.5881] ], - [ [2764128.3196, -4787610.6883, -3170373.7354], [-60, -30, 0] ], - [ [2763900.3489, -4787215.8313, -3170110.4974], [-60, -30, -526.476] ], - [ [2763880.8633, -4787182.0813, -3170087.9974], [-60, -30, -571.476] ], - [ [-1598023.169, -2768611.912, -5499631.045], [-119.99323757, -59.99934884, -935.0995] ], - [ [-1597798.169, -2768222.201, -5498851.622], [-119.99323663, -59.99934874, -1835.0995] ], - [ [-962297.0059, -555582.4354, -6259542.961], [-150, -80, 0] ], - [ [-962150.945, -555498.1071, -6258586.4616], [-150, -80, -971.255] ], - [ [-961798.2951, -555294.5046, -6256277.0874], [-150, -80, -3316.255] ], - [ [-2187336.719, -112, 5971017.093], [-179.99706624, 70.00490733, -223.6178] ], - [ [-2904698.5551, -2904698.5551, 4862789.0377], [-135, 50, 0] ], - [ [371, -5783593.614, 2679326.11], [-89.99632465, 25.00366329, -274.7286] ], - [ [6378137, 0, 0], [0, 0, 0] ], - [ [-4087095.478, 2977467.559, -3875457.429], [143.92649252, -37.65282217, 737.7182] ], - [ [-4085919.959, 2976611.233, -3874335.274], [143.92649211, -37.65282206, -1099.2288] ], - [ [-4084000.165, 2975212.729, -3872502.631], [143.92649143, -37.65282187, -4099.2288] ], - [ [-4079520.647, 2971949.553, -3868226.465], [143.92648984, -37.65282143, -11099.2288] ], - [ [-2904698.5551, 2904698.5551, -4862789.0377], [135, -50, 0] ], - [ [-2187336.719, -112, -5970149.093], [-179.99706624, -70.00224647, -1039.2896] ] -], - -"tests" : [ - {"type": "conversion", "tolerances": [0.01, [8.333333333333333e-08, 8.333333333333333e-08, 0.01]]}, - {"type": "roundtrip", "times":1000, "tolerances": [0.006, [5.555555555555556e-08, 5.555555555555556e-08, 0.006]] } -] -} diff --git a/test/gigs/5203.1.json b/test/gigs/5203.1.json deleted file mode 100644 index 658e7857..00000000 --- a/test/gigs/5203.1.json +++ /dev/null @@ -1,25 +0,0 @@ -{ -"description": "GIGS Test 5203 (part 1), Position Vector 7-parameter transformation, v2.0_2011-06-28. Geographic 2D domain (EPSG method code 9606).", -"projections" : [ "+init=epsg:4277", "+init=epsg:4326" ], - -"coordinates" : [ - [ [150.00567472, 79.99487333], [150.0, 80.0] ], - [ [120.0, 60.0], [119.99435889, 60.00569306] ], - [ [60.00446778, 29.99566778], [60.0, 30.0] ], - [ [0.0, 0.0], [-0.00089056, 0.00483333] ], - [ [-60.00357056, -30.00504639], [-60.0, -30.0] ], - [ [-120.0, -60.0], [-119.9918525, -59.99907361] ], - [ [-150.01693111, -79.99778139], [-150.0, -80.0] ], - [ [-180.0, 70.0], [-179.99637361, 70.005945] ], - [ [-135.00596333, 49.99458694], [-135.0, 50.0] ], - [ [-90.0, 25.0], [-89.99531139, 25.00445833] ], - [ [0.00089056, -0.00483333], [0.0, 0.0] ], - [ [143.9279419, -37.6532236], [143.92634806, -37.65235306] ], - [ [135.00291194, -49.99973028], [135.0, -50.0] ], - [ [180.0, -70.0], [-179.99660139, -70.002485] ] -], - -"tests" : [ {"type": "conversion", "tolerances": [2.7777777777777776e-07, 2.7777777777777776e-07]}, - {"type": "roundtrip", "times":1000, "tolerances": [5.555555555555556e-08, 5.555555555555556e-08] } - ] -} diff --git a/test/gigs/5204.1.json b/test/gigs/5204.1.json deleted file mode 100644 index 06347e64..00000000 --- a/test/gigs/5204.1.json +++ /dev/null @@ -1,25 +0,0 @@ -{ -"description" : "GIGS Test 5204, Coordinate Frame 7-parameter transformation, v2.0_2011-06-28. Geographic 2D domain (EPSG method code 9607)", -"projections" : [ "+init=epsg:4313", "+init=epsg:4326" ], - -"coordinates" : [ - [ [149.99825389, 80.00155167], [150, 80] ], - [ [120, 60], [120.00197111, 59.99807333] ], - [ [59.99822194, 30.00134083], [60, 30] ], - [ [0, 0], [0.00098139, -0.00081028] ], - [ [-59.99991333, -29.99943917], [-60, -30] ], - [ [-120, -60], [-120.00150694, -59.999835] ], - [ [-149.99532167, -80.00054917], [-150, -80] ], - [ [-180, 70], [179.99939778, 69.99812806] ], - [ [-134.99891389, 50.00183], [-135, 50] ], - [ [-90, 25], [-90.00060583, 24.99862667] ], - [ [-0.00098139, 0.00081028], [0, 0] ], - [ [143.9279419, -37.6532236], [143.92857222, -37.65257083] ], - [ [134.99913472, -50.00096139], [135, -50] ], - [ [180, -70], [179.99888667, -69.99901667] ] -], - -"tests" : [ {"type": "conversion", "tolerances": [2.7777777777777776e-07, 2.7777777777777776e-07]}, - {"type": "roundtrip", "times":1000, "tolerances": [5.555555555555556e-08, 5.555555555555556e-08] } - ] -} diff --git a/test/gigs/5205.1.json b/test/gigs/5205.1.json deleted file mode 100644 index e0c41ff3..00000000 --- a/test/gigs/5205.1.json +++ /dev/null @@ -1,25 +0,0 @@ -{ -"description" : "GIGS Test 5205 (Part 1), Molodensky-Badekas 10-parameter transformation, v2.0_2011-06-28. Geographic 2D domain (EPSG method code 9636)", -"projections" : [ "+init=epsg:4289", "+init=epsg:4326" ], - -"coordinates": [ - [ [150.01814371, 79.99494639], [150, 80] ], - [ [120, 60], [119.99001559, 60.00441792] ], - [ [60.00535007, 29.99746103], [60, 30] ], - [ [0, 0], [-0.00007025, 0.0041133] ], - [ [-60.00473241, -30.0042486], [-60, -30] ], - [ [-120, -60], [-119.9922412, -60.00081456] ], - [ [-150.01209192, -79.99612229], [-150, -80] ], - [ [-180, 70], [179.99786174, 70.00666951] ], - [ [-135.00454845, 49.99357566], [-135, 50] ], - [ [-90, 25], [-89.99487454, 25.00457271] ], - [ [0.00007032, -0.00411349], [0, 0] ], - [ [143.9279419, -37.6532236], [143.92330599, -37.65282034] ], - [ [135.00641074, -49.99958243], [135, -50] ], - [ [180, -70], [179.99847886, -70.00362084] ] -], - -"tests" : [ {"type": "conversion", "tolerances": [2.7777777777777776e-07, 2.7777777777777776e-07]}, - {"type": "roundtrip", "times":1000, "tolerances": [5.555555555555556e-08, 5.555555555555556e-08] } - ] -} diff --git a/test/gigs/5206.json b/test/gigs/5206.json deleted file mode 100644 index d5a26252..00000000 --- a/test/gigs/5206.json +++ /dev/null @@ -1,54 +0,0 @@ -{ -"description" : "Test 5206, NADCON transformation, v2.0_2011-06-28. Out of transform grid area error tests have been removed.", -"projections" : [ "+init=epsg:4267", "+init=epsg:4269" ], - -"coordinates": [ - [ [-89.5177272, 29.9997978], [-89.5177778, 30.0000000] ], - [ [-90.5177778, 29.2833333], [-90.5178639, 29.2835592] ], - [ [-91.5176758, 28.2830864], [-91.5177778, 28.2833333] ], - [ [-92.5177778, 27.2833333], [-92.5178811, 27.2836106] ], - [ [-93.5176731, 26.2830225], [-93.5177778, 26.2833333] ], - [ [-94.5177778, 25], [-94.5178744, 25.0003486] ], - [ [-142.9972522, 70.0001631], [-143, 70] ], - [ [-142, 70.0000000], [-142.0026922, 69.9998422] ], - [ [-141.9973078, 70.0001578], [-142, 70] ], - [ [-140.9971981, 70.0001481], [-141, 70] ], - [ [-140, 70], [-140.0027922, 69.9998617] ], - [ [-138.9973075, 70.0001297], [-139, 70] ], - [ [-138, 70], [-138.0026767, 69.9998867] ], - [ [-134.9973733, 70.000055], [-135, 70] ], - [ [-130, 70], [-130.0025347, 70.0000511] ], - [ [-128.0009742, 69.9999053], [-128.0034722, 70] ], - [ [-179, 70], [-179.0035064, 69.9990142] ], - [ [-179.9964664, 70.0010089], [180, 70] ], - [ [180, 70], [179.9964664, 69.9989911] ], - [ [179, 70], [178.9964394, 69.9989678] ], - [ [-111.9991714, 49.9999556], [-112, 49.9999997] ], - [ [-112, 49.9999997], [-112.0008286, 50.0000439] ], - [ [-111.9991214, 49.0000033], [-112, 49] ], - [ [-112, 48], [-112.0008492, 47.9999606] ], - [ [-111.9991678, 47.0000569], [-112, 47] ], - [ [-112, 47], [-112.0008325, 46.9999431] ], - [ [-111.9991756, 46.0000733], [-112, 46] ], - [ [-112, 45], [-112.0008022, 44.9999197] ], - [ [-130.5177467, 51], [-130.5193953, 50.9997114] ], - [ [-130.5160981, 51.0002886], [-130.5177467, 51] ], - [ [-130.5161206, 50.0002897], [-130.5177467, 49.9999997] ], - [ [-130.5177467, 49.9999997], [-130.5193731, 49.9997097] ], - [ [-130.5161458, 49.0002717], [-130.5177467, 49] ], - [ [-130.5177467, 48.1166667], [-130.5193258, 48.1164106] ], - [ [-130.5161942, 47.0002378], [-130.5177467, 47] ], - [ [-130.5177467, 47], [-130.5192992, 46.9997622] ], - [ [-130.5162172, 46.0002222], [-130.5177467, 46] ], - [ [-130.5177467, 45], [-130.5192539, 44.9997925] ], - [ [-132.9984775, 48.1169867], [-133, 48.1166667] ], - [ [-131.4555556, 48.1166667], [-131.4571578, 48.1163964] ], - [ [-130.5161675, 48.1169228], [-130.5177467, 48.1166667] ], - [ [-128.4555556, 48.1166667], [-128.4570433, 48.1164319] ], - [ [-128.5444444, 48.1166667], [-128.5459361, 48.1164311] ] -], - -"tests" : [ {"type": "conversion", "tolerances": [2.7777777777777776e-07, 2.7777777777777776e-07]}, - {"type": "roundtrip", "times":1000, "tolerances": [5.555555555555556e-08, 5.555555555555556e-08] } - ] -} diff --git a/test/gigs/5207.1.json b/test/gigs/5207.1.json deleted file mode 100644 index aa4e0f07..00000000 --- a/test/gigs/5207.1.json +++ /dev/null @@ -1,30 +0,0 @@ -{ -"description" : "Test 5207, NTv2 transformation, v2.0_2011-06-28. Out of transform grid area error tests have been removed.", -"projections" : [ "+init=epsg:4202", "+init=epsg:4283" ], - -"coordinates": [ - [ [-115, -10.05], [-115.001251111111, -10.048637222222] ], - [ [-114.998744166667, -11.001359444445], [-115, -11] ], - [ [-115, -12], [-115.001261388889, -11.998644166667] ], - [ [-138.04, -9], [-138.041132777778, -8.998543333333] ], - [ [-138.043867222222, -9.001456666667], [-138.045, -9] ], - [ [-138.05, -9], [-138.051132777778, -8.998543333333] ], - [ [-138.048867222222, -9.001456666667], [-138.05, -9] ], - [ [-138.053867222222, -9.001456666667], [-138.055, -9] ], - [ [-138.06, -9], [-138.061132777778, -8.998543333333] ], - [ [-138.038730833333, -27.126476388889], [-138.04, -27.125] ], - [ [-138.045, -27.125], [-138.046268888889, -27.123523611111] ], - [ [-138.05, -27.125], [-138.051268888889, -27.123523611111] ], - [ [-138.048731111111, -27.126476388889], [-138.05, -27.125] ], - [ [-138.055, -27.125], [-138.056268888889, -27.123523333333] ], - [ [-138.058731111111, -27.126476666667], [-138.06, -27.125] ], - [ [-136.847222222222, -28.05], [-136.848525277778, -28.048526944445] ], - [ [-137.847222222222, -28.05], [-137.848505555556, -28.048531111111] ], - [ [-138.847222222222, -28.05], [-138.8484925, -28.048518888889] ], - [ [-139.847222222222, -28.05], [-139.848475277778, -28.048507222222] ] -], - -"tests" : [ {"type": "conversion", "tolerances": [2.7777777777777776e-07, 2.7777777777777776e-07]}, - {"type": "roundtrip", "times":1000, "tolerances": [5.555555555555556e-08, 5.555555555555556e-08]} - ] -} diff --git a/test/gigs/5207.2.json b/test/gigs/5207.2.json deleted file mode 100644 index cf5c4cd6..00000000 --- a/test/gigs/5207.2.json +++ /dev/null @@ -1,47 +0,0 @@ -{ -"description" : "Test 5206, NADCON transformation, v2.0_2011-06-28. Out of transform grid area error tests have been removed.", -"projections" : [ "+init=epsg:4267", "+init=epsg:4269" ], - -"coordinates": [ - [ [-142, 70], [-142.002804722222, 69.999806944445] ], - [ [-141.997195277778, 70.000193055556], [-142, 70] ], - [ [-140.997219722222, 70.000179166667], [-141, 70] ], - [ [-140, 70], [-140.002795277778, 69.999828055556] ], - [ [-138.997199444444, 70.000160833333], [-139, 70] ], - [ [-138, 70], [-138.002957222222, 69.999875555556] ], - [ [-134.997081944444, 70.000046388889], [-135, 70] ], - [ [-130, 70], [-130.002737222222, 70.000053333333] ], - [ [-128.000734722222, 69.999866388889], [-128.003472222222, 70] ], - [ [-128, 70], [-128.002737777778, 70.000133611111] ], - [ [-125.997388333333, 69.999778055556], [-126, 70] ], - [ [-88.005575, 70], [-88.0056825, 70.000609444445] ], - [ [-88, 70], [-88.000107222222, 70.000609166667] ], - [ [-87.999893333333, 69.999390833333], [-88, 70] ], - [ [-87.6610917, 70], [-87.661171666667, 70.000603333333] ], - [ [-112.165693333333, 51.016955555556], [-112.166607777778, 51.017009444445] ], - [ [-111.999093888889, 50.999949166667], [-112, 51] ], - [ [-111.999095277778, 49.999959722222], [-112, 49.999999722222] ], - [ [-112, 49.999999722222], [-112.000904638889, 50.000039666667] ], - [ [-111.9991175, 49.000006388889], [-112, 49] ], - [ [-112, 48], [-112.0008525, 47.999988888889] ], - [ [-111.999174722222, 47.000009722222], [-112, 47] ], - [ [-112, 47], [-112.000825277778, 46.999990277778] ], - [ [-130.517746666667, 51], [-130.519401944444, 50.999771388889] ], - [ [-130.516091666667, 51.000228611111], [-130.517746666667, 51] ], - [ [-130.516041666667, 50.000246111111], [-130.517746666667, 49.999999722222] ], - [ [-130.517746666667, 49.999999722222], [-130.519451666667, 49.999753333333] ], - [ [-130.516067222222, 49.0002825], [-130.517746666667, 49] ], - [ [-130.517746666667, 48], [-130.519391111111, 47.999679444445] ], - [ [-130.516146944444, 47.000361111111], [-130.517746666667, 47] ], - [ [-130.517746666667, 47], [-130.519346388889, 46.999638611111] ], - [ [-132.998205277778, 48.117026388889], [-133, 48.116666666667] ], - [ [-131.455555555556, 48.116666666667], [-131.457260277778, 48.116333055556] ], - [ [-130.516098055556, 48.116982777778], [-130.517746666667, 48.116666666667] ], - [ [-128.455555555556, 48.116666666667], [-128.457086944444, 48.116392777778] ], - [ [-128.5444, 48.1167066], [-128.545936111111, 48.116431111111] ] -], - -"tests" : [ {"type": "conversion", "tolerances": [2.7777777777777776e-07, 2.7777777777777776e-07]}, - {"type": "roundtrip", "times":1000, "tolerances": [5.555555555555556e-08, 5.555555555555556e-08] } - ] -} diff --git a/test/gigs/5208.json b/test/gigs/5208.json deleted file mode 100644 index 4242c175..00000000 --- a/test/gigs/5208.json +++ /dev/null @@ -1,25 +0,0 @@ -{ -"description": "Test 5208, Longitude Rotation, v2.0_2011-06-28.", -"projections" : [ "+init=epsg:4275", "+init=epsg:4807" ], - -"coordinates": [ - [ [5, 58], [2.66277083, 58] ], - [ [5, 56], [2.66277083, 56] ], - [ [5, 55], [2.66277083, 55] ], - [ [5, 53], [2.66277083, 53] ], - [ [4, 51], [1.66277083, 51] ], - [ [4, 49], [1.66277083, 49] ], - [ [2.33722917, 46.8], [0, 46.8] ], - [ [3, 53], [0.66277083, 53] ], - [ [4, 53], [1.66277083, 53] ], - [ [6, 53], [3.66277083, 53] ], - [ [7, 53], [4.66277083, 53] ], - [ [9, 53], [6.66277083, 53] ], - [ [10, 53], [7.66277083, 53] ], - [ [11, 53], [8.66277083, 53] ] -], - -"tests" : [ {"type": "conversion", "tolerances": [2.7777777777777776e-07, 2.7777777777777776e-07]}, - {"type": "roundtrip", "times":1000, "tolerances": [5.555555555555556e-08, 5.555555555555556e-08] } - ] -} diff --git a/test/gigs/TESTNOTES.md b/test/gigs/TESTNOTES.md deleted file mode 100644 index ff9c03a1..00000000 --- a/test/gigs/TESTNOTES.md +++ /dev/null @@ -1,225 +0,0 @@ -## TEST JSON ########################################################### - -This is the testing framework that uses JSON formatted files that tests -PROJ.4 using Geospatial Integrity of Geoscience Software (GIGS) calculations. -This could be used as a framework for testing projections from other -sources. - - -For more information about the Geospatial Integrity of Geoscience Software -(GIGS) at -http://www.iogp.org/Geomatics#2521115-gigs - -## Geospatial Integrity of Geoscience Software License ################# - -The disclaimer and copyright **only** applies to JSON files that originate -from GIGS tests, which is a reformatting material provided by the -International Association of Oil & Gas Producers. - -**Disclaimer** - -Whilst every effort has been made to ensure the accuracy of the information contained in this publication, -neither the OGP nor any of its members past present or future warrants its accuracy or will, regardless -of its or their negligence, assume liability for any foreseeable or unforeseeable use made thereof, which -liability is hereby excluded. Consequently, such use is at the recipient’s own risk on the basis that any use -by the recipient constitutes agreement to the terms of this disclaimer. The recipient is obliged to inform -any subsequent recipient of such terms. - -This document may provide guidance supplemental to the requirements of local legislation. Nothing -herein, however, is intended to replace, amend, supersede or otherwise depart from such requirements. In -the event of any conflict or contradiction between the provisions of this document and local legislation, -applicable laws shall prevail. - -**Copyright notice** - -The contents of these pages are © The International Association of Oil & Gas Producers. Permission -is given to reproduce this report in whole or in part provided (i) that the copyright of OGP and (ii) -the source are acknowledged. All other rights are reserved.” Any other use requires the prior written -permission of the OGP. - -These Terms and Conditions shall be governed by and construed in accordance with the laws of -England and Wales. Disputes arising here from shall be exclusively subject to the jurisdiction of the -courts of England and Wales. - - -## INSTALLING ########################################################## - - * Requires: Python 2.7 or 3.3+ - * pyproj (optional but highly recommended), this speeds up tests, makes - results more precise but has the trade-off of making installation a - little more complicated. - - - -### Installing pyproj ################################################## - - 1) Install `pip` (usually `pip3`) if not installed, should already be installed on new Python - versions (Python 3 >=3.4) or if using a virtual environment for python. - see https://pip.pypa.io/en/stable/installing/ - * **Note**: if you have Python 2.x and 3.x installed, `pip3` is for Python 3.x. - `pip` could be an alias for either one. - 2) Upgrade `pip` (possibly not needed) - https://pip.pypa.io/en/stable/installing/#upgrading-pip - 3) Install pyproj - * requires a C/C++ compiler be usable by python - * repository version requires Cython to be installed, releases do not require this - -``` - $ pip install cython -``` - - * install latest release - * set PROJ_DIR environment variable to an installed version of PROJ4 - library. This should have the directories include/ lib/ & - share/proj/ underneath it. - - * installing on Linux (default ./configure settings for PROJ.4) - -``` - $ PROJ_DIR=/usr/local pip install pyproj -``` - -## Running Tests ####################################################### - -When calling test_json.py it defaults to using pyproj driver. - -``` - $ python test_json.py 5*.json -``` - -There is a driver to directly use cs2cs instead of installing pyproj, but -it is much slower and not recommended. - -Here is how you run the cs2cs driver: - -``` - $ python test_json.py -d cs2cs -e path/to/repo/bin/cs2cs 5201.json -``` - - -## GIGS Test ########################################################### - -Tests that were meant to test for out of grid errors were removed from -testing. PROJ.4 cs2cs provides coordinates seemingly without warnings -or errors. - -### Drastic Tolerance Errors ########################################### - -These are errors that might indicate the wrong projection is being used, -wrong parameters are being used in the projection, or problems with the -projection itself. It could point to problems with the provided model. - - * 5101 part 4 - Transverse Mercator - - EPSG code will need to be redefined to make sure that etmerc version - is used, should be done before next release (4.9.3 / 4.10.0 ?) - - Temporarily use test "5101.4-jhs-etmerc.json", perhaps remove file - when etmerc/tmerc aliasing issue has been fixed. - * 5102 part 2 - Lambert Conic Conformal (1SP) - - This one seems to have some problems. - * 5105 part 1 - Oblique Mercator (variant B) - - There are some drastically different answers. - -### Slight Tolerance Errors ############################################ - -These tests have results with rounding errors that are slightly out of -tolerance. This could be due to a lack of precision in the JSON file -or due to the formula's precision. Most of these tests fail with some -point in testing 1,000 round trip coordinate conversions. A few of these -might require a little bit of tuning with cs2cs. There are some rather -concerning differences between Python 2.7 and Python 3.4 in testing, which -needs to be pinpointed. - - * 5101 part 1 - Transverse Mercator - - roundtrip tests fail with very slight tolerance issues - * 5104 - Oblique stereographic - - roundtrip tests fail with very slight tolerance issues - * 5105 part 2 - Oblique Mercator (variant B) - - roundtrip tests fail with tolerance issues - * 5106 - Hotline Oblique Mercator (variant A) - - roundtrip tests fail with very slight tolerance issues - * 5108 - Cassini-Soldner - - roundtrip tests seem to accumulate errors - * 5110 - Lambert Azimuthal Equal Area - - roundtrip tests have some slight errors - * 5111 part 1 - Mercator (variant A) - - roundtrip tests fail with very slight tolerance issues - * 5111 part 2 - Mercator (variant A) - * 5203 part 1 - Position Vector 7-parameter transformation - - most seem to be rounding errors. Some results cross longitude - line 180/-180 - * 5204 part 1 - Coordinate Frame 7-parameter transformation - - most seem to be rounding errors. Some results cross longitude - line 180/-180 - * 5205 part 1 - Molodensky-Badekas 10-parameter transformation - - most seem to be rounding errors. Some results cross longitude - line 180/-180 - * 5206 - NADCON transformation - * 5207 parts 1 & 2 - NTv2 transformation - - -### Other Issues with Tests ############################################ - * 5201 - Geographic Geocentric conversions - - EPSG code 4979, does not exist in PROJ.4 substituted EPGS code 4326. - - The test passes. - * 5206 and 5207 parts 1 & 2 - NADCON Transformation and NTv2 Transformation - - These tests have cases that are out of grid, which have been omitted. - The GIGS tests expectations, "[n]ote 1: This location is out of - transformation grid area - the attempted transformation should fail - and application notify user." - - -## Passing Tests ####################################################### - * 5101 part 2 - Transverse Mercator - * 5101 part 3 - Transverse Mercator - * 5102 part 1 - Lambert Conic Conformal (1SP) - * 5103 part 1 - Lambert Conic Conformal (2SP) - * 5103 part 2 - Lambert Conic Conformal (2SP) - * 5103 part 3 - Lambert Conic Conformal (2SP) - * 5107 - American Polyconic - * 5109 - Albers Equal Area - * 5112 - Mercator (variant B) - * 5113 - Transverse Mercator (South Oriented) - * 5208 - Longitude Rotation - - - -## Benchmarks ########################################################## - -Benchmarks were made using Micah Cochran's circa 2008 Desktop computer -using LXLE Ubuntu Linux 14.04. The pattern "5*.json" was used for testing. - -This is the computer time used for the process, not the actual run time. - * pyproj driver testing 5 seconds - * cs2cs driver testing - using Python 2.7.6 - 4 min 36 seconds - * cs2cs driver testing - using Python 3.4.3 - 6 min 23 seconds - - - -## Random Notes ####################################################### -Roundtrip testing has been fixed, it now checks both resulting coordinates. - -Some tests in the 5100/5200 series have not been converted. The most of -the 3d coordinate test in the 5200 series have not been converted. - -This is designed to use decimal degrees over Sexagesimal degree or degree -minutes seconds, which is a decision that might need to be revisited. -Decimal degrees were chosen because it was easier interface with the -Python pyproj library. This might be the cause of some testing tolerance -issues. - -pyproj and cs2cs drivers do not quite work the same. Different tests -fail depending on the driver. - -Other drivers could be written to interface with other code. - -There could be some precision issues with cs2cs, perhaps some adjustment -of the "-f format" parameter could help. This could be done based either -on expected output or extra info from the JSON file. - -A TODO list is located source code. - -Conversion tests the output coordinate, causing 2 test results per -coordinate pair. - -Roundtrip tests the input coordinate and the output coordinate of each - pair, causing 4 test results per coordinate pair. diff --git a/test/gigs/convert_to_gie.py b/test/gigs/convert_to_gie.py deleted file mode 100644 index ba04b03d..00000000 --- a/test/gigs/convert_to_gie.py +++ /dev/null @@ -1,69 +0,0 @@ -import sys -import json - -def write_coords(f, coords, testtype, test): - '''testtype can be either ('fwd', 'inv', 'roundtrip')''' - - for coord in coords: - if len(coord[0]) == 3: - cstring = '{} {} {}' - else: - cstring = '{} {}' - - f.write('tolerance {tol} m\n'.format(tol=test['tolerances'][tolerance_index])) - accept = 'accept {s}\n'.format(s=cstring) - expect = 'expect {s}\n'.format(s=cstring) - - if testtype == 'fwd': - f.write(accept.format(*coord[0])) - f.write(expect.format(*coord[1])) - - if testtype == 'inv': - f.write(accept.format(*coord[1])) - f.write(expect.format(*coord[0])) - - if testtype == 'roundtrip': - f.write(accept.format(*coord[0])) - f.write('roundtrip {n}\n'.format(n=test['times'])) - - f.write('\n') - - - -with open(sys.argv[1]) as f: - data = json.load(f) - -coords = data['coordinates'] -tests = data['tests'] -crss = data['projections'] - -if len(coords[0]) == 3: - tolerance_index = 0 -else: - tolerance_index = 1 - -filename = sys.argv[1].replace('json', 'gie') -with open(filename, 'w') as f: - f.write('-'*80 + '\n\n') - f.write('{descr}\n\n'.format(descr=data['description'])) - f.write('-'*80 + '\n\n') - f.write('\n\n'); - for test in tests: - f.write('-'*80 + '\n') - f.write('operation +proj=pipeline\n') - f.write(' +step {src} +inv\n'.format(src=crss[0])) - f.write(' +step {dst}\n'.format(dst=crss[1])) - f.write('-'*80 + '\n') - if test['type'] == 'conversion': - write_coords(f, coords, 'fwd', test) - f.write('-'*80 + '\n') - f.write('operation +proj=pipeline\n') - f.write(' +step {src} +inv\n'.format(src=crss[1])) - f.write(' +step {dst}\n'.format(dst=crss[0])) - f.write('-'*80 + '\n') - write_coords(f, coords, 'inv', test) - - if test['type'] == 'roundtrip': - write_coords(f, coords, 'roundtrip', test) - - f.write('\n') diff --git a/test/gigs/test_json.py b/test/gigs/test_json.py deleted file mode 100644 index 11aec31e..00000000 --- a/test/gigs/test_json.py +++ /dev/null @@ -1,528 +0,0 @@ -# This is a framework to test GIGS, Geospatial Integrity of geoscience -# software. Which is published by International Association of Oil & Gas -# Producers as a resources for how geospatial software should give consistent -# and expected results. -# -# This could be expanded to be used with other testing frameworks. -# -# - See more at: http://www.iogp.org/Geomatics#2521115-gigs -# - -# -# == REQUIREMENTS == -# - Python 2.7 or 3.3+ -# - pyproj (optional but highly recommended) - read TESTNOTES.md - -# == TODO list == -# * Python 3 was not running all the test cases seemingly due to how it uses -# an iterable version of zip. -- FIXED -# * driver for proj4js (javascript) -# - could be written using nodejs using subprocess -# - could use PyExecJS (currently not advanced enough) or PyV8 -# * call cs2cs directly -# - WORKING but 2 orders of magnitude slower than pyproj, and -# potentially insecure shelling? - - -import argparse -import glob -import json -import logging -import os -import platform -import sys -import subprocess -from tempfile import NamedTemporaryFile - -# only for debug -# import pdb - -try: - import pyproj -except ImportError as e_pyproj: - pass - - -PY_MAJOR = sys.version_info[0] -PY2 = (PY_MAJOR == 2) - -# Python 2/3 Compatibility code ######################################## -if PY_MAJOR >= 3: - # list-producing versions of the major Python iterating functions - # lzip acts like Python 2.x zip function. - # taken from Python-Future http://python-future.org/ - # future.utils.lzip() - - def lzip(*args, **kwargs): - return list(zip(*args, **kwargs)) - -else: - from __builtin__ import zip as lzip -######################################################################## - - -def list_count_matches(coords, ex_coords, tolerance): - """ - counts coordinates in lists that match and don't match. - assumes that lists are the same length (they should be) - - coords - coordinates - ex_cords - expected cooridnate - tolerance - difference allowed between the coordinates - - returns tuple (matches, non_matches) - """ - matches, non_matches = 0, 0 - iter_ex_coords = iter(ex_coords) - for c in coords: - ex_coord = next(iter_ex_coords) - if match_func(c, ex_coord, tolerance): - matches = matches + 1 - else: - non_matches = non_matches + 1 - - return (matches, non_matches) - - -def match_func(cor, exc, tolerance): - """ - Check if coordinate matches expected coordinate within a given tolerance. - - cor - coordinate - exc - expected coordinate - tolerance - error rate - float coordinate elements will be checked based on this value - list/tuple coordinate elements will be checked based on the - corresponding values - return bool - """ - if len(exc) == 3: - # coordinate triples - coord_diff = abs(cor[0] - exc[0]), abs(cor[1] - exc[1]), abs(cor[2] - exc[2]) - if isinstance(tolerance, float): - matching = coord_diff < (tolerance, tolerance, tolerance) - elif isinstance(tolerance, (list, tuple)): # FIXME is list's length atleast 3? - matching = coord_diff < tuple(tolerance) - else: - # assume coordinate pairs - coord_diff = abs(cor[0] - exc[0]), abs(cor[1] - exc[1]) - if isinstance(tolerance, float): - matching = coord_diff < (tolerance, tolerance) - elif isinstance(tolerance, (list, tuple)): # FIXME is list's length atleast 2? - matching = coord_diff < tuple(tolerance) - - if matching is False: - logging.info('non-match, calculated coordinate: {c1}\n' - 'expected coordinate: {c2}\n difference:{res}\n' - 'tolerance: {tol}\n' - ''.format(c1=cor, c2=exc, res=coord_diff, tol=tolerance)) - - return matching - - -# parse multiple tests and call TransformTest -# TODO: needs some awareness of the driver, so driver_info function in -# TransformTest classes can be called, could allow a dummy instance of -# Driver and move all the initization code to another function? Or allow -# dipatch function to check if everything is in order do a transform. -# Not an elegant solution. -class TransformRunner(object): - def __init__(self, fn_pattern, driver, **kwargs): - """ - fn_pattern - file name or file name pattern (example "*.json") - driver - this is the type of driver to run - kwargs - parameters passed to the respective driver TransformTest class - """ - self.driver = driver - json_input = [] - if os.path.isfile(fn_pattern): - with open(fn_pattern, 'rt') as fp: - logging.info("Reading json from file '{0}'".format(fn_pattern)) - json_dict = json.load(fp, parse_int=float) - json_dict['filename'] = fn_pattern - json_input = [json_dict] - # is this a glob/fnmatch style pattern? - elif '*' in fn_pattern or '?' in fn_pattern: - filename_iter = glob.iglob(fn_pattern) - for filename in filename_iter: - with open(filename, 'rt') as fp: - logging.info("Reading json from file '{0}'".format(filename)) - j_input = json.load(fp, parse_int=float) - if isinstance(j_input, dict): - j_input['filename'] = filename - json_input.append(j_input) - elif isinstance(j_input, list): - # FIXME could build a new list with the filename dict - logging.warning("json file is a list, not quite supported - FIXME") - json_input.extend(j_input) - else: - raise ValueError('json input in an unknown type') - else: - raise TypeError('filename_pattern must be a valid filename or pattern') - - self.runs = json_input - self.kwargs = kwargs - - def dispatch(self): - """ - main loop to run all the tests - """ - total_matches, total_no_matches, success_code = 0, 0, 0 - for run in self.runs: - if self.driver == 'pyproj': - trantst = TransformTestPyProj(run, self.kwargs) - elif self.driver == 'cs2cs': - trantst = TransformTestCs2cs(run, self.kwargs) - else: - raise ValueError("driver {0} is not a valid test driver".format(self.driver)) - matches, no_matches = trantst.dispatch() - total_matches += matches - total_no_matches += no_matches - success_code += no_matches - - return total_matches, total_no_matches, success_code - - -# parses and runs a single GIGS test case -class TransformTestBase(object): - """ - TransformTest common code for testing framework. - """ - def __init__(self, json_dict, kwargs): - """ - json_dict must dictonary from json - """ - if not isinstance(json_dict, dict): # must be a json dictionary - raise TypeError("json_source must be a dictionary type not {0}" - "".format(type(json_dict))) - - # require keys 'coordinates' and 'projections' - if 'coordinates' not in json_dict: - raise KeyError("TransformTest.__init__ requires 'coordinates' key" - " in json source input") - - if 'projections' not in json_dict: - raise KeyError("TransformTest.__init__ requires 'projections' key" - " in json source input") - - logging.info('Number of coordinate pairs to test: {0}'.format( - len(json_dict['coordinates']))) - - self.run_test_args = kwargs.get('test') - - # unpack coordinates - self.coords_left, self.coords_right = lzip(*json_dict['coordinates']) - - self.testobj = json_dict - - def runner_conversion(self, **kwargs): - """ - tests a single conversion - - return tuple (num_matches, num_no_matches) - """ - - # get tolerance, if not set tolerance to a precise value - tolerances = kwargs.get('tolerances', [0.0000000000001, 0.0000000000001]) - - test_right = self.transform(self.proj_left, self.proj_right, self.coords_left) - test_left = self.transform(self.proj_right, self.proj_left, self.coords_right) - - results1 = list_count_matches(test_right, self.coords_right, tolerances[1]) - results2 = list_count_matches(test_left, self.coords_left, tolerances[0]) - - return (results1[0] + results2[0], results1[1] + results2[1]) - - def runner_roundtrip(self, **kwargs): - """ - rountrip test using pyproj. - - times - number roundtrips to perform - tolerance - TODO explain the structure of why this is a list - - return tuple (num_matches, num_no_matches) - """ - times = None - - # get variables - times = int(kwargs.get('times')) - tolerances = kwargs.get('tolerances', [0.0000000000001, 0.0000000000001]) - - # keep the transformations separate, so as to not cross contaminate the - # results. - - # process roundtrip for the left coordinates - Test 1 - test1_left = self.coords_left - for i in range(times): - test1_right = self.transform(self.proj_left, self.proj_right, test1_left) - test1_left = self.transform(self.proj_right, self.proj_left, test1_right) - - # process roundtrip for the right coordinates - Test 2 - test2_right = self.coords_right - for i in range(times): - test2_left = self.transform(self.proj_right, self.proj_left, test2_right) - test2_right = self.transform(self.proj_left, self.proj_right, test2_left) - - results = ( - list_count_matches(test1_right, self.coords_right, tolerances[1]), - list_count_matches(test1_left, self.coords_left, tolerances[0]), - list_count_matches(test2_right, self.coords_right, tolerances[1]), - list_count_matches(test2_left, self.coords_left, tolerances[0]) - ) - - return tuple(sum(x) for x in lzip(*results)) - - # TODO: Untested. Not useful for GIGS. - def runner_onedirection(self, **kwargs): - """ - Perform a conversion in only one direction, not both. Useful for - testing convergence of a coordinate system. - - return tuple (num_matches, num_no_matches) - """ - # get variables - direction = kwargs.get('direction') - # get tolerance, if not set tolerance to a precise value - tolerances = kwargs.get('tolerances', [0.0000000000001, 0.0000000000001]) - - if direction not in ('left-to-right', 'right-to-left'): - raise ValueError('direction must be left-to-right or right-to-left, not: {0}'.format(direction)) - - if direction == 'left-to-right': - test_dest_right = self.transform(self.proj_left, self.proj_right, self.coords_left) - results = list_count_matches(test_dest_right, self.coords_right, tolerances[1]) - elif direction == 'right-to-left': - test_dest_left = self.transform(self.proj_right, self.proj_left, self.coords_right) - results = list_count_matches(test_dest_left, self.coords_left, tolerances[0]) - else: - raise RuntimeError('Unexpected state of value direction "{0}" in runner_onedirection'.format(direction)) - - return results - - # placeholder function - def transform(self, src_crs, dst_crs, coords): - pass - - def dispatch(self): - """ - main - """ - matches, no_matches = 0, 0 - - # convert to tuple - run_tests = self.run_test_args, - if self.run_test_args is None: - run_tests = ('conversion', 'roundtrip') - - logging.info('Testing: {0}'.format(self.testobj['description'])) - - for test in self.testobj['tests']: - m_res, nm_res = None, None - if test['type'] not in run_tests: - # skip test - continue - - if test['type'] == 'conversion': - m_res, nm_res = self.runner_conversion(**test) - elif test['type'] == 'roundtrip': - m_res, nm_res = self.runner_roundtrip(**test) - - if nm_res == 0: - logging.info(" {0}... All {1} match.".format(test['type'], m_res)) - else: - logging.info(" {0}... matches: {1} doesn't match: {2}" - "".format(test['type'], m_res, nm_res)) - - matches += m_res - no_matches += nm_res - - return matches, no_matches - - # placeholder function -- TODO How should this be exposed? - def driver_info(self): - return "base class" - - -class TransformTestPyProj(TransformTestBase): - """ - TransformTest uses pyproj to run tests. - """ - def __init__(self, json_dict, kwargs): - # call super class - TransformTestBase.__init__(self, json_dict, kwargs) - - # setup projections - try: - self.proj_left = pyproj.Proj(json_dict['projections'][0], preserve_units=True) - except RuntimeError as e: - logging.error('pyproj raised a RuntimeError for projection string:' - ' "{0}"'.format(json_dict['projections'][0])) - raise RuntimeError(e) - try: - self.proj_right = pyproj.Proj(json_dict['projections'][1], preserve_units=True) - except RuntimeError as e: - logging.error('pyproj raised a RuntimeError for projection string:' - ' "{0}"'.format(json_dict['projections'][1])) - raise RuntimeError(e) - - def transform(self, src_crs, dst_crs, coords): - return self.pyproj_transform_ex(src_crs, dst_crs, coords) - - def driver_info(self): - return 'pyproj {0}\nproj4 {1}\n'.format( - pyproj.__version__, self.proj4_version()) - - # TODO: currently dead code, unneeded for the pyproj repo. version - # as of 2016-05-24. - def proj4_version(): - """ - Gives the proj.4 library's version number. (requires pyproj) - returns string, so proj.4 version 4.9.3 will return "4.9.3" - """ - try: - return pyproj.proj_version_str - except AttributeError: - # for pyproj versions 1.9.5.1 and before, this will run - # Get PROJ4 version in a floating point number - proj4_ver_num = pyproj.Proj(proj='latlong').proj_version - - # convert float into a version string (4.90 becomes '4.9.0') - return '.'.join(str(int(proj4_ver_num * 100))) - - def pyproj_transform_ex(self, proj_src, proj_dst, coords): - """ - wrapper for pyproj.transform to do all the zipping of the coordinates - - returns coordinate list - """ - # are these coordinate triples? - if len(coords[0]) == 3: - xi, yi, zi = lzip(*coords) - xo, yo, zo = pyproj.transform(proj_src, proj_dst, xi, yi, zi) - return lzip(xo, yo, zo) - - # assume list of coordinate pairs - xi, yi = lzip(*coords) - xo, yo = pyproj.transform(proj_src, proj_dst, xi, yi) - return lzip(xo, yo) - - -class TransformTestCs2cs(TransformTestBase): - def __init__(self, json_dict, kwargs): - # call super class - TransformTestBase.__init__(self, json_dict, kwargs) - - # copy proj4 projection strings - self.proj_left, self.proj_right = json_dict['projections'] - - self.exe = kwargs.get('exe', 'cs2cs') - - # when the exe is not the default, check if the file exists - if self.exe == 'cs2cs' or not os.path.isfile(self.exe): - raise RuntimeError('cannot find cs2cs executable file: {}' - ''.format(self.exe)) - - def transform(self, src_crs, dst_crs, coords): - # send points to a temporary file - # TODO Should this use with statement? - tmpfn = NamedTemporaryFile(mode='w+t', delete=False) - for point in coords: - # convert list of float values into a list of strings - point = [str(e) for e in point] - # print('POINT: {}'.format(point)) - tmpfn.write(' '.join(point) + '\n') - - tmpfn.flush() - command = "{exe} {proj_from} +to {proj_to} -f %.13f {filename}".format( - exe=self.exe, proj_from=src_crs, proj_to=dst_crs, filename=tmpfn.name) - tmpfn.close() - - logging.debug('Running Popen on command "{0}"'.format(command)) - - if platform.system() == 'Windows': - shell = False - else: - # shell=True according to the subprocess documentation has some - # security implications - # Linux seems to need this - shell = True - - # call cs2cs - outs = subprocess.check_output(command, shell=shell) - - # delete temporary filename - os.unlink(tmpfn.name) - - # print('RESULTS OUTS: {}\n'.format(outs)) - # print('RESULTS ERRS: {}\n'.format(errs)) - - # outs - # print('RESULTS LINE: {}\n'.format([line.split() for line in outs])) - coords = [] - - # process output - for line in outs.splitlines(): - # print("LINE: {}".format(line)) - coord = [] - for e in line.split(): - coord.append(float(e)) - - coords.append(coord) - - # print('COORDS: {}\n'.format(coords)) - return coords - - def driver_info(self): - shell = True # see transform() for info. - if platform.system() == 'Windows': - shell = False - - outs = subprocess.check_output(self.exe, shell=shell) - return 'PROJ.4 version: ' + outs.splitlines()[0] + '\n' - - -if __name__ == '__main__': - # logging.basicConfig(level=logging.DEBUG) - logging.basicConfig(level=logging.INFO) - - parser = argparse.ArgumentParser(description='Test PROJ.4 using a JSON file.') - parser.add_argument('-e', '--exe', - help="executable with path default: 'cs2cs' (needed for cs2cs driver)") - - parser.add_argument('-d', '--driver', default='pyproj', - help='driver to test') - - parser.add_argument('-t', '--test', - help='only run these test types (valid values: conversion or roundtrip)') - - # get json file names and/or glob patterns - parser.add_argument('testnames_pat_json', nargs=argparse.REMAINDER, - help='single filename or glob wildcard patern') - - args = parser.parse_args() - - # test that the arguments have sensible values - if args.driver not in ('cs2cs', 'pyproj'): - raise ValueError('driver "{}" is not a valid driver'.format(args.driver)) - - logging.info('Python {}'.format(sys.version)) - logging.info('using driver: {}'.format(args.driver)) - - # there could be a version command for the TransformRunner TODO - - match_results, nonmatch_results, success_code = 0, 0, 0 - for test_name in args.testnames_pat_json: - tratst = TransformRunner(test_name, driver=args.driver, exe=args.exe, - test=args.test) - m_res, nm_res, success_cd = tratst.dispatch() - match_results += m_res - nonmatch_results += nm_res - success_code += success_cd - - logging.info("----------------------------------------") - logging.info("TOTAL: matches: {0} non-matching: {1}" - "".format(match_results, nonmatch_results)) - - # exit status code is the number of non-matching results - # This should play nicely with Travis and similar testing. - sys.exit(success_code) diff --git a/travis/before_install.sh b/travis/before_install.sh index ccf59936..ac45a6d4 100755 --- a/travis/before_install.sh +++ b/travis/before_install.sh @@ -2,18 +2,3 @@ # All platform-specific before_install scripts starts by running this # "global" before_install script. - -# Specify which version of python to use. The default python to use on Travis -# can vary from platform to platform, so we use pyenv to make sure we use -# a version that works for the complete build processs. (Not in use at the moment, -# since the pyenv setup on Travis is not consistent across platforms and partly -# broken as well) -#pyenv global system 3.5 -#pyenv versions # a bit of debug info - -# What is the current python setup? -which python -python --version - -which pip -pip --version diff --git a/travis/install.sh b/travis/install.sh index 5f520902..8b7a7b90 100755 --- a/travis/install.sh +++ b/travis/install.sh @@ -82,21 +82,4 @@ if [ $TRAVIS_OS_NAME == "osx" ]; then make -j3 PROJ_LIB=$GRIDDIR make check -# install & run the working GIGS test - # create locations that pyproj understands -ln -s src include -ln -s src/.libs lib -mkdir share -ln -s nad share/proj -pwd - # install pyproj -export CFLAGS= -PROJ_DIR=`pwd` pip install -v --user pyproj - -cd test/gigs - # run test_json.py -PROJ_LIB=../../nad python test_json.py --test conversion 5101.1-jhs.json 5101.4-jhs-etmerc.json 5105.2.json 5106.json 5108.json 5110.json 5111.1.json -PROJ_LIB=../../nad python test_json.py 5101.2-jhs.json 5101.3-jhs.json 5102.1.json 5103.1.json 5103.2.json 5103.3.json 5107.json 5109.json 5112.json 5113.json 5201.json 5208.json -cd ../.. - mv src/.libs/*.gc* src diff --git a/travis/osx/before_install.sh b/travis/osx/before_install.sh index e4d3b00d..17c0e141 100755 --- a/travis/osx/before_install.sh +++ b/travis/osx/before_install.sh @@ -2,8 +2,6 @@ set -e -sudo easy_install pip - ./travis/before_install.sh brew update -- cgit v1.2.3 From 35f9f725cc1e18b5966752386d735fc661c9e0ca Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Fri, 2 Feb 2018 14:08:58 +0100 Subject: Revert plotdefs.json that was deleted by accident. [skip ci] --- docs/plot/plotdefs.json | 1476 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1476 insertions(+) create mode 100644 docs/plot/plotdefs.json diff --git a/docs/plot/plotdefs.json b/docs/plot/plotdefs.json new file mode 100644 index 00000000..b61466f0 --- /dev/null +++ b/docs/plot/plotdefs.json @@ -0,0 +1,1476 @@ +[ + { + "filename": "aea.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "aea", + "projstring": "+proj=aea", + "res": "low", + "type": "poly" + }, + { + "filename": "aeqd.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "aeqd", + "projstring": "+proj=aeqd", + "res": "low", + "type": "poly" + }, + { + "filename": "airy.png", + "latmax": 90, + "latmin": -90, + "lonmax": 90, + "lonmin": -90, + "name": "airy", + "projstring": "+proj=airy", + "res": "low", + "type": "poly" + }, + { + "filename": "aitoff.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "aitoff", + "projstring": "+proj=aitoff", + "res": "low", + "type": "poly" + }, + { + "filename": "alsk.png", + "latmax": 75, + "latmin": 50, + "lonmax": -130, + "lonmin": -175, + "name": "alsk", + "projstring": "+proj=alsk", + "res": "med", + "type": "poly" + }, + { + "filename": "apian.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "apian", + "projstring": "+proj=apian", + "res": "low", + "type": "poly" + }, + { + "filename": "august.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "august", + "projstring": "+proj=august", + "res": "low", + "type": "poly" + }, + { + "filename": "bacon.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "bacon", + "projstring": "+proj=bacon", + "res": "low", + "type": "poly" + }, + { + "filename": "bipc.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "bipc", + "projstring": "+proj=bipc +ns", + "res": "low", + "type": "line" + }, + { + "filename": "boggs.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "boggs", + "projstring": "+proj=boggs", + "res": "low", + "type": "poly" + }, + { + "filename": "bonne.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "bonne", + "projstring": "+proj=bonne +lat_1=10", + "res": "low", + "type": "poly" + }, + { + "filename": "cass.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "cass", + "projstring": "+proj=cass", + "res": "low", + "type": "poly" + }, + { + "filename": "cc.png", + "latmax": 75, + "latmin": -75, + "lonmax": 180, + "lonmin": -180, + "name": "cc", + "projstring": "+proj=cc", + "res": "low", + "type": "poly" + }, + { + "filename": "ccon.png", + "latmax": 70, + "latmin": 34, + "lonmax": -30, + "lonmin": 68, + "name": "ccon", + "projstring": "+proj=ccon +lat_1=52 +lon_0=19", + "res": "med", + "type": "poly" + }, + { + "filename": "cea.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "cea", + "projstring": "+proj=cea", + "res": "low", + "type": "poly" + }, + { + "filename": "chamb.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "chamb", + "projstring": "+proj=chamb +lat_1=10 +lon_1=30 +lon_2=40", + "res": "low", + "type": "poly" + }, + { + "filename": "collg.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "collg", + "projstring": "+proj=collg", + "res": "low", + "type": "poly" + }, + { + "filename": "comill.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "comill", + "projstring": "+proj=comill", + "res": "low", + "type": "poly" + }, + { + "filename": "crast.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "crast", + "projstring": "+proj=crast", + "res": "low", + "type": "poly" + }, + { + "filename": "denoy.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "denoy", + "projstring": "+proj=denoy", + "res": "low", + "type": "poly" + }, + { + "filename": "eck1.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "eck1", + "projstring": "+proj=eck1", + "res": "low", + "type": "poly" + }, + { + "filename": "eck2.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "eck2", + "projstring": "+proj=eck2", + "res": "low", + "type": "poly" + }, + { + "filename": "eck3.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "eck3", + "projstring": "+proj=eck3", + "res": "low", + "type": "poly" + }, + { + "filename": "eck4.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "eck4", + "projstring": "+proj=eck4", + "res": "low", + "type": "poly" + }, + { + "filename": "eck5.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "eck5", + "projstring": "+proj=eck5", + "res": "low", + "type": "poly" + }, + { + "filename": "eck6.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "eck6", + "projstring": "+proj=eck6", + "res": "low", + "type": "poly" + }, + { + "filename": "eqc.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "eqc", + "projstring": "+proj=eqc", + "res": "low", + "type": "poly" + }, + { + "filename": "eqdc.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "eqdc", + "projstring": "+proj=eqdc +lat_1=55 +lat_2=60", + "res": "low", + "type": "poly" + }, + { + "filename": "euler.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "euler", + "projstring": "+proj=euler +lat_1=67 +lat_2=75", + "res": "low", + "type": "poly" + }, + { + "filename": "etmerc.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "etmerc", + "projstring": "+proj=etmerc +lon_0=-40", + "res": "low", + "type": "line" + }, + { + "filename": "fahey.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "fahey", + "projstring": "+proj=fahey", + "res": "low", + "type": "poly" + }, + { + "filename": "fouc.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "fouc", + "projstring": "+proj=fouc", + "res": "low", + "type": "poly" + }, + { + "filename": "fouc_s.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "fouc_s", + "projstring": "+proj=fouc_s", + "res": "low", + "type": "poly" + }, + { + "filename": "gall.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "gall", + "projstring": "+proj=gall", + "res": "low", + "type": "poly" + }, + { + "filename": "geos.png", + "latmax": 90, + "latmin": -90, + "lonmax": 15, + "lonmin": -135, + "name": "geos", + "projstring": "+proj=geos +h=35785831.0 +lon_0=-60 +sweep=y", + "res": "low", + "type": "poly" + }, + { + "filename": "gins8.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "gins8", + "projstring": "+proj=gins8", + "res": "low", + "type": "poly" + }, + { + "filename": "gn_sinu.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "gn_sinu", + "projstring": "+proj=gn_sinu +m=2 +n=3", + "res": "low", + "type": "poly" + }, + { + "filename": "gnom.png", + "latmax": 90, + "latmin": 50, + "lonmax": 180, + "lonmin": -180, + "name": "gnom", + "projstring": "+proj=gnom +lat_0=90 +lon_0=-50", + "res": "low", + "type": "poly" + }, + { + "filename": "goode.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "goode", + "projstring": "+proj=goode", + "res": "low", + "type": "poly" + }, + { + "filename": "gs48.png", + "latmax": 45, + "latmin": 25, + "lonmax": -70, + "lonmin": -125, + "name": "gs48", + "projstring": "+proj=gs48", + "res": "med", + "type": "poly" + }, + { + "filename": "gs50.png", + "latmax": 75, + "latmin": 15, + "lonmax": -55, + "lonmin": -170, + "name": "gs50", + "projstring": "+proj=gs50", + "res": "med", + "type": "poly" + }, + { + "filename": "hammer.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "hammer", + "projstring": "+proj=hammer", + "res": "low", + "type": "poly" + }, + { + "filename": "hatano.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "hatano", + "projstring": "+proj=hatano", + "res": "low", + "type": "poly" + }, + { + "filename": "igh.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "igh", + "projstring": "+proj=igh", + "res": "low", + "type": "line" + }, + { + "filename": "imw_p.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "imw_p", + "projstring": "+proj=imw_p +lat_1=30 +lat_2=-40", + "res": "low", + "type": "line" + }, + { + "filename": "isea.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "isea", + "projstring": "+proj=isea", + "res": "low", + "type": "line" + }, + { + "filename": "kav5.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "kav5", + "projstring": "+proj=kav5", + "res": "low", + "type": "poly" + }, + { + "filename": "kav7.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "kav7", + "projstring": "+proj=kav7", + "res": "low", + "type": "poly" + }, + { + "filename": "krovak.png", + "latmax": 58, + "latmin": 42, + "lonmax": 25, + "lonmin": 5, + "name": "krovak", + "projstring": "+proj=krovak", + "res": "med", + "type": "poly" + }, + { + "filename": "labrd.png", + "latmax": 0, + "latmin": -35, + "lonmax": 55, + "lonmin": 30, + "name": "labrd", + "projstring": "+proj=labrd +lon_0=40 +lat_0=-10", + "res": "med", + "type": "poly" + }, + { + "filename": "laea.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "laea", + "projstring": "+proj=laea", + "res": "low", + "type": "poly" + }, + { + "filename": "lagrng.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "lagrng", + "projstring": "+proj=lagrng", + "res": "low", + "type": "poly" + }, + { + "filename": "larr.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "larr", + "projstring": "+proj=larr", + "res": "low", + "type": "poly" + }, + { + "filename": "lask.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "lask", + "projstring": "+proj=lask", + "res": "low", + "type": "poly" + }, + { + "filename": "lcc.png", + "latmax": 90, + "latmin": 10, + "lonmax": -10, + "lonmin": -160, + "name": "lcc", + "projstring": "+proj=lcc +lon_0=-90", + "res": "med", + "type": "poly" + }, + { + "filename": "lcca.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "lcca", + "projstring": "+proj=lcca +lat_0=35", + "res": "low", + "type": "poly" + }, + { + "filename": "leac.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "leac", + "projstring": "+proj=leac", + "res": "low", + "type": "poly" + }, + { + "filename": "lee_os.png", + "latmax": 85, + "latmin": -85, + "lonmax": -80, + "lonmin": -180, + "name": "lee_os", + "projstring": "+proj=lee_os", + "res": "med", + "type": "poly" + }, + { + "filename": "loxim.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "loxim", + "projstring": "+proj=loxim", + "res": "low", + "type": "poly" + }, + { + "filename": "lsat.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "lsat", + "projstring": "+proj=lsat +ellps=GRS80 +lat_1=-60 +lat_2=60 +lsat=2 +path=2", + "res": "low", + "type": "line" + }, + { + "filename": "mbt_s.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "mbt_s", + "projstring": "+proj=mbt_s", + "res": "low", + "type": "poly" + }, + { + "filename": "mbt_fps.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "mbt_fps", + "projstring": "+proj=mbt_fps", + "res": "low", + "type": "poly" + }, + { + "filename": "mbtfpp.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "mbtfpp", + "projstring": "+proj=mbtfpp", + "res": "low", + "type": "poly" + }, + { + "filename": "mbtfpq.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "mbtfpq", + "projstring": "+proj=mbtfpq", + "res": "low", + "type": "poly" + }, + { + "filename": "mbtfps.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "mbtfps", + "projstring": "+proj=mbtfps", + "res": "low", + "type": "poly" + }, + { + "filename": "merc.png", + "latmax": 85, + "latmin": -85, + "lonmax": 180, + "lonmin": -180, + "name": "merc", + "projstring": "+proj=merc", + "res": "low", + "type": "poly" + }, + { + "filename": "mil_os.png", + "latmax": 80, + "latmin": -40, + "lonmax": 80, + "lonmin": -40, + "name": "mil_os", + "projstring": "+proj=mil_os", + "res": "low", + "type": "poly" + }, + { + "filename": "mill.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "mill", + "projstring": "+proj=mill", + "res": "low", + "type": "poly" + }, + { + "filename": "misrsom.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "misrsom", + "projstring": "+proj=misrsom +path=1", + "res": "low", + "type": "line" + }, + { + "filename": "moll.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "moll", + "projstring": "+proj=moll", + "res": "low", + "type": "poly" + }, + { + "filename": "murd1.png", + "latmax": 85, + "latmin": -40, + "lonmax": 180, + "lonmin": -180, + "name": "murd1", + "projstring": "+proj=murd1 +lat_1=30 +lat_2=50", + "res": "low", + "type": "poly" + }, + { + "filename": "murd2.png", + "latmax": 85, + "latmin": -40, + "lonmax": 180, + "lonmin": -180, + "name": "murd2", + "projstring": "+proj=murd2 +lat_1=30 +lat_2=50", + "res": "low", + "type": "poly" + }, + { + "filename": "murd3.png", + "latmax": 85, + "latmin": -40, + "lonmax": 180, + "lonmin": -180, + "name": "murd3", + "projstring": "+proj=murd3 +lat_1=30 +lat_2=50", + "res": "low", + "type": "poly" + }, + { + "filename": "natearth.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "natearth", + "projstring": "+proj=natearth", + "res": "low", + "type": "poly" + }, + { + "filename": "natearth2.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "natearth2", + "projstring": "+proj=natearth2", + "res": "low", + "type": "poly" + }, + { + "filename": "nell.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "nell", + "projstring": "+proj=nell", + "res": "low", + "type": "poly" + }, + { + "filename": "nell_h.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "nell_h", + "projstring": "+proj=nell_h", + "res": "low", + "type": "poly" + }, + { + "filename": "nicol.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "nicol", + "projstring": "+proj=nicol", + "res": "low", + "type": "poly" + }, + { + "filename": "nsper.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "nsper", + "projstring": "+proj=nsper +h=3000000 +lat_0=-20 +lon_0=145", + "res": "med", + "type": "poly" + }, + { + "filename": "nzmg.png", + "latmax": -32, + "latmin": -48, + "lonmax": 180, + "lonmin": 165, + "name": "nzmg", + "projstring": "+proj=nzmg", + "res": "med", + "type": "poly" + }, + { + "filename": "ob_tran.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "ob_tran", + "projstring": "+proj=ob_tran +o_proj=mill +o_lon_p=40 +o_lat_p=50 +lon_0=60", + "res": "low", + "type": "poly" + }, + { + "filename": "ocea.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "ocea", + "projstring": "+proj=ocea", + "res": "low", + "type": "poly" + }, + { + "filename": "oea.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "oea", + "projstring": "+proj=oea +m=1 +n=2", + "res": "low", + "type": "poly" + }, + { + "filename": "omerc.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "omerc", + "projstring": "+proj=omerc +lat_1=45 +lat_2=55", + "res": "low", + "type": "line" + }, + { + "filename": "ortel.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "ortel", + "projstring": "+proj=ortel", + "res": "low", + "type": "poly" + }, + { + "filename": "ortho.png", + "latmax": 90, + "latmin": -90, + "lonmax": 90, + "lonmin": -90, + "name": "ortho", + "projstring": "+proj=ortho", + "res": "low", + "type": "poly" + }, + { + "filename": "pconic.png", + "latmax": 90, + "latmin": 0, + "lonmax": 180, + "lonmin": -180, + "name": "pconic", + "projstring": "+proj=pconic +lat_1=25 +lat_2=75", + "res": "low", + "type": "poly" + }, + { + "filename": "patterson.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "patterson", + "projstring": "+proj=patterson", + "res": "low", + "type": "poly" + }, + { + "filename": "poly.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "poly", + "projstring": "+proj=poly", + "res": "low", + "type": "poly" + }, + { + "filename": "putp1.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "putp1", + "projstring": "+proj=putp1", + "res": "low", + "type": "poly" + }, + { + "filename": "putp2.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "putp2", + "projstring": "+proj=putp2", + "res": "low", + "type": "poly" + }, + { + "filename": "putp3.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "putp3", + "projstring": "+proj=putp3", + "res": "low", + "type": "poly" + }, + { + "filename": "putp3p.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "putp3p", + "projstring": "+proj=putp3p", + "res": "low", + "type": "poly" + }, + { + "filename": "putp4p.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "putp4p", + "projstring": "+proj=putp4p", + "res": "low", + "type": "poly" + }, + { + "filename": "putp5.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "putp5", + "projstring": "+proj=putp5", + "res": "low", + "type": "poly" + }, + { + "filename": "putp5p.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "putp5p", + "projstring": "+proj=putp5p", + "res": "low", + "type": "poly" + }, + { + "filename": "putp6.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "putp6", + "projstring": "+proj=putp6", + "res": "low", + "type": "poly" + }, + { + "filename": "putp6p.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "putp6p", + "projstring": "+proj=putp6p", + "res": "low", + "type": "poly" + }, + { + "filename": "qua_aut.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "qua_aut", + "projstring": "+proj=qua_aut", + "res": "low", + "type": "poly" + }, + { + "filename": "qsc.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "qsc", + "projstring": "+proj=qsc", + "res": "low", + "type": "poly" + }, + { + "filename": "robin.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "robin", + "projstring": "+proj=robin", + "res": "low", + "type": "poly" + }, + { + "filename": "rouss.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "rouss", + "projstring": "+proj=rouss", + "res": "low", + "type": "poly" + }, + { + "filename": "rpoly.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "rpoly", + "projstring": "+proj=rpoly", + "res": "low", + "type": "poly" + }, + { + "filename": "sinu.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "sinu", + "projstring": "+proj=sinu", + "res": "low", + "type": "poly" + }, + { + "filename": "somerc.png", + "latmax": 60, + "latmin": 30, + "lonmax": 30, + "lonmin": -15, + "name": "somerc", + "projstring": "+proj=somerc", + "res": "med", + "type": "poly" + }, + { + "filename": "stere.png", + "latmax": 90.0, + "latmin": 50.0, + "lonmax": 180, + "lonmin": -180, + "name": "stere", + "projstring": "+proj=stere +lat_0=90 +lat_ts=75", + "res": "low", + "type": "poly" + }, + { + "filename": "sterea.png", + "latmax": 90, + "latmin": 50, + "lonmax": 180, + "lonmin": -180, + "name": "sterea", + "projstring": "+proj=sterea +lat_0=90", + "res": "low", + "type": "poly" + }, + { + "filename": "gstmerc.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "gstmerc", + "projstring": "+proj=gstmerc", + "res": "low", + "type": "line" + }, + { + "filename": "tcc.png", + "latmax": 85, + "latmin": 30, + "lonmax": 45, + "lonmin": -45, + "name": "tcc", + "projstring": "+proj=tcc", + "res": "med", + "type": "poly" + }, + { + "filename": "tcea.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "tcea", + "projstring": "+proj=tcea", + "res": "low", + "type": "line" + }, + { + "filename": "tissot.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "tissot", + "projstring": "+proj=tissot +lat_1=60 +lat_2=65", + "res": "low", + "type": "poly" + }, + { + "filename": "tmerc.png", + "latmax": 90, + "latmin": -90, + "lonmax": 90, + "lonmin": -90, + "name": "tmerc", + "projstring": "+proj=tmerc", + "res": "low", + "type": "poly" + }, + { + "filename": "tpeqd.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "tpeqd", + "projstring": "+proj=tpeqd +lat_1=60 +lat_2=65", + "res": "low", + "type": "poly" + }, + { + "filename": "tpers.png", + "latmax": 90, + "latmin": 0, + "lonmax": 75, + "lonmin": -75, + "name": "tpers", + "projstring": "+proj=tpers +h=5500000 +lat_0=40", + "res": "low", + "type": "poly" + }, + { + "filename": "ups.png", + "latmax": 90, + "latmin": -20, + "lonmax": 180, + "lonmin": -180, + "name": "ups", + "projstring": "+proj=ups", + "res": "low", + "type": "poly" + }, + { + "filename": "urm5.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "urm5", + "projstring": "+proj=urm5 +n=0.9 +alpha=2 +q=4", + "res": "low", + "type": "poly" + }, + { + "filename": "urmfps.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "urmfps", + "projstring": "+proj=urmfps +n=0.5", + "res": "low", + "type": "poly" + }, + { + "filename": "utm.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "utm", + "projstring": "+proj=utm", + "res": "low", + "type": "line" + }, + { + "filename": "vandg.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "vandg", + "projstring": "+proj=vandg", + "res": "low", + "type": "poly" + }, + { + "filename": "vandg2.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "vandg2", + "projstring": "+proj=vandg2", + "res": "low", + "type": "poly" + }, + { + "filename": "vandg3.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "vandg3", + "projstring": "+proj=vandg3", + "res": "low", + "type": "poly" + }, + { + "filename": "vandg4.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "vandg4", + "projstring": "+proj=vandg4", + "res": "low", + "type": "poly" + }, + { + "filename": "vitk1.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "vitk1", + "projstring": "+proj=vitk1 +lat_1=45 +lat_2=55", + "res": "low", + "type": "poly" + }, + { + "filename": "wag1.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "wag1", + "projstring": "+proj=wag1", + "res": "low", + "type": "poly" + }, + { + "filename": "wag2.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "wag2", + "projstring": "+proj=wag2", + "res": "low", + "type": "poly" + }, + { + "filename": "wag3.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "wag3", + "projstring": "+proj=wag3", + "res": "low", + "type": "poly" + }, + { + "filename": "wag4.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "wag4", + "projstring": "+proj=wag4", + "res": "low", + "type": "poly" + }, + { + "filename": "wag5.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "wag5", + "projstring": "+proj=wag5", + "res": "low", + "type": "poly" + }, + { + "filename": "wag6.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "wag6", + "projstring": "+proj=wag6", + "res": "low", + "type": "poly" + }, + { + "filename": "wag7.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "wag7", + "projstring": "+proj=wag7", + "res": "low", + "type": "poly" + }, + { + "filename": "weren.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "weren", + "projstring": "+proj=weren", + "res": "low", + "type": "poly" + }, + { + "filename": "wink1.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "wink1", + "projstring": "+proj=wink1", + "res": "low", + "type": "poly" + }, + { + "filename": "wink2.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "wink2", + "projstring": "+proj=wink2", + "res": "low", + "type": "poly" + }, + { + "filename": "wintri.png", + "latmax": 90, + "latmin": -90, + "lonmax": 180, + "lonmin": -180, + "name": "wintri", + "projstring": "+proj=wintri", + "res": "low", + "type": "poly" + } +] -- cgit v1.2.3 From d14bf09d94be40e3e2ed2be5b0b55c9d885f1513 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Fri, 2 Feb 2018 14:58:00 +0100 Subject: Avoid buffer overflow - OSSFuzz issue 5903 --- src/proj_4D_api.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index af4bae45..0d50407f 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -402,7 +402,6 @@ invocators can emulate the behaviour of pj_transform and the cs2cs app. **************************************************************************************/ PJ *Q; paralist *p; - char def[1000]; if (0==P) return 0; @@ -415,8 +414,12 @@ invocators can emulate the behaviour of pj_transform and the cs2cs app. /* Don't axisswap if data are already in "enu" order */ if (p && (0!=strcmp ("enu", p->param))) { + char *def = malloc (100+strlen(P->axis)); + if (0==def) + return 0; sprintf (def, "break_cs2cs_recursion proj=axisswap axis=%s", P->axis); Q = proj_create (P->ctx, def); + free (def); if (0==Q) return 0; P->axisswap = skip_prep_fin(Q); @@ -426,8 +429,12 @@ invocators can emulate the behaviour of pj_transform and the cs2cs app. p = pj_param_exists (P->params, "geoidgrids"); if (p && strlen (p->param) > strlen ("geoidgrids=")) { char *gridnames = p->param + strlen ("geoidgrids="); + char *def = malloc (100+strlen(gridnames)); + if (0==def) + return 0; sprintf (def, "break_cs2cs_recursion proj=vgridshift grids=%s", gridnames); Q = proj_create (P->ctx, def); + free (def); if (0==Q) return 0; P->vgridshift = skip_prep_fin(Q); @@ -437,8 +444,12 @@ invocators can emulate the behaviour of pj_transform and the cs2cs app. p = pj_param_exists (P->params, "nadgrids"); if (p && strlen (p->param) > strlen ("nadgrids=")) { char *gridnames = p->param + strlen ("nadgrids="); + char *def = malloc (100+strlen(gridnames)); + if (0==def) + return 0; sprintf (def, "break_cs2cs_recursion proj=hgridshift grids=%s", gridnames); Q = proj_create (P->ctx, def); + free (def); if (0==Q) return 0; P->hgridshift = skip_prep_fin(Q); @@ -447,6 +458,7 @@ invocators can emulate the behaviour of pj_transform and the cs2cs app. /* We ignore helmert if we have grid shift */ p = P->hgridshift ? 0 : pj_param_exists (P->params, "towgs84"); while (p) { + char *def; char *s = p->param; double *d = P->datum_params; size_t n = strlen (s); @@ -455,12 +467,15 @@ invocators can emulate the behaviour of pj_transform and the cs2cs app. if (0==d[0] && 0==d[1] && 0==d[2] && 0==d[3] && 0==d[4] && 0==d[5] && 0==d[6]) break; - if (n > 900) - return 0; if (n <= 8) /* 8==strlen ("towgs84=") */ return 0; + + def = malloc (100+n); + if (0==def) + return 0; sprintf (def, "break_cs2cs_recursion proj=helmert %s", s); Q = proj_create (P->ctx, def); + free (def); if (0==Q) return 0; P->helmert = skip_prep_fin(Q); @@ -471,7 +486,7 @@ invocators can emulate the behaviour of pj_transform and the cs2cs app. /* We also need cartesian/geographical transformations if we are working in */ /* geocentric/cartesian space or we need to do a Helmert transform. */ if (P->is_geocent || P->helmert) { - char *wgs84 = "ellps=WGS84"; + char def[100]; sprintf (def, "break_cs2cs_recursion proj=cart"); Q = proj_create (P->ctx, def); if (0==Q) @@ -479,7 +494,7 @@ invocators can emulate the behaviour of pj_transform and the cs2cs app. pj_inherit_ellipsoid_def(P, Q); P->cart = skip_prep_fin(Q); - sprintf (def, "break_cs2cs_recursion proj=cart %s", wgs84); + sprintf (def, "break_cs2cs_recursion proj=cart ellps=WGS84"); Q = proj_create (P->ctx, def); if (0==Q) return 0; -- cgit v1.2.3 From 762d74e864f72b5b38c7b3bd25fb642566ee05b7 Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Fri, 2 Feb 2018 19:13:14 +0100 Subject: Add AC_SEARCH_LIBS for libm to configure.ac. Fixes: #759 --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac index 4893646e..ecc6e31b 100644 --- a/configure.ac +++ b/configure.ac @@ -43,6 +43,8 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM( [AC_MSG_RESULT([no]);C99_MATH="-DHAVE_C99_MATH=0"]) CFLAGS="$save_CFLAGS $C99_MATH" +AC_SEARCH_LIBS([sqrt], [m]) + AC_CHECK_FUNC(localeconv, [AC_DEFINE(HAVE_LOCALECONV,1,[Define to 1 if you have localeconv])]) dnl --------------------------------------------------------------------------- -- cgit v1.2.3 From cc50f3dfcfba4faeb0ee44efda6e1001a885a93b Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Fri, 2 Feb 2018 19:59:00 +0100 Subject: Fix SOVERSION for Automake build. Fixes: #763 --- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index aebfc22b..f94e5f26 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -40,7 +40,7 @@ geodtest_LDADD = libproj.la lib_LTLIBRARIES = libproj.la -libproj_la_LDFLAGS = -no-undefined -version-info 13:0:1 +libproj_la_LDFLAGS = -no-undefined -version-info 13:0:0 libproj_la_SOURCES = \ pj_list.h proj_internal.h\ -- cgit v1.2.3 From 36a5a75fa8976eaacca1627f0725deb77926aa6b Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Fri, 2 Feb 2018 20:52:19 +0100 Subject: Add manpages for cct & gie. Fixes: #760 --- man/CMakeLists.txt | 2 +- man/man1/Makefile.am | 2 +- man/man1/cct.1 | 112 +++++++++++++++++++++++++++++++++++++++++++++++++ man/man1/gie.1 | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 230 insertions(+), 2 deletions(-) create mode 100644 man/man1/cct.1 create mode 100644 man/man1/gie.1 diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt index bf47b16f..3ca48226 100644 --- a/man/CMakeLists.txt +++ b/man/CMakeLists.txt @@ -1,4 +1,4 @@ -install (FILES man1/proj.1 man1/cs2cs.1 man1/geod.1 +install (FILES man1/proj.1 man1/cs2cs.1 man1/geod.1 man1/cct.1 man1/gie.1 DESTINATION share/man/man1) install (FILES man3/pj_init.3 man3/geodesic.3 diff --git a/man/man1/Makefile.am b/man/man1/Makefile.am index b175aaa0..b8a59ff2 100644 --- a/man/man1/Makefile.am +++ b/man/man1/Makefile.am @@ -1,4 +1,4 @@ -man_MANS = geod.1 proj.1 cs2cs.1 +man_MANS = geod.1 proj.1 cs2cs.1 cct.1 gie.1 EXTRA_DIST = $(man_MANS) diff --git a/man/man1/cct.1 b/man/man1/cct.1 new file mode 100644 index 00000000..2cd12e4e --- /dev/null +++ b/man/man1/cct.1 @@ -0,0 +1,112 @@ +.\" release 5 +.nr LL 5.5i +.ad b +.hy 1 +.TH CCT 1 "2018/02/25 Rel. 5.0.0" +.SH NAME +cct \- 4D equivalent to the "proj" projection program +.SH SYNOPSIS +.B cct +[\-options]... [+operator_specs]... infile... +.SH DESCRIPTION +.I cct +is a 4D equivalent to the proj(1) projection program. +.PP +cct is an acronym meaning "Coordinate Conversion and Transformation". +.PP +The acronym refers to definitions given in the OGC 08-015r2/ISO-19111 +standard "Geographical Information -- Spatial Referencing by Coordinates", +which defines two different classes of coordinate operations: +.PP +*Coordinate Conversions*, which are coordinate operations where input +and output datum are identical (e.g. conversion from geographical to +cartesian coordinates) and +.PP +*Coordinate Transformations*, which are coordinate operations where +input and output datums differ (e.g. change of reference frame). +.PP +\fBcct\fR, however, also refers to Carl Christian Tscherning (1942--2014), +professor of Geodesy at the University of Copenhagen, mentor and advisor +for a generation of Danish geodesists, colleague and collaborator for +two generations of global geodesists, Secretary General for the +International Association of Geodesy, IAG (1995--2007), fellow of the +Amercan Geophysical Union (1991), recipient of the IAG Levallois Medal +(2007), the European Geosciences Union Vening Meinesz Medal (2008), and +of numerous other honours. +.PP +cct, or Christian, as he was known to most of us, was recognized for his +good mood, his sharp wit, his tireless work, and his great commitment to +the development of geodesy - both through his scientific contributions, +comprising more than 250 publications, and by his mentoring and teaching +of the next generations of geodesists. +.PP +As Christian was an avid Fortran programmer, and a keen Unix connoiseur, +he would have enjoyed to know that his initials would be used to name a +modest Unix style transformation filter, hinting at the tireless aspect +of his personality, which was certainly one of the reasons he accomplished +so much, and meant so much to so many people. +.PP +Hence, in honour of cct (the geodesist) this is cct (the program). +.SH OPTIONS +.IP "\fB\fB\-o /path/to/file\fR\fR" 1c +Specify output file name\& +.IP "\fB\fB\-c x,y,z,t\fR\fR" 1c +Specify input columns for (up to) 4 input parameters. +Defaults to 1,2,3,4\& +.IP "\fB\fB\-z value\fR\fR" 1c +Provide a fixed z value for all input data (e.g. \-z 0)\& +.IP "\fB\fB\-t value\fR\fR" 1c +Provide a fixed t value for all input data (e.g. \-t 0)\& +.IP "\fB\fB\-I\fR\fR" 1c +Do the inverse transformation\& +.IP "\fB\fB\-v\fR\fR" 1c +Verbose: Provide non-essential informational output. +Repeat \-v for more verbosity (e.g. \-vv)\& +.SH LONG OPTIONS +.IP "\fB\fB\-\-output\fR\fR" 1c +Alias for \-o\& +.IP "\fB\fB\-\-columns\fR\fR" 1c +Alias for \-c\& +.IP "\fB\fB\-\-height\fR\fR" 1c +Alias for \-z\& +.IP "\fB\fB\-\-time\fR\fR" 1c +Alias for \-t\& +.IP "\fB\fB\-\-verbose\fR\fR" 1c +Alias for \-v\& +.IP "\fB\fB\-\-inverse\fR\fR" 1c +Alias for \-I\& +.IP "\fB\fB\-\-help\fR\fR" 1c +Alias for -h\& +.SH OPERATOR SPECS +The operator specs describe the action to be performed by cct, e.g: +.IP ++proj=utm +ellps=GRS80 +zone=32 +.PP +instructs cct to convert input data to Universal Transverse Mercator, zone 32 +coordinates, based on the GRS80 ellipsoid. +.PP +Hence, the command +.IP +echo 12 55 | cct -z0 -t0 +proj=utm +zone=32 +ellps=GRS80 +.PP +Should give results comparable to the classic proj command +.IP +echo 12 55 | proj +proj=utm +zone=32 +ellps=GRS80 +.SH EXAMPLES +1. convert geographical input to UTM zone 32 on the GRS80 ellipsoid: +.IP +cct +proj=utm +ellps=GRS80 +zone=32 +.PP +2. roundtrip accuracy check for the case above: +.IP +cct +proj=pipeline +proj=utm +ellps=GRS80 +zone=32 +step +step +inv +.PP +3. as (1) but specify input columns for longitude, latitude, height and time: +.IP +cct -c 5,2,1,4 +proj=utm +ellps=GRS80 +zone=32 +.PP +4. as (1) but specify fixed height and time, hence needing only 2 cols in input: +.IP +cct -t 0 -z 0 +proj=utm +ellps=GRS80 +zone=32 +.SH HOME PAGE +http://proj4.org/ diff --git a/man/man1/gie.1 b/man/man1/gie.1 new file mode 100644 index 00000000..6a2ce887 --- /dev/null +++ b/man/man1/gie.1 @@ -0,0 +1,116 @@ +.\" release 5 +.nr LL 5.5i +.ad b +.hy 1 +.TH GIE 1 "2018/02/25 Rel. 5.0.0" +.SH NAME +gie \- The Geospatial Integrity Investigation Environment +.SH SYNOPSIS +.B gie +[\-options]... infile... +.SH DESCRIPTION +\fBgie\fR, the Geospatial Integrity Investigation Environment, is a modest +regression testing environment for the PROJ.4 transformation library. +.PP +Its primary design goal was to be able to replace those thousands of +lines of regression testing code that are (at time of writing) part +of PROJ.4, while not requiring any other kind of tooling than the same +C compiler already employed for compiling the library. +.PP +The basic functionality of the gie command language is implemented +through just 3 command verbs: +.PP +operation, which defines the PROJ.4 operation to test, +.br +accept, which defines the input coordinate to read, and +.br +expect, which defines the result to expect. +.PP +E.g: +.PP +operation +proj=utm +zone=32 +ellps=GRS80 +.br +accept 12 55 +.br +expect 691_875.632_14 6_098_907.825_05 +.PP +Note that gie accepts the underscore ("_") as a thousands separator. +It is not required (in fact, it is entirely ignored by the input +routine), but it significantly improves the readability of the very +long strings of numbers typically required in projected coordinates. +.PP +By default, gie considers the EXPECTation met, if the result comes to +within 0.5 mm of the expected. This default can be changed using the +"tolerance" command verb (and yes, I know, linguistically speaking, both +"operation" and "tolerance" are nouns, not verbs). See the first +few hundred lines of the "builtins.gie" test file for more details of +the command verbs available (verbs of both the VERBal and NOUNistic +persuation). +.PP +But more importantly than being an acronym for "Geospatial Integrity +Investigation Environment", gie were also the initials, user id, and +USGS email address of Gerald Ian Evenden (1935--2016), the geospatial +visionary, who, already in the 1980s, started what was to become the +PROJ.4 of today. +.PP +Gerald's clear vision was that map projections are *just special +functions*. Some of them rather complex, most of them of two variables, +but all of them *just special functions*, and not particularly more +special than the sin(), cos(), tan(), and hypot() already available in +the C standard library. +.PP +And hence, according to Gerald, *they should not be particularly much +harder to use*, for a programmer, than the sin()s, tan()s and hypot()s +so readily available. +.PP +Gerald's ingenuity also showed in the implementation of the vision, +where he devised a comprehensive, yet simple, system of key-value +pairs for parameterising a map projection, and the highly flexible +PJ struct, storing run-time compiled versions of those key-value pairs, +hence making a map projection function call, pj_fwd(PJ, point), as easy +as a traditional function call like hypot(x,y). +.PP +While today, we may have more formally well defined metadata systems +(most prominent the OGC WKT2 representation), nothing comes close being +as easily readable ("human compatible") as Gerald's key-value system. +This system in particular, and the PROJ.4 system in general, was +Gerald's great gift to anyone using and/or communicating about geodata. +.PP +It is only reasonable to name a program, keeping an eye on the integrity +of the PROJ.4 system, in honour of Gerald. +.PP +So in honour, and hopefully also in the spirit, of Gerald Ian Evenden +(1935--2016), this is the Geospatial Integrity Investigation Environment. +.SH OPTIONS +.IP "\fB\fB\-h\fR\fR" 1c +Help: print usage information\& +.IP "\fB\fB\-o /path/to/file\fR\fR" 1c +Specify output file name\& +.IP "\fB\fB\-v\fR\fR" 1c +Verbose: Provide non-essential informational output. +Repeat \-v for more verbosity (e.g. \-vv)\& +.IP "\fB\fB\-q\fR\fR" 1c +Quiet: Opposite of verbose. In quiet mode not even errors +are reported. Only interaction is through the return code +(0 on success, non-zero indicates number of FAILED tests)\& +.IP "\fB\fB\-l\fR\fR" 1c +List the PROJ internal system error codes\& +.SH LONG OPTIONS +.IP "\fB\fB\-\-output\fR\fR" 1c +Alias for \-o\& +.IP "\fB\fB\-\-verbose\fR\fR" 1c +Alias for \-v\& +.IP "\fB\fB\-\-help\fR\fR" 1c +Alias for -h\& +.IP "\fB\fB\-\-list\fR\fR" 1c +Alias for \-l\& +.SH EXAMPLES +1. Run all tests in file \"corner-cases.gie\", providing much extra information +.IP +gie \-vvvv corner-cases.gie +.PP +2. Run all tests in files \"foo\" and \"bar\", providing info on failures only +.IP +gie foo bar +.SH HOME PAGE +http://proj4.org/ -- cgit v1.2.3 From 00fe72d73f5daa3aae99f2d91a0dfffcb880d6c1 Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Fri, 2 Feb 2018 21:12:27 +0100 Subject: Don't limit line length in manpages. --- man/man1/cct.1 | 2 +- man/man1/gie.1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/man/man1/cct.1 b/man/man1/cct.1 index 2cd12e4e..b74896f4 100644 --- a/man/man1/cct.1 +++ b/man/man1/cct.1 @@ -1,5 +1,5 @@ .\" release 5 -.nr LL 5.5i +.\" .ad b .hy 1 .TH CCT 1 "2018/02/25 Rel. 5.0.0" diff --git a/man/man1/gie.1 b/man/man1/gie.1 index 6a2ce887..b444e95b 100644 --- a/man/man1/gie.1 +++ b/man/man1/gie.1 @@ -1,5 +1,5 @@ .\" release 5 -.nr LL 5.5i +.\" .ad b .hy 1 .TH GIE 1 "2018/02/25 Rel. 5.0.0" -- cgit v1.2.3 From 30c6cf59599395f8abb389a50c96bea483037799 Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Fri, 2 Feb 2018 21:13:54 +0100 Subject: Don't limit line length in manpages. --- man/man1/cs2cs.1 | 2 +- man/man1/geod.1 | 2 +- man/man1/nad2nad.1 | 2 +- man/man1/proj.1 | 2 +- man/man3/geodesic.3 | 2 +- man/man3/pj_init.3 | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/man/man1/cs2cs.1 b/man/man1/cs2cs.1 index 5d4d36d0..27ecd1b8 100644 --- a/man/man1/cs2cs.1 +++ b/man/man1/cs2cs.1 @@ -1,5 +1,5 @@ .\" release 5 -.nr LL 5.5i +.\" .ad b .hy 1 .TH CS2CS 1 "2018/02/15 Rel. 5.0.0" diff --git a/man/man1/geod.1 b/man/man1/geod.1 index 8e4c18db..59185f02 100644 --- a/man/man1/geod.1 +++ b/man/man1/geod.1 @@ -1,5 +1,5 @@ .\" @(#)geod.1 -.nr LL 7.0i +.\" .ad b .hy 1 .TH GEOD 1 "2018/02/15 Rel. 5.0.0" diff --git a/man/man1/nad2nad.1 b/man/man1/nad2nad.1 index c25630dc..1b8c1bb2 100644 --- a/man/man1/nad2nad.1 +++ b/man/man1/nad2nad.1 @@ -1,5 +1,5 @@ .\" release 5 -.nr LL 5.5i +.\" .ad b .hy 1 .TH NAD2NAD 1 "2018/02/15 Rel. 5.0.0" diff --git a/man/man1/proj.1 b/man/man1/proj.1 index 44bc08b6..5bcd11ca 100644 --- a/man/man1/proj.1 +++ b/man/man1/proj.1 @@ -1,5 +1,5 @@ .\" release 5 -.nr LL 5.5i +.\" .ad b .hy 1 .TH PROJ 1 "2018/02/25 Rel. 5.0.0" diff --git a/man/man3/geodesic.3 b/man/man3/geodesic.3 index 6e3c9447..9410ced4 100644 --- a/man/man3/geodesic.3 +++ b/man/man3/geodesic.3 @@ -1,5 +1,5 @@ .\" @(#)geodesic.3 -.nr LL 7.0i +.\" .TH GEODESIC 3 "2018/02/15 Rel. 5.0.0" .ad b .hy 1 diff --git a/man/man3/pj_init.3 b/man/man3/pj_init.3 index ae830e71..06ecb331 100644 --- a/man/man3/pj_init.3 +++ b/man/man3/pj_init.3 @@ -1,5 +1,5 @@ .\" @(#)pj_init.3 - 5.0.0 -.nr LL 5.5i +.\" .TH PJ_INIT 3U "2018/02/15 Rel. 5.0.0" .ad b .hy 1 -- cgit v1.2.3 From 056933cb27b7e84f0b3cde2ff72186c84400390f Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Fri, 2 Feb 2018 21:38:59 +0100 Subject: Fix manpage section for pj_init. --- man/man3/pj_init.3 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/man/man3/pj_init.3 b/man/man3/pj_init.3 index ae830e71..82ccc288 100644 --- a/man/man3/pj_init.3 +++ b/man/man3/pj_init.3 @@ -1,6 +1,5 @@ .\" @(#)pj_init.3 - 5.0.0 -.nr LL 5.5i -.TH PJ_INIT 3U "2018/02/15 Rel. 5.0.0" +.TH PJ_INIT 3 "2018/02/15 Rel. 5.0.0" .ad b .hy 1 .SH NAME -- cgit v1.2.3 From 7d89557993c68ccfce32b62ed50fcd1d0e4fdbcc Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Sat, 3 Feb 2018 13:11:02 +0100 Subject: Reference PROJ instead of PROJ.4 [skip ci] --- man/man1/gie.1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/man/man1/gie.1 b/man/man1/gie.1 index b444e95b..dbe83f9b 100644 --- a/man/man1/gie.1 +++ b/man/man1/gie.1 @@ -10,17 +10,17 @@ gie \- The Geospatial Integrity Investigation Environment [\-options]... infile... .SH DESCRIPTION \fBgie\fR, the Geospatial Integrity Investigation Environment, is a modest -regression testing environment for the PROJ.4 transformation library. +regression testing environment for the PROJ transformation library. .PP Its primary design goal was to be able to replace those thousands of lines of regression testing code that are (at time of writing) part -of PROJ.4, while not requiring any other kind of tooling than the same +of PROJ, while not requiring any other kind of tooling than the same C compiler already employed for compiling the library. .PP The basic functionality of the gie command language is implemented through just 3 command verbs: .PP -operation, which defines the PROJ.4 operation to test, +operation, which defines the PROJ operation to test, .br accept, which defines the input coordinate to read, and .br @@ -51,7 +51,7 @@ But more importantly than being an acronym for "Geospatial Integrity Investigation Environment", gie were also the initials, user id, and USGS email address of Gerald Ian Evenden (1935--2016), the geospatial visionary, who, already in the 1980s, started what was to become the -PROJ.4 of today. +PROJ of today. .PP Gerald's clear vision was that map projections are *just special functions*. Some of them rather complex, most of them of two variables, @@ -73,11 +73,11 @@ as a traditional function call like hypot(x,y). While today, we may have more formally well defined metadata systems (most prominent the OGC WKT2 representation), nothing comes close being as easily readable ("human compatible") as Gerald's key-value system. -This system in particular, and the PROJ.4 system in general, was +This system in particular, and the PROJ system in general, was Gerald's great gift to anyone using and/or communicating about geodata. .PP It is only reasonable to name a program, keeping an eye on the integrity -of the PROJ.4 system, in honour of Gerald. +of the PROJ system, in honour of Gerald. .PP So in honour, and hopefully also in the spirit, of Gerald Ian Evenden (1935--2016), this is the Geospatial Integrity Investigation Environment. -- cgit v1.2.3 From 343cce8158085c96ebcda40c379d6c7cb9a7f9b2 Mon Sep 17 00:00:00 2001 From: Mateusz Loskot Date: Fri, 2 Feb 2018 19:10:57 +0100 Subject: Move README to README.md in Markdown Add badgest for CI builds. Add sections about building with CMake. --- README | 88 ------------------------------------------------------ README.md | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ proj.spec | 2 +- 3 files changed, 101 insertions(+), 89 deletions(-) delete mode 100644 README create mode 100644 README.md diff --git a/README b/README deleted file mode 100644 index e2a9c713..00000000 --- a/README +++ /dev/null @@ -1,88 +0,0 @@ - -------------------- P R O J -------------------- - -PROJ is a generic coordinate transformation software, that transforms -coordinates from one coordinate reference system (CRS) to another. This -includes cartographic projections as well as geodetic transformations. - -For more information on the PROJ.4 project please see the web page at: - - http://proj4.org/ - -The PROJ.4 mailing list can be found at: - - http://lists.maptools.org/mailman/listinfo/proj - -See the NEWS file for changes between versions. - -The following command line utilities are included in the PROJ package: - - - proj, for cartographic projection of geodetic coordinates - - cs2cs, for transformation from one CRS to another CRS. - - geod, for geodesic (great circle) computations. - - cct, for generic Coordinate Conversions and Transformations. - - gie, the Geospatial Integrity Investigation Environment. - - - -UNIX/Linux build and installation: ---------------------------------- - -FSF's configuration procedure is used to ease installation of the -PROJ system. - -The default destination path prefix for installed files is /usr/local. -Results from the installation script will be placed into subdirectories -bin, include, lib, man/man1 and man/man3. If this default path prefix -is proper, then execute: - - ./configure - -If another path prefix is required, then execute: - - ./configure --prefix=/my/path - -In either case, the directory of the prefix path must exist and be -writable by the installer. - -After executing configure, execute: - - make - make install - -The install target will create, if necessary, all required sub-directories. - - -Windows build and installation: -------------------------------- - -PROJ can be built with Microsoft Visual C/C++ using the makefile.vc -in the PROJ directory. First edit the PROJ\nmake.opt and modify -the INSTDIR value at the top to point to the directory where -the PROJ tree shall be installed. If you want to install into -C:\PROJ, it can remain unchanged. -Then use the makefile.vc to build the software e.g.: - - C:\> cd proj - C:\PROJ> nmake /f makefile.vc - C:\PROJ> nmake /f makefile.vc install-all - -Note that you have to have the VC++ environment variables, and path -setup properly. This may involve running the VCVARS32.BAT script out -of the Visual C++ tree. - -The makefile.vc builds proj.exe, proj.dll and proj.lib. - - -Distribution files and format. ------------------------------- - -Sources are distributed in one or more files. The principle elements -of the system are in a compress tar file named `PROJ-x.y.z.tar.gz' where -"x" will indicate major release number, "y" indicates minor release -number and "z" indicates the patch number of the release. - -In addition to the PROJ software package, a distribution of datum -conversion grid files is also available. The grid package is -distributed under the name `PROJ-datumgrid-x.y.zip', where "x" is the -major release version and "y" the minor release version numbers. The -grid package can be downloaded from the PROJ.4 website. diff --git a/README.md b/README.md new file mode 100644 index 00000000..2d7bb39c --- /dev/null +++ b/README.md @@ -0,0 +1,100 @@ +# PROJ + +[![Travis Status](https://travis-ci.org/OSGeo/proj.4.svg?branch=master)](https://travis-ci.org/OSGeo/proj.4) +[![AppVeyor Status](https://ci.appveyor.com/api/projects/status/584j49uguwoo5evi?svg=true)](https://ci.appveyor.com/project/OSGeo/proj-4) +[![Coveralls Status](https://coveralls.io/repos/github/OSGeo/proj.4/badge.svg?branch=master)](https://coveralls.io/github/OSGeo/proj.4?branch=master) + +PROJ is a generic coordinate transformation software, that transforms +coordinates from one coordinate reference system (CRS) to another. +This includes cartographic projections as well as geodetic transformations. + +For more information on the PROJ.4 project please see the web page at: + +http://proj4.org/ + +The PROJ.4 mailing list can be found at: + +http://lists.maptools.org/mailman/listinfo/proj + +See the NEWS file for changes between versions. + +The following command line utilities are included in the PROJ package: + +- proj, for cartographic projection of geodetic coordinates +- cs2cs, for transformation from one CRS to another CRS. +- geod, for geodesic (great circle) computations. +- cct, for generic Coordinate Conversions and Transformations. +- gie, the Geospatial Integrity Investigation Environment. + + +## Installation +### Building with CMake + + cd proj + mkdir build + cd build + cmake .. + cmake --build . + +On Windows, one may need to specify generator: + + cmake -G "Visual Studio 15 2017" .. + +### Building on Unix/Linux + +FSF's configuration procedure is used to ease installation of the +PROJ system. + +The default destination path prefix for installed files is `/usr/local`. +Results from the installation script will be placed into subdirectories +`bin`, `include`, `lib`, `man/man1` and `man/man3`. +If this default path prefix is proper, then execute: + + ./configure + +If another path prefix is required, then execute: + + ./configure --prefix=/my/path + +In either case, the directory of the prefix path must exist and be +writable by the installer. + +After executing configure, execute: + + make + make install + +The install target will create, if necessary, all required sub-directories. + +### Building on Windows with NMAKE + +PROJ can be built with Microsoft Visual C/C++ using the `makefile.vc` +in the `PROJ` directory. First edit the `PROJ\nmake.opt` and +modify the `INSTDIR` value at the top to point to the directory +where the PROJ tree shall be installed. +If you want to install into `C:\PROJ`, it can remain unchanged. +Then use the `makefile.vc` to build the software e.g.: + + C:\> cd proj + C:\PROJ> nmake /f makefile.vc + C:\PROJ> nmake /f makefile.vc install-all + +Note that you have to have the VC++ environment variables, and path +setup properly. This may involve running the `VCVARS32.BAT` +script out of the Visual C++ tree. + +The `makefile.vc` builds `proj.exe`, `proj.dll` and `proj.lib`. + + +### Distribution files and format + +Sources are distributed in one or more files. The principle elements +of the system are in a compress tar file named `PROJ-x.y.z.tar.gz` where +"x" will indicate major release number, "y" indicates minor release +number and "z" indicates the patch number of the release. + +In addition to the PROJ software package, a distribution of datum +conversion grid files is also available. The grid package is +distributed under the name `PROJ-datumgrid-x.y.zip`, where "x" is the +major release version and "y" the minor release version numbers. +The grid package can be downloaded from the PROJ.4 website. diff --git a/proj.spec b/proj.spec index 2e050c41..b0854077 100644 --- a/proj.spec +++ b/proj.spec @@ -48,4 +48,4 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/* %{_mandir}/man3/* -%doc AUTHORS COPYING ChangeLog NEWS README +%doc AUTHORS COPYING ChangeLog NEWS README.md -- cgit v1.2.3 From 9e412249e5a7c6eaab1e73a11ca09e2bc7ca5df9 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Sun, 4 Feb 2018 11:20:32 +0100 Subject: Add Makefile rule that handles non-standard README.md filename --- Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.am b/Makefile.am index 692e8a21..7b38aaf9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,3 +7,5 @@ pkgconfig_DATA = proj.pc AUTOMAKE_OPTIONS = dist-zip ACLOCAL_AMFLAGS = -I m4 + +README: README.md -- cgit v1.2.3 From 0ca9e9ff582e9ed2243c1991326b172880d94f35 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sun, 4 Feb 2018 15:49:48 +0100 Subject: Add --version option to gie and cct. Additionally correct a spelling error in optargpm.h and remove two lines of leftover cruft from gie.c --- src/cct.c | 7 ++++++- src/gie.c | 12 ++++++++---- src/optargpm.h | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/cct.c b/src/cct.c index 7e48311a..2ce478bd 100644 --- a/src/cct.c +++ b/src/cct.c @@ -157,7 +157,7 @@ int main(int argc, char **argv) { int nfields = 4, direction = 1, verbose; double fixed_z = HUGE_VAL, fixed_time = HUGE_VAL; int columns_xyzt[] = {1, 2, 3, 4}; - const char *longflags[] = {"v=verbose", "h=help", "I=inverse", 0}; + const char *longflags[] = {"v=verbose", "h=help", "I=inverse", "version", 0}; const char *longkeys[] = {"o=output", "c=columns", "z=height", "t=time", 0}; o = opt_parse (argc, argv, "hvI", "cozt", longflags, longkeys); @@ -173,6 +173,11 @@ int main(int argc, char **argv) { direction = opt_given (o, "I")? -1: 1; verbose = opt_given (o, "v"); + if (opt_given (o, "version")) { + fprintf (stdout, "%s: %s\n", o->progname, pj_get_release ()); + return 0; + } + if (opt_given (o, "o")) fout = fopen (opt_arg (o, "output"), "wt"); if (0==fout) { diff --git a/src/gie.c b/src/gie.c index b2673d13..ee5bae44 100644 --- a/src/gie.c +++ b/src/gie.c @@ -133,8 +133,6 @@ typedef struct ffio { size_t level; } ffio; -FILE *test = 0; - static int get_inp (ffio *F); static int skip_to_next_tag (ffio *F); static int step_into_gie_block (ffio *F); @@ -231,7 +229,7 @@ static const char usage[] = { int main (int argc, char **argv) { int i; - const char *longflags[] = {"v=verbose", "q=quiet", "h=help", "l=list", 0}; + const char *longflags[] = {"v=verbose", "q=quiet", "h=help", "l=list", "version", 0}; const char *longkeys[] = {"o=output", 0}; OPTARGS *o; @@ -240,7 +238,6 @@ int main (int argc, char **argv) { T.verbosity = 1; T.tolerance = 5e-4; - test = fopen ("test.c", "wt"); o = opt_parse (argc, argv, "hlvq", "o", longflags, longkeys); if (0==o) return 0; @@ -250,6 +247,13 @@ int main (int argc, char **argv) { return 0; } + + if (opt_given (o, "version")) { + fprintf (stdout, "%s: %s\n", o->progname, pj_get_release ()); + return 0; + } + + if (opt_given (o, "l")) return list_err_codes (); diff --git a/src/optargpm.h b/src/optargpm.h index d464b5a9..8a9dd0c7 100644 --- a/src/optargpm.h +++ b/src/optargpm.h @@ -84,7 +84,7 @@ opt_eof_handler (o): Usage is probably easiest understood by a brief textbook style example: -Consider a simple program taking the conventinal "-v, -h, -o" options +Consider a simple program taking the conventional "-v, -h, -o" options indicating "verbose output", "help please", and "output file specification", respectively. -- cgit v1.2.3 From 9ae0e5e8a515d4e225a895809de32ed83fc413da Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Mon, 5 Feb 2018 16:43:35 +0100 Subject: Make a README from README.md when running 'make dist' (#772) Make a README from README.md when running 'make dist'. README.md is stripped from the CI status images that is displayed on GitHub, but other README is just a copy of README.md. Adjusted travis/install.sh so that 'make dist-all' is not run on the source distribution. --- .gitignore | 1 + Makefile.am | 5 +++++ travis/install.sh | 1 - 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e191b441..50314ae9 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ CTestTestfile.cmake cmake_install.cmake install_manifest.txt cmake/project-config*.cmake +README /.vs* /*.manifest diff --git a/Makefile.am b/Makefile.am index 7b38aaf9..f4a82f9c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,4 +8,9 @@ pkgconfig_DATA = proj.pc AUTOMAKE_OPTIONS = dist-zip ACLOCAL_AMFLAGS = -I m4 + README: README.md + fgrep -v "[![" $< > $@ + +clean-local: + $(RM) README diff --git a/travis/install.sh b/travis/install.sh index 8b7a7b90..a12de9c6 100755 --- a/travis/install.sh +++ b/travis/install.sh @@ -38,7 +38,6 @@ cd $TAR_DIRECTORY ./configure --prefix=/tmp/proj_autoconf_install_from_dist_all make -j3 make install -make dist-all PROJ_LIB=$GRIDDIR make check CURRENT_PWD=`pwd` cd /tmp/proj_autoconf_install -- cgit v1.2.3 From b24fc0f7cf105d89c194b63dc6d0dd2cf911b9c1 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sun, 4 Feb 2018 15:15:02 +0100 Subject: Add EPSG definitions to failing gigs test 5108.gie_failing --- test/gigs/5108.gie_failing | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/gigs/5108.gie_failing b/test/gigs/5108.gie_failing index a5273a65..6a979118 100644 --- a/test/gigs/5108.gie_failing +++ b/test/gigs/5108.gie_failing @@ -4,6 +4,13 @@ Test 5108, Cassini-Soldner, v2-0_2011-06-28. -------------------------------------------------------------------------------- +# GDM2000 +<4742> +proj=longlat +ellps=GRS80 +no_defs <> + +# GDM2000 / Johor Grid +<3377> +proj=cass +lat_0=2.121679744444445 +lon_0=103.4279362361111 +x_0=-14810.562 +y_0=8758.32 +ellps=GRS80 +units=m +no_defs <> + + -------------------------------------------------------------------------------- -- cgit v1.2.3 From d888b5e21d9857878530972d2af3455dc5ccc2ee Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Mon, 5 Feb 2018 20:49:27 +0100 Subject: Make gie tests in autoconf setup more granular. --- test/Makefile.am | 9 -------- test/gie/Makefile.am | 30 +++++++++++++++++++++++++- test/gigs/Makefile.am | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 10 deletions(-) diff --git a/test/Makefile.am b/test/Makefile.am index 0cb83342..8bdfdc0a 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,12 +1,3 @@ -EXEPATH = ../src -GIEEXE = $(EXEPATH)/gie -GIETESTS = gie -GIGSTESTS = gigs - SUBDIRS = gie gigs EXTRA_DIST = CMakeLists.txt - -check-local: - $(GIEEXE) $(GIETESTS)/*.gie - $(GIEEXE) $(GIGSTESTS)/*.gie diff --git a/test/gie/Makefile.am b/test/gie/Makefile.am index 291bc3f7..72ecd990 100644 --- a/test/gie/Makefile.am +++ b/test/gie/Makefile.am @@ -1,9 +1,37 @@ +EXEPATH = ../../src +GIEEXE = $(EXEPATH)/gie + EXTRA_DIST = 4D-API_cs2cs-style.gie \ GDA.gie \ - Makefile.am \ axisswap.gie \ builtins.gie \ deformation.gie \ ellipsoid.gie \ more_builtins.gie \ unitconvert.gie + +4D-API-cs2cs-style: 4D-API_cs2cs-style.gie + $(GIEEXE) $< + +GDA: GDA.gie + $(GIEEXE) $< + +axisswap: axisswap.gie + $(GIEEXE) $< + +builtins: builtins.gie + $(GIEEXE) $< + +deformation: deformation.gie + $(GIEEXE) $< + +ellipsoid: ellipsoid.gie + $(GIEEXE) $< + +more_builtins: more_builtins.gie + $(GIEEXE) $< + +unitconvert: unitconvert.gie + $(GIEEXE) $< + +check-local: 4D-API-cs2cs-style GDA axisswap builtins deformation ellipsoid more_builtins unitconvert diff --git a/test/gigs/Makefile.am b/test/gigs/Makefile.am index 4840c272..ed93daba 100644 --- a/test/gigs/Makefile.am +++ b/test/gigs/Makefile.am @@ -1,3 +1,6 @@ +EXEPATH = ../../src +GIEEXE = $(EXEPATH)/gie + EXTRA_DIST = \ 5101.1-jhs.gie \ 5101.2-jhs.gie \ @@ -16,3 +19,58 @@ EXTRA_DIST = \ 5113.gie \ 5201.gie \ 5208.gie + + +5101.1: 5101.1-jhs.gie + $(GIEEXE) $< + +5101.2: 5101.2-jhs.gie + $(GIEEXE) $< + +5101.3: 5101.3-jhs.gie + $(GIEEXE) $< + +5101.4: 5101.4-jhs-etmerc.gie + $(GIEEXE) $< + +5102.1: 5102.1.gie + $(GIEEXE) $< + +5103.1: 5103.1.gie + $(GIEEXE) $< + +5103.2: 5103.2.gie + $(GIEEXE) $< + +5103.3: 5103.3.gie + $(GIEEXE) $< + +5105.2: 5105.2.gie + $(GIEEXE) $< + +5106: 5106.gie + $(GIEEXE) $< + +5107: 5107.gie + $(GIEEXE) $< + +5109: 5109.gie + $(GIEEXE) $< + +5111.1: 5111.1.gie + $(GIEEXE) $< + +5112: 5112.gie + $(GIEEXE) $< + +5113: 5113.gie + $(GIEEXE) $< + +5201: 5201.gie + $(GIEEXE) $< + +5208: 5208.gie + $(GIEEXE) $< + + +check-local: 5101.1 5101.2 5101.3 5101.4 5102.1 5103.1 5103.2 5103.3 5105.2 5106 5107 5109 5111.1 5112 5113 5201 5208 -- cgit v1.2.3 From 0e7cb70f167858ec098343e8a991fcb41435880a Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Tue, 6 Feb 2018 16:00:01 +0100 Subject: Let gie skip tests when specific errors are returned. Introducing a new keyword 'skiperror' that when given a error code like pjd_err_failed_to_load_grid will skip tests if that error is returned when creating the operation. This is useful for grids that can't be located. --- src/gie.c | 50 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/src/gie.c b/src/gie.c index ee5bae44..6aa185f8 100644 --- a/src/gie.c +++ b/src/gie.c @@ -146,7 +146,7 @@ static ffio *ffio_create (const char **tags, size_t n_tags, size_t max_record_si static const char *gie_tags[] = { "", "operation", "accept", "expect", "roundtrip", "banner", "verbose", - "direction", "tolerance", "builtins", "echo", "" + "direction", "tolerance", "ignore", "builtins", "echo", "" }; static const size_t n_gie_tags = sizeof gie_tags / sizeof gie_tags[0]; @@ -178,12 +178,13 @@ typedef struct { PJ_DIRECTION dir; int verbosity; int op_id; - int op_ok, op_ko; - int total_ok, total_ko; - int grand_ok, grand_ko; + int op_ok, op_ko, op_skip; + int total_ok, total_ko, total_skip; + int grand_ok, grand_ko, grand_skip; size_t operation_lineno; size_t dimensions_given, dimensions_given_at_last_accept; double tolerance; + int ignore; const char *curr_file; FILE *fout; } gie_ctx; @@ -237,6 +238,7 @@ int main (int argc, char **argv) { T.dir = PJ_FWD; T.verbosity = 1; T.tolerance = 5e-4; + T.ignore = 5555; /* Error code that will not be issued by proj_create() */ o = opt_parse (argc, argv, "hlvq", "o", longflags, longkeys); if (0==o) @@ -294,7 +296,8 @@ int main (int argc, char **argv) { if (T.verbosity > 0) { if (o->fargc > 1) - fprintf (T.fout, "%sGrand total: %d. Success: %d, Failure: %d\n", delim, T.grand_ok+T.grand_ko, T.grand_ok, T.grand_ko); + fprintf (T.fout, "%sGrand total: %d. Success: %d, Skipped: %d, Failure: %d\n", + delim, T.grand_ok+T.grand_ko+T.grand_skip, T.grand_ok, T.grand_skip, T.grand_ko); fprintf (T.fout, "%s", delim); } else @@ -315,6 +318,12 @@ static int another_failure (void) { return 0; } +static int another_skip (void) { + T.op_skip++; + T.total_skip++; + return 0; +} + static int another_success (void) { T.op_ok++; T.total_ok++; @@ -328,6 +337,7 @@ static int process_file (const char *fname) { F->lineno = F->next_lineno = F->level = 0; T.op_ok = T.total_ok = 0; T.op_ko = T.total_ko = 0; + T.op_skip = T.total_skip = 0; f = fopen (fname, "rt"); if (0==f) { @@ -351,10 +361,12 @@ static int process_file (const char *fname) { fclose (f); F->lineno = F->next_lineno = 0; - T.grand_ok += T.total_ok; - T.grand_ko += T.total_ko; + T.grand_ok += T.total_ok; + T.grand_ko += T.total_ko; + T.grand_skip += T.grand_skip; if (T.verbosity > 0) - fprintf (T.fout, "%stotal: %2d tests succeeded, %2d tests %s\n", delim, T.total_ok, T.total_ko, T.total_ko? "FAILED!": "failed."); + fprintf (T.fout, "%stotal: %2d tests succeeded, %2d tests skipped, %2d tests %s\n", + delim, T.total_ok, T.total_skip, T.total_ko, T.total_ko? "FAILED!": "failed."); if (F->level==0) return errmsg (-3, "File '%s':Missing '' cmnd - bye!\n", fname); @@ -441,6 +453,10 @@ static int tolerance (const char *args) { return 0; } +static int ignore (const char *args) { + T.ignore = errno_from_err_const (column (args, 1)); + return 0; +} static int direction (const char *args) { const char *endp = args; @@ -467,7 +483,8 @@ static int direction (const char *args) { static void finish_previous_operation (const char *args) { if (T.verbosity > 1 && T.op_id > 1 && T.op_ok+T.op_ko) - fprintf (T.fout, "%s %d tests succeeded, %d tests %s\n", delim, T.op_ok, T.op_ko, T.op_ko? "FAILED!": "failed."); + fprintf (T.fout, "%s %d tests succeeded, %d tests skipped, %d tests %s\n", + delim, T.op_ok, T.op_skip, T.op_ko, T.op_ko? "FAILED!": "failed."); (void) args; } @@ -494,9 +511,11 @@ either a conversion or a transformation) T.op_ok = 0; T.op_ko = 0; + T.op_skip = 0; direction ("forward"); tolerance ("0.5 mm"); + ignore ("pjd_err_dont_skip"); proj_errno_reset (T.P); @@ -533,6 +552,7 @@ using the "builtins" command verb. } T.op_ok = 0; T.op_ko = 0; + T.op_skip = 0; i = pj_unitconvert_selftest (); if (i!=0) { fprintf (T.fout, "pj_unitconvert_selftest fails with %d\n", i); @@ -637,8 +657,12 @@ back/forward transformation pairs. char *endp; PJ_COORD coo; - if (0==T.P) + if (0==T.P) { + if (T.ignore == proj_errno(T.P)) + return another_skip(); + return another_failure (); + } ans = proj_strtod (args, &endp); ntrips = (int) (endp==args? 100: fabs(ans)); @@ -745,12 +769,16 @@ Tell GIE what to expect, when transforming the ACCEPTed input expect_failure_with_errno = errno_from_err_const (column (args, 3)); } + if (T.ignore==proj_errno(T.P)) + return another_skip (); + if (0==T.P) { /* If we expect failure, and fail, then it's a success... */ if (expect_failure) { /* Failed to fail correctly? */ if (expect_failure_with_errno && proj_errno (T.P)!=expect_failure_with_errno) return expect_failure_with_errno_message (expect_failure_with_errno, proj_errno(T.P)); + return another_success (); } @@ -881,6 +909,7 @@ static int dispatch (const char *cmnd, const char *args) { if (0==strcmp (cmnd, "verbose")) return verbose (args); if (0==strcmp (cmnd, "direction")) return direction (args); if (0==strcmp (cmnd, "tolerance")) return tolerance (args); + if (0==strcmp (cmnd, "ignore")) return ignore (args); if (0==strcmp (cmnd, "builtins")) return builtins (args); if (0==strcmp (cmnd, "echo")) return echo (args); @@ -950,6 +979,7 @@ static const struct errno_vs_err_const lookup[] = { {"pjd_err_ellipsoidal_unsupported" , -56}, {"pjd_err_too_many_inits" , -57}, {"pjd_err_invalid_arg" , -58}, + {"pjd_err_dont_skip" , 5555}, {"pjd_err_unknown" , 9999}, {"pjd_err_enomem" , ENOMEM}, }; -- cgit v1.2.3 From 3dfd8b26d30f5b1acd189154b830eceb6ac38ccb Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Tue, 6 Feb 2018 19:08:24 +0100 Subject: Skip gie tests that require grids --- test/gie/4D-API_cs2cs-style.gie | 8 ++++++++ test/gie/deformation.gie | 2 ++ test/gie/more_builtins.gie | 2 ++ 3 files changed, 12 insertions(+) diff --git a/test/gie/4D-API_cs2cs-style.gie b/test/gie/4D-API_cs2cs-style.gie index 853df993..edd83882 100644 --- a/test/gie/4D-API_cs2cs-style.gie +++ b/test/gie/4D-API_cs2cs-style.gie @@ -74,6 +74,7 @@ operation proj=latlong ellps=intl operation proj=latlong nadgrids=nzgd2kgrid0005.gsb ellps=GRS80 ------------------------------------------------------------------------------- tolerance 1 nm +ignore pjd_err_failed_to_load_grid accept 173 -45 0 0 expect 172.999892181021551 -45.001620431954613 0 0 direction inverse @@ -87,6 +88,7 @@ expect 173 -45 0 0 operation proj=latlong geoidgrids=egm96_15.gtx ellps=GRS80 ------------------------------------------------------------------------------- tolerance 15 cm # lax tolerance due to widespread bad egm96 file +ignore pjd_err_failed_to_load_grid accept 12.5 55.5 0 expect 12.5 55.5 -36.0213 direction inverse @@ -96,6 +98,7 @@ expect 12.5 55.5 0 operation proj=merc geoidgrids=egm96_15.gtx ellps=GRS80 ------------------------------------------------------------------------------- tolerance 0.1 mm +ignore pjd_err_failed_to_load_grid accept 12.5 55.5 0 expect 1391493.63492 7424275.19462 -36.0213 direction inverse @@ -111,6 +114,7 @@ Same as the two above, but also do axis swapping. operation proj=latlong geoidgrids=egm96_15.gtx axis=neu ellps=GRS80 ------------------------------------------------------------------------------- tolerance 15 cm # lax tolerance due to widely distributed, bad egm96 file +ignore pjd_err_failed_to_load_grid accept 12.5 55.5 0 expect 55.5 12.5 -36.0213 direction inverse @@ -120,6 +124,7 @@ expect 12.5 55.5 0 operation proj=latlong geoidgrids=egm96_15.gtx axis=dne ellps=GRS80 ------------------------------------------------------------------------------- tolerance 15 cm # lax tolerance due to widely distributed, bad egm96 file +ignore pjd_err_failed_to_load_grid accept 12.5 55.5 0 expect 36.0213 55.5 12.5 direction inverse @@ -129,6 +134,7 @@ expect 12.5 55.5 0 operation proj=merc geoidgrids=egm96_15.gtx ellps=GRS80 ------------------------------------------------------------------------------- tolerance 0.1 mm +ignore pjd_err_failed_to_load_grid accept 12.5 55.5 0 expect 1391493.63492 7424275.19462 -36.0213 direction inverse @@ -143,6 +149,7 @@ Some more complex axis swapping. operation proj=latlong geoidgrids=egm96_15.gtx axis=nue ellps=GRS80 ------------------------------------------------------------------------------- tolerance 15 cm # lax tolerance due to widely distributed, bad egm96 file +ignore pjd_err_failed_to_load_grid accept 12.5 55.5 0 expect 55.5 -36.0213 12.5 direction inverse @@ -152,6 +159,7 @@ expect 12.5 55.5 0 operation proj=merc geoidgrids=egm96_15.gtx axis=sue ellps=GRS80 ------------------------------------------------------------------------------- tolerance 15 cm +ignore pjd_err_failed_to_load_grid accept 12.5 55.5 0 expect -7424275.1946 -36.0213 1391493.6349 0.0000 direction inverse diff --git a/test/gie/deformation.gie b/test/gie/deformation.gie index 8f0f0caf..55283b84 100644 --- a/test/gie/deformation.gie +++ b/test/gie/deformation.gie @@ -18,6 +18,7 @@ operation +proj=deformation +xy_grids=alaska +z_grids=egm96_15.gtx +t_epoch=2016.0 +t_obs=2000.0 +ellps=GRS80 ------------------------------------------------------------------------------- tolerance 0.1 mm +ignore pjd_err_failed_to_load_grid accept -3004295.5882503074 -1093474.1690603832 5500477.1338251457 expect -3004295.7025 -1093474.2106 5500477.3444 roundtrip 5 @@ -29,6 +30,7 @@ operation +proj=deformation +xy_grids=alaska +z_grids=egm96_15.gtx +t_epoch=2016.0 +ellps=GRS80 ------------------------------------------------------------------------------- tolerance 0.1 mm +ignore pjd_err_failed_to_load_grid accept -3004295.5882503074 -1093474.1690603832 5500477.1338251457 2000.0 expect -3004295.7025 -1093474.2106 5500477.3444 2000.0 roundtrip 5 diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index e21f0321..e1c026ea 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -190,6 +190,7 @@ This is annoying, but must be handled elsewhere. We jump through the hoop by setting a very lax tolerance. ------------------------------------------------------------------------------- tolerance 15 cm +ignore pjd_err_failed_to_load_grid accept 12.5 55.5 0 0 expect 12.5 55.5 -36.021305084228516 0 @@ -214,6 +215,7 @@ Some tests from PJ_hgridshift.c operation proj=hgridshift +grids=nzgd2kgrid0005.gsb ellps=GRS80 ------------------------------------------------------------------------------- tolerance 1 nm +ignore pjd_err_failed_to_load_grid accept 173 -45 0 0 roundtrip 100 ------------------------------------------------------------------------------- -- cgit v1.2.3 From 27200f2f7689cb77546efb2e3ba0e795c46fd45f Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Tue, 6 Feb 2018 20:52:31 +0100 Subject: Make pj_free return with the correct errno. Error codes can't be specified directly in pj_free. With this change the error number in proj_errno() is passed on to P->destructor to ensure that we communicate the correct reason why the PJ object is being freed. This was a problem in the cs2cs_emulation setup when auxillary operations failed to create. The error was not propagated properly when destroying the parent object. --- src/pj_malloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pj_malloc.c b/src/pj_malloc.c index cfb7f658..73a60599 100644 --- a/src/pj_malloc.c +++ b/src/pj_malloc.c @@ -182,7 +182,7 @@ void pj_free(PJ *P) { /* to be called as the last step of the local destructor */ /* pointed to by P->destructor. In most cases, */ /* pj_default_destructor actually *is* what is pointed to */ - P->destructor (P, 0); + P->destructor (P, proj_errno(P)); } -- cgit v1.2.3 From b2ce811f40d14e4659869597200388a13ccffeaf Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Tue, 6 Feb 2018 20:59:33 +0100 Subject: Use a grid in API selftest that we can always rely on being present. --- src/gie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gie.c b/src/gie.c index 6aa185f8..40820e59 100644 --- a/src/gie.c +++ b/src/gie.c @@ -1739,9 +1739,9 @@ static int pj_cart_selftest (void) { proj_destroy(P); /* proj_grid_info() */ - grid_info = proj_grid_info("egm96_15.gtx"); + grid_info = proj_grid_info("null"); if ( strlen(grid_info.filename) == 0 ) return 64; - if ( strcmp(grid_info.gridname, "egm96_15.gtx") ) return 65; + if ( strcmp(grid_info.gridname, "null") ) return 65; grid_info = proj_grid_info("nonexistinggrid"); if ( strlen(grid_info.filename) > 0 ) return 66; -- cgit v1.2.3 From 23f8fb8835015f57ec6debb33c376628419cc5cd Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Tue, 6 Feb 2018 21:01:07 +0100 Subject: Use PROJ_LIB explicitly for gie tests and if it is not set change it to nad/ --- test/gie/Makefile.am | 18 ++++++++++-------- test/gigs/Makefile.am | 36 ++++++++++++++++++------------------ 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/test/gie/Makefile.am b/test/gie/Makefile.am index 72ecd990..4d5b206d 100644 --- a/test/gie/Makefile.am +++ b/test/gie/Makefile.am @@ -10,28 +10,30 @@ EXTRA_DIST = 4D-API_cs2cs-style.gie \ more_builtins.gie \ unitconvert.gie +PROJ_LIB ?= $(top_srcdir)/nad + 4D-API-cs2cs-style: 4D-API_cs2cs-style.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< GDA: GDA.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< axisswap: axisswap.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< builtins: builtins.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< deformation: deformation.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< ellipsoid: ellipsoid.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< more_builtins: more_builtins.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< unitconvert: unitconvert.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< check-local: 4D-API-cs2cs-style GDA axisswap builtins deformation ellipsoid more_builtins unitconvert diff --git a/test/gigs/Makefile.am b/test/gigs/Makefile.am index ed93daba..25f7d141 100644 --- a/test/gigs/Makefile.am +++ b/test/gigs/Makefile.am @@ -20,57 +20,57 @@ EXTRA_DIST = \ 5201.gie \ 5208.gie +PROJ_LIB ?= $(top_srcdir)/nad 5101.1: 5101.1-jhs.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< 5101.2: 5101.2-jhs.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< 5101.3: 5101.3-jhs.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< 5101.4: 5101.4-jhs-etmerc.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< 5102.1: 5102.1.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< 5103.1: 5103.1.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< 5103.2: 5103.2.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< 5103.3: 5103.3.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< 5105.2: 5105.2.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< 5106: 5106.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< 5107: 5107.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< 5109: 5109.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< 5111.1: 5111.1.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< 5112: 5112.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< 5113: 5113.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< 5201: 5201.gie - $(GIEEXE) $< + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< 5208: 5208.gie - $(GIEEXE) $< - + PROJ_LIB=$(PROJ_LIB) $(GIEEXE) $< check-local: 5101.1 5101.2 5101.3 5101.4 5102.1 5103.1 5103.2 5103.3 5105.2 5106 5107 5109 5111.1 5112 5113 5201 5208 -- cgit v1.2.3 From 4f00f09f1c306e87dfea3a5bc49dcaae72280e00 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Wed, 7 Feb 2018 12:15:04 +0100 Subject: Shrink PJ_XXX_INFO structs, but keep same syntax. (#775) * Shrink PJ_XXX_INFO structs, but keep same syntax. A number of the fixed length strings in the INFO structs are simply reflections of material that already exists as static strings at a number of places in the library (or in the case of PJ_INFO, really *should* exist, and now is implemented). This PR replaces these cases of constant length strings with const char pointers. The usage syntax is unchanged, and so is the nice property of having the return value allocated on the stack, and hence not requiring explicit memory management by the caller. proj_info now only does setup once - and the searchpath entry of PJ_INFO is not arbitrarily truncated at 512 bytes. Repeated calls simply returns a copy of already prepared material. The id, description and definition entries of PJ_PROJ_INFO are now also guaranteed to hold the entire text of the corresponding static string, by being represented by a const char pointer to that actual static string. PJ_GRID_INFO and PJ_INIT_INFO (i.e. the two smallest INFO structs) are unchanged. * Eliminate pj_strlcpy - not needed anymore: Remining calls could safely be replaced by strncpy. * Extend PROJ_INFO with paths from pj_set_searchpath. NOTE: Need to call pj_set_searchpath before first call to proj_info Huge thanks to Kristian Evers and Even Rouault for comments, debugging and advice. --- appveyor.yml | 2 + src/gie.c | 6 +- src/pj_internal.c | 54 +----------- src/pj_malloc.c | 1 + src/proj.h | 16 ++-- src/proj_4D_api.c | 238 +++++++++++++++++++++++++++++++--------------------- src/proj_internal.h | 2 - src/projects.h | 1 + 8 files changed, 162 insertions(+), 158 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 292d896d..52993558 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -60,6 +60,8 @@ test_script: - dir - echo "Contents of ..\test\gie:" - dir ..\test\gie + - echo "Contents of PROJ_LIB " %PROJ_LIB% + - dir %PROJ_LIB% - gie.exe ..\test\gie\*.gie deploy: off diff --git a/src/gie.c b/src/gie.c index 40820e59..9931b2ef 100644 --- a/src/gie.c +++ b/src/gie.c @@ -1492,7 +1492,7 @@ static int pj_cart_selftest (void) { size_t n, sz; double dist, h, t; char *args[3] = {"proj=utm", "zone=32", "ellps=GRS80"}; - const char *arg = {"+proj=utm +zone=32 +ellps=GRS80"}; + char arg[50] = {"+proj=utm; +zone=32; +ellps=GRS80"}; char buf[40]; /* An utm projection on the GRS80 ellipsoid */ @@ -1723,7 +1723,8 @@ static int pj_cart_selftest (void) { if (strcmp(info.version, tmpstr)) return 55; } if (info.release[0] == '\0') return 56; - if (info.searchpath[0] == '\0') return 57; + if (getenv ("HOME") || getenv ("PROJ_LIB")) + if (info.searchpath[0] == '\0') return 57; /* proj_pj_info() */ P = proj_create(PJ_DEFAULT_CTX, "+proj=august"); /* august has no inverse */ @@ -1733,6 +1734,7 @@ static int pj_cart_selftest (void) { P = proj_create(PJ_DEFAULT_CTX, arg); pj_info = proj_pj_info(P); if ( !pj_info.has_inverse ) { proj_destroy(P); return 61; } + pj_shrink (arg); if ( strcmp(pj_info.definition, arg) ) { proj_destroy(P); return 62; } if ( strcmp(pj_info.id, "utm") ) { proj_destroy(P); return 63; } diff --git a/src/pj_internal.c b/src/pj_internal.c index 6bb33d64..4dbcfbd4 100644 --- a/src/pj_internal.c +++ b/src/pj_internal.c @@ -148,56 +148,6 @@ void proj_context_inherit (PJ *parent, PJ *child) { -/**************************************************************************************/ -size_t pj_strlcpy(char *dst, const char *src, size_t dsize) { -/*************************************************************************************** - Copy src to string dst of size siz. At most siz-1 characters - will be copied. Always NUL terminates (unless siz == 0). - Returns strlen(src); if retval >= siz, truncation occurred. - - * - * Copyright (c) 1998, 2015 Todd C. Miller - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - - Source: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/string/strlcpy.c - -***************************************************************************************/ - const char *osrc = src; - size_t nleft = dsize; - - /* Copy as many bytes as will fit. */ - if (nleft != 0) { - while (--nleft != 0) { - if ((*dst++ = *src++) == '\0') - break; - } - } - - /* Not enough room in dst, add NUL and traverse rest of src. */ - if (nleft == 0) { - if (dsize != 0) - *dst = '\0'; /* NUL-terminate dst */ - while (*src++) - ; - } - - return(src - osrc - 1); /* count does not include NUL */ -} - - - /*****************************************************************************/ char *pj_chomp (char *c) { /****************************************************************************** @@ -261,7 +211,9 @@ consuming their surrounding whitespace. /* Eliminate prefix '+', only if preceeded by whitespace */ /* (i.e. keep it in 1.23e+08) */ - if ((i > 0) && ('+'==c[j]) && isspace (c[i])) + if ((i > 0) && ('+'==c[j]) && ws) + c[j] = ' '; + if ((i==0) && ('+'==c[j])) c[j] = ' '; if (isspace (c[j]) || ';'==c[j]) { diff --git a/src/pj_malloc.c b/src/pj_malloc.c index 73a60599..127e76ee 100644 --- a/src/pj_malloc.c +++ b/src/pj_malloc.c @@ -221,6 +221,7 @@ void *pj_default_destructor (PJ *P, int errlev) { /* Destructor */ /* free parameter list elements */ pj_dealloc_params (pj_get_ctx(P), P->params, errlev); + pj_dealloc (P->def_full); /* free the cs2cs emulation elements */ pj_free (P->axisswap); diff --git a/src/proj.h b/src/proj.h index c3165cfe..73629490 100644 --- a/src/proj.h +++ b/src/proj.h @@ -239,20 +239,22 @@ union PJ_COORD { struct PJ_INFO { - char release[64]; /* Release info. Version + date */ - char version[64]; /* Full version number */ int major; /* Major release number */ int minor; /* Minor release number */ int patch; /* Patch level */ - char searchpath[512]; /* Paths where init and grid files are */ + const char *release; /* Release info. Version + date */ + const char *version; /* Full version number */ + const char *searchpath; /* Paths where init and grid files are */ /* looked for. Paths are separated by */ /* semi-colons. */ + const char * const *paths; + size_t path_count; }; struct PJ_PROJ_INFO { - char id[16]; /* Name of the projection in question */ - char description[128]; /* Description of the projection */ - char definition[512]; /* Projection definition */ + const char *id; /* Name of the projection in question */ + const char *description; /* Description of the projection */ + const char *definition; /* Projection definition */ int has_inverse; /* 1 if an inverse mapping exists, 0 otherwise */ double accuracy; /* Expected accuracy of the transformation. -1 if unknown. */ }; @@ -356,7 +358,7 @@ int proj_errno_restore (const PJ *P, int err); PJ_FACTORS proj_factors(PJ *P, LP lp); /* Info functions - get information about various PROJ.4 entities */ -PJ_INFO proj_info(void); +PJ_INFO proj_info(void); PJ_PROJ_INFO proj_pj_info(PJ *P); PJ_GRID_INFO proj_grid_info(const char *gridname); PJ_INIT_INFO proj_init_info(const char *initname); diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index 0d50407f..42e3cbf9 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -724,70 +724,113 @@ PJ_CONTEXT *proj_context_destroy (PJ_CONTEXT *ctx) { } + + + + /*****************************************************************************/ -PJ_INFO proj_info(void) { +static char *path_append (char *buf, const char *app, size_t *buf_size) { /****************************************************************************** - Basic info about the current instance of the PROJ.4 library. + Helper for proj_info() below. Append app to buf, separated by a + semicolon. Also handle allocation of longer buffer if needed. + + Returns buffer and adjusts *buf_size through provided pointer arg. +******************************************************************************/ + char *p; + size_t len, applen = 0, buflen = 0; +#ifdef _WIN32 + char *delim = ";"; +#else + char *delim = ":"; +#endif + + /* Nothing to do? */ + if (0 == app) + return buf; + applen = strlen (app); + if (0 == applen) + return buf; + + /* Start checking whether buf is long enough */ + if (0 != buf) + buflen = strlen (buf); + len = buflen+applen+strlen (delim) + 1; + + /* "pj_realloc", so to speak */ + if (*buf_size < len) { + p = pj_calloc (2 * len, sizeof (char)); + if (0==p) { + pj_dealloc (buf); + return 0; + } + *buf_size = 2 * len; + if (buf != 0) + strcpy (p, buf); + pj_dealloc (buf); + buf = p; + } + + /* Only append a semicolon if something's already there */ + if (0 != buflen) + strcat (buf, ";"); + strcat (buf, app); + return buf; +} - Returns PJ_INFO struct. Searchpath member of the struct is truncated to 512 - characters. +static const char *empty = {""}; +static char version[64] = {""}; +static PJ_INFO info = {0, 0, 0, 0, 0, 0, 0, 0}; +static volatile int info_initialized = 0; +/*****************************************************************************/ +PJ_INFO proj_info (void) { +/****************************************************************************** + Basic info about the current instance of the PROJ.4 library. + + Returns PJ_INFO struct. ******************************************************************************/ - PJ_INFO info; const char * const *paths; - char *tmpstr; - int i, n; - size_t len = 0; + size_t i, n; + + size_t buf_size = 0; + char *buf = 0; - memset(&info, 0, sizeof(PJ_INFO)); + pj_acquire_lock (); + + if (0!=info_initialized) { + pj_release_lock (); + return info; + } info.major = PROJ_VERSION_MAJOR; info.minor = PROJ_VERSION_MINOR; info.patch = PROJ_VERSION_PATCH; /* This is a controlled environment, so no risk of sprintf buffer - overflow. A normal version string is xx.yy.zz which is 8 characters - long and there is room for 64 bytes in the version string. */ - sprintf(info.version, "%d.%d.%d", info.major, info.minor, info.patch); - - pj_strlcpy(info.release, pj_get_release(), sizeof(info.release)); + overflow. A normal version string is xx.yy.zz which is 8 characters + long and there is room for 64 bytes in the version string. */ + sprintf (version, "%d.%d.%d", info.major, info.minor, info.patch); + info.searchpath = empty; + info.version = version; + info.release = pj_get_release (); /* build search path string */ - tmpstr = getenv("HOME"); - if (tmpstr != NULL) { - pj_strlcpy(info.searchpath, tmpstr, sizeof(info.searchpath)); - } + buf = path_append (buf, getenv ("HOME"), &buf_size); + buf = path_append (buf, getenv ("PROJ_LIB"), &buf_size); - tmpstr = getenv("PROJ_LIB"); - if (tmpstr != NULL) { - if (strlen(info.searchpath) != 0) { - /* $HOME already in path */ - strcat(info.searchpath, ";"); - len = strlen(tmpstr); - strncat(info.searchpath, tmpstr, sizeof(info.searchpath)-len-1); - } else { - /* path is empty */ - pj_strlcpy(info.searchpath, tmpstr, sizeof(info.searchpath)); - } - } - - paths = proj_get_searchpath(); - n = proj_get_path_count(); + paths = proj_get_searchpath (); + n = (size_t) proj_get_path_count (); - for (i=0; i= 511) - continue; + for (i = 0; i < n; i++) + buf = path_append (buf, paths[i], &buf_size); + info.searchpath = buf ? buf : empty; - if (strlen(info.searchpath) != 0) { - strcat(info.searchpath, ";"); - len = strlen(paths[i]); - strncat(info.searchpath, paths[i], sizeof(info.searchpath)-len-1); - } else { - pj_strlcpy(info.searchpath, paths[i], sizeof(info.searchpath)); - } - } + info.paths = paths; + info.path_count = n; + info_initialized = 1; + pj_release_lock (); return info; } @@ -798,37 +841,41 @@ PJ_PROJ_INFO proj_pj_info(PJ *P) { Basic info about a particular instance of a projection object. Returns PJ_PROJ_INFO struct. - ******************************************************************************/ - PJ_PROJ_INFO info; + PJ_PROJ_INFO pjinfo; char *def; - memset(&info, 0, sizeof(PJ_PROJ_INFO)); + memset(&pjinfo, 0, sizeof(PJ_PROJ_INFO)); /* Expected accuracy of the transformation. Hardcoded for now, will be improved */ /* later. Most likely to be used when a transformation is set up with */ /* proj_create_crs_to_crs in a future version that leverages the EPSG database. */ - info.accuracy = -1.0; + pjinfo.accuracy = -1.0; - if (!P) { - return info; - } + if (0==P) + return pjinfo; /* projection id */ if (pj_param(P->ctx, P->params, "tproj").i) - pj_strlcpy(info.id, pj_param(P->ctx, P->params, "sproj").s, sizeof(info.id)); + pjinfo.id = pj_param(P->ctx, P->params, "sproj").s; /* projection description */ - pj_strlcpy(info.description, P->descr, sizeof(info.description)); + pjinfo.description = P->descr; /* projection definition */ - def = pj_get_def(P, 0); /* pj_get_def takes a non-const PJ pointer */ - pj_strlcpy(info.definition, &def[1], sizeof(info.definition)); /* def includes a leading space */ - pj_dealloc(def); - - info.has_inverse = pj_has_inverse(P); + if (P->def_full) + def = P->def_full; + else + def = pj_get_def(P, 0); /* pj_get_def takes a non-const PJ pointer */ + if (0==def) + pjinfo.definition = empty; + else + pjinfo.definition = pj_shrink (def); + /* Make pj_free clean this up eventually */ + P->def_full = def; - return info; + pjinfo.has_inverse = pj_has_inverse(P); + return pjinfo; } @@ -838,47 +885,49 @@ PJ_GRID_INFO proj_grid_info(const char *gridname) { Information about a named datum grid. Returns PJ_GRID_INFO struct. - ******************************************************************************/ - PJ_GRID_INFO info; + PJ_GRID_INFO grinfo; /*PJ_CONTEXT *ctx = proj_context_create(); */ PJ_CONTEXT *ctx = pj_get_default_ctx(); PJ_GRIDINFO *gridinfo = pj_gridinfo_init(ctx, gridname); - memset(&info, 0, sizeof(PJ_GRID_INFO)); + memset(&grinfo, 0, sizeof(PJ_GRID_INFO)); /* in case the grid wasn't found */ if (gridinfo->filename == NULL) { pj_gridinfo_free(ctx, gridinfo); - strcpy(info.format, "missing"); - return info; + strcpy(grinfo.format, "missing"); + return grinfo; } + /* The string copies below are automatically null-terminated due to */ + /* the memset above, so strncpy is safe */ + /* name of grid */ - pj_strlcpy(info.gridname, gridname, sizeof(info.gridname)); + strncpy (grinfo.gridname, gridname, sizeof(grinfo.gridname) - 1); /* full path of grid */ - pj_find_file(ctx, gridname, info.filename, sizeof(info.filename)); + pj_find_file(ctx, gridname, grinfo.filename, sizeof(grinfo.filename) - 1); /* grid format */ - pj_strlcpy(info.format, gridinfo->format, sizeof(info.format)); + strncpy (grinfo.format, gridinfo->format, sizeof(grinfo.format) - 1); /* grid size */ - info.n_lon = gridinfo->ct->lim.lam; - info.n_lat = gridinfo->ct->lim.phi; + grinfo.n_lon = gridinfo->ct->lim.lam; + grinfo.n_lat = gridinfo->ct->lim.phi; /* cell size */ - info.cs_lon = gridinfo->ct->del.lam; - info.cs_lat = gridinfo->ct->del.phi; + grinfo.cs_lon = gridinfo->ct->del.lam; + grinfo.cs_lat = gridinfo->ct->del.phi; /* bounds of grid */ - info.lowerleft = gridinfo->ct->ll; - info.upperright.lam = info.lowerleft.lam + info.n_lon*info.cs_lon; - info.upperright.phi = info.lowerleft.phi + info.n_lat*info.cs_lat; + grinfo.lowerleft = gridinfo->ct->ll; + grinfo.upperright.lam = grinfo.lowerleft.lam + grinfo.n_lon*grinfo.cs_lon; + grinfo.upperright.phi = grinfo.lowerleft.phi + grinfo.n_lat*grinfo.cs_lat; pj_gridinfo_free(ctx, gridinfo); - return info; + return grinfo; } @@ -897,27 +946,28 @@ PJ_INIT_INFO proj_init_info(const char *initname){ If the init file is found, but the metadata is missing, the value is set to "Unknown". - ******************************************************************************/ int file_found; char param[80], key[74]; paralist *start, *next; - PJ_INIT_INFO info; + PJ_INIT_INFO ininfo; PJ_CONTEXT *ctx = pj_get_default_ctx(); - memset(&info, 0, sizeof(PJ_INIT_INFO)); + memset(&ininfo, 0, sizeof(PJ_INIT_INFO)); - file_found = pj_find_file(ctx, initname, info.filename, sizeof(info.filename)); + file_found = pj_find_file(ctx, initname, ininfo.filename, sizeof(ininfo.filename)); if (!file_found || strlen(initname) > 64) { - return info; + return ininfo; } - pj_strlcpy(info.name, initname, sizeof(info.name)); - strcpy(info.origin, "Unknown"); - strcpy(info.version, "Unknown"); - strcpy(info.lastupdate, "Unknown"); + /* The initial memset (0) makes strncpy safe here */ + strncpy (ininfo.name, initname, sizeof(ininfo.name) - 1); + strcpy(ininfo.origin, "Unknown"); + strcpy(ininfo.version, "Unknown"); + strcpy(ininfo.lastupdate, "Unknown"); - pj_strlcpy(key, initname, 64); /* make room for ":metadata\0" at the end */ + strncpy (key, initname, 64); /* make room for ":metadata\0" at the end */ + key[64] = 0; strncat(key, ":metadata", 9); strcpy(param, "+init="); strncat(param, key, 73); @@ -925,24 +975,21 @@ PJ_INIT_INFO proj_init_info(const char *initname){ start = pj_mkparam(param); pj_expand_init(ctx, start); - if (pj_param(ctx, start, "tversion").i) { - pj_strlcpy(info.version, pj_param(ctx, start, "sversion").s, sizeof(info.version)); - } + if (pj_param(ctx, start, "tversion").i) + strncpy(ininfo.version, pj_param(ctx, start, "sversion").s, sizeof(ininfo.version) - 1); - if (pj_param(ctx, start, "torigin").i) { - pj_strlcpy(info.origin, pj_param(ctx, start, "sorigin").s, sizeof(info.origin)); - } + if (pj_param(ctx, start, "torigin").i) + strncpy(ininfo.origin, pj_param(ctx, start, "sorigin").s, sizeof(ininfo.origin) - 1); - if (pj_param(ctx, start, "tlastupdate").i) { - pj_strlcpy(info.lastupdate, pj_param(ctx, start, "slastupdate").s, sizeof(info.lastupdate)); - } + if (pj_param(ctx, start, "tlastupdate").i) + strncpy(ininfo.lastupdate, pj_param(ctx, start, "slastupdate").s, sizeof(ininfo.lastupdate) - 1); for ( ; start; start = next) { next = start->next; pj_dalloc(start); } - return info; + return ininfo; } @@ -957,7 +1004,6 @@ PJ_FACTORS proj_factors(PJ *P, LP lp) { returns PJ_FACTORS. If unsuccessfull, error number is set and the struct returned contains NULL data. - ******************************************************************************/ PJ_FACTORS factors = {0,0,0, 0,0,0, 0,0, 0,0,0,0}; struct FACTORS f; diff --git a/src/proj_internal.h b/src/proj_internal.h index 3e0ecbe9..bc3b2dd1 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -132,8 +132,6 @@ void proj_fileapi_set (PJ *P, void *fileapi); const char * const *proj_get_searchpath(void); int proj_get_path_count(void); -size_t pj_strlcpy(char *dst, const char *src, size_t siz); - #ifdef __cplusplus } #endif diff --git a/src/projects.h b/src/projects.h index 41f4aa3c..60bac8a1 100644 --- a/src/projects.h +++ b/src/projects.h @@ -231,6 +231,7 @@ struct PJconsts { projCtx_t *ctx; const char *descr; /* From pj_list.h or individual PJ_*.c file */ paralist *params; /* Parameter list */ + char *def_full; /* Full textual definition (usually 0 - set by proj_pj_info) */ char *def_size; /* Shape and size parameters extracted from params */ char *def_shape; char *def_spherification; -- cgit v1.2.3 From d9e184d2497e7f2c5d3d2ea13399d5ba7bc7fa4a Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Fri, 2 Feb 2018 21:38:59 +0100 Subject: Fix manpage section for pj_init. --- man/man3/pj_init.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man3/pj_init.3 b/man/man3/pj_init.3 index 06ecb331..5a5aede3 100644 --- a/man/man3/pj_init.3 +++ b/man/man3/pj_init.3 @@ -1,6 +1,6 @@ .\" @(#)pj_init.3 - 5.0.0 .\" -.TH PJ_INIT 3U "2018/02/15 Rel. 5.0.0" +.TH PJ_INIT 3 "2018/02/15 Rel. 5.0.0" .ad b .hy 1 .SH NAME -- cgit v1.2.3 From 9c75d794177276189d0a2809bc462291e1a070d3 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Fri, 9 Feb 2018 13:43:22 +0100 Subject: Avoid XY, LP and UV datatype clashes with other libraries. Remove unnecessary definitions of UV and UVW from project.h that collides with external libraries. To prevent similar problems in the future the datatypes XY, LP, UV, XYZ, LPZ and UVW has been prefixed by PJ_ in proj.h and proj_internal.h --- src/proj.h | 38 +++++++++++++++++++------------------- src/proj_internal.h | 6 +++--- src/projects.h | 13 +++++++++---- 3 files changed, 31 insertions(+), 26 deletions(-) diff --git a/src/proj.h b/src/proj.h index 73629490..950cc271 100644 --- a/src/proj.h +++ b/src/proj.h @@ -212,13 +212,13 @@ typedef struct { double o, p, k; } PJ_OPK; /* Rotations: omega, phi, k typedef struct { double e, n, u; } PJ_ENU; /* East, North, Up */ /* Classic proj.4 pair/triplet types */ -typedef struct { double u, v; } UV; -typedef struct { double x, y; } XY; -typedef struct { double lam, phi; } LP; +typedef struct { double u, v; } PJ_UV; +typedef struct { double x, y; } PJ_XY; +typedef struct { double lam, phi; } PJ_LP; -typedef struct { double x, y, z; } XYZ; -typedef struct { double u, v, w; } UVW; -typedef struct { double lam, phi, z; } LPZ; +typedef struct { double x, y, z; } PJ_XYZ; +typedef struct { double u, v, w; } PJ_UVW; +typedef struct { double lam, phi, z; } PJ_LPZ; /* Avoid preprocessor renaming and implicit type-punning: Use a union to make it explicit */ @@ -229,12 +229,12 @@ union PJ_COORD { PJ_LPZT lpzt; PJ_OPK opk; PJ_ENU enu; - XYZ xyz; - UVW uvw; - LPZ lpz; - XY xy; - UV uv; - LP lp; + PJ_XYZ xyz; + PJ_UVW uvw; + PJ_LPZ lpz; + PJ_XY xy; + PJ_UV uv; + PJ_LP lp; }; @@ -263,8 +263,8 @@ struct PJ_GRID_INFO { char gridname[32]; /* name of grid */ char filename[260]; /* full path to grid */ char format[8]; /* file format of grid */ - LP lowerleft; /* Coordinates of lower left corner */ - LP upperright; /* Coordinates of upper right corner */ + PJ_LP lowerleft; /* Coordinates of lower left corner */ + PJ_LP upperright; /* Coordinates of upper right corner */ int n_lon, n_lat; /* Grid size */ double cs_lon, cs_lat; /* Cell size of grid */ }; @@ -336,16 +336,16 @@ PJ_COORD proj_coord (double x, double y, double z, double t); double proj_roundtrip (PJ *P, PJ_DIRECTION direction, int n, PJ_COORD *coo); /* Geodesic distance between two points with angular 2D coordinates */ -double proj_lp_dist (const PJ *P, LP a, LP b); +double proj_lp_dist (const PJ *P, PJ_LP a, PJ_LP b); /* The geodesic distance AND the vertical offset */ -double proj_lpz_dist (const PJ *P, LPZ a, LPZ b); +double proj_lpz_dist (const PJ *P, PJ_LPZ a, PJ_LPZ b); /* Euclidean distance between two points with linear 2D coordinates */ -double proj_xy_dist (XY a, XY b); +double proj_xy_dist (PJ_XY a, PJ_XY b); /* Euclidean distance between two points with linear 3D coordinates */ -double proj_xyz_dist (XYZ a, XYZ b); +double proj_xyz_dist (PJ_XYZ a, PJ_XYZ b); /* Set or read error level */ @@ -355,7 +355,7 @@ int proj_errno_reset (const PJ *P); int proj_errno_restore (const PJ *P, int err); /* Scaling and angular distortion factors */ -PJ_FACTORS proj_factors(PJ *P, LP lp); +PJ_FACTORS proj_factors(PJ *P, PJ_LP lp); /* Info functions - get information about various PROJ.4 entities */ PJ_INFO proj_info(void); diff --git a/src/proj_internal.h b/src/proj_internal.h index bc3b2dd1..071510c7 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -91,9 +91,9 @@ PJ_COORD pj_approx_3D_trans (PJ *P, PJ_DIRECTION direction, PJ_COORD coo); /* Grid functionality */ int proj_vgrid_init(PJ *P, const char *grids); int proj_hgrid_init(PJ *P, const char *grids); -double proj_vgrid_value(PJ *P, LP lp); -LP proj_hgrid_value(PJ *P, LP lp); -LP proj_hgrid_apply(PJ *P, LP lp, PJ_DIRECTION direction); +double proj_vgrid_value(PJ *P, PJ_LP lp); +PJ_LP proj_hgrid_value(PJ *P, PJ_LP lp); +PJ_LP proj_hgrid_apply(PJ *P, PJ_LP lp, PJ_DIRECTION direction); /* High level functionality for handling thread contexts */ enum proj_log_level { diff --git a/src/projects.h b/src/projects.h index 60bac8a1..bfbe08cb 100644 --- a/src/projects.h +++ b/src/projects.h @@ -157,10 +157,6 @@ typedef struct { double u, v, w; } projUVW; #define XYZ projUVW #define LPZ projUVW -/* Yes, this is ridiculous, but a consequence of an old and bad decision about implicit type-punning through preprocessor abuse */ -typedef struct { double u, v; } UV; -typedef struct { double u, v, w; } UVW; - #else typedef struct { double x, y; } XY; typedef struct { double x, y, z; } XYZ; @@ -169,6 +165,15 @@ typedef struct { double lam, phi, z; } LPZ; typedef struct { double u, v; } UV; typedef struct { double u, v, w; } UVW; #endif /* ndef PJ_LIB__ */ + +#else +typedef PJ_XY XY; +typedef PJ_LP LP; +typedef PJ_UV UV; +typedef PJ_XYZ XYZ; +typedef PJ_LPZ LPZ; +typedef PJ_UVW UVW; + #endif /* ndef PROJ_H */ -- cgit v1.2.3 From be4dd97fc7c1833019b1aa4db65a8a5550853269 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Thu, 8 Feb 2018 14:26:29 +0100 Subject: Relaxing tolerances in a few tests to fix #778. --- nad/testvarious | 4 ++-- nad/tv_out.dist | 8 ++++---- test/gie/builtins.gie | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/nad/testvarious b/nad/testvarious index 4ca20a63..8b3c14ac 100755 --- a/nad/testvarious +++ b/nad/testvarious @@ -782,11 +782,11 @@ EOF echo "##############################################################" >> ${OUT} echo "Test SCH inverse projection" >> ${OUT} # -$EXE -f '%.7f' \ +$EXE -f '%.6f' \ +proj=sch +datum=WGS84 +plat_0=30.0 +plon_0=45.0 +phdg_0=-12.0 +nodefs +to \ +proj=latlong +datum=WGS84 \ -E >> ${OUT} < Date: Sat, 10 Feb 2018 10:42:03 +0100 Subject: Add BETA2007 grid and change potsdam datum (#383) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Functionnaly equivalent to https://github.com/OSGeo/proj.4/pull/371 by Jürgen Fischer See http://crs.bkg.bund.de/crseu/crs/descrtrans/BeTA/de_dhdn2etrs_beta.php Confirmed with Uwe Schmitz that free redistribution is allowed and welcome. --- nad/BETA2007.gsb | Bin 0 -> 83696 bytes nad/README | 4 ++++ src/pj_datums.c | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 nad/BETA2007.gsb diff --git a/nad/BETA2007.gsb b/nad/BETA2007.gsb new file mode 100644 index 00000000..69cd3346 Binary files /dev/null and b/nad/BETA2007.gsb differ diff --git a/nad/README b/nad/README index 884cedda..4ed6b192 100644 --- a/nad/README +++ b/nad/README @@ -70,3 +70,7 @@ WO.lla.Z --- Washington, Oregon, N. California Other grid shift files ntv1_can.dat --- Canadian NTv1 grid shift file (NAD27-->NAD83) ntf_r93.gsb --- French NTv2 grid shift file (NTF-->RGF93) +BETA2007.gsb --- German NTv2 grid shift file (DE_DHDN-->ETRS89) : + http://crs.bkg.bund.de/crseu/crs/descrtrans/BeTA/de_dhdn2etrs_beta.php + Confirmed with Uwe Schmitz that free + redistribution is allowed and welcome. diff --git a/src/pj_datums.c b/src/pj_datums.c index 48c77c69..f084f9cc 100644 --- a/src/pj_datums.c +++ b/src/pj_datums.c @@ -47,7 +47,8 @@ C_NAMESPACE_VAR const struct PJ_DATUMS pj_datums[] = { {"NAD27", "nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat", "clrk66", "North_American_Datum_1927"}, -{"potsdam", "towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7", +{"potsdam", /*"towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7",*/ + "nadgrids=@BETA2007.gsb", "bessel", "Potsdam Rauenberg 1950 DHDN"}, {"carthage","towgs84=-263.0,6.0,431.0", "clrk80ign", -- cgit v1.2.3 From a1ce77b609e7a132ab2b4d4673d8abb6e1f6b28d Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sat, 10 Feb 2018 11:57:12 +0100 Subject: gie: repair handling of angular distances --- src/gie.c | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/src/gie.c b/src/gie.c index 9931b2ef..8d0404b2 100644 --- a/src/gie.c +++ b/src/gie.c @@ -681,7 +681,7 @@ back/forward transformation pairs. banner (T.operation); fprintf (T.fout, "%s", T.op_ko? " -----\n": delim); fprintf (T.fout, " FAILURE in %s(%d):\n", opt_strip_path (T.curr_file), (int) F->lineno); - fprintf (T.fout, " roundtrip deviation: %.3f mm, expected: %.3f mm\n", 1000*r, 1000*d); + fprintf (T.fout, " roundtrip deviation: %.6f mm, expected: %.6f mm\n", 1000*r, 1000*d); } return another_failure (); } @@ -700,13 +700,13 @@ static int expect_message (double d, const char *args) { fprintf (T.fout, " FAILURE in %s(%d):\n", opt_strip_path (T.curr_file), (int) F->lineno); fprintf (T.fout, " expected: %s\n", args); - fprintf (T.fout, " got: %.9f %.9f", T.b.xy.x, T.b.xy.y); + fprintf (T.fout, " got: %.12f %.12f", T.b.xy.x, T.b.xy.y); if (T.b.xyzt.t!=0 || T.b.xyzt.z!=0) fprintf (T.fout, " %.9f", T.b.xyz.z); if (T.b.xyzt.t!=0) fprintf (T.fout, " %.9f", T.b.xyzt.t); fprintf (T.fout, "\n"); - fprintf (T.fout, " deviation: %.3f mm, expected: %.3f mm\n", 1000*d, 1000*T.tolerance); + fprintf (T.fout, " deviation: %.6f mm, expected: %.6f mm\n", 1000*d, 1000*T.tolerance); return 1; } @@ -829,42 +829,28 @@ Tell GIE what to expect, when transforming the ACCEPTed input /* expected angular values, probably in degrees */ ce = proj_angular_output (T.P, T.dir)? torad_coord (T.P, T.dir, T.e): T.e; if (T.verbosity > 3) - printf ("EXPECTS %.4f %.4f %.4f %.4f\n", ce.v[0],ce.v[1],ce.v[2],ce.v[3]); + printf ("EXPECTS %.12f %.12f %.12f %.12f\n", ce.v[0],ce.v[1],ce.v[2],ce.v[3]); /* input ("accepted") values, also probably in degrees */ ci = proj_angular_input (T.P, T.dir)? torad_coord (T.P, T.dir, T.a): T.a; if (T.verbosity > 3) - printf ("ACCEPTS %.4f %.4f %.4f %.4f\n", ci.v[0],ci.v[1],ci.v[2],ci.v[3]); + printf ("ACCEPTS %.12f %.12f %.12f %.12f\n", ci.v[0],ci.v[1],ci.v[2],ci.v[3]); /* angular output from proj_trans comes in radians */ co = expect_trans_n_dim (ci); T.b = proj_angular_output (T.P, T.dir)? todeg_coord (T.P, T.dir, co): co; if (T.verbosity > 3) - printf ("GOT %.4f %.4f %.4f %.4f\n", co.v[0],co.v[1],co.v[2],co.v[3]); + printf ("GOT %.12f %.12f %.12f %.12f\n", co.v[0],co.v[1],co.v[2],co.v[3]); - /* but there are a few more possible input conventions... */ - if (proj_angular_output (T.P, T.dir)) { - double e = HUGE_VAL; + if (proj_angular_output (T.P, T.dir)) d = proj_lpz_dist (T.P, ce.lpz, co.lpz); - /* check whether input was already in radians */ - if (d > T.tolerance) - e = proj_lpz_dist (T.P, T.e.lpz, co.lpz); - if (e < d) - d = e; - - /* or the tolerance may be based on euclidean distance */ - if (d > T.tolerance) - e = proj_xyz_dist (T.b.xyz, T.e.xyz); - if (e < d) - d = e; - } else d = proj_xyz_dist (T.b.xyz, T.e.xyz); + if (d > T.tolerance) return expect_message (d, args); another_success (); - return 0; } -- cgit v1.2.3 From 82cbab19db5ec8fd7b2fec7f6faf75993381f105 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sat, 10 Feb 2018 12:00:15 +0100 Subject: pj_init: set ellipsoid if given, even if not needed --- src/pj_init.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pj_init.c b/src/pj_init.c index 0acc6c71..f54a2a92 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -593,12 +593,12 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { if (pj_datum_set(ctx, start, PIN)) return pj_default_destructor (PIN, proj_errno(PIN)); - if (PIN->need_ellps) { - int ret = pj_ellipsoid (PIN); - if (0 != ret) { - pj_log (ctx, PJ_LOG_DEBUG_MINOR, "pj_init_ctx: Must specify ellipsoid or sphere"); - return pj_default_destructor (PIN, proj_errno(PIN)); - } + err = pj_ellipsoid (PIN); + if (PIN->need_ellps && 0 != err) { + pj_log (ctx, PJ_LOG_DEBUG_MINOR, "pj_init_ctx: Must specify ellipsoid or sphere"); + return pj_default_destructor (PIN, proj_errno(PIN)); + } + if (0==err) { PIN->a_orig = PIN->a; PIN->es_orig = PIN->es; if (pj_calc_ellipsoid_params (PIN, PIN->a, PIN->es)) -- cgit v1.2.3 From 797890c920e60ca62f5daeea55dcebb27314fb3c Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sat, 10 Feb 2018 12:16:25 +0100 Subject: Fix numerous bugs in the cs2cs emulation --- src/pj_fwd.c | 14 ++++++++++---- src/pj_inv.c | 17 +++++++++++------ src/proj_4D_api.c | 11 ++++++----- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/src/pj_fwd.c b/src/pj_fwd.c index 66b86aab..dbb7748e 100644 --- a/src/pj_fwd.c +++ b/src/pj_fwd.c @@ -73,9 +73,11 @@ static PJ_COORD pj_fwd_prepare (PJ *P, PJ_COORD coo) { coo = proj_trans (P->hgridshift, PJ_INV, coo); else if (P->helmert) { coo = proj_trans (P->cart_wgs84, PJ_FWD, coo); /* Go cartesian in WGS84 frame */ - coo = proj_trans (P->helmert, PJ_FWD, coo); /* Step into local frame */ + coo = proj_trans (P->helmert, PJ_INV, coo); /* Step into local frame */ coo = proj_trans (P->cart, PJ_INV, coo); /* Go back to angular using local ellps */ } + if (coo.lp.lam==HUGE_VAL) + return coo; if (P->vgridshift) coo = proj_trans (P->vgridshift, PJ_FWD, coo); @@ -92,7 +94,7 @@ static PJ_COORD pj_fwd_prepare (PJ *P, PJ_COORD coo) { /* We do not support gridshifts on cartesian input */ if (INPUT_UNITS==PJ_IO_UNITS_CARTESIAN && P->helmert) - return proj_trans (P->helmert, PJ_FWD, coo); + return proj_trans (P->helmert, PJ_INV, coo); return coo; } @@ -140,13 +142,17 @@ static PJ_COORD pj_fwd_finalize (PJ *P, PJ_COORD coo) { if (P->vgridshift) coo = proj_trans (P->vgridshift, PJ_INV, coo); + if (coo.lp.lam==HUGE_VAL) + return coo; if (P->hgridshift) - coo = proj_trans (P->hgridshift, PJ_FWD, coo); + coo = proj_trans (P->hgridshift, PJ_INV, coo); else if (P->helmert) { coo = proj_trans (P->cart_wgs84, PJ_FWD, coo); /* Go cartesian in WGS84 frame */ - coo = proj_trans (P->helmert, PJ_FWD, coo); /* Step into local frame */ + coo = proj_trans (P->helmert, PJ_INV, coo); /* Step into local frame */ coo = proj_trans (P->cart, PJ_INV, coo); /* Go back to angular using local ellps */ } + if (coo.lp.lam==HUGE_VAL) + return coo; /* If input latitude was geocentrical, convert back to geocentrical */ if (P->geoc) diff --git a/src/pj_inv.c b/src/pj_inv.c index 5e44eb34..7b47f5d7 100644 --- a/src/pj_inv.c +++ b/src/pj_inv.c @@ -80,11 +80,13 @@ static PJ_COORD pj_inv_prepare (PJ *P, PJ_COORD coo) { coo = proj_trans (P->hgridshift, PJ_FWD, coo); else if (P->helmert) { coo = proj_trans (P->cart, PJ_FWD, coo); /* Go cartesian in local frame */ - coo = proj_trans (P->helmert, PJ_INV, coo); /* Step into WGS84 */ + coo = proj_trans (P->helmert, PJ_FWD, coo); /* Step into WGS84 */ coo = proj_trans (P->cart_wgs84, PJ_INV, coo); /* Go back to angular using WGS84 ellps */ } + if (coo.lp.lam==HUGE_VAL) + return coo; if (P->vgridshift) - coo = proj_trans (P->vgridshift, PJ_INV, coo); + coo = proj_trans (P->vgridshift, PJ_FWD, coo); return coo; } @@ -99,9 +101,8 @@ static PJ_COORD pj_inv_prepare (PJ *P, PJ_COORD coo) { coo.xyz.y = P->to_meter * coo.xyz.y - P->y0; coo.xyz.z = P->to_meter * coo.xyz.z - P->z0; - if (P->is_geocent) { + if (P->is_geocent) coo = proj_trans (P->cart, PJ_INV, coo); - } return coo; @@ -148,14 +149,18 @@ static PJ_COORD pj_inv_finalize (PJ *P, PJ_COORD coo) { coo.lpz.lam = adjlon(coo.lpz.lam); if (P->vgridshift) - coo = proj_trans (P->vgridshift, PJ_INV, coo); + coo = proj_trans (P->vgridshift, PJ_FWD, coo); + if (coo.lp.lam==HUGE_VAL) + return coo; if (P->hgridshift) coo = proj_trans (P->hgridshift, PJ_FWD, coo); else if (P->helmert) { coo = proj_trans (P->cart, PJ_FWD, coo); /* Go cartesian in local frame */ - coo = proj_trans (P->helmert, PJ_INV, coo); /* Step into WGS84 */ + coo = proj_trans (P->helmert, PJ_FWD, coo); /* Step into WGS84 */ coo = proj_trans (P->cart_wgs84, PJ_INV, coo); /* Go back to angular using WGS84 ellps */ } + if (coo.lp.lam==HUGE_VAL) + return coo; } /* If input latitude was geocentrical, convert back to geocentrical */ diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index 42e3cbf9..8f6305a4 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -473,12 +473,13 @@ invocators can emulate the behaviour of pj_transform and the cs2cs app. def = malloc (100+n); if (0==def) return 0; - sprintf (def, "break_cs2cs_recursion proj=helmert %s", s); + sprintf (def, "break_cs2cs_recursion proj=helmert %s transpose", s); Q = proj_create (P->ctx, def); + pj_inherit_ellipsoid_def (P, Q); free (def); if (0==Q) return 0; - P->helmert = skip_prep_fin(Q); + P->helmert = skip_prep_fin (Q); break; } @@ -491,14 +492,14 @@ invocators can emulate the behaviour of pj_transform and the cs2cs app. Q = proj_create (P->ctx, def); if (0==Q) return 0; - pj_inherit_ellipsoid_def(P, Q); - P->cart = skip_prep_fin(Q); + pj_inherit_ellipsoid_def (P, Q); + P->cart = skip_prep_fin (Q); sprintf (def, "break_cs2cs_recursion proj=cart ellps=WGS84"); Q = proj_create (P->ctx, def); if (0==Q) return 0; - P->cart_wgs84 = skip_prep_fin(Q); + P->cart_wgs84 = skip_prep_fin (Q); } return 1; -- cgit v1.2.3 From 8a407d59d4aa657415a4cfd3069206f5839e6470 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sat, 10 Feb 2018 13:16:40 +0100 Subject: update gie tests to agree with improved gie distance handling --- test/gie/4D-API_cs2cs-style.gie | 76 ++++---- test/gie/DHDN_ETRS89.gie | 373 ++++++++++++++++++++++++++++++++++++++++ test/gie/GDA.gie | 1 + test/gie/builtins.gie | 352 ++++++++++++++++++------------------- test/gie/more_builtins.gie | 18 +- 5 files changed, 598 insertions(+), 222 deletions(-) create mode 100644 test/gie/DHDN_ETRS89.gie diff --git a/test/gie/4D-API_cs2cs-style.gie b/test/gie/4D-API_cs2cs-style.gie index edd83882..b2cae594 100644 --- a/test/gie/4D-API_cs2cs-style.gie +++ b/test/gie/4D-API_cs2cs-style.gie @@ -12,74 +12,62 @@ but provided through a different interface. ------------------------------------------------------------------------------- -Test the handling of the +towgs84 parameter +Test the handling of the +towgs84 parameter. ------------------------------------------------------------------------------- -This example is from Lotti Jivall: "Simplified transformations from -ITRF2008/IGS08 to ETRS89 for maritime applications". The original -XYZ data (cf. more_builtins.gie) have been transformed to LPZ using -this command: echo x_val y_val z_val | cct -It0 proj=cart ellps=GRS80 -- +(additional tests of the towgs84 handling can be found in DHDN_ETRS89.gie) +------------------------------------------------------------------------------- + -NOTE: Here, the ellipsoid has been swapped to WGS84, to align with - the WGS84 ellipsoid used in the cs2cs emulation introduced by - pj_cs2cs_emulation_setup() ------------------------------------------------------------------------------- -operation proj=latlong ellps=WGS84 - towgs84 = 0.676780, 0.654950, -0.528270, - -0.022742, 0.012667, 0.022704, -0.010700 +This example is from Lotti Jivall: "Simplified transformations from +ITRF2008/IGS08 to ETRS89 for maritime applications" (see also more_builtins.gie) ------------------------------------------------------------------------------- -tolerance 0.05 mm -direction forward - -accept 13.4999969828397 54.9999995493206 -0.6034 -expect 13.4999906103972 54.9999957469562 -0.6374 +operation proj=geocent ellps=WGS84 + towgs84 = 0.676780, 0.654950, -0.528270, + -0.022742, 0.012667, 0.022704, + -0.01070 +------------------------------------------------------------------------------- +tolerance 1 um direction inverse -accept 13.4999906103972 54.9999957469562 -0.6374 -expect 13.4999969828397 54.9999995493206 -0.6034 +accept 3565285.00000000 855949.00000000 5201383.00000000 +expect 3565285.41342351 855948.67986759 5201382.72939791 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- This example is a random point, transformed from ED50 to ETRS89 using KMStrans2. - -NOTE: Signs swapped wrt. KMStrans2, which apparently uses frame rotation. ------------------------------------------------------------------------------- operation proj=latlong ellps=intl - towgs84 = 081.07030, 089.36030, 115.75260, - 000.48488, 000.02436, 000.41321, 0.540645 + towgs84 = -081.07030, -089.36030, -115.75260, + 000.48488, 000.02436, 000.41321, -0.540645 ------------------------------------------------------------------------------- -tolerance 0.1 mm -# echo SWAPPED and trimmed - expect succcess -# accept 16.819999997 55.170000002 61.0 +tolerance 25 mm + accept 16.82 55.17 61.0 expect 16.8210462130 55.1705688946 29.0317 ------------------------------------------------------------------------------- -This commented-out version of the example above was used to detect the sign -discrepancy between KMSTrans2 and PROJ. -------------------------------------------------------------------------------- -operation proj=latlong ellps=intl - towgs84 = -081.07030, -089.36030, -115.75260, - -000.48488, -000.02436, -000.41321, -0.540645 -------------------------------------------------------------------------------- -# echo NOT SWAPPED - Expect failure -# accept 16.8210462130 55.1705688946 29.0317 -# expect 16.819999997 55.170000002 61.0 -------------------------------------------------------------------------------- + ------------------------------------------------------------------------------- -operation proj=latlong nadgrids=nzgd2kgrid0005.gsb ellps=GRS80 +# operation proj=latlong nadgrids=nzgd2kgrid0005.gsb ellps=GRS80 ------------------------------------------------------------------------------- -tolerance 1 nm -ignore pjd_err_failed_to_load_grid -accept 173 -45 0 0 -expect 172.999892181021551 -45.001620431954613 0 0 -direction inverse -accept 172.999892181021551 -45.001620431954613 0 0 -expect 173 -45 0 0 +Note: This test appears to use wrong coordinate data, and is commented out. +We need a set of authoritative test cases to test the nzgd2000 grid. + +This functionality is sufficiently tested in DHDN_ETRS89.gie +------------------------------------------------------------------------------- +# tolerance 1 um +# ignore pjd_err_failed_to_load_grid +# accept 173 -45 0 0 +# expect 172.999892181021551 -45.001620431954613 0 0 +# direction inverse +# accept 172.999892181021551 -45.001620431954613 0 0 +# expect 173 -45 0 0 ------------------------------------------------------------------------------- diff --git a/test/gie/DHDN_ETRS89.gie b/test/gie/DHDN_ETRS89.gie new file mode 100644 index 00000000..f536821b --- /dev/null +++ b/test/gie/DHDN_ETRS89.gie @@ -0,0 +1,373 @@ + + +------------------------------------------------------------------------------- +operation proj=latlong datum=potsdam ellps=bessel +------------------------------------------------------------------------------- +DE_DHDN (BeTA, 2007) to ETRS89 using NTv2 grid. epsg:15948 +------------------------------------------------------------------------------- + +tolerance 1 mm +accept 7.482506019176 53.498461143331 # ETRS89_Lat-Lon +expect 7.483333333333 53.500000000000 # DE_DHDN_Lat-Lon + +direction inverse + +accept 7.483333333333 53.500000000000 # DE_DHDN_Lat-Lon +expect 7.482506019176 53.498461143331 # ETRS89_Lat-Lon +accept 10.333333333333 48.833333333333 # DE_DHDN_Lat-Lon +expect 10.332117283303 48.832327188640 # ETRS89_Lat-Lon +accept 8.000000000000 50.083333333333 # DE_DHDN_Lat-Lon +expect 7.999097344043 50.082172046476 # ETRS89_Lat-Lon +accept 10.016666666667 51.033333333333 # DE_DHDN_Lat-Lon +expect 10.015460839103 51.032075951188 # ETRS89_Lat-Lon +accept 10.466666666667 54.333333333333 # DE_DHDN_Lat-Lon +expect 10.465373788153 54.331696254077 # ETRS89_Lat-Lon +accept 10.750000000000 53.583333333333 # DE_DHDN_Lat-Lon +expect 10.748659705929 53.581781243436 # ETRS89_Lat-Lon +accept 10.016666666667 53.500000000000 # DE_DHDN_Lat-Lon +expect 10.015444367463 53.498457503620 # ETRS89_Lat-Lon +accept 11.000000000000 53.466666666667 # DE_DHDN_Lat-Lon +expect 10.998619309575 53.465127257963 # ETRS89_Lat-Lon +accept 13.466666666667 53.766666666667 # DE_DHDN_Lat-Lon +expect 13.464877774631 53.765109112396 # ETRS89_Lat-Lon +accept 10.983333333333 52.766666666667 # DE_DHDN_Lat-Lon +expect 10.981965431979 52.765211787713 # ETRS89_Lat-Lon +accept 13.000000000000 51.783333333333 # DE_DHDN_Lat-Lon +expect 12.998336654827 51.782006921265 # ETRS89_Lat-Lon +accept 10.466666666667 52.500000000000 # DE_DHDN_Lat-Lon +expect 10.465380298337 52.498573633365 # ETRS89_Lat-Lon +accept 10.550000000000 51.466666666667 # DE_DHDN_Lat-Lon +expect 10.548711467380 51.465361979987 # ETRS89_Lat-Lon +accept 10.450000000000 50.583333333333 # DE_DHDN_Lat-Lon +expect 10.448735275612 50.582129474187 # ETRS89_Lat-Lon +accept 10.416666666667 49.666666666667 # DE_DHDN_Lat-Lon +expect 10.415423634267 49.665566047661 # ETRS89_Lat-Lon +accept 10.550000000000 47.750000000000 # DE_DHDN_Lat-Lon +expect 10.548775945187 47.749120260296 # ETRS89_Lat-Lon +accept 13.450000000000 50.666666666667 # DE_DHDN_Lat-Lon +expect 13.448283429558 50.665476385913 # ETRS89_Lat-Lon +accept 13.550000000000 51.333333333333 # DE_DHDN_Lat-Lon +expect 13.548264242652 51.332063317958 # ETRS89_Lat-Lon +accept 13.566666666667 52.050000000000 # DE_DHDN_Lat-Lon +expect 13.564906713066 52.048646469731 # ETRS89_Lat-Lon +accept 13.433333333333 53.166666666667 # DE_DHDN_Lat-Lon +expect 13.431569610583 53.165185284138 # ETRS89_Lat-Lon +accept 13.466666666667 52.483333333333 # DE_DHDN_Lat-Lon +expect 13.464913254978 52.481930297429 # ETRS89_Lat-Lon +accept 13.133333333333 49.066666666667 # DE_DHDN_Lat-Lon +expect 13.131706947050 49.065661709281 # ETRS89_Lat-Lon +accept 8.666666666667 53.116666666667 # DE_DHDN_Lat-Lon +expect 8.665654272188 53.115169791635 # ETRS89_Lat-Lon +accept 12.950000000000 47.650000000000 # DE_DHDN_Lat-Lon +expect 12.948437185277 47.649155713893 # ETRS89_Lat-Lon +accept 8.500000000000 54.716666666667 # DE_DHDN_Lat-Lon +expect 8.499027339833 54.714992333813 # ETRS89_Lat-Lon +accept 7.483333333333 51.983333333333 # DE_DHDN_Lat-Lon +expect 7.482494584516 51.981965147975 # ETRS89_Lat-Lon +accept 7.516666666667 51.016666666667 # DE_DHDN_Lat-Lon +expect 7.515823996992 51.015402184493 # ETRS89_Lat-Lon +accept 7.466666666667 50.500000000000 # DE_DHDN_Lat-Lon +expect 7.465834308888 50.498791390585 # ETRS89_Lat-Lon +accept 7.533333333333 49.333333333333 # DE_DHDN_Lat-Lon +expect 7.532503616986 49.332250779407 # ETRS89_Lat-Lon +accept 7.250000000000 49.333333333333 # DE_DHDN_Lat-Lon +expect 7.249209260581 49.332249456364 # ETRS89_Lat-Lon +accept 7.533333333333 47.666666666667 # DE_DHDN_Lat-Lon +expect 7.532530252396 47.665765608135 # ETRS89_Lat-Lon +------------------------------------------------------------------------------- + + + +------------------------------------------------------------------------------- +operation proj=latlong + towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 ellps=bessel +------------------------------------------------------------------------------- +DE_DHDN to ETRS89 using deprecated 7 parameter Helmert transform. The results +agree at the 3 m level. +------------------------------------------------------------------------------- +tolerance 3 m + +accept 7.482506019176 53.498461143331 # ETRS89_Lat-Lon +expect 7.483333333333 53.500000000000 # DE_DHDN_Lat-Lon + +direction inverse + +accept 7.483333333333 53.500000000000 # DE_DHDN_Lat-Lon +expect 7.482506019176 53.498461143331 # ETRS89_Lat-Lon + +accept 10.333333333333 48.833333333333 # DE_DHDN_Lat-Lon +expect 10.332117283303 48.832327188640 # ETRS89_Lat-Lon +accept 8.000000000000 50.083333333333 # DE_DHDN_Lat-Lon +expect 7.999097344043 50.082172046476 # ETRS89_Lat-Lon +accept 10.016666666667 51.033333333333 # DE_DHDN_Lat-Lon +expect 10.015460839103 51.032075951188 # ETRS89_Lat-Lon +accept 10.466666666667 54.333333333333 # DE_DHDN_Lat-Lon +expect 10.465373788153 54.331696254077 # ETRS89_Lat-Lon +accept 10.750000000000 53.583333333333 # DE_DHDN_Lat-Lon +expect 10.748659705929 53.581781243436 # ETRS89_Lat-Lon +accept 10.016666666667 53.500000000000 # DE_DHDN_Lat-Lon +expect 10.015444367463 53.498457503620 # ETRS89_Lat-Lon +accept 11.000000000000 53.466666666667 # DE_DHDN_Lat-Lon +expect 10.998619309575 53.465127257963 # ETRS89_Lat-Lon +accept 13.466666666667 53.766666666667 # DE_DHDN_Lat-Lon +expect 13.464877774631 53.765109112396 # ETRS89_Lat-Lon +accept 10.983333333333 52.766666666667 # DE_DHDN_Lat-Lon +expect 10.981965431979 52.765211787713 # ETRS89_Lat-Lon +accept 13.000000000000 51.783333333333 # DE_DHDN_Lat-Lon +expect 12.998336654827 51.782006921265 # ETRS89_Lat-Lon +accept 10.466666666667 52.500000000000 # DE_DHDN_Lat-Lon +expect 10.465380298337 52.498573633365 # ETRS89_Lat-Lon +accept 10.550000000000 51.466666666667 # DE_DHDN_Lat-Lon +expect 10.548711467380 51.465361979987 # ETRS89_Lat-Lon +accept 10.450000000000 50.583333333333 # DE_DHDN_Lat-Lon +expect 10.448735275612 50.582129474187 # ETRS89_Lat-Lon +accept 10.416666666667 49.666666666667 # DE_DHDN_Lat-Lon +expect 10.415423634267 49.665566047661 # ETRS89_Lat-Lon +accept 10.550000000000 47.750000000000 # DE_DHDN_Lat-Lon +expect 10.548775945187 47.749120260296 # ETRS89_Lat-Lon +accept 13.450000000000 50.666666666667 # DE_DHDN_Lat-Lon +expect 13.448283429558 50.665476385913 # ETRS89_Lat-Lon +accept 13.550000000000 51.333333333333 # DE_DHDN_Lat-Lon +expect 13.548264242652 51.332063317958 # ETRS89_Lat-Lon +accept 13.566666666667 52.050000000000 # DE_DHDN_Lat-Lon +expect 13.564906713066 52.048646469731 # ETRS89_Lat-Lon +accept 13.433333333333 53.166666666667 # DE_DHDN_Lat-Lon +expect 13.431569610583 53.165185284138 # ETRS89_Lat-Lon +accept 13.466666666667 52.483333333333 # DE_DHDN_Lat-Lon +expect 13.464913254978 52.481930297429 # ETRS89_Lat-Lon +accept 13.133333333333 49.066666666667 # DE_DHDN_Lat-Lon +expect 13.131706947050 49.065661709281 # ETRS89_Lat-Lon +accept 8.666666666667 53.116666666667 # DE_DHDN_Lat-Lon +expect 8.665654272188 53.115169791635 # ETRS89_Lat-Lon +accept 12.950000000000 47.650000000000 # DE_DHDN_Lat-Lon +expect 12.948437185277 47.649155713893 # ETRS89_Lat-Lon +accept 8.500000000000 54.716666666667 # DE_DHDN_Lat-Lon +expect 8.499027339833 54.714992333813 # ETRS89_Lat-Lon +accept 7.483333333333 51.983333333333 # DE_DHDN_Lat-Lon +expect 7.482494584516 51.981965147975 # ETRS89_Lat-Lon +accept 7.516666666667 51.016666666667 # DE_DHDN_Lat-Lon +expect 7.515823996992 51.015402184493 # ETRS89_Lat-Lon +accept 7.466666666667 50.500000000000 # DE_DHDN_Lat-Lon +expect 7.465834308888 50.498791390585 # ETRS89_Lat-Lon +accept 7.533333333333 49.333333333333 # DE_DHDN_Lat-Lon +expect 7.532503616986 49.332250779407 # ETRS89_Lat-Lon +accept 7.250000000000 49.333333333333 # DE_DHDN_Lat-Lon +expect 7.249209260581 49.332249456364 # ETRS89_Lat-Lon +accept 7.533333333333 47.666666666667 # DE_DHDN_Lat-Lon +expect 7.532530252396 47.665765608135 # ETRS89_Lat-Lon +------------------------------------------------------------------------------- + + + + + + + + + + + +------------------------------------------------------------------------------- +The numerical material in this file is based on the contents of the +BKG test data file over at http://crs.bkg.bund.de/crseu/crs/descrtrans/BeTA/BETA2007testdaten.csv + +The conversion was carried out as follows: + +set insertkey=gawk 'BEGIN {FS=","}; {print $3","$0} +set reformat=gawk 'BEGIN {FS=","}; {print "accept " $6 " " $5 " # " $4 "\nexpect " $9 " " $8 " # " $7}' +cat BETA2007testdaten.csv | %insertkey% | sort | %reformat% >DHDN_ETRS89.gie +------------------------------------------------------------------------------- + + +------------------------------------------------------------------------------- +Tests for GK system zones to UTM32/33 not implemented yet +------------------------------------------------------------------------------- +accept 2598417.333192 5930677.980308 # DE_DHDN_3GK2 +expect 399340.601863 5928794.177992 # ETRS89_UTM32 +accept 2643120.946052 5551463.861308 # DE_DHDN_3GK2 +expect 428391.209209 5548246.766868 # ETRS89_UTM32 +accept 2678509.791823 5890320.494547 # DE_DHDN_3GK2 +expect 477621.722498 5885134.566909 # ETRS89_UTM32 +accept 2661073.960381 6067930.993896 # DE_DHDN_3GK2 +expect 467726.896146 6063191.974102 # ETRS89_UTM32 +accept 2601895.024514 5761935.671777 # DE_DHDN_3GK2 +expect 395783.496871 5760119.715259 # ETRS89_UTM32 +accept 2606412.760026 5654454.411797 # DE_DHDN_3GK2 +expect 395892.865206 5652585.895428 # ETRS89_UTM32 +accept 2604044.332230 5596917.811668 # DE_DHDN_3GK2 +expect 391195.030128 5595215.127880 # ETRS89_UTM32 +accept 2611430.565041 5467270.623504 # DE_DHDN_3GK2 +expect 393381.121595 5465427.351346 # ETRS89_UTM32 +accept 2590840.678885 5466891.206854 # DE_DHDN_3GK2 +expect 372799.647928 5465865.755414 # ETRS89_UTM32 +accept 2615145.447136 5281966.148083 # DE_DHDN_3GK2 +expect 389829.267589 5280195.601333 # ETRS89_UTM32 +accept 3399371.190396 5930724.531323 # DE_DHDN_3GK3 +expect 399340.601862 5928794.177992 # ETRS89_UTM32 +accept 3597874.421966 5411397.512092 # DE_DHDN_3GK3 +expect 597759.898637 5409672.239612 # ETRS89_UTM32 +accept 3428437.612810 5550026.645035 # DE_DHDN_3GK3 +expect 428391.209209 5548246.766869 # ETRS89_UTM32 +accept 3571307.006323 5655705.338031 # DE_DHDN_3GK3 +expect 571204.563344 5653882.476948 # ETRS89_UTM32 +accept 3595392.782000 6023387.959898 # DE_DHDN_3GK3 +expect 595286.044398 6021417.376973 # ETRS89_UTM32 +accept 3615881.001454 5940351.727710 # DE_DHDN_3GK3 +expect 615764.364007 5938413.819150 # ETRS89_UTM32 +accept 3615881.001454 5940351.727710 # DE_DHDN_3GK3 +expect 218617.111391 5945399.220269 # ETRS89_UTM33 +accept 3567455.742115 5930134.904864 # DE_DHDN_3GK3 +expect 567358.390548 5928201.976543 # ETRS89_UTM32 +accept 3632798.076882 5927807.051283 # DE_DHDN_3GK3 +expect 632674.379672 5925873.747901 # ETRS89_UTM32 +accept 3632798.076882 5927807.051283 # DE_DHDN_3GK3 +expect 234423.486615 5931470.592457 # ETRS89_UTM33 +accept 3633848.721200 5849896.198513 # DE_DHDN_3GK3 +expect 633723.734075 5847994.536970 # ETRS89_UTM32 +accept 3633848.721200 5849896.198513 # DE_DHDN_3GK3 +expect 228947.171966 5853725.067987 # ETRS89_UTM33 +accept 3599586.686397 5819391.659845 # DE_DHDN_3GK3 +expect 599474.934168 5817502.626999 # ETRS89_UTM32 +accept 3607695.214682 5704557.217497 # DE_DHDN_3GK3 +expect 607578.857121 5702714.405562 # ETRS89_UTM32 +accept 3607695.214682 5704557.217497 # DE_DHDN_3GK3 +expect 190859.292094 5710978.842070 # ETRS89_UTM33 +accept 3602680.921862 5606162.921133 # DE_DHDN_3GK3 +expect 602565.455313 5604359.618990 # ETRS89_UTM32 +accept 3602680.921862 5606162.921133 # DE_DHDN_3GK3 +expect 177845.139712 5613251.897383 # ETRS89_UTM33 +accept 3602255.364740 5504172.212483 # DE_DHDN_3GK3 +expect 602139.527314 5502409.680191 # ETRS89_UTM32 +accept 3602255.364740 5504172.212483 # DE_DHDN_3GK3 +expect 169220.450101 5511545.700292 # ETRS89_UTM33 +accept 3616211.566778 5291255.078896 # DE_DHDN_3GK3 +expect 616089.408439 5289578.131826 # ETRS89_UTM32 +accept 3616211.566778 5291255.078896 # DE_DHDN_3GK3 +expect 166384.067958 5298018.237122 # ETRS89_UTM33 +accept 3477684.063162 5887048.676718 # DE_DHDN_3GK3 +expect 477621.722499 5885134.566914 # ETRS89_UTM32 +accept 3467781.947036 6065176.417740 # DE_DHDN_3GK3 +expect 467726.896147 6063191.974105 # ETRS89_UTM32 +accept 3395815.326925 5761982.907482 # DE_DHDN_3GK3 +expect 395783.496872 5760119.715259 # ETRS89_UTM32 +accept 3395925.872234 5654406.808724 # DE_DHDN_3GK3 +expect 395892.865206 5652585.895428 # ETRS89_UTM32 +accept 3391226.589718 5597013.366086 # DE_DHDN_3GK3 +expect 391195.030128 5595215.127881 # ETRS89_UTM32 +accept 3393414.080125 5467174.397245 # DE_DHDN_3GK3 +expect 393381.121595 5465427.351346 # ETRS89_UTM32 +accept 3372824.499428 5467612.907301 # DE_DHDN_3GK3 +expect 372799.647928 5465865.755413 # ETRS89_UTM32 +accept 3389860.774004 5281869.239226 # DE_DHDN_3GK3 +expect 389829.267590 5280195.601333 # ETRS89_UTM32 +accept 4377657.794741 5411879.839992 # DE_DHDN_3GK4 +expect 597759.898636 5409672.239612 # ETRS89_UTM32 +accept 4360897.154310 5657085.679344 # DE_DHDN_3GK4 +expect 571204.563343 5653882.476947 # ETRS89_UTM32 +accept 4400271.505998 6023480.198072 # DE_DHDN_3GK4 +expect 595286.044399 6021417.376972 # ETRS89_UTM32 +accept 4417225.999425 5939654.081375 # DE_DHDN_3GK4 +expect 615764.364007 5938413.819151 # ETRS89_UTM32 +accept 4417225.999425 5939654.081375 # DE_DHDN_3GK4 +expect 218617.111391 5945399.220269 # ETRS89_UTM33 +accept 4368411.664264 5931484.902370 # DE_DHDN_3GK4 +expect 567358.390548 5928201.976543 # ETRS89_UTM32 +accept 4433598.021986 5926410.006980 # DE_DHDN_3GK4 +expect 632674.379671 5925873.747901 # ETRS89_UTM32 +accept 4433598.021986 5926410.006980 # DE_DHDN_3GK4 +expect 234423.486614 5931470.592457 # ETRS89_UTM33 +accept 4596699.814954 5960328.296681 # DE_DHDN_3GK4 +expect 794226.051532 5966642.993890 # ETRS89_UTM32 +accept 4596699.814954 5960328.296681 # DE_DHDN_3GK4 +expect 398811.452821 5958481.617326 # ETRS89_UTM33 +accept 4431385.771953 5848536.122437 # DE_DHDN_3GK4 +expect 633723.734074 5847994.536971 # ETRS89_UTM32 +accept 4431385.771953 5848536.122437 # DE_DHDN_3GK4 +expect 228947.171966 5853725.067987 # ETRS89_UTM33 +accept 4568999.833703 5739119.060681 # DE_DHDN_3GK4 +expect 775766.817929 5744357.999264 # ETRS89_UTM32 +accept 4568999.833703 5739119.060681 # DE_DHDN_3GK4 +expect 361924.813552 5738688.111797 # ETRS89_UTM33 +accept 4395886.918912 5819485.694352 # DE_DHDN_3GK4 +expect 599474.934169 5817502.626999 # ETRS89_UTM32 +accept 4399252.521454 5704414.901133 # DE_DHDN_3GK4 +expect 607578.857121 5702714.405563 # ETRS89_UTM32 +accept 4399252.521454 5704414.901133 # DE_DHDN_3GK4 +expect 190859.292094 5710978.842070 # ETRS89_UTM33 +accept 4390237.957560 5606306.171667 # DE_DHDN_3GK4 +expect 602565.455313 5604359.618990 # ETRS89_UTM32 +accept 4390237.957560 5606306.171667 # DE_DHDN_3GK4 +expect 177845.139712 5613251.897384 # ETRS89_UTM33 +accept 4385715.060070 5504412.338975 # DE_DHDN_3GK4 +expect 602139.527314 5502409.680191 # ETRS89_UTM32 +accept 4385715.060070 5504412.338975 # DE_DHDN_3GK4 +expect 169220.450101 5511545.700292 # ETRS89_UTM33 +accept 4391285.796869 5291109.755123 # DE_DHDN_3GK4 +expect 616089.408439 5289578.131827 # ETRS89_UTM32 +accept 4391285.796869 5291109.755123 # DE_DHDN_3GK4 +expect 166384.067958 5298018.237122 # ETRS89_UTM33 +accept 4602499.566145 5615431.379860 # DE_DHDN_3GK4 +expect 814311.364242 5622071.326313 # ETRS89_UTM32 +accept 4602499.566145 5615431.379860 # DE_DHDN_3GK4 +expect 390338.211462 5613774.353256 # ETRS89_UTM33 +accept 4608008.855658 5689725.987089 # DE_DHDN_3GK4 +expect 816793.461724 5696579.298817 # ETRS89_UTM32 +accept 4608008.855658 5689725.987089 # DE_DHDN_3GK4 +expect 398863.493307 5687753.129020 # ETRS89_UTM33 +accept 4607459.254388 5769472.054323 # DE_DHDN_3GK4 +expect 812962.846098 5776288.882564 # ETRS89_UTM32 +accept 4607459.254388 5769472.054323 # DE_DHDN_3GK4 +expect 401589.388273 5767420.751372 # ETRS89_UTM33 +accept 4595844.509596 5893520.178529 # DE_DHDN_3GK4 +expect 796184.889876 5899821.806119 # ETRS89_UTM32 +accept 4595844.509596 5893520.178529 # DE_DHDN_3GK4 +expect 395147.893839 5891795.036022 # ETRS89_UTM33 +accept 4599624.347102 5817537.418158 # DE_DHDN_3GK4 +expect 803137.012417 5824018.671556 # ETRS89_UTM32 +accept 4599624.347102 5817537.418158 # DE_DHDN_3GK4 +expect 395754.092849 5815749.835902 # ETRS89_UTM33 +accept 4582806.457775 5437104.667215 # DE_DHDN_3GK4 +expect 801769.133341 5442981.626260 # ETRS89_UTM32 +accept 4582806.457775 5437104.667215 # DE_DHDN_3GK4 +expect 363531.446507 5436436.282581 # ETRS89_UTM33 +accept 4571363.304563 5279411.440581 # DE_DHDN_3GK4 +expect 796505.582915 5284862.664428 # ETRS89_UTM32 +accept 4571363.304563 5279411.440581 # DE_DHDN_3GK4 +expect 345930.907036 5279345.459526 # ETRS89_UTM33 +accept 5398905.047545 5960421.130827 # DE_DHDN_3GK5 +expect 794226.051532 5966642.993889 # ETRS89_UTM32 +accept 5398905.047545 5960421.130827 # DE_DHDN_3GK5 +expect 398811.452821 5958481.617326 # ETRS89_UTM33 +accept 5362005.247500 5740538.568445 # DE_DHDN_3GK5 +expect 775766.817929 5744357.999262 # ETRS89_UTM32 +accept 5362005.247500 5740538.568445 # DE_DHDN_3GK5 +expect 361924.813551 5738688.111796 # ETRS89_UTM33 +accept 5390431.824773 5615574.548074 # DE_DHDN_3GK5 +expect 814311.364241 5622071.326313 # ETRS89_UTM32 +accept 5390431.824773 5615574.548074 # DE_DHDN_3GK5 +expect 390338.211462 5613774.353256 # ETRS89_UTM33 +accept 5398959.121385 5689583.521018 # DE_DHDN_3GK5 +expect 816793.461724 5696579.298817 # ETRS89_UTM32 +accept 5398959.121385 5689583.521018 # DE_DHDN_3GK5 +expect 398863.493307 5687753.129020 # ETRS89_UTM33 +accept 5401685.729154 5769283.220752 # DE_DHDN_3GK5 +expect 812962.846098 5776288.882564 # ETRS89_UTM32 +accept 5401685.729154 5769283.220752 # DE_DHDN_3GK5 +expect 401589.388272 5767420.751372 # ETRS89_UTM33 +accept 5395240.318989 5893707.029636 # DE_DHDN_3GK5 +expect 796184.889876 5899821.806119 # ETRS89_UTM32 +accept 5395240.318989 5893707.029636 # DE_DHDN_3GK5 +expect 395147.893840 5891795.036022 # ETRS89_UTM33 +accept 5395847.545864 5817631.467237 # DE_DHDN_3GK5 +expect 803137.012417 5824018.671556 # ETRS89_UTM32 +accept 5395847.545864 5817631.467237 # DE_DHDN_3GK5 +expect 395754.092849 5815749.835902 # ETRS89_UTM33 +accept 5363615.032963 5438164.610427 # DE_DHDN_3GK5 +expect 801769.133341 5442981.626260 # ETRS89_UTM32 +accept 5363615.032963 5438164.610427 # DE_DHDN_3GK5 +expect 363531.446506 5436436.282581 # ETRS89_UTM33 +accept 5346007.854521 5281010.564511 # DE_DHDN_3GK5 +expect 796505.582915 5284862.664427 # ETRS89_UTM32 +accept 5346007.854521 5281010.564511 # DE_DHDN_3GK5 +expect 345930.907036 5279345.459525 # ETRS89_UTM33 +------------------------------------------------------------------------------- diff --git a/test/gie/GDA.gie b/test/gie/GDA.gie index b77ca934..e20cc88c 100644 --- a/test/gie/GDA.gie +++ b/test/gie/GDA.gie @@ -50,6 +50,7 @@ operation proj = pipeline ellps=GRS80; z = -0.04019; rz = -0.0328979; s = -0.009994; step proj = cart inv; ----------------------------------------------------------------------------------- +tolerance 1.1 mm accept 133.88551329 -23.67012389 603.3466 0 # Alice Springs GDA94 expect 133.8855216 -23.67011014 603.2489 0 # Alice Springs GDA2020 ------------------------------------------------------------------------------- diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index 66a228db..707b2afa 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -20,7 +20,7 @@ Albers Equal Area ------------------------------------------------------------------------------- operation +proj=aea +ellps=GRS80 +lat_1=0 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222571.608757106 110653.326743030 accept 2 -1 @@ -43,7 +43,7 @@ expect -0.001796630 -0.000904370 ------------------------------------------------------------------------------- operation +proj=aea +R=6400000 +lat_1=0 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223334.085170885 111780.431884472 accept 2 -1 @@ -73,7 +73,7 @@ Azimuthal Equidistant ------------------------------------------------------------------------------- operation +proj=aeqd +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222616.522190052 110596.996549550 accept 2 -1 @@ -96,7 +96,7 @@ expect -0.001796631 -0.000904369 ------------------------------------------------------------------------------- operation +proj=aeqd +R=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223379.456047271 111723.757570854 accept 2 -1 @@ -126,7 +126,7 @@ Airy ------------------------------------------------------------------------------- operation +proj=airy +a=6400000 +lat_1=0 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 189109.886908621 94583.752387504 accept 2 -1 @@ -145,7 +145,7 @@ Aitoff ------------------------------------------------------------------------------- operation +proj=aitoff +R=6400000 +lat_1=0 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223379.458811696 111706.742883853 accept 2 -1 @@ -174,7 +174,7 @@ Mod. Stereographic of Alaska ------------------------------------------------------------------------------- operation +proj=alsk +ellps=clrk66 ------------------------------------------------------------------------------- -tolerance 0.00001 mm +tolerance 0.1 mm accept -160.000000000 55.000000000 expect -513253.146950842 -968928.031867943 accept -160.000000000 70.000000000 @@ -197,7 +197,7 @@ expect -144.758985461 60.202929201 ------------------------------------------------------------------------------- operation +proj=alsk +R=6370997 ------------------------------------------------------------------------------- -tolerance 0.0001 mm +tolerance 0.1 mm accept -160.000000000 55.000000000 expect -511510.319410844 -967150.991676078 accept -160.000000000 70.000000000 @@ -226,7 +226,7 @@ Apian Globular I ------------------------------------------------------------------------------- operation +proj=apian +a=6400000 +lat_1=0 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223374.577355253 111701.072127637 accept 2 -1 @@ -245,7 +245,7 @@ August Epicycloidal ------------------------------------------------------------------------------- operation +proj=august +a=6400000 +lat_1=0 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223404.978180972 111722.340289763 accept 2 -1 @@ -264,7 +264,7 @@ Bacon Globular ------------------------------------------------------------------------------- operation +proj=bacon +a=6400000 +lat_1=0 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223334.132555965 175450.725922666 accept 2 -1 @@ -283,7 +283,7 @@ Bipolar conic of western hemisphere ------------------------------------------------------------------------------- operation +proj=bipc +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 2452160.217725756 -14548450.759654747 accept 2 -1 @@ -306,7 +306,7 @@ expect -73.034496627 17.246832896 ------------------------------------------------------------------------------- operation +proj=bipc +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 2460565.740974965 -14598319.989330800 accept 2 -1 @@ -335,7 +335,7 @@ Boggs Eumorphic ------------------------------------------------------------------------------- operation +proj=boggs +a=6400000 +lat_1=0 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 211949.700808182 117720.998305411 accept 2 -1 @@ -355,7 +355,7 @@ Bonne (Werner lat_1=90) ------------------------------------------------------------------------------- operation +proj=bonne +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222605.296097157 55321.139565495 accept 2 -1 @@ -378,7 +378,7 @@ expect -0.001796698 0.499095631 ------------------------------------------------------------------------------- operation +proj=bonne +R=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223368.115572528 55884.555246394 accept 2 -1 @@ -407,7 +407,7 @@ Cal Coop Ocean Fish Invest Lines/Stations ------------------------------------------------------------------------------- operation +proj=calcofi +ellps=GRS80 +lat_1=0.5 +lat_2=2 +no_defs ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 508.444872150 -1171.764860418 accept 2 -1 @@ -430,7 +430,7 @@ expect -62.486322854 87.980755945 ------------------------------------------------------------------------------- operation +proj=calcofi +R=6400000 +lat_1=0.5 +lat_2=2 +no_defs ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 507.090507488 -1164.727375198 accept 2 -1 @@ -459,7 +459,7 @@ Cassini ------------------------------------------------------------------------------- operation +proj=cass +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222605.285776991 110642.229253999 accept 2 -1 @@ -482,7 +482,7 @@ expect -0.001796631 -0.000904369 ------------------------------------------------------------------------------- operation +proj=cass +R=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223368.105203484 111769.145040586 accept 2 -1 @@ -513,7 +513,7 @@ operation +proj=pipeline +R=6390000 +step +proj=ccon +lat_1=52 +lat_0=52 +lon_0=19 +x_0=330000 +y_0=-350000 +step +proj=axisswap +order=1,-2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 24 55 expect 650031.54109413219363 4106.1617770643609028 accept 15 49 @@ -544,7 +544,7 @@ Central Cylindrical ------------------------------------------------------------------------------- operation +proj=cc +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223402.144255274 111712.415540593 accept 2 -1 @@ -574,7 +574,7 @@ Equal Area Cylindrical ------------------------------------------------------------------------------- operation +proj=cea +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222638.981586547 110568.812396267 accept 2 -1 @@ -597,7 +597,7 @@ expect -0.001796631 -0.000904369 ------------------------------------------------------------------------------- operation +proj=cea +R=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223402.144255274 111695.401198614 accept 2 -1 @@ -627,7 +627,7 @@ Chamberlin Trimetric ------------------------------------------------------------------------------- operation +proj=chamb +R=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.5 mm +tolerance 0.1 mm accept 2 1 expect -27864.779586801 -223364.324593274 accept 2 -1 @@ -646,7 +646,7 @@ Collignon ------------------------------------------------------------------------------- operation +proj=collg +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 249872.921577930 99423.174788460 accept 2 -1 @@ -675,7 +675,7 @@ Compact Miller ------------------------------------------------------------------------------- operation +proj=comill +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223402.144255274 110611.859089459 accept 2 -1 @@ -704,7 +704,7 @@ Craster Parabolic (Putnins P4) ------------------------------------------------------------------------------- operation +proj=crast +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 218280.142056781 114306.045604280 accept 2 -1 @@ -733,7 +733,7 @@ Denoyer Semi-Elliptical ------------------------------------------------------------------------------- operation +proj=denoy +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223377.422876954 111701.072127637 accept 2 -1 @@ -752,7 +752,7 @@ Eckert I ------------------------------------------------------------------------------- operation +proj=eck1 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 204680.888202951 102912.178426065 accept 2 -1 @@ -781,7 +781,7 @@ Eckert II ------------------------------------------------------------------------------- operation +proj=eck2 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 204472.870907960 121633.734975242 accept 2 -1 @@ -810,7 +810,7 @@ Eckert III ------------------------------------------------------------------------------- operation +proj=eck3 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 188652.015721538 94328.919337031 accept 2 -1 @@ -839,7 +839,7 @@ Eckert IV ------------------------------------------------------------------------------- operation +proj=eck4 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 188646.389356416 132268.540174065 accept 2 -1 @@ -868,7 +868,7 @@ Eckert V ------------------------------------------------------------------------------- operation +proj=eck5 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 197031.392134061 98523.198847227 accept 2 -1 @@ -897,7 +897,7 @@ Eckert VI ------------------------------------------------------------------------------- operation +proj=eck6 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 197021.605628992 126640.420733174 accept 2 -1 @@ -927,7 +927,7 @@ Equidistant Cylindrical (Plate Caree) ------------------------------------------------------------------------------- operation +proj=eqc +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223402.144255274 111701.072127637 accept 2 -1 @@ -957,7 +957,7 @@ Equidistant Conic ------------------------------------------------------------------------------- operation +proj=eqdc +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222588.440269286 110659.134907347 accept 2 -1 @@ -980,7 +980,7 @@ expect -0.001796358 -0.000904370 ------------------------------------------------------------------------------- operation +proj=eqdc +R=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223351.088175114 111786.108747174 accept 2 -1 @@ -1010,7 +1010,7 @@ Euler ------------------------------------------------------------------------------- operation +proj=euler +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222597.634659108 111404.240549919 accept 2 -1 @@ -1033,7 +1033,7 @@ expect -0.001796279 -0.000898316 ------------------------------------------------------------------------------- operation +proj=euler +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223360.655598694 111786.112389791 accept 2 -1 @@ -1064,7 +1064,7 @@ lat_0=(0) ------------------------------------------------------------------------------- operation +proj=etmerc +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 +zone=30 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222650.796797586 110642.229411933 accept 2 -1 @@ -1093,7 +1093,7 @@ Fahey ------------------------------------------------------------------------------- operation +proj=fahey +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 182993.344649124 101603.193569884 accept 2 -1 @@ -1122,7 +1122,7 @@ Foucaut ------------------------------------------------------------------------------- operation +proj=fouc +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222588.120675892 111322.316700694 accept 2 -1 @@ -1145,7 +1145,7 @@ expect -0.001796631 -0.000898315 ------------------------------------------------------------------------------- operation +proj=fouc +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223351.109003414 111703.907721713 accept 2 -1 @@ -1174,7 +1174,7 @@ Foucaut Sinusoidal ------------------------------------------------------------------------------- operation +proj=fouc_s +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223402.144255274 111695.401198614 accept 2 -1 @@ -1203,7 +1203,7 @@ Gall (Gall Stereographic) ------------------------------------------------------------------------------- operation +proj=gall +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 157969.171134520 95345.249178386 accept 2 -1 @@ -1232,7 +1232,7 @@ Geocentric ------------------------------------------------------------------------------- operation +proj=geocent +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 0 expect 6373287.27950247 222560.09599219 110568.77482092 accept 2 -1 0 @@ -1255,7 +1255,7 @@ expect -0.001796631 -0.000898315 ------------------------------------------------------------------------------- operation +proj=geocent +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm =============================================================================== @@ -1267,7 +1267,7 @@ Geostationary Satellite View ------------------------------------------------------------------------------- operation +proj=geos +ellps=GRS80 +lat_1=0.5 +lat_2=2 +h=35785831 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222527.070365800 110551.303413329 accept 2 -1 @@ -1290,7 +1290,7 @@ expect -0.001796631 -0.000904369 ------------------------------------------------------------------------------- operation +proj=geos +R=6400000 +lat_1=0.5 +lat_2=2 +h=35785831 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223289.457635795 111677.657456537 accept 2 -1 @@ -1319,7 +1319,7 @@ Ginsburg VIII (TsNIIGAiK) ------------------------------------------------------------------------------- operation +proj=gins8 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 194350.250939590 111703.907635335 accept 2 -1 @@ -1339,7 +1339,7 @@ General Sinusoidal Series ------------------------------------------------------------------------------- operation +proj=gn_sinu +a=6400000 +lat_1=0.5 +lat_2=2 +m=1 +n=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223385.132504696 111698.236447187 accept 2 -1 @@ -1368,7 +1368,7 @@ Gnomonic ------------------------------------------------------------------------------- operation +proj=gnom +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223492.924747185 111780.509206593 accept 2 -1 @@ -1397,7 +1397,7 @@ Goode Homolosine ------------------------------------------------------------------------------- operation +proj=goode +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223368.119026632 111701.072127637 accept 2 -1 @@ -1426,7 +1426,7 @@ Mod. Stereographic of 48 U.S. ------------------------------------------------------------------------------- operation +proj=gs48 +R=6370997 ------------------------------------------------------------------------------- -tolerance 0.0001 mm +tolerance 0.1 mm accept -119.000000000 40.000000000 expect -1923908.446529346 355874.658944479 accept -70.000000000 64.000000000 @@ -1455,7 +1455,7 @@ Mod. Stereographic of 50 U.S. ------------------------------------------------------------------------------- operation +proj=gs50 +ellps=clrk66 ------------------------------------------------------------------------------- -tolerance 0.0001 mm +tolerance 0.1 mm accept -160.000000000 65.000000000 expect -1874628.537740233 2660907.942291015 accept -130.000000000 45.000000000 @@ -1478,7 +1478,7 @@ expect -75.550660091 34.191114076 ------------------------------------------------------------------------------- operation +proj=gs50 +R=6370997 ------------------------------------------------------------------------------- -tolerance 0.0001 mm +tolerance 0.1 mm accept -160.000000000 65.000000000 expect -1867268.253460009 2656506.230401823 accept -130.000000000 45.000000000 @@ -1508,7 +1508,7 @@ Hammer & Eckert-Greifendorff ------------------------------------------------------------------------------- operation +proj=hammer +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223373.788703241 111703.907397767 accept 2 -1 @@ -1537,7 +1537,7 @@ Hatano Asymmetrical Equal Area ------------------------------------------------------------------------------- operation +proj=hatano +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 189878.878946528 131409.802440626 accept 2 -1 @@ -1566,7 +1566,7 @@ HEALPix ------------------------------------------------------------------------------- operation +proj=healpix +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222390.103949239 130406.588664482 accept 2 -1 @@ -1589,7 +1589,7 @@ expect -0.001798641 -0.000766795 ------------------------------------------------------------------------------- operation +proj=healpix +R=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223402.144255274 131588.044441999 accept 2 -1 @@ -1619,7 +1619,7 @@ rHEALPix ------------------------------------------------------------------------------- operation +proj=rhealpix +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222390.103949239 130406.588664482 accept 2 -1 @@ -1642,7 +1642,7 @@ expect -0.001798641 -0.000766795 ------------------------------------------------------------------------------- operation +proj=rhealpix +R=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223402.144255274 131588.044441999 accept 2 -1 @@ -1671,7 +1671,7 @@ Interrupted Goode Homolosine ------------------------------------------------------------------------------- operation +proj=igh +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223878.497456271 111701.072127637 accept 2 -1 @@ -1701,7 +1701,7 @@ International Map of the World Polyconic ------------------------------------------------------------------------------- operation +proj=imw_p +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222588.441139376 55321.128653810 accept 2 -1 @@ -1730,7 +1730,7 @@ Icosahedral Snyder Equal Area ------------------------------------------------------------------------------- operation +proj=isea +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect -1097074.948022474 3442909.309037183 accept 2 -1 @@ -1749,7 +1749,7 @@ Kavraisky V ------------------------------------------------------------------------------- operation +proj=kav5 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 200360.905308829 123685.082476998 accept 2 -1 @@ -1772,7 +1772,7 @@ expect -0.001996259 -0.000808483 ------------------------------------------------------------------------------- operation +proj=kav5 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 201047.703110878 124109.050629171 accept 2 -1 @@ -1801,7 +1801,7 @@ Kavraisky VII ------------------------------------------------------------------------------- operation +proj=kav7 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 193462.974943729 111701.072127637 accept 2 -1 @@ -1830,7 +1830,7 @@ Krovak ------------------------------------------------------------------------------- operation +proj=krovak +ellps=GRS80 +no_defs ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect -3196535.232563641 -6617878.867551444 accept 2 -1 @@ -1860,7 +1860,7 @@ Laborde ------------------------------------------------------------------------------- operation +proj=labrd +ellps=GRS80 +lon_0=0.5 +lat_0=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 166973.166090228 -110536.912730266 accept 2 -1 @@ -1889,7 +1889,7 @@ Lambert Azimuthal Equal Area ------------------------------------------------------------------------------- operation +proj=laea +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222602.471450095 110589.827224410 accept 2 -1 @@ -1912,7 +1912,7 @@ expect -0.001796631 -0.000904369 ------------------------------------------------------------------------------- operation +proj=laea +R=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223365.281370125 111716.668072916 accept 2 -1 @@ -1942,7 +1942,7 @@ Lagrange ------------------------------------------------------------------------------- operation +proj=lagrng +a=6400000 +W=2 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 111703.375917226 27929.831908033 accept 2 -1 @@ -1961,7 +1961,7 @@ Larrivee ------------------------------------------------------------------------------- operation +proj=larr +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223393.637624201 111707.215961256 accept 2 -1 @@ -1980,7 +1980,7 @@ Laskowski ------------------------------------------------------------------------------- operation +proj=lask +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 217928.275907355 112144.329220142 accept 2 -1 @@ -2000,7 +2000,7 @@ Lambert Conformal Conic ------------------------------------------------------------------------------- operation +proj=lcc +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222588.439735968 110660.533870800 accept 2 -1 @@ -2030,7 +2030,7 @@ Lambert Conformal Conic Alternative ------------------------------------------------------------------------------- operation +proj=lcca +ellps=GRS80 +lat_0=1 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222605.285770237 67.806007272 accept 2 -1 @@ -2060,7 +2060,7 @@ Lambert Equal Area Conic ------------------------------------------------------------------------------- operation +proj=leac +ellps=GRS80 +lat_1=0 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 220685.140542979 112983.500889396 accept 2 -1 @@ -2083,7 +2083,7 @@ expect -0.001796616 -0.000904387 ------------------------------------------------------------------------------- operation +proj=leac +R=6400000 +lat_1=0 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 221432.868592852 114119.454526532 accept 2 -1 @@ -2112,7 +2112,7 @@ Lee Oblated Stereographic ------------------------------------------------------------------------------- operation +proj=lee_os +R=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.0010 mm +tolerance 0.1 mm accept 2 1 expect -25564478.952605054 154490848.828625500 accept 2 -1 @@ -2141,7 +2141,7 @@ Loximuthal ------------------------------------------------------------------------------- operation +proj=loxim +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223382.295791339 55850.536063819 accept 2 -1 @@ -2171,7 +2171,7 @@ Space oblique for LANDSAT ------------------------------------------------------------------------------- operation +proj=lsat +ellps=GRS80 +lat_1=0.5 +lat_2=2 +lsat=1 +path=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 18241950.014558550 9998256.839822935 accept 2 -1 @@ -2200,7 +2200,7 @@ McBryde-Thomas Flat-Polar Sine (No. 1) ------------------------------------------------------------------------------- operation +proj=mbt_s +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 204131.517850273 121400.330225508 accept 2 -1 @@ -2223,7 +2223,7 @@ expect -0.001959383 -0.000823699 ------------------------------------------------------------------------------- operation +proj=mbt_s +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 204831.240570992 121816.466696035 accept 2 -1 @@ -2252,7 +2252,7 @@ McBryde-Thomas Flat-Pole Sine (No. 2) ------------------------------------------------------------------------------- operation +proj=mbt_fps +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 198798.176129850 125512.017254531 accept 2 -1 @@ -2281,7 +2281,7 @@ McBride-Thomas Flat-Polar Parabolic ------------------------------------------------------------------------------- operation +proj=mbtfpp +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 206804.786929820 120649.762565793 accept 2 -1 @@ -2310,7 +2310,7 @@ McBryde-Thomas Flat-Polar Quartic ------------------------------------------------------------------------------- operation +proj=mbtfpq +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 209391.854738393 119161.040199055 accept 2 -1 @@ -2339,7 +2339,7 @@ McBryde-Thomas Flat-Polar Sinusoidal ------------------------------------------------------------------------------- operation +proj=mbtfps +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 204740.117478572 121864.729719340 accept 2 -1 @@ -2369,7 +2369,7 @@ Mercator ------------------------------------------------------------------------------- operation +proj=merc +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222638.981586547 110579.965218250 accept 2 -1 @@ -2392,7 +2392,7 @@ expect -0.001796631 -0.000904369 ------------------------------------------------------------------------------- operation +proj=merc +R=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223402.144255274 111706.743574944 accept 2 -1 @@ -2421,7 +2421,7 @@ Miller Oblated Stereographic ------------------------------------------------------------------------------- operation +proj=mil_os +R=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect -1908527.949594205 -1726237.473061448 accept 2 -1 @@ -2450,7 +2450,7 @@ Miller Cylindrical ------------------------------------------------------------------------------- operation +proj=mill +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223402.144255274 111704.701754394 accept 2 -1 @@ -2480,7 +2480,7 @@ Space oblique for MISR ------------------------------------------------------------------------------- operation +proj=misrsom +ellps=GRS80 +lat_1=0.5 +lat_2=2 +path=1 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 18556630.368369825 9533394.675311271 accept 2 -1 @@ -2503,7 +2503,7 @@ expect 127.761567257 -0.001735150 ------------------------------------------------------------------------------- operation +proj=misrsom +R=6400000 +lat_1=0.5 +lat_2=2 +path=1 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 18641249.279170386 9563342.532334166 accept 2 -1 @@ -2532,7 +2532,7 @@ Mollweide ------------------------------------------------------------------------------- operation +proj=moll +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 201113.698641813 124066.283433860 accept 2 -1 @@ -2562,7 +2562,7 @@ Murdoch I ------------------------------------------------------------------------------- operation +proj=murd1 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222600.813473554 111404.244180546 accept 2 -1 @@ -2585,7 +2585,7 @@ expect -0.001796254 -0.000898316 ------------------------------------------------------------------------------- operation +proj=murd1 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223363.845309492 111786.116032863 accept 2 -1 @@ -2615,7 +2615,7 @@ Murdoch II ------------------------------------------------------------------------------- operation +proj=murd2 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222588.099751230 111426.140027412 accept 2 -1 @@ -2638,7 +2638,7 @@ expect -0.001796356 -0.000897888 ------------------------------------------------------------------------------- operation +proj=murd2 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223351.088007027 111808.086934388 accept 2 -1 @@ -2668,7 +2668,7 @@ Murdoch III ------------------------------------------------------------------------------- operation +proj=murd3 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222600.814077577 111404.246601372 accept 2 -1 @@ -2691,7 +2691,7 @@ expect -0.001796254 -0.000898316 ------------------------------------------------------------------------------- operation +proj=murd3 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223363.845915585 111786.118461987 accept 2 -1 @@ -2720,7 +2720,7 @@ Natural Earth ------------------------------------------------------------------------------- operation +proj=natearth +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 194507.265257889 112508.737358295 accept 2 -1 @@ -2749,7 +2749,7 @@ Natural Earth 2 ------------------------------------------------------------------------------- operation +proj=natearth2 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 189255.172934731 113022.495810907 accept 2 -1 @@ -2778,7 +2778,7 @@ Nell ------------------------------------------------------------------------------- operation +proj=nell +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223385.132504696 111698.236447187 accept 2 -1 @@ -2807,7 +2807,7 @@ Nell-Hammer ------------------------------------------------------------------------------- operation +proj=nell_h +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223385.131640953 111698.236533562 accept 2 -1 @@ -2836,7 +2836,7 @@ Nicolosi Globular ------------------------------------------------------------------------------- operation +proj=nicol +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223374.561814140 111732.553988545 accept 2 -1 @@ -2856,7 +2856,7 @@ Near-sided perspective ------------------------------------------------------------------------------- operation +proj=nsper +a=6400000 +h=1000000 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222239.816114100 111153.763991925 accept 2 -1 @@ -2885,7 +2885,7 @@ New Zealand Map Grid ------------------------------------------------------------------------------- operation +proj=nzmg +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.010 mm +tolerance 0.1 mm accept 2 1 expect 3352675144.747425100 -7043205391.100243600 accept 2 -1 @@ -2918,7 +2918,7 @@ General Oblique Transformation ------------------------------------------------------------------------------- operation +proj=ob_tran +R=6400000 +o_proj=latlon +o_lon_p=20 +o_lat_p=20 +lon_0=180 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect -2.685687214 1.237430235 accept 2 -1 @@ -2948,7 +2948,7 @@ Oblique Cylindrical Equal Area ------------------------------------------------------------------------------- operation +proj=ocea +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 19994423.837934088 223322.760576728 accept 2 -1 @@ -2978,7 +2978,7 @@ Oblated Equal Area ------------------------------------------------------------------------------- operation +proj=oea +a=6400000 +lat_1=0.5 +lat_2=2 +n=1 +m=2 +theta=3 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 228926.872097864 99870.488430076 accept 2 -1 @@ -3009,7 +3009,7 @@ Oblique Mercator ------------------------------------------------------------------------------- operation +proj=omerc +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222650.796885261 110642.229314984 accept 2 -1 @@ -3038,7 +3038,7 @@ Ortelius Oval ------------------------------------------------------------------------------- operation +proj=ortel +a=6400000 +lat_1=0 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223374.577355253 111701.072127637 accept 2 -1 @@ -3057,7 +3057,7 @@ Orthographic ------------------------------------------------------------------------------- operation +proj=ortho +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223322.760576727 111695.401198614 accept 2 -1 @@ -3087,7 +3087,7 @@ Perspective Conic ------------------------------------------------------------------------------- operation +proj=pconic +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222588.098841617 111416.604770067 accept 2 -1 @@ -3110,7 +3110,7 @@ expect -0.001796356 -0.000897965 ------------------------------------------------------------------------------- operation +proj=pconic +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223351.087094295 111798.518992055 accept 2 -1 @@ -3139,7 +3139,7 @@ Patterson Cylindrical ------------------------------------------------------------------------------- operation +proj=patterson +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223402.144255274 113354.250397780 accept 2 -1 @@ -3168,7 +3168,7 @@ Polyconic (American) ------------------------------------------------------------------------------- operation +proj=poly +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222605.285770237 110642.194561440 accept 2 -1 @@ -3191,7 +3191,7 @@ expect -0.001796631 -0.000904369 ------------------------------------------------------------------------------- operation +proj=poly +R=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223368.105210219 111769.110491225 accept 2 -1 @@ -3220,7 +3220,7 @@ Putnins P1 ------------------------------------------------------------------------------- operation +proj=putp1 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 211642.762754160 105831.180787330 accept 2 -1 @@ -3249,7 +3249,7 @@ Putnins P2 ------------------------------------------------------------------------------- operation +proj=putp2 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 211638.039634339 117895.033043380 accept 2 -1 @@ -3278,7 +3278,7 @@ Putnins P3 ------------------------------------------------------------------------------- operation +proj=putp3 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 178227.115507794 89124.560786088 accept 2 -1 @@ -3307,7 +3307,7 @@ Putnins P3' ------------------------------------------------------------------------------- operation +proj=putp3p +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 178238.118539985 89124.560786088 accept 2 -1 @@ -3336,7 +3336,7 @@ Putnins P4' ------------------------------------------------------------------------------- operation +proj=putp4p +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 195241.477349386 127796.782307926 accept 2 -1 @@ -3365,7 +3365,7 @@ Putnins P5 ------------------------------------------------------------------------------- operation +proj=putp5 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 226367.213380562 113204.568558475 accept 2 -1 @@ -3394,7 +3394,7 @@ Putnins P5' ------------------------------------------------------------------------------- operation +proj=putp5p +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 226388.175248756 113204.568558475 accept 2 -1 @@ -3423,7 +3423,7 @@ Putnins P6 ------------------------------------------------------------------------------- operation +proj=putp6 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 226369.395133403 110218.523796521 accept 2 -1 @@ -3452,7 +3452,7 @@ Putnins P6' ------------------------------------------------------------------------------- operation +proj=putp6p +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 198034.195132195 125989.475461323 accept 2 -1 @@ -3481,7 +3481,7 @@ Quartic Authalic ------------------------------------------------------------------------------- operation +proj=qua_aut +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222613.549033097 111318.077887984 accept 2 -1 @@ -3504,7 +3504,7 @@ expect -0.001796631 -0.000898315 ------------------------------------------------------------------------------- operation +proj=qua_aut +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223376.624524029 111699.654379186 accept 2 -1 @@ -3533,7 +3533,7 @@ Quadrilateralized Spherical Cube ------------------------------------------------------------------------------- operation +proj=qsc +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 304638.450843852 164123.870923794 accept 2 -1 @@ -3556,7 +3556,7 @@ expect -0.001321341 -0.000610653 ------------------------------------------------------------------------------- operation +proj=qsc +R=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 305863.792402891 165827.722754715 accept 2 -1 @@ -3585,7 +3585,7 @@ Robinson ------------------------------------------------------------------------------- operation +proj=robin +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 189588.423282508 107318.530350703 accept 2 -1 @@ -3614,7 +3614,7 @@ Roussilhe Stereographic ------------------------------------------------------------------------------- operation +proj=rouss +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222644.894131617 110611.091868370 accept 2 -1 @@ -3644,7 +3644,7 @@ Rectangular Polyconic ------------------------------------------------------------------------------- operation +proj=rpoly +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223368.098302014 111769.110486991 accept 2 -1 @@ -3663,7 +3663,7 @@ Sinusoidal (Sanson-Flamsteed) ------------------------------------------------------------------------------- operation +proj=sinu +ellps=GRS80 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222605.299539466 110574.388554153 accept 2 -1 @@ -3686,7 +3686,7 @@ expect -0.001796631 -0.000904369 ------------------------------------------------------------------------------- operation +proj=sinu +R=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223368.119026632 111701.072127637 accept 2 -1 @@ -3716,7 +3716,7 @@ Swiss. Obl. Mercator ------------------------------------------------------------------------------- operation +proj=somerc +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222638.981586547 110579.965218249 accept 2 -1 @@ -3739,7 +3739,7 @@ expect -0.001796631 -0.000904369 ------------------------------------------------------------------------------- operation +proj=somerc +R=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223402.144255274 111706.743574944 accept 2 -1 @@ -3769,7 +3769,7 @@ Stereographic ------------------------------------------------------------------------------- operation +proj=stere +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222644.854550117 110610.883474174 accept 2 -1 @@ -3792,7 +3792,7 @@ expect -0.001796631 -0.000904369 ------------------------------------------------------------------------------- operation +proj=stere +R=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223407.810259507 111737.938996443 accept 2 -1 @@ -3821,7 +3821,7 @@ Oblique Stereographic Alternative ------------------------------------------------------------------------------- operation +proj=sterea +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222644.894109198 110611.091871737 accept 2 -1 @@ -3844,7 +3844,7 @@ expect -0.001796631 -0.000904369 ------------------------------------------------------------------------------- operation +proj=sterea +R=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223407.810259507 111737.938996443 accept 2 -1 @@ -3874,7 +3874,7 @@ Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion) ------------------------------------------------------------------------------- operation +proj=gstmerc +R=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223413.466406322 111769.145040586 accept 2 -1 @@ -3903,7 +3903,7 @@ Transverse Central Cylindrical ------------------------------------------------------------------------------- operation +proj=tcc +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223458.844192458 111769.145040586 accept 2 -1 @@ -3922,7 +3922,7 @@ Transverse Cylindrical Equal Area ------------------------------------------------------------------------------- operation +proj=tcea +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223322.760576727 111769.145040586 accept 2 -1 @@ -3951,7 +3951,7 @@ Times ------------------------------------------------------------------------------- operation +proj=times +ellps=sphere ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 0.000000000 0.000000000 expect 0.000000000 0.000000000 accept 80.000000000 70.000000000 @@ -3985,7 +3985,7 @@ Tissot ------------------------------------------------------------------------------- operation +proj=tissot +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222641.078699631 54347.828487281 accept 2 -1 @@ -4008,7 +4008,7 @@ expect -0.001796279 0.511648325 ------------------------------------------------------------------------------- operation +proj=tissot +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223404.248556849 54534.122161158 accept 2 -1 @@ -4037,7 +4037,7 @@ Transverse Mercator ------------------------------------------------------------------------------- operation +proj=tmerc +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222650.796795778 110642.229411927 accept 2 -1 @@ -4060,7 +4060,7 @@ expect -0.001796631 -0.000904369 ------------------------------------------------------------------------------- operation +proj=tmerc +R=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223413.466406322 111769.145040597 accept 2 -1 @@ -4090,7 +4090,7 @@ Two Point Equidistant ------------------------------------------------------------------------------- operation +proj=tpeqd +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect -27750.758831679 -222599.403691777 accept 2 -1 @@ -4113,7 +4113,7 @@ expect 0.000898554 1.248203369 ------------------------------------------------------------------------------- operation +proj=tpeqd +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect -27845.882978485 -223362.430695260 accept 2 -1 @@ -4143,7 +4143,7 @@ Tilted perspective ------------------------------------------------------------------------------- operation +proj=tpers +a=6400000 +h=1000000 +azi=20 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 170820.288955531 180460.865555805 accept 2 -1 @@ -4173,7 +4173,7 @@ Universal Polar Stereographic ------------------------------------------------------------------------------- operation +proj=ups +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 2433455.563438467 -10412543.301512826 accept 2 -1 @@ -4203,7 +4203,7 @@ Urmaev V ------------------------------------------------------------------------------- operation +proj=urm5 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223393.638433964 111696.818785117 accept 2 -1 @@ -4223,7 +4223,7 @@ Urmaev Flat-Polar Sinusoidal ------------------------------------------------------------------------------- operation +proj=urmfps +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 196001.708134192 127306.843329993 accept 2 -1 @@ -4253,7 +4253,7 @@ Universal Transverse Mercator (UTM) ------------------------------------------------------------------------------- operation +proj=utm +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 +zone=30 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 1057002.405491298 110955.141175949 accept 2 -1 @@ -4282,7 +4282,7 @@ van der Grinten (I) ------------------------------------------------------------------------------- operation +proj=vandg +a=6400000 +lat_1=0.5 +lat_2=2 +no_defs ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223395.249543407 111704.596633675 rem 223395.249543407 111704.596633675 osgeo @@ -4315,7 +4315,7 @@ van der Grinten II ------------------------------------------------------------------------------- operation +proj=vandg2 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.5 mm +tolerance 0.1 mm accept 2 1 expect 223395.247850437 111718.491037226 accept 2 -1 @@ -4334,7 +4334,7 @@ van der Grinten III ------------------------------------------------------------------------------- operation +proj=vandg3 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223395.249552831 111704.519904421 accept 2 -1 @@ -4353,7 +4353,7 @@ van der Grinten IV ------------------------------------------------------------------------------- operation +proj=vandg4 +R=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.01 mm +tolerance 0.1 mm accept 2 1 expect 223374.577294355 111701.195484154 accept 2 -1 @@ -4373,7 +4373,7 @@ Vitkovsky I ------------------------------------------------------------------------------- operation +proj=vitk1 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 222607.171211458 111404.251442435 accept 2 -1 @@ -4396,7 +4396,7 @@ expect -0.001796202 -0.000898316 ------------------------------------------------------------------------------- operation +proj=vitk1 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223370.224840471 111786.123319644 accept 2 -1 @@ -4425,7 +4425,7 @@ Wagner I (Kavraisky VI) ------------------------------------------------------------------------------- operation +proj=wag1 +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 195986.781561158 127310.075060660 accept 2 -1 @@ -4454,7 +4454,7 @@ Wagner II ------------------------------------------------------------------------------- operation +proj=wag2 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 206589.888099962 120778.040357547 accept 2 -1 @@ -4484,7 +4484,7 @@ Wagner III ------------------------------------------------------------------------------- operation +proj=wag3 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223387.021718166 111701.072127637 accept 2 -1 @@ -4513,7 +4513,7 @@ Wagner IV ------------------------------------------------------------------------------- operation +proj=wag4 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 192801.218662384 129416.216394803 accept 2 -1 @@ -4542,7 +4542,7 @@ Wagner V ------------------------------------------------------------------------------- operation +proj=wag5 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 203227.051925325 138651.631442713 accept 2 -1 @@ -4571,7 +4571,7 @@ Wagner VI ------------------------------------------------------------------------------- operation +proj=wag6 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 211652.562164410 105831.180787330 accept 2 -1 @@ -4600,7 +4600,7 @@ Wagner VII ------------------------------------------------------------------------------- operation +proj=wag7 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 198601.876957312 125637.045714171 accept 2 -1 @@ -4619,7 +4619,7 @@ Werenskiold I ------------------------------------------------------------------------------- operation +proj=weren +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223378.515757634 146214.093042288 accept 2 -1 @@ -4649,7 +4649,7 @@ Winkel I ------------------------------------------------------------------------------- operation +proj=wink1 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223385.131640953 111701.072127637 accept 2 -1 @@ -4679,7 +4679,7 @@ Winkel II ------------------------------------------------------------------------------- operation +proj=wink2 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223387.396433786 124752.032797445 accept 2 -1 @@ -4699,7 +4699,7 @@ Winkel Tripel ------------------------------------------------------------------------------- operation +proj=wintri +a=6400000 +lat_1=0 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.00010 mm +tolerance 0.1 mm accept 2 1 expect 223390.801533485 111703.907505745 accept 2 -1 diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index e1c026ea..580cef08 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -208,12 +208,26 @@ expect failure errno failed_to_load_grid - ------------------------------------------------------------------------------- Some tests from PJ_hgridshift.c ------------------------------------------------------------------------------- -operation proj=hgridshift +grids=nzgd2kgrid0005.gsb ellps=GRS80 +# operation proj=hgridshift +grids=nzgd2kgrid0005.gsb ellps=GRS80 +------------------------------------------------------------------------------- +Note: This test appears to use wrong coordinate data, and is commented out. +We need a set of authoritative test cases to test the nzgd2000 grid. ------------------------------------------------------------------------------- +# tolerance 1 um +# ignore pjd_err_failed_to_load_grid +# accept 173 -45 0 0 +# expect 172.999892181021551 -45.001620431954613 0 0 +# direction inverse +# accept 172.999892181021551 -45.001620431954613 0 0 +# expect 173 -45 0 0 +------------------------------------------------------------------------------- + + + + tolerance 1 nm ignore pjd_err_failed_to_load_grid accept 173 -45 0 0 -- cgit v1.2.3 From 3c62e6e7263b3a0e6e2397db5b43607f4b7fbe1d Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sat, 10 Feb 2018 14:57:50 +0100 Subject: Handle sign convention for vertical datum shifts Also make corresponding sign corrections in a number of tests, and comment out a few tests which work correctly, but report failure since gie is not yet ready to handle unusual axis orders in cases with angular output coordinates. --- src/gie.c | 9 ++++++++- src/pj_fwd.c | 4 ++-- src/pj_inv.c | 4 ++-- test/gie/4D-API_cs2cs-style.gie | 29 ++++++++++++++++++----------- test/gie/more_builtins.gie | 10 ---------- 5 files changed, 30 insertions(+), 26 deletions(-) diff --git a/src/gie.c b/src/gie.c index 8d0404b2..95f50708 100644 --- a/src/gie.c +++ b/src/gie.c @@ -842,10 +842,17 @@ Tell GIE what to expect, when transforming the ACCEPTed input if (T.verbosity > 3) printf ("GOT %.12f %.12f %.12f %.12f\n", co.v[0],co.v[1],co.v[2],co.v[3]); +#if 0 + /* We need to handle unusual axis orders - that'll be an item for version 5.1 */ + if (T.P->axisswap) { + ce = proj_trans (T.P->axisswap, T.dir, ce); + co = proj_trans (T.P->axisswap, T.dir, co); + } +#endif if (proj_angular_output (T.P, T.dir)) d = proj_lpz_dist (T.P, ce.lpz, co.lpz); else - d = proj_xyz_dist (T.b.xyz, T.e.xyz); + d = proj_xyz_dist (co.xyz, ce.xyz); if (d > T.tolerance) return expect_message (d, args); diff --git a/src/pj_fwd.c b/src/pj_fwd.c index dbb7748e..d238fa4d 100644 --- a/src/pj_fwd.c +++ b/src/pj_fwd.c @@ -79,7 +79,7 @@ static PJ_COORD pj_fwd_prepare (PJ *P, PJ_COORD coo) { if (coo.lp.lam==HUGE_VAL) return coo; if (P->vgridshift) - coo = proj_trans (P->vgridshift, PJ_FWD, coo); + coo = proj_trans (P->vgridshift, PJ_FWD, coo); /* Go orthometric from geometric */ /* Distance from central meridian, taking system zero meridian into account */ coo.lp.lam = (coo.lp.lam - P->from_greenwich) - P->lam0; @@ -141,7 +141,7 @@ static PJ_COORD pj_fwd_finalize (PJ *P, PJ_COORD coo) { coo.lpz.lam = adjlon(coo.lpz.lam); if (P->vgridshift) - coo = proj_trans (P->vgridshift, PJ_INV, coo); + coo = proj_trans (P->vgridshift, PJ_FWD, coo); /* Go orthometric from geometric */ if (coo.lp.lam==HUGE_VAL) return coo; if (P->hgridshift) diff --git a/src/pj_inv.c b/src/pj_inv.c index 7b47f5d7..4ea88b69 100644 --- a/src/pj_inv.c +++ b/src/pj_inv.c @@ -86,7 +86,7 @@ static PJ_COORD pj_inv_prepare (PJ *P, PJ_COORD coo) { if (coo.lp.lam==HUGE_VAL) return coo; if (P->vgridshift) - coo = proj_trans (P->vgridshift, PJ_FWD, coo); + coo = proj_trans (P->vgridshift, PJ_INV, coo); /* Go geometric from orthometric */ return coo; } @@ -149,7 +149,7 @@ static PJ_COORD pj_inv_finalize (PJ *P, PJ_COORD coo) { coo.lpz.lam = adjlon(coo.lpz.lam); if (P->vgridshift) - coo = proj_trans (P->vgridshift, PJ_FWD, coo); + coo = proj_trans (P->vgridshift, PJ_INV, coo); /* Go geometric from orthometric */ if (coo.lp.lam==HUGE_VAL) return coo; if (P->hgridshift) diff --git a/test/gie/4D-API_cs2cs-style.gie b/test/gie/4D-API_cs2cs-style.gie index b2cae594..4cace784 100644 --- a/test/gie/4D-API_cs2cs-style.gie +++ b/test/gie/4D-API_cs2cs-style.gie @@ -77,9 +77,12 @@ operation proj=latlong geoidgrids=egm96_15.gtx ellps=GRS80 ------------------------------------------------------------------------------- tolerance 15 cm # lax tolerance due to widespread bad egm96 file ignore pjd_err_failed_to_load_grid + accept 12.5 55.5 0 expect 12.5 55.5 -36.0213 + direction inverse + accept 12.5 55.5 -36.0213 expect 12.5 55.5 0 ------------------------------------------------------------------------------- @@ -99,6 +102,10 @@ expect 12.5 55.5 0 ------------------------------------------------------------------------------- Same as the two above, but also do axis swapping. ------------------------------------------------------------------------------- +NOTE: A number of the tests below are commented out. The actually do the +right thing, but the gie distance computation is not yet able to cope +with "unusual" axis orders +------------------------------------------------------------------------------- operation proj=latlong geoidgrids=egm96_15.gtx axis=neu ellps=GRS80 ------------------------------------------------------------------------------- tolerance 15 cm # lax tolerance due to widely distributed, bad egm96 file @@ -113,11 +120,11 @@ operation proj=latlong geoidgrids=egm96_15.gtx axis=dne ellps=GRS80 ------------------------------------------------------------------------------- tolerance 15 cm # lax tolerance due to widely distributed, bad egm96 file ignore pjd_err_failed_to_load_grid -accept 12.5 55.5 0 -expect 36.0213 55.5 12.5 -direction inverse -accept 36.0213 55.5 12.5 -expect 12.5 55.5 0 +# accept 12.5 55.5 0 +# expect 36.0213 55.5 12.5 +# direction inverse +# accept 36.0213 55.5 12.5 +# expect 12.5 55.5 0 ------------------------------------------------------------------------------- operation proj=merc geoidgrids=egm96_15.gtx ellps=GRS80 ------------------------------------------------------------------------------- @@ -140,9 +147,9 @@ tolerance 15 cm # lax tolerance due to widely distributed, bad egm96 file ignore pjd_err_failed_to_load_grid accept 12.5 55.5 0 expect 55.5 -36.0213 12.5 -direction inverse -accept 55.5 -36.0213 12.5 -expect 12.5 55.5 0 +# direction inverse +# accept 55.5 -36.0213 12.5 +# expect 12.5 55.5 0 ------------------------------------------------------------------------------- operation proj=merc geoidgrids=egm96_15.gtx axis=sue ellps=GRS80 ------------------------------------------------------------------------------- @@ -150,8 +157,8 @@ tolerance 15 cm ignore pjd_err_failed_to_load_grid accept 12.5 55.5 0 expect -7424275.1946 -36.0213 1391493.6349 0.0000 -direction inverse -accept -7424275.1946 -36.0213 1391493.6349 0.0000 -expect 12.5 55.5 0 +# direction inverse +# accept -7424275.1946 -36.0213 1391493.6349 0.0000 +# expect 12.5 55.5 0 ------------------------------------------------------------------------------- diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index 580cef08..5defb4e3 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -228,17 +228,7 @@ We need a set of authoritative test cases to test the nzgd2000 grid. -tolerance 1 nm -ignore pjd_err_failed_to_load_grid -accept 173 -45 0 0 -roundtrip 100 -------------------------------------------------------------------------------- -expect 172.999892181021551 -45.001620431954613 0 0 -direction inverse -accept 172.999892181021551 -45.001620431954613 0 0 -expect 173 -45 0 0 ------------------------------------------------------------------------------- - # Fail on purpose: open non-existing grid: operation proj=hgridshift grids=@nonexistinggrid.gsb,anothernonexistinggrid.gsb expect failure errno failed_to_load_grid -- cgit v1.2.3 From 357af968915f4d1300b14fbd1e9188318d15399f Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sat, 10 Feb 2018 16:09:50 +0100 Subject: Relax tolerance slightly for two tests failing on OS/X --- test/gie/builtins.gie | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index 707b2afa..66916cdc 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -4090,7 +4090,7 @@ Two Point Equidistant ------------------------------------------------------------------------------- operation +proj=tpeqd +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5 ------------------------------------------------------------------------------- -tolerance 0.1 mm +tolerance 0.15 mm accept 2 1 expect -27750.758831679 -222599.403691777 accept 2 -1 -- cgit v1.2.3 From 75fca1c0e2fdd58d997ff962936888b6f983e8ec Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sat, 10 Feb 2018 18:31:16 +0100 Subject: Update a few gie tests --- test/gie/4D-API_cs2cs-style.gie | 37 ++++++++++++++++++++++++------------- test/gie/GDA.gie | 2 +- test/gie/more_builtins.gie | 19 +++++++++---------- 3 files changed, 34 insertions(+), 24 deletions(-) diff --git a/test/gie/4D-API_cs2cs-style.gie b/test/gie/4D-API_cs2cs-style.gie index 4cace784..2b7a851d 100644 --- a/test/gie/4D-API_cs2cs-style.gie +++ b/test/gie/4D-API_cs2cs-style.gie @@ -52,22 +52,18 @@ expect 16.8210462130 55.1705688946 29.0317 - ------------------------------------------------------------------------------- -# operation proj=latlong nadgrids=nzgd2kgrid0005.gsb ellps=GRS80 +operation proj=latlong nadgrids=nzgd2kgrid0005.gsb ellps=GRS80 ------------------------------------------------------------------------------- -Note: This test appears to use wrong coordinate data, and is commented out. -We need a set of authoritative test cases to test the nzgd2000 grid. - -This functionality is sufficiently tested in DHDN_ETRS89.gie +This functionality is also tested in DHDN_ETRS89.gie ------------------------------------------------------------------------------- -# tolerance 1 um -# ignore pjd_err_failed_to_load_grid -# accept 173 -45 0 0 -# expect 172.999892181021551 -45.001620431954613 0 0 -# direction inverse -# accept 172.999892181021551 -45.001620431954613 0 0 -# expect 173 -45 0 0 +tolerance 1 mm +ignore pjd_err_failed_to_load_grid +accept 173 -45 +expect 172.999892181021551 -45.001620431954613 +direction inverse +accept 172.999892181021551 -45.001620431954613 +expect 173 -45 ------------------------------------------------------------------------------- @@ -161,4 +157,19 @@ expect -7424275.1946 -36.0213 1391493.6349 0.0000 # accept -7424275.1946 -36.0213 1391493.6349 0.0000 # expect 12.5 55.5 0 ------------------------------------------------------------------------------- + + + +------------------------------------------------------------------------------- +A test point from a comment by Github user c0nk +------------------------------------------------------------------------------- +operation proj=somerc + lat_0=46.95240555555556 lon_0=7.439583333333333 k_0=1 + x_0=2600000 y_0=1200000 ellps=bessel + towgs84=674.374,15.056,405.346 +------------------------------------------------------------------------------- +tolerance 20 cm # lax tolerance due to widely distributed, bad egm96 file +accept 7.438632495 46.951082877 +expect 2600000.0 1200000.0 +------------------------------------------------------------------------------- diff --git a/test/gie/GDA.gie b/test/gie/GDA.gie index e20cc88c..ea975bb6 100644 --- a/test/gie/GDA.gie +++ b/test/gie/GDA.gie @@ -50,7 +50,7 @@ operation proj = pipeline ellps=GRS80; z = -0.04019; rz = -0.0328979; s = -0.009994; step proj = cart inv; ----------------------------------------------------------------------------------- -tolerance 1.1 mm +tolerance 2 mm accept 133.88551329 -23.67012389 603.3466 0 # Alice Springs GDA94 expect 133.8855216 -23.67011014 603.2489 0 # Alice Springs GDA2020 ------------------------------------------------------------------------------- diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index 5defb4e3..d7074c5b 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -211,23 +211,22 @@ expect failure errno failed_to_load_grid ------------------------------------------------------------------------------- Some tests from PJ_hgridshift.c ------------------------------------------------------------------------------- -# operation proj=hgridshift +grids=nzgd2kgrid0005.gsb ellps=GRS80 +operation proj=hgridshift +grids=nzgd2kgrid0005.gsb ellps=GRS80 ------------------------------------------------------------------------------- -Note: This test appears to use wrong coordinate data, and is commented out. +Note: These data are home grown and suitable for regression testing only We need a set of authoritative test cases to test the nzgd2000 grid. ------------------------------------------------------------------------------- -# tolerance 1 um -# ignore pjd_err_failed_to_load_grid -# accept 173 -45 0 0 -# expect 172.999892181021551 -45.001620431954613 0 0 -# direction inverse -# accept 172.999892181021551 -45.001620431954613 0 0 -# expect 173 -45 0 0 +tolerance 1 mm +ignore pjd_err_failed_to_load_grid +accept 172.999892181021551 -45.001620431954613 +expect 173 -45 +direction inverse +accept 173 -45 +expect 172.999892181021551 -45.001620431954613 ------------------------------------------------------------------------------- - ------------------------------------------------------------------------------- # Fail on purpose: open non-existing grid: operation proj=hgridshift grids=@nonexistinggrid.gsb,anothernonexistinggrid.gsb -- cgit v1.2.3 From 2cca9ead11be47f6efd0ab504cf2e9020b85fa80 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sat, 10 Feb 2018 23:02:47 +0100 Subject: Make the 4D API fully 4D (#788) Make 4D API fully 4D: Remove PJ_XY, PJ_LP, PJ_XYZ, PJ_LPZ etc. from the API surface and make all formal parameters of the API fully 4D PJ_COORD. This operation primarily influences the proj_XXX_dist functions, which mostly work by calling Charles Karney's geodesic subsystem, keeping the distance, and throwing away the start and end azimuths for the geodesic computed. Also a PJ_GEOD(esic) persona is introduced for the PJ_COORD type. The proj_geod function returns a PJ_GEOD, representing the geodesic between the points represented by its PJ_COORD arguments. Finally, the proj_factors functions had its lp argument changed from PJ_LP to PJ_COORD. --- src/gie.c | 12 ++++++------ src/proj.h | 31 +++++++++++++------------------ src/proj_4D_api.c | 47 +++++++++++++++++++++++++++++++---------------- 3 files changed, 50 insertions(+), 40 deletions(-) diff --git a/src/gie.c b/src/gie.c index 95f50708..5acec578 100644 --- a/src/gie.c +++ b/src/gie.c @@ -850,9 +850,9 @@ Tell GIE what to expect, when transforming the ACCEPTed input } #endif if (proj_angular_output (T.P, T.dir)) - d = proj_lpz_dist (T.P, ce.lpz, co.lpz); + d = proj_lpz_dist (T.P, ce, co); else - d = proj_xyz_dist (co.xyz, ce.xyz); + d = proj_xyz_dist (co, ce); if (d > T.tolerance) return expect_message (d, args); @@ -1432,13 +1432,13 @@ static int pj_horner_selftest (void) { /* Forward projection */ b = proj_trans (P, PJ_FWD, a); - dist = proj_xy_dist (b.xy, c.xy); + dist = proj_xy_dist (b, c); if (dist > 0.001) return 2; /* Inverse projection */ b = proj_trans (P, PJ_INV, c); - dist = proj_xy_dist (b.xy, a.xy); + dist = proj_xy_dist (b, a); if (dist > 0.001) return 3; @@ -1520,7 +1520,7 @@ static int pj_cart_selftest (void) { /* Forward again, to get two linear items for comparison */ a = proj_trans (P, PJ_FWD, a); - dist = proj_xy_dist (a.xy, b.xy); + dist = proj_xy_dist (a, b); if (dist > 2e-9) return 3; @@ -1771,7 +1771,7 @@ static int pj_cart_selftest (void) { a.lp.lam = PJ_TORAD(12); a.lp.phi = PJ_TORAD(55); - factors = proj_factors(P, a.lp); + factors = proj_factors(P, a); if (proj_errno(P)) return 85; /* factors not created correctly */ diff --git a/src/proj.h b/src/proj.h index 950cc271..8997965e 100644 --- a/src/proj.h +++ b/src/proj.h @@ -112,13 +112,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. *****************************************************************************/ -/* -#ifdef _MSC_VER -#ifndef _USE_MATH_DEFINES -#define _USE_MATH_DEFINES -#endif -#endif -#include For M_PI */ + #include /* For size_t */ @@ -151,11 +145,6 @@ typedef union PJ_COORD PJ_COORD; struct PJ_AREA; typedef struct PJ_AREA PJ_AREA; -/* The slimmed down PROJ 5.0.0 version of struct FACTORS */ -/* Will take over the world and the name when we can rid */ -/* the library for deprecated stuff, but it's the typedef */ -/* which is userspace useful, so it does not do much of a */ -/* difference */ struct P5_FACTORS { /* Common designation */ double meridional_scale; /* h */ double parallel_scale; /* k */ @@ -210,8 +199,9 @@ typedef struct { double u, v, w, t; } PJ_UVWT; typedef struct { double lam, phi, z, t; } PJ_LPZT; typedef struct { double o, p, k; } PJ_OPK; /* Rotations: omega, phi, kappa */ typedef struct { double e, n, u; } PJ_ENU; /* East, North, Up */ +typedef struct { double s, a1, a2; } PJ_GEOD; /* Geodesic length, fwd azi, rev azi */ -/* Classic proj.4 pair/triplet types */ +/* Classic proj.4 pair/triplet types - moved into the PJ_ name space */ typedef struct { double u, v; } PJ_UV; typedef struct { double x, y; } PJ_XY; typedef struct { double lam, phi; } PJ_LP; @@ -227,6 +217,7 @@ union PJ_COORD { PJ_XYZT xyzt; PJ_UVWT uvwt; PJ_LPZT lpzt; + PJ_GEOD geod; PJ_OPK opk; PJ_ENU enu; PJ_XYZ xyz; @@ -336,16 +327,20 @@ PJ_COORD proj_coord (double x, double y, double z, double t); double proj_roundtrip (PJ *P, PJ_DIRECTION direction, int n, PJ_COORD *coo); /* Geodesic distance between two points with angular 2D coordinates */ -double proj_lp_dist (const PJ *P, PJ_LP a, PJ_LP b); +double proj_lp_dist (const PJ *P, PJ_COORD a, PJ_COORD b); /* The geodesic distance AND the vertical offset */ -double proj_lpz_dist (const PJ *P, PJ_LPZ a, PJ_LPZ b); +double proj_lpz_dist (const PJ *P, PJ_COORD a, PJ_COORD b); /* Euclidean distance between two points with linear 2D coordinates */ -double proj_xy_dist (PJ_XY a, PJ_XY b); +double proj_xy_dist (PJ_COORD a, PJ_COORD b); /* Euclidean distance between two points with linear 3D coordinates */ -double proj_xyz_dist (PJ_XYZ a, PJ_XYZ b); +double proj_xyz_dist (PJ_COORD a, PJ_COORD b); + +/* Geodesic distance (in meter) + fwd and rev azimuth between two points on the ellipsoid */ +PJ_COORD proj_geod (const PJ *P, PJ_COORD a, PJ_COORD b); + /* Set or read error level */ @@ -355,7 +350,7 @@ int proj_errno_reset (const PJ *P); int proj_errno_restore (const PJ *P, int err); /* Scaling and angular distortion factors */ -PJ_FACTORS proj_factors(PJ *P, PJ_LP lp); +PJ_FACTORS proj_factors(PJ *P, PJ_COORD lp); /* Info functions - get information about various PROJ.4 entities */ PJ_INFO proj_info(void); diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index 8f6305a4..2f689085 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -67,32 +67,47 @@ int proj_angular_output (PJ *P, enum PJ_DIRECTION dir) { } +/* Geodesic distance (in meter) + fwd and rev azimuth between two points on the ellipsoid */ +PJ_COORD proj_geod (const PJ *P, PJ_COORD a, PJ_COORD b) { + PJ_COORD c; + /* Note: the geodesic code takes arguments in degrees */ + geod_inverse (P->geod, + PJ_TODEG(a.lpz.phi), PJ_TODEG(a.lpz.lam), + PJ_TODEG(b.lpz.phi), PJ_TODEG(b.lpz.lam), + c.v, c.v+1, c.v+2 + ); + + return c; +} + + /* Geodesic distance (in meter) between two points with angular 2D coordinates */ -double proj_lp_dist (const PJ *P, LP a, LP b) { +double proj_lp_dist (const PJ *P, PJ_COORD a, PJ_COORD b) { double s12, azi1, azi2; /* Note: the geodesic code takes arguments in degrees */ - geod_inverse (P->geod, PJ_TODEG(a.phi), PJ_TODEG(a.lam), PJ_TODEG(b.phi), PJ_TODEG(b.lam), &s12, &azi1, &azi2); + geod_inverse (P->geod, + PJ_TODEG(a.lpz.phi), PJ_TODEG(a.lpz.lam), + PJ_TODEG(b.lpz.phi), PJ_TODEG(b.lpz.lam), + &s12, &azi1, &azi2 + ); return s12; } /* The geodesic distance AND the vertical offset */ -double proj_lpz_dist (const PJ *P, LPZ a, LPZ b) { - PJ_COORD aa, bb; - aa.lpz = a; - bb.lpz = b; - if (HUGE_VAL==a.lam || HUGE_VAL==b.lam) +double proj_lpz_dist (const PJ *P, PJ_COORD a, PJ_COORD b) { + if (HUGE_VAL==a.lpz.lam || HUGE_VAL==b.lpz.lam) return HUGE_VAL; - return hypot (proj_lp_dist (P, aa.lp, bb.lp), a.z - b.z); + return hypot (proj_lp_dist (P, a, b), a.lpz.z - b.lpz.z); } /* Euclidean distance between two points with linear 2D coordinates */ -double proj_xy_dist (XY a, XY b) { - return hypot (a.x - b.x, a.y - b.y); +double proj_xy_dist (PJ_COORD a, PJ_COORD b) { + return hypot (a.xy.x - b.xy.x, a.xy.y - b.xy.y); } /* Euclidean distance between two points with linear 3D coordinates */ -double proj_xyz_dist (XYZ a, XYZ b) { - return hypot (hypot (a.x - b.x, a.y - b.y), a.z - b.z); +double proj_xyz_dist (PJ_COORD a, PJ_COORD b) { + return hypot (proj_xy_dist (a, b), a.xyz.z - b.xyz.z); } @@ -125,9 +140,9 @@ double proj_roundtrip (PJ *P, PJ_DIRECTION direction, int n, PJ_COORD *coo) { /* checking for angular *input* since we do a roundtrip, and end where we begin */ if (proj_angular_input (P, direction)) - return proj_lpz_dist (P, org.lpz, t.lpz); + return proj_lpz_dist (P, org, t); - return proj_xyz_dist (org.xyz, t.xyz); + return proj_xyz_dist (org, t); } @@ -996,7 +1011,7 @@ PJ_INIT_INFO proj_init_info(const char *initname){ /*****************************************************************************/ -PJ_FACTORS proj_factors(PJ *P, LP lp) { +PJ_FACTORS proj_factors(PJ *P, PJ_COORD lp) { /****************************************************************************** Cartographic characteristics at point lp. @@ -1012,7 +1027,7 @@ PJ_FACTORS proj_factors(PJ *P, LP lp) { if (0==P) return factors; - if (pj_factors(lp, P, 0.0, &f)) + if (pj_factors(lp.lp, P, 0.0, &f)) return factors; factors.meridional_scale = f.h; -- cgit v1.2.3 From 0199b3fd17fca361bba4eec93209c0b74c0f7340 Mon Sep 17 00:00:00 2001 From: Charles Karney Date: Sat, 10 Feb 2018 17:17:27 -0500 Subject: Re-do pull request #451 export CMake targets with PROJ4:: namespace This version takes to add the include path to the target definition for cmake 2.8.11 and later. Also the documentation sticks to the existing convention of using cmake variables ${PROJ4_LIBRARIES} and ${PROJ4_INCLUDE_DIRS}. However, the namespace variables are still being included. Here's the roll-out plan (0) Version 4.9.x: The target is proj and PROJ4_LIBRARIES is set to this. (1) Version 5.0.x: Two targets, proj and PROJ4::proj, are defined; PROJ4_LIBRARIES = proj. (2) In a year or two: Two targets, proj and PROJ4::proj, are defined; PROJ4_LIBRARIES = PROJ4::proj. (3) With a change in the library which breaks backwards compatibility: The target is PROJ4::proj and PROJ4_LIBRARIES = PROJ4::proj. --- cmake/CMakeLists.txt | 4 ++++ cmake/project-config.cmake.in | 1 + docs/source/development/cmake.rst | 30 ++++++++++++++++++++++++++++++ docs/source/development/index.rst | 2 +- src/lib_proj.cmake | 4 ++++ 5 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 docs/source/development/cmake.rst diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 0fcde0ca..7073b7b4 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -21,3 +21,7 @@ install (FILES install (EXPORT targets FILE ${PROJECT_NAME_LOWER}-targets.cmake DESTINATION "${CMAKECONFIGDIR}") +install (EXPORT targets + NAMESPACE ${PROJECT_NAME}:: + FILE ${PROJECT_NAME_LOWER}-namespace-targets.cmake + DESTINATION "${CMAKECONFIGDIR}") diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in index 9a52b3b5..57445463 100644 --- a/cmake/project-config.cmake.in +++ b/cmake/project-config.cmake.in @@ -23,6 +23,7 @@ set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/@BINDIR@") set (@PROJECT_NAME@_LIBRARIES proj) # Read in the exported definition of the library include ("${_DIR}/@PROJECT_NAME_LOWER@-targets.cmake") +include ("${_DIR}/@PROJECT_NAME_LOWER@-namespace-targets.cmake") unset (_ROOT) unset (_DIR) diff --git a/docs/source/development/cmake.rst b/docs/source/development/cmake.rst new file mode 100644 index 00000000..1429ae88 --- /dev/null +++ b/docs/source/development/cmake.rst @@ -0,0 +1,30 @@ +.. _cmake: + +******************************************************************************** +Using Proj.4 in CMake projects +******************************************************************************** + +The recommended way to use the Proj.4 library in a CMake project is to +link to the imported library target ``${PROJ4_LIBRARIES}`` provided by +the CMake configuration which comes with the library. Typical usage is: + +.. code:: + + find_package(PROJ4) + + target_link_libraries(MyApp ${PROJ4_LIBRARIES}) + +By adding the imported library target ``${PROJ4_LIBRARIES}`` to the +target link libraries, CMake will also pass the include directories to +the compiler. This requires that you use CMake version 2.8.11 or later. +If you are using an older version of CMake, then add + +.. code:: + + include_directories(${PROJ4_INCLUDE_DIRS}) + +The CMake command ``find_package`` will look for the configuration in a +number of places. The lookup can be adjusted for all packages by setting +the cache variable or environment variable ``CMAKE_PREFIX_PATH``. In +particular, CMake will consult (and set) the cache variable +``PROJ4_DIR``. diff --git a/docs/source/development/index.rst b/docs/source/development/index.rst index 2e6e5622..712bbdfe 100644 --- a/docs/source/development/index.rst +++ b/docs/source/development/index.rst @@ -14,4 +14,4 @@ proj.4 project or using the library in their own software. api threads bindings - + cmake diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake index f1337a54..c9e4d9e6 100644 --- a/src/lib_proj.cmake +++ b/src/lib_proj.cmake @@ -284,6 +284,10 @@ add_library( ${PROJ_CORE_TARGET} ${ALL_LIBPROJ_HEADERS} ${PROJ_RESOURCES} ) +if (NOT CMAKE_VERSION VERSION_LESS 2.8.11) + target_include_directories (${PROJ_CORE_TARGET} INTERFACE + $) +endif () if(WIN32) set_target_properties(${PROJ_CORE_TARGET} -- cgit v1.2.3 From 06d35126d36f377e06da0a747cf0847e1827d1be Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Sat, 10 Feb 2018 23:25:36 +0100 Subject: Make sure that #define's work properly when including proj_api.h and proj.h together. --- src/proj_api.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/proj_api.h b/src/proj_api.h index 40c40ad1..5bba5887 100644 --- a/src/proj_api.h +++ b/src/proj_api.h @@ -25,8 +25,6 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ - - /* * This version number should be updated with every release! * @@ -84,10 +82,18 @@ extern int pj_errno; /* global error return code */ /* These make the function declarations below conform with classic proj */ typedef PJ *projPJ; /* projPJ is a pointer to PJ */ typedef struct projCtx_t *projCtx; /* projCtx is a pointer to projCtx_t */ -# define projXY XY +#ifdef PROJ_H +# define projXY PJ_XY +# define projLP PJ_LP +# define projXYZ PJ_XYZ +# define projLPZ PJ_LPZ +#else +# define projXY XY # define projLP LP # define projXYZ XYZ # define projLPZ LPZ +#endif + #else /* i.e. proj_api invoked as primary API */ typedef struct { double u, v; } projUV; -- cgit v1.2.3 From e1a213b2d9a29d86b89547781a2e27d5fd01f111 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sun, 11 Feb 2018 00:42:05 +0100 Subject: Add proj_context_errno to API and missing proj_geod to proj.def (#791) --- src/proj.def | 3 +++ src/proj.h | 1 + src/proj_4D_api.c | 15 +++++++++++++++ 3 files changed, 19 insertions(+) diff --git a/src/proj.def b/src/proj.def index f2936edb..d6c84dc3 100644 --- a/src/proj.def +++ b/src/proj.def @@ -152,3 +152,6 @@ EXPORTS proj_angular_input @138 proj_angular_output @139 + + proj_geod @140 + proj_context_errno @141 diff --git a/src/proj.h b/src/proj.h index 8997965e..133f1412 100644 --- a/src/proj.h +++ b/src/proj.h @@ -344,6 +344,7 @@ PJ_COORD proj_geod (const PJ *P, PJ_COORD a, PJ_COORD b); /* Set or read error level */ +int proj_context_errno (PJ_CONTEXT *ctx); int proj_errno (const PJ *P); int proj_errno_set (const PJ *P, int err); int proj_errno_reset (const PJ *P); diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index 2f689085..796e5769 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -649,10 +649,25 @@ PJ *proj_destroy (PJ *P) { return 0; } +/*****************************************************************************/ int proj_errno (const PJ *P) { +/****************************************************************************** + Read an error level from the context of a PJ. +******************************************************************************/ return pj_ctx_get_errno (pj_get_ctx ((PJ *) P)); } +/*****************************************************************************/ +int proj_context_errno (PJ_CONTEXT *ctx) { +/****************************************************************************** + Read an error directly from a context, without going through a PJ + belonging to that context. +******************************************************************************/ + if (0==ctx) + ctx = pj_get_default_ctx(); + return pj_ctx_get_errno (ctx); +} + /*****************************************************************************/ int proj_errno_set (const PJ *P, int err) { /****************************************************************************** -- cgit v1.2.3 From 332bf648a65b5a1a6bb1e2f5d7f5c7cca1ce1159 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Sun, 11 Feb 2018 16:07:18 +0100 Subject: Add missing ! in boolean evaluation. Fixes #780. --- src/pj_gridinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pj_gridinfo.c b/src/pj_gridinfo.c index b1b39e01..b855980b 100644 --- a/src/pj_gridinfo.c +++ b/src/pj_gridinfo.c @@ -564,7 +564,7 @@ static int pj_gridinfo_init_ntv2( projCtx ctx, PAFile fid, PJ_GRIDINFO *gilist ) gi->gridname = pj_strdup( gilist->gridname ); gi->filename = pj_strdup( gilist->filename ); - if (!gi->gridname || gi->filename) { + if (!gi->gridname || !gi->filename) { pj_gridinfo_free(ctx, gi); pj_dalloc(ct); pj_gridinfo_free(ctx, gilist); -- cgit v1.2.3 From cc26b288fe0a208468068726bc4b38f4cf05ba47 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sun, 11 Feb 2018 17:29:17 +0100 Subject: typedef some recurring function signatures --- src/pj_init.c | 10 ++++------ src/projects.h | 37 ++++++++++++++++++++++++++++++++++--- 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/src/pj_init.c b/src/pj_init.c index f54a2a92..3c36fc3a 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -470,22 +470,20 @@ pj_init(int argc, char **argv) { } -typedef PJ *(constructor)(PJ *); - -static constructor *pj_constructor (const char *name) { +static PJ_CONSTRUCTOR pj_locate_constructor (const char *name) { int i; char *s; for (i = 0; (s = pj_list[i].id) && strcmp(name, s) ; ++i) ; if (0==s) return 0; - return (constructor *) pj_list[i].proj; + return (PJ_CONSTRUCTOR) pj_list[i].proj; } PJ * pj_init_ctx(projCtx ctx, int argc, char **argv) { char *s, *name; - constructor *proj; + PJ_CONSTRUCTOR proj; paralist *curr, *init, *start; int i; int err; @@ -559,7 +557,7 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { return pj_dealloc_params (ctx, start, PJD_ERR_PROJ_NOT_NAMED); name += 5; - proj = pj_constructor (name); + proj = pj_locate_constructor (name); if (0==proj) return pj_dealloc_params (ctx, start, PJD_ERR_UNKNOWN_PROJECTION_ID); diff --git a/src/projects.h b/src/projects.h index bfbe08cb..25ff82a4 100644 --- a/src/projects.h +++ b/src/projects.h @@ -218,6 +218,37 @@ struct PJ_AREA { struct projCtx_t; typedef struct projCtx_t projCtx_t; +/***************************************************************************** + + Some function types that are especially useful when working with PJs + +****************************************************************************** + +PJ_CONSTRUCTOR: + + A function taking a pointer-to-PJ as arg, and returning a pointer-to-PJ. + Historically called twice: First with a 0 argument, to allocate memory, + second with the first return value as argument, for actual setup. + +PJ_DESTRUCTOR: + + A function taking a pointer-to-PJ and an integer as args, then first + handling the deallocation of the PJ, afterwards handing the integer over + to the error reporting subsystem, and finally returning a null pointer in + support of the "return free (P)" (aka "get the hell out of here") idiom. + +PJ_OPERATOR: + + A function taking a PJ_COORD and a pointer-to-PJ as args, applying the + PJ to the PJ_COORD, and returning the resulting PJ_COORD. + +*****************************************************************************/ +typedef PJ *(* PJ_CONSTRUCTOR) (PJ *); +typedef void *(* PJ_DESTRUCTOR) (PJ *, int); +typedef PJ_COORD (* PJ_OPERATOR) (PJ_COORD, PJ *); +/****************************************************************************/ + + /* base projection data structure */ struct PJconsts { @@ -267,10 +298,10 @@ struct PJconsts { LP (*inv)(XY, PJ *); XYZ (*fwd3d)(LPZ, PJ *); LPZ (*inv3d)(XYZ, PJ *); - PJ_COORD (*fwd4d)(PJ_COORD, PJ *); - PJ_COORD (*inv4d)(PJ_COORD, PJ *); + PJ_OPERATOR fwd4d; + PJ_OPERATOR inv4d; - void *(*destructor)(PJ *, int); + PJ_DESTRUCTOR destructor; /************************************************************************************* -- cgit v1.2.3 From d3cc97a0cce7f01cf878be4ace8ac0bef538dd39 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sun, 11 Feb 2018 17:33:00 +0100 Subject: a minor linguistic correction --- src/pj_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pj_init.c b/src/pj_init.c index 3c36fc3a..be3a2457 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -509,7 +509,7 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { n_inits++; } - /* can't have nested pipeline directly */ + /* can't have nested pipelines directly */ if (n_pipelines > 1) { pj_ctx_set_errno (ctx, PJD_ERR_MALFORMED_PIPELINE); return 0; -- cgit v1.2.3 From 5480a1ffaa38e16dd592beeaa42deb7e2cf4eadb Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sun, 11 Feb 2018 19:13:10 +0100 Subject: Repair prior attempt to default to WGS84 if explicit ellps not needed --- src/gie.c | 13 +++++++------ src/pj_init.c | 25 ++++++++++++++++--------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/gie.c b/src/gie.c index 5acec578..577ad7cf 100644 --- a/src/gie.c +++ b/src/gie.c @@ -1836,12 +1836,12 @@ static int pj_cart_selftest (void) { /* linear in and out */ P = proj_create(PJ_DEFAULT_CTX, - " +proj=helmert +ellps=GRS80" + " +proj=helmert" " +x=0.0127 +y=0.0065 +z=-0.0209 +s=0.00195" " +rx=-0.00039 +ry=0.00080 +rz=-0.00114" " +dx=-0.0029 +dy=-0.0002 +dz=-0.0006 +ds=0.00001" " +drx=-0.00011 +dry=-0.00019 +drz=0.00007" - " +t_epoch=1988.0 +transpose" + " +t_epoch=1988.0 +transpose +no_defs" ); if (0==P) return 0; if (proj_angular_input (P, PJ_FWD)) return 116; @@ -1853,8 +1853,12 @@ static int pj_cart_selftest (void) { if (proj_angular_input (P, PJ_INV)) return 121; if (proj_angular_output (P, PJ_FWD)) return 122; if (proj_angular_output (P, PJ_INV)) return 123; - proj_destroy(P); + /* We specified "no_defs" but didn't give any ellipsoid info */ + /* pj_init_ctx should defualt to WGS84 */ + if (P->a != 6378137.0) return 124; + if (P->f != 1.0/298.257223563) return 125; + proj_destroy(P); return 0; } @@ -1862,9 +1866,6 @@ static int pj_cart_selftest (void) { - - - static int test_time(const char* args, double tol, double t_in, double t_exp) { PJ_COORD in, out; PJ *P = proj_create(PJ_DEFAULT_CTX, args); diff --git a/src/pj_init.c b/src/pj_init.c index be3a2457..bf098686 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -592,16 +592,23 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { return pj_default_destructor (PIN, proj_errno(PIN)); err = pj_ellipsoid (PIN); - if (PIN->need_ellps && 0 != err) { - pj_log (ctx, PJ_LOG_DEBUG_MINOR, "pj_init_ctx: Must specify ellipsoid or sphere"); - return pj_default_destructor (PIN, proj_errno(PIN)); - } - if (0==err) { - PIN->a_orig = PIN->a; - PIN->es_orig = PIN->es; - if (pj_calc_ellipsoid_params (PIN, PIN->a, PIN->es)) - return pj_default_destructor (PIN, PJD_ERR_ECCENTRICITY_IS_ONE); + + if (err) { + /* Didn't get an ellps, but doesn't need one: Get a free WGS84 */ + if (PIN->need_ellps) { + pj_log (ctx, PJ_LOG_DEBUG_MINOR, "pj_init_ctx: Must specify ellipsoid or sphere"); + return pj_default_destructor (PIN, proj_errno(PIN)); + } + else { + PIN->f = 1.0/298.257223563; + PIN->a_orig = PIN->a = 6378137.0; + PIN->es_orig = PIN->es = PIN->f*(2-PIN->f); + } } + PIN->a_orig = PIN->a; + PIN->es_orig = PIN->es; + if (pj_calc_ellipsoid_params (PIN, PIN->a, PIN->es)) + return pj_default_destructor (PIN, PJD_ERR_ECCENTRICITY_IS_ONE); /* Now that we have ellipse information check for WGS84 datum */ if( PIN->datum_type == PJD_3PARAM -- cgit v1.2.3 From f1dd367c64de4f48eb48f6dcf17c2be93c7eaafc Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Mon, 12 Feb 2018 16:45:09 +0100 Subject: Avoid invalid ellps error messages from pj_init (#794) Reset error type PJD_ERR_MAJOR_AXIS_NOT_GIVEN for operations that do not need an ellipsoid. --- src/pj_init.c | 2 ++ test/gie/4D-API_cs2cs-style.gie | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/pj_init.c b/src/pj_init.c index bf098686..78486480 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -600,6 +600,8 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { return pj_default_destructor (PIN, proj_errno(PIN)); } else { + if (PJD_ERR_MAJOR_AXIS_NOT_GIVEN==proj_errno (PIN)) + proj_errno_reset (PIN); PIN->f = 1.0/298.257223563; PIN->a_orig = PIN->a = 6378137.0; PIN->es_orig = PIN->es = PIN->f*(2-PIN->f); diff --git a/test/gie/4D-API_cs2cs-style.gie b/test/gie/4D-API_cs2cs-style.gie index 2b7a851d..ed67afce 100644 --- a/test/gie/4D-API_cs2cs-style.gie +++ b/test/gie/4D-API_cs2cs-style.gie @@ -161,14 +161,29 @@ expect -7424275.1946 -36.0213 1391493.6349 0.0000 ------------------------------------------------------------------------------- -A test point from a comment by Github user c0nk +A test case from a comment by Github user c0nk ------------------------------------------------------------------------------- operation proj=somerc lat_0=46.95240555555556 lon_0=7.439583333333333 k_0=1 x_0=2600000 y_0=1200000 ellps=bessel - towgs84=674.374,15.056,405.346 + towgs84=674.374,15.056,405.346 no_defs ------------------------------------------------------------------------------- -tolerance 20 cm # lax tolerance due to widely distributed, bad egm96 file +tolerance 20 cm +accept 7.438632495 46.951082877 +expect 2600000.0 1200000.0 +------------------------------------------------------------------------------- +Same test, but now implemented as a pipeline. This is for testing a nasty bug, +where, at the end of pipeline creation, a false warning about missing ellps was +left behind from the creation of the Helmert step (now repaired in pj_init). +------------------------------------------------------------------------------- +operation proj=pipeline + step proj=cart ellps=WGS84 no_defs + step proj=helmert x=674.37400 y=15.05600 z=405.34600 inv no_defs + step proj=cart ellps=bessel no_defs inv + step proj=somerc lat_0=46.95240555555556 lon_0=7.439583333333333 + k_0=1 x_0=2600000 y_0=1200000 ellps=bessel units=m no_defs +------------------------------------------------------------------------------- +tolerance 20 cm accept 7.438632495 46.951082877 expect 2600000.0 1200000.0 ------------------------------------------------------------------------------- -- cgit v1.2.3 From 60566a2239328d83ba809b3673a852ba7eab3690 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Mon, 12 Feb 2018 16:46:24 +0100 Subject: Make proj_pj_info work correctly for pipelines (#795) Due to the slightly involved way a pipeline is set up, only a small subset of the definition parameters are directly read by the pj_init code. The remaining parameters will not get their "used" flag set, and for that reason will not be included in the projection definition element of a PJ_PROJ_INFO, returned by proj_pj_info. For now, we force the "used" flag of all elements of a pipeline to be set. The code is tested by introducing cct functionality for printing the projection definition used. --- src/PJ_pipeline.c | 10 ++++++---- src/cct.c | 6 ++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/PJ_pipeline.c b/src/PJ_pipeline.c index 2f904ab1..25c7a953 100644 --- a/src/PJ_pipeline.c +++ b/src/PJ_pipeline.c @@ -240,11 +240,13 @@ static PJ *pj_create_pipeline (PJ *P, size_t steps) { -/* count the number of args in pipeline definition */ +/* count the number of args in pipeline definition, and mark all args as used */ static size_t argc_params (paralist *params) { size_t argc = 0; - for (; params != 0; params = params->next) + for (; params != 0; params = params->next) { argc++; + params->used = 1; + } return ++argc; /* one extra for the sentinel */ } @@ -414,7 +416,7 @@ PJ *OPERATION(pipeline,0) { err = proj_errno_reset (P); next_step = proj_create_argv (P->ctx, current_argc, current_argv); - proj_log_trace (P, "Pipeline: Step %d at %p", i, next_step); + proj_log_trace (P, "Pipeline: Step %d (%s) at %p", i, current_argv[0], next_step); if (0==next_step) { /* The step init failed, but possibly without setting errno. If so, we say "malformed" */ @@ -436,7 +438,7 @@ PJ *OPERATION(pipeline,0) { P->opaque->pipeline[i+1] = next_step; - proj_log_trace (P, "Pipeline at [%p]: step at [%p] done", P, next_step); + proj_log_trace (P, "Pipeline at [%p]: step at [%p] (%s) done", P, next_step, current_argv[0]); } /* Require a forward path through the pipeline */ diff --git a/src/cct.c b/src/cct.c index 2ce478bd..dc68122d 100644 --- a/src/cct.c +++ b/src/cct.c @@ -151,6 +151,7 @@ static const char usage[] = { int main(int argc, char **argv) { PJ *P; PJ_COORD point; + PJ_PROJ_INFO info; OPTARGS *o; FILE *fout = stdout; char *buf; @@ -222,6 +223,11 @@ int main(int argc, char **argv) { return 1; } + if (verbose > 4) { + info = proj_pj_info (P); + fprintf (stdout, "Final: %s argc=%d pargc=%d\n", info.definition, argc, o->pargc); + } + if (direction==-1) { /* fail if an inverse operation is not available */ if (!proj_pj_info(P).has_inverse) { -- cgit v1.2.3 From 715ec0b90aec05f15554c6591ea8cfd09d5cf043 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Mon, 12 Feb 2018 20:44:00 +0100 Subject: Ensure cs2cs emulation gets correct ellipsoid defn (#798) Copy ellipsoid definition for proj=cart directly into the proj_create call, rather than calling pj_inherit_ellipsoid_def afterwards. Previously, the ellipsoid definition was left out from the call. pj_init_ctx would then pick up WGS84 from proj_def.dat, and the init would succeed (and the possibly wrong ellipsoid definition would later on be overwritten with the correct values by pj_inherit_ellipsoid_def. But if PROJ_LIB was not set or proj_def.dat was inaccessible for other reasons, things went wrong. --- src/pj_geocent.c | 2 +- src/proj_4D_api.c | 8 +++++--- test/gie/4D-API_cs2cs-style.gie | 3 +-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/pj_geocent.c b/src/pj_geocent.c index 6530b103..3d771c43 100644 --- a/src/pj_geocent.c +++ b/src/pj_geocent.c @@ -48,7 +48,7 @@ static LP inverse(XY xy, PJ *P) { return lp; } -PJ *PROJECTION(geocent) { +PJ *CONVERSION (geocent, 0) { P->is_geocent = 1; P->x0 = 0.0; P->y0 = 0.0; diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index 796e5769..dab4b409 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -414,6 +414,8 @@ static int pj_cs2cs_emulation_setup (PJ *P) { If any cs2cs style modifiers are given (axis=..., towgs84=..., ) create the 4D API equivalent operations, so the preparation and finalization steps in the pj_inv/pj_fwd invocators can emulate the behaviour of pj_transform and the cs2cs app. + +Returns 1 on success, 0 on failure **************************************************************************************/ PJ *Q; paralist *p; @@ -502,12 +504,11 @@ invocators can emulate the behaviour of pj_transform and the cs2cs app. /* We also need cartesian/geographical transformations if we are working in */ /* geocentric/cartesian space or we need to do a Helmert transform. */ if (P->is_geocent || P->helmert) { - char def[100]; - sprintf (def, "break_cs2cs_recursion proj=cart"); + char def[150]; + sprintf (def, "break_cs2cs_recursion proj=cart a=%40.20g f=%40.20g", P->a, P->f); Q = proj_create (P->ctx, def); if (0==Q) return 0; - pj_inherit_ellipsoid_def (P, Q); P->cart = skip_prep_fin (Q); sprintf (def, "break_cs2cs_recursion proj=cart ellps=WGS84"); @@ -521,6 +522,7 @@ invocators can emulate the behaviour of pj_transform and the cs2cs app. } + /*************************************************************************************/ PJ *proj_create (PJ_CONTEXT *ctx, const char *definition) { /************************************************************************************** diff --git a/test/gie/4D-API_cs2cs-style.gie b/test/gie/4D-API_cs2cs-style.gie index ed67afce..66da0633 100644 --- a/test/gie/4D-API_cs2cs-style.gie +++ b/test/gie/4D-API_cs2cs-style.gie @@ -22,7 +22,7 @@ Test the handling of the +towgs84 parameter. This example is from Lotti Jivall: "Simplified transformations from ITRF2008/IGS08 to ETRS89 for maritime applications" (see also more_builtins.gie) ------------------------------------------------------------------------------- -operation proj=geocent ellps=WGS84 +operation proj=geocent towgs84 = 0.676780, 0.654950, -0.528270, -0.022742, 0.012667, 0.022704, -0.01070 @@ -36,7 +36,6 @@ expect 3565285.41342351 855948.67986759 5201382.72939791 ------------------------------------------------------------------------------- - ------------------------------------------------------------------------------- This example is a random point, transformed from ED50 to ETRS89 using KMStrans2. ------------------------------------------------------------------------------- -- cgit v1.2.3 From ab2d175bf1674e3472576250281e7fdb68f09198 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Mon, 12 Feb 2018 22:45:20 +0100 Subject: Rename gie_failing to work around MS wildcard bug (#799) For reasons unknown to anyone but the geniuses from Redmond: In MSWindows, the wildcard pattern "*.gie" expands to all files having an extension *starting* with ".gie". In other words "dir *.gie" will list files with extension ".gie" *and* with extension ".gie_failing". This means that running "gie test\gigs\*.gie" will run all gigs tests, even the ones known to fail. So rather than getting a quick check for regressions, one gets a lot of noise and no easy way to be sure whether any regressions have appeared. To work around this oddity, we rename all files ending in ".gie_failing" to end in ".gie.failing" - and while at it, adding all the non-failing gigs tests to the AppVeyor test suite. This extends the regression test suite, run at the end of each AppVeyor integration, to over 2500 individual tests. Test coverage, however, is still hovering just below 75%, so there's still plenty of room and reason for additional tests. --- appveyor.yml | 2 +- test/gigs/5101.4-jhs.gie.failing | 300 ++++++++++++++++++++++ test/gigs/5101.4-jhs.gie_failing | 300 ---------------------- test/gigs/5102.2.gie.failing | 252 ++++++++++++++++++ test/gigs/5102.2.gie_failing | 252 ------------------ test/gigs/5104.gie.failing | 264 +++++++++++++++++++ test/gigs/5104.gie_failing | 264 ------------------- test/gigs/5105.1.gie.failing | 300 ++++++++++++++++++++++ test/gigs/5105.1.gie_failing | 300 ---------------------- test/gigs/5108.gie.failing | 235 +++++++++++++++++ test/gigs/5108.gie_failing | 235 ----------------- test/gigs/5110.gie.failing | 164 ++++++++++++ test/gigs/5110.gie_failing | 164 ------------ test/gigs/5111.2.gie.failing | 444 ++++++++++++++++++++++++++++++++ test/gigs/5111.2.gie_failing | 444 -------------------------------- test/gigs/5203.1.gie.failing | 192 ++++++++++++++ test/gigs/5203.1.gie_failing | 192 -------------- test/gigs/5204.1.gie.failing | 192 ++++++++++++++ test/gigs/5204.1.gie_failing | 192 -------------- test/gigs/5205.1.gie.failing | 192 ++++++++++++++ test/gigs/5205.1.gie_failing | 192 -------------- test/gigs/5206.gie.failing | 540 +++++++++++++++++++++++++++++++++++++++ test/gigs/5206.gie_failing | 540 --------------------------------------- test/gigs/5207.1.gie.failing | 252 ++++++++++++++++++ test/gigs/5207.1.gie_failing | 252 ------------------ test/gigs/5207.2.gie.failing | 456 +++++++++++++++++++++++++++++++++ test/gigs/5207.2.gie_failing | 456 --------------------------------- 27 files changed, 3784 insertions(+), 3784 deletions(-) create mode 100644 test/gigs/5101.4-jhs.gie.failing delete mode 100644 test/gigs/5101.4-jhs.gie_failing create mode 100644 test/gigs/5102.2.gie.failing delete mode 100644 test/gigs/5102.2.gie_failing create mode 100644 test/gigs/5104.gie.failing delete mode 100644 test/gigs/5104.gie_failing create mode 100644 test/gigs/5105.1.gie.failing delete mode 100644 test/gigs/5105.1.gie_failing create mode 100644 test/gigs/5108.gie.failing delete mode 100644 test/gigs/5108.gie_failing create mode 100644 test/gigs/5110.gie.failing delete mode 100644 test/gigs/5110.gie_failing create mode 100644 test/gigs/5111.2.gie.failing delete mode 100644 test/gigs/5111.2.gie_failing create mode 100644 test/gigs/5203.1.gie.failing delete mode 100644 test/gigs/5203.1.gie_failing create mode 100644 test/gigs/5204.1.gie.failing delete mode 100644 test/gigs/5204.1.gie_failing create mode 100644 test/gigs/5205.1.gie.failing delete mode 100644 test/gigs/5205.1.gie_failing create mode 100644 test/gigs/5206.gie.failing delete mode 100644 test/gigs/5206.gie_failing create mode 100644 test/gigs/5207.1.gie.failing delete mode 100644 test/gigs/5207.1.gie_failing create mode 100644 test/gigs/5207.2.gie.failing delete mode 100644 test/gigs/5207.2.gie_failing diff --git a/appveyor.yml b/appveyor.yml index 52993558..11f16b5d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -62,7 +62,7 @@ test_script: - dir ..\test\gie - echo "Contents of PROJ_LIB " %PROJ_LIB% - dir %PROJ_LIB% - - gie.exe ..\test\gie\*.gie + - gie.exe ..\test\gie\*.gie ..\test\gigs\*.gie deploy: off diff --git a/test/gigs/5101.4-jhs.gie.failing b/test/gigs/5101.4-jhs.gie.failing new file mode 100644 index 00000000..615bf60b --- /dev/null +++ b/test/gigs/5101.4-jhs.gie.failing @@ -0,0 +1,300 @@ +-------------------------------------------------------------------------------- + +Test 5101 (part 4), Transverse Mercator, v2-0_2011-06-28, recommended JHS formula + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4190 +inv + +step +init=epsg:22175 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept -63.9993433 80.0002644 +expect 5422500.0 18889800.0 + +tolerance 0.03 m +accept -63.9998472 60.0001191 +expect 5276900.0 16662800.0 + +tolerance 0.03 m +accept -63.9997361 40.0003081 +expect 5158399.999 14439199.99 + +tolerance 0.03 m +accept -64.0004605 19.9996448 +expect 5081100.0 12219300.0 + +tolerance 0.03 m +accept -63.9996186 0.0003092 +expect 5054400.005 10002000.0 + +tolerance 0.03 m +accept -64.0004675 -19.9999283 +expect 5081100.017 7784599.993 + +tolerance 0.03 m +accept -63.9997001 -39.9996924 +expect 5158400.0 5564800.0 + +tolerance 0.03 m +accept -63.9998814 -60.0004008 +expect 5276899.994 3341099.995 + +tolerance 0.03 m +accept -63.9991006 -79.9996521 +expect 5422500.0 1114200.0 + +tolerance 0.03 m +accept -70.0002089 -40.000215 +expect 4645300.113 5524200.123 + +tolerance 0.03 m +accept -69.0001441 -40.0002935 +expect 4730900.0 5533400.0 + +tolerance 0.03 m +accept -67.9995333 -39.9996136 +expect 4816500.043 5541700.028 + +tolerance 0.03 m +accept -66.9998073 -39.9999313 +expect 4902000.0 5548900.0 + +tolerance 0.03 m +accept -65.9996522 -39.9995894 +expect 4987500.009 5555200.001 + +tolerance 0.03 m +accept -64.9992796 -40.000411 +expect 5073000.0 5560400.0 + +tolerance 0.03 m +accept -63.9997 -39.9996925 +expect 5158400.01 5564799.987 + +tolerance 0.03 m +accept -62.9999842 -40.0002087 +expect 5243800.0 5568100.0 + +tolerance 0.03 m +accept -62.0000778 -40.0001803 +expect 5329199.995 5570500.009 + +tolerance 0.03 m +accept -61.0000574 -39.9996182 +expect 5414600.0 5572000.0 + +tolerance 0.03 m +accept -60 -40.0003306 +expect 5500000.0 5572399.996 + +tolerance 0.03 m +accept -58.9999426 -39.9996182 +expect 5585400.0 5572000.0 + +tolerance 0.03 m +accept -57.9999222 -40.0001803 +expect 5670800.005 5570500.009 + +tolerance 0.03 m +accept -57.0000158 -40.0002087 +expect 5756200.0 5568100.0 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:22175 +inv + +step +init=epsg:4190 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 5422500.0 18889800.0 +expect -63.9993433 80.0002644 + +tolerance 0.03 m +accept 5276900.0 16662800.0 +expect -63.9998472 60.0001191 + +tolerance 0.03 m +accept 5158399.999 14439199.99 +expect -63.9997361 40.0003081 + +tolerance 0.03 m +accept 5081100.0 12219300.0 +expect -64.0004605 19.9996448 + +tolerance 0.03 m +accept 5054400.005 10002000.0 +expect -63.9996186 0.0003092 + +tolerance 0.03 m +accept 5081100.017 7784599.993 +expect -64.0004675 -19.9999283 + +tolerance 0.03 m +accept 5158400.0 5564800.0 +expect -63.9997001 -39.9996924 + +tolerance 0.03 m +accept 5276899.994 3341099.995 +expect -63.9998814 -60.0004008 + +tolerance 0.03 m +accept 5422500.0 1114200.0 +expect -63.9991006 -79.9996521 + +tolerance 0.03 m +accept 4645300.113 5524200.123 +expect -70.0002089 -40.000215 + +tolerance 0.03 m +accept 4730900.0 5533400.0 +expect -69.0001441 -40.0002935 + +tolerance 0.03 m +accept 4816500.043 5541700.028 +expect -67.9995333 -39.9996136 + +tolerance 0.03 m +accept 4902000.0 5548900.0 +expect -66.9998073 -39.9999313 + +tolerance 0.03 m +accept 4987500.009 5555200.001 +expect -65.9996522 -39.9995894 + +tolerance 0.03 m +accept 5073000.0 5560400.0 +expect -64.9992796 -40.000411 + +tolerance 0.03 m +accept 5158400.01 5564799.987 +expect -63.9997 -39.9996925 + +tolerance 0.03 m +accept 5243800.0 5568100.0 +expect -62.9999842 -40.0002087 + +tolerance 0.03 m +accept 5329199.995 5570500.009 +expect -62.0000778 -40.0001803 + +tolerance 0.03 m +accept 5414600.0 5572000.0 +expect -61.0000574 -39.9996182 + +tolerance 0.03 m +accept 5500000.0 5572399.996 +expect -60 -40.0003306 + +tolerance 0.03 m +accept 5585400.0 5572000.0 +expect -58.9999426 -39.9996182 + +tolerance 0.03 m +accept 5670800.005 5570500.009 +expect -57.9999222 -40.0001803 + +tolerance 0.03 m +accept 5756200.0 5568100.0 +expect -57.0000158 -40.0002087 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4190 +inv + +step +init=epsg:22175 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept -63.9993433 80.0002644 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9998472 60.0001191 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9997361 40.0003081 +roundtrip 1000 + +tolerance 0.006 m +accept -64.0004605 19.9996448 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9996186 0.0003092 +roundtrip 1000 + +tolerance 0.006 m +accept -64.0004675 -19.9999283 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9997001 -39.9996924 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9998814 -60.0004008 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9991006 -79.9996521 +roundtrip 1000 + +tolerance 0.006 m +accept -70.0002089 -40.000215 +roundtrip 1000 + +tolerance 0.006 m +accept -69.0001441 -40.0002935 +roundtrip 1000 + +tolerance 0.006 m +accept -67.9995333 -39.9996136 +roundtrip 1000 + +tolerance 0.006 m +accept -66.9998073 -39.9999313 +roundtrip 1000 + +tolerance 0.006 m +accept -65.9996522 -39.9995894 +roundtrip 1000 + +tolerance 0.006 m +accept -64.9992796 -40.000411 +roundtrip 1000 + +tolerance 0.006 m +accept -63.9997 -39.9996925 +roundtrip 1000 + +tolerance 0.006 m +accept -62.9999842 -40.0002087 +roundtrip 1000 + +tolerance 0.006 m +accept -62.0000778 -40.0001803 +roundtrip 1000 + +tolerance 0.006 m +accept -61.0000574 -39.9996182 +roundtrip 1000 + +tolerance 0.006 m +accept -60 -40.0003306 +roundtrip 1000 + +tolerance 0.006 m +accept -58.9999426 -39.9996182 +roundtrip 1000 + +tolerance 0.006 m +accept -57.9999222 -40.0001803 +roundtrip 1000 + +tolerance 0.006 m +accept -57.0000158 -40.0002087 +roundtrip 1000 + + diff --git a/test/gigs/5101.4-jhs.gie_failing b/test/gigs/5101.4-jhs.gie_failing deleted file mode 100644 index 615bf60b..00000000 --- a/test/gigs/5101.4-jhs.gie_failing +++ /dev/null @@ -1,300 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5101 (part 4), Transverse Mercator, v2-0_2011-06-28, recommended JHS formula - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4190 +inv - +step +init=epsg:22175 --------------------------------------------------------------------------------- -tolerance 0.03 m -accept -63.9993433 80.0002644 -expect 5422500.0 18889800.0 - -tolerance 0.03 m -accept -63.9998472 60.0001191 -expect 5276900.0 16662800.0 - -tolerance 0.03 m -accept -63.9997361 40.0003081 -expect 5158399.999 14439199.99 - -tolerance 0.03 m -accept -64.0004605 19.9996448 -expect 5081100.0 12219300.0 - -tolerance 0.03 m -accept -63.9996186 0.0003092 -expect 5054400.005 10002000.0 - -tolerance 0.03 m -accept -64.0004675 -19.9999283 -expect 5081100.017 7784599.993 - -tolerance 0.03 m -accept -63.9997001 -39.9996924 -expect 5158400.0 5564800.0 - -tolerance 0.03 m -accept -63.9998814 -60.0004008 -expect 5276899.994 3341099.995 - -tolerance 0.03 m -accept -63.9991006 -79.9996521 -expect 5422500.0 1114200.0 - -tolerance 0.03 m -accept -70.0002089 -40.000215 -expect 4645300.113 5524200.123 - -tolerance 0.03 m -accept -69.0001441 -40.0002935 -expect 4730900.0 5533400.0 - -tolerance 0.03 m -accept -67.9995333 -39.9996136 -expect 4816500.043 5541700.028 - -tolerance 0.03 m -accept -66.9998073 -39.9999313 -expect 4902000.0 5548900.0 - -tolerance 0.03 m -accept -65.9996522 -39.9995894 -expect 4987500.009 5555200.001 - -tolerance 0.03 m -accept -64.9992796 -40.000411 -expect 5073000.0 5560400.0 - -tolerance 0.03 m -accept -63.9997 -39.9996925 -expect 5158400.01 5564799.987 - -tolerance 0.03 m -accept -62.9999842 -40.0002087 -expect 5243800.0 5568100.0 - -tolerance 0.03 m -accept -62.0000778 -40.0001803 -expect 5329199.995 5570500.009 - -tolerance 0.03 m -accept -61.0000574 -39.9996182 -expect 5414600.0 5572000.0 - -tolerance 0.03 m -accept -60 -40.0003306 -expect 5500000.0 5572399.996 - -tolerance 0.03 m -accept -58.9999426 -39.9996182 -expect 5585400.0 5572000.0 - -tolerance 0.03 m -accept -57.9999222 -40.0001803 -expect 5670800.005 5570500.009 - -tolerance 0.03 m -accept -57.0000158 -40.0002087 -expect 5756200.0 5568100.0 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:22175 +inv - +step +init=epsg:4190 --------------------------------------------------------------------------------- -tolerance 0.03 m -accept 5422500.0 18889800.0 -expect -63.9993433 80.0002644 - -tolerance 0.03 m -accept 5276900.0 16662800.0 -expect -63.9998472 60.0001191 - -tolerance 0.03 m -accept 5158399.999 14439199.99 -expect -63.9997361 40.0003081 - -tolerance 0.03 m -accept 5081100.0 12219300.0 -expect -64.0004605 19.9996448 - -tolerance 0.03 m -accept 5054400.005 10002000.0 -expect -63.9996186 0.0003092 - -tolerance 0.03 m -accept 5081100.017 7784599.993 -expect -64.0004675 -19.9999283 - -tolerance 0.03 m -accept 5158400.0 5564800.0 -expect -63.9997001 -39.9996924 - -tolerance 0.03 m -accept 5276899.994 3341099.995 -expect -63.9998814 -60.0004008 - -tolerance 0.03 m -accept 5422500.0 1114200.0 -expect -63.9991006 -79.9996521 - -tolerance 0.03 m -accept 4645300.113 5524200.123 -expect -70.0002089 -40.000215 - -tolerance 0.03 m -accept 4730900.0 5533400.0 -expect -69.0001441 -40.0002935 - -tolerance 0.03 m -accept 4816500.043 5541700.028 -expect -67.9995333 -39.9996136 - -tolerance 0.03 m -accept 4902000.0 5548900.0 -expect -66.9998073 -39.9999313 - -tolerance 0.03 m -accept 4987500.009 5555200.001 -expect -65.9996522 -39.9995894 - -tolerance 0.03 m -accept 5073000.0 5560400.0 -expect -64.9992796 -40.000411 - -tolerance 0.03 m -accept 5158400.01 5564799.987 -expect -63.9997 -39.9996925 - -tolerance 0.03 m -accept 5243800.0 5568100.0 -expect -62.9999842 -40.0002087 - -tolerance 0.03 m -accept 5329199.995 5570500.009 -expect -62.0000778 -40.0001803 - -tolerance 0.03 m -accept 5414600.0 5572000.0 -expect -61.0000574 -39.9996182 - -tolerance 0.03 m -accept 5500000.0 5572399.996 -expect -60 -40.0003306 - -tolerance 0.03 m -accept 5585400.0 5572000.0 -expect -58.9999426 -39.9996182 - -tolerance 0.03 m -accept 5670800.005 5570500.009 -expect -57.9999222 -40.0001803 - -tolerance 0.03 m -accept 5756200.0 5568100.0 -expect -57.0000158 -40.0002087 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4190 +inv - +step +init=epsg:22175 --------------------------------------------------------------------------------- -tolerance 0.006 m -accept -63.9993433 80.0002644 -roundtrip 1000 - -tolerance 0.006 m -accept -63.9998472 60.0001191 -roundtrip 1000 - -tolerance 0.006 m -accept -63.9997361 40.0003081 -roundtrip 1000 - -tolerance 0.006 m -accept -64.0004605 19.9996448 -roundtrip 1000 - -tolerance 0.006 m -accept -63.9996186 0.0003092 -roundtrip 1000 - -tolerance 0.006 m -accept -64.0004675 -19.9999283 -roundtrip 1000 - -tolerance 0.006 m -accept -63.9997001 -39.9996924 -roundtrip 1000 - -tolerance 0.006 m -accept -63.9998814 -60.0004008 -roundtrip 1000 - -tolerance 0.006 m -accept -63.9991006 -79.9996521 -roundtrip 1000 - -tolerance 0.006 m -accept -70.0002089 -40.000215 -roundtrip 1000 - -tolerance 0.006 m -accept -69.0001441 -40.0002935 -roundtrip 1000 - -tolerance 0.006 m -accept -67.9995333 -39.9996136 -roundtrip 1000 - -tolerance 0.006 m -accept -66.9998073 -39.9999313 -roundtrip 1000 - -tolerance 0.006 m -accept -65.9996522 -39.9995894 -roundtrip 1000 - -tolerance 0.006 m -accept -64.9992796 -40.000411 -roundtrip 1000 - -tolerance 0.006 m -accept -63.9997 -39.9996925 -roundtrip 1000 - -tolerance 0.006 m -accept -62.9999842 -40.0002087 -roundtrip 1000 - -tolerance 0.006 m -accept -62.0000778 -40.0001803 -roundtrip 1000 - -tolerance 0.006 m -accept -61.0000574 -39.9996182 -roundtrip 1000 - -tolerance 0.006 m -accept -60 -40.0003306 -roundtrip 1000 - -tolerance 0.006 m -accept -58.9999426 -39.9996182 -roundtrip 1000 - -tolerance 0.006 m -accept -57.9999222 -40.0001803 -roundtrip 1000 - -tolerance 0.006 m -accept -57.0000158 -40.0002087 -roundtrip 1000 - - diff --git a/test/gigs/5102.2.gie.failing b/test/gigs/5102.2.gie.failing new file mode 100644 index 00000000..db812dbd --- /dev/null +++ b/test/gigs/5102.2.gie.failing @@ -0,0 +1,252 @@ +-------------------------------------------------------------------------------- + +Test 5102 (part 2), Lambert Conic Conformal (1SP), v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4807 +inv + +step +init=epsg:27572 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 2.9586342556 64.4444444444 +expect 760724.023 3457334.864 + +tolerance 0.03 m +accept 2.9586342556 63.3333333333 +expect 764567.882 3343917.044 + +tolerance 0.03 m +accept 2.9586342556 62.2222222222 +expect 768397.648 3230915.06 + +tolerance 0.03 m +accept 2.9586342556 61.1111111111 +expect 772214.859 3118283.535 + +tolerance 0.03 m +accept 2.9586342556 60 +expect 776020.989 3005978.979 + +tolerance 0.03 m +accept 2.9586342556 58.8888888889 +expect 779817.454 2893959.584 + +tolerance 0.03 m +accept 1.8475231444 56.6666666667 +expect 717027.602 2668679.866 + +tolerance 0.03 m +accept 1.8475231444 55.5555555556 +expect 719385.487 2557240.347 + +tolerance 0.03 m +accept 1.8475231444 54.4444444444 +expect 721740.59 2445932.319 + +tolerance 0.03 m +accept 1.8475231444 52 +expect 726915.726 2201342.51839 + +tolerance 0.03 m +accept 0.7364120333 58.8888888889 +expect 644765.081 2891102.088 + +tolerance 0.03 m +accept 1.8475231444 58.8888888889 +expect 712300.356 2892101.266 + +tolerance 0.03 m +accept 2.9586342556 58.8888888889 +expect 779817.454 2893959.584 + +tolerance 0.03 m +accept 4.0697453667 58.8888888889 +expect 847305.444 2896676.742 + +tolerance 0.03 m +accept 5.1808564778 58.8888888889 +expect 914753.403 2900252.301 + +tolerance 0.03 m +accept 6.2919675889 58.8888888889 +expect 982150.413 2904685.68 + +tolerance 0.03 m +accept 7.4030787 58.8888888889 +expect 1049485.565 2909976.163 + +tolerance 0.03 m +accept 8.5141898111 58.8888888889 +expect 1116747.958 2916122.894 + +tolerance 0.03 m +accept 9.6253009222 58.8888888889 +expect 1183926.705 2923124.876 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:27572 +inv + +step +init=epsg:4807 +-------------------------------------------------------------------------------- +tolerance 0.03 m +accept 760724.023 3457334.864 +expect 2.9586342556 64.4444444444 + +tolerance 0.03 m +accept 764567.882 3343917.044 +expect 2.9586342556 63.3333333333 + +tolerance 0.03 m +accept 768397.648 3230915.06 +expect 2.9586342556 62.2222222222 + +tolerance 0.03 m +accept 772214.859 3118283.535 +expect 2.9586342556 61.1111111111 + +tolerance 0.03 m +accept 776020.989 3005978.979 +expect 2.9586342556 60 + +tolerance 0.03 m +accept 779817.454 2893959.584 +expect 2.9586342556 58.8888888889 + +tolerance 0.03 m +accept 717027.602 2668679.866 +expect 1.8475231444 56.6666666667 + +tolerance 0.03 m +accept 719385.487 2557240.347 +expect 1.8475231444 55.5555555556 + +tolerance 0.03 m +accept 721740.59 2445932.319 +expect 1.8475231444 54.4444444444 + +tolerance 0.03 m +accept 726915.726 2201342.51839 +expect 1.8475231444 52 + +tolerance 0.03 m +accept 644765.081 2891102.088 +expect 0.7364120333 58.8888888889 + +tolerance 0.03 m +accept 712300.356 2892101.266 +expect 1.8475231444 58.8888888889 + +tolerance 0.03 m +accept 779817.454 2893959.584 +expect 2.9586342556 58.8888888889 + +tolerance 0.03 m +accept 847305.444 2896676.742 +expect 4.0697453667 58.8888888889 + +tolerance 0.03 m +accept 914753.403 2900252.301 +expect 5.1808564778 58.8888888889 + +tolerance 0.03 m +accept 982150.413 2904685.68 +expect 6.2919675889 58.8888888889 + +tolerance 0.03 m +accept 1049485.565 2909976.163 +expect 7.4030787 58.8888888889 + +tolerance 0.03 m +accept 1116747.958 2916122.894 +expect 8.5141898111 58.8888888889 + +tolerance 0.03 m +accept 1183926.705 2923124.876 +expect 9.6253009222 58.8888888889 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4807 +inv + +step +init=epsg:27572 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 2.9586342556 64.4444444444 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9586342556 63.3333333333 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9586342556 62.2222222222 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9586342556 61.1111111111 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9586342556 60 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9586342556 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 1.8475231444 56.6666666667 +roundtrip 1000 + +tolerance 0.006 m +accept 1.8475231444 55.5555555556 +roundtrip 1000 + +tolerance 0.006 m +accept 1.8475231444 54.4444444444 +roundtrip 1000 + +tolerance 0.006 m +accept 1.8475231444 52 +roundtrip 1000 + +tolerance 0.006 m +accept 0.7364120333 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 1.8475231444 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 2.9586342556 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 4.0697453667 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 5.1808564778 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 6.2919675889 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 7.4030787 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 8.5141898111 58.8888888889 +roundtrip 1000 + +tolerance 0.006 m +accept 9.6253009222 58.8888888889 +roundtrip 1000 + + diff --git a/test/gigs/5102.2.gie_failing b/test/gigs/5102.2.gie_failing deleted file mode 100644 index db812dbd..00000000 --- a/test/gigs/5102.2.gie_failing +++ /dev/null @@ -1,252 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5102 (part 2), Lambert Conic Conformal (1SP), v2-0_2011-06-28. - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4807 +inv - +step +init=epsg:27572 --------------------------------------------------------------------------------- -tolerance 0.03 m -accept 2.9586342556 64.4444444444 -expect 760724.023 3457334.864 - -tolerance 0.03 m -accept 2.9586342556 63.3333333333 -expect 764567.882 3343917.044 - -tolerance 0.03 m -accept 2.9586342556 62.2222222222 -expect 768397.648 3230915.06 - -tolerance 0.03 m -accept 2.9586342556 61.1111111111 -expect 772214.859 3118283.535 - -tolerance 0.03 m -accept 2.9586342556 60 -expect 776020.989 3005978.979 - -tolerance 0.03 m -accept 2.9586342556 58.8888888889 -expect 779817.454 2893959.584 - -tolerance 0.03 m -accept 1.8475231444 56.6666666667 -expect 717027.602 2668679.866 - -tolerance 0.03 m -accept 1.8475231444 55.5555555556 -expect 719385.487 2557240.347 - -tolerance 0.03 m -accept 1.8475231444 54.4444444444 -expect 721740.59 2445932.319 - -tolerance 0.03 m -accept 1.8475231444 52 -expect 726915.726 2201342.51839 - -tolerance 0.03 m -accept 0.7364120333 58.8888888889 -expect 644765.081 2891102.088 - -tolerance 0.03 m -accept 1.8475231444 58.8888888889 -expect 712300.356 2892101.266 - -tolerance 0.03 m -accept 2.9586342556 58.8888888889 -expect 779817.454 2893959.584 - -tolerance 0.03 m -accept 4.0697453667 58.8888888889 -expect 847305.444 2896676.742 - -tolerance 0.03 m -accept 5.1808564778 58.8888888889 -expect 914753.403 2900252.301 - -tolerance 0.03 m -accept 6.2919675889 58.8888888889 -expect 982150.413 2904685.68 - -tolerance 0.03 m -accept 7.4030787 58.8888888889 -expect 1049485.565 2909976.163 - -tolerance 0.03 m -accept 8.5141898111 58.8888888889 -expect 1116747.958 2916122.894 - -tolerance 0.03 m -accept 9.6253009222 58.8888888889 -expect 1183926.705 2923124.876 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:27572 +inv - +step +init=epsg:4807 --------------------------------------------------------------------------------- -tolerance 0.03 m -accept 760724.023 3457334.864 -expect 2.9586342556 64.4444444444 - -tolerance 0.03 m -accept 764567.882 3343917.044 -expect 2.9586342556 63.3333333333 - -tolerance 0.03 m -accept 768397.648 3230915.06 -expect 2.9586342556 62.2222222222 - -tolerance 0.03 m -accept 772214.859 3118283.535 -expect 2.9586342556 61.1111111111 - -tolerance 0.03 m -accept 776020.989 3005978.979 -expect 2.9586342556 60 - -tolerance 0.03 m -accept 779817.454 2893959.584 -expect 2.9586342556 58.8888888889 - -tolerance 0.03 m -accept 717027.602 2668679.866 -expect 1.8475231444 56.6666666667 - -tolerance 0.03 m -accept 719385.487 2557240.347 -expect 1.8475231444 55.5555555556 - -tolerance 0.03 m -accept 721740.59 2445932.319 -expect 1.8475231444 54.4444444444 - -tolerance 0.03 m -accept 726915.726 2201342.51839 -expect 1.8475231444 52 - -tolerance 0.03 m -accept 644765.081 2891102.088 -expect 0.7364120333 58.8888888889 - -tolerance 0.03 m -accept 712300.356 2892101.266 -expect 1.8475231444 58.8888888889 - -tolerance 0.03 m -accept 779817.454 2893959.584 -expect 2.9586342556 58.8888888889 - -tolerance 0.03 m -accept 847305.444 2896676.742 -expect 4.0697453667 58.8888888889 - -tolerance 0.03 m -accept 914753.403 2900252.301 -expect 5.1808564778 58.8888888889 - -tolerance 0.03 m -accept 982150.413 2904685.68 -expect 6.2919675889 58.8888888889 - -tolerance 0.03 m -accept 1049485.565 2909976.163 -expect 7.4030787 58.8888888889 - -tolerance 0.03 m -accept 1116747.958 2916122.894 -expect 8.5141898111 58.8888888889 - -tolerance 0.03 m -accept 1183926.705 2923124.876 -expect 9.6253009222 58.8888888889 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4807 +inv - +step +init=epsg:27572 --------------------------------------------------------------------------------- -tolerance 0.006 m -accept 2.9586342556 64.4444444444 -roundtrip 1000 - -tolerance 0.006 m -accept 2.9586342556 63.3333333333 -roundtrip 1000 - -tolerance 0.006 m -accept 2.9586342556 62.2222222222 -roundtrip 1000 - -tolerance 0.006 m -accept 2.9586342556 61.1111111111 -roundtrip 1000 - -tolerance 0.006 m -accept 2.9586342556 60 -roundtrip 1000 - -tolerance 0.006 m -accept 2.9586342556 58.8888888889 -roundtrip 1000 - -tolerance 0.006 m -accept 1.8475231444 56.6666666667 -roundtrip 1000 - -tolerance 0.006 m -accept 1.8475231444 55.5555555556 -roundtrip 1000 - -tolerance 0.006 m -accept 1.8475231444 54.4444444444 -roundtrip 1000 - -tolerance 0.006 m -accept 1.8475231444 52 -roundtrip 1000 - -tolerance 0.006 m -accept 0.7364120333 58.8888888889 -roundtrip 1000 - -tolerance 0.006 m -accept 1.8475231444 58.8888888889 -roundtrip 1000 - -tolerance 0.006 m -accept 2.9586342556 58.8888888889 -roundtrip 1000 - -tolerance 0.006 m -accept 4.0697453667 58.8888888889 -roundtrip 1000 - -tolerance 0.006 m -accept 5.1808564778 58.8888888889 -roundtrip 1000 - -tolerance 0.006 m -accept 6.2919675889 58.8888888889 -roundtrip 1000 - -tolerance 0.006 m -accept 7.4030787 58.8888888889 -roundtrip 1000 - -tolerance 0.006 m -accept 8.5141898111 58.8888888889 -roundtrip 1000 - -tolerance 0.006 m -accept 9.6253009222 58.8888888889 -roundtrip 1000 - - diff --git a/test/gigs/5104.gie.failing b/test/gigs/5104.gie.failing new file mode 100644 index 00000000..10c42935 --- /dev/null +++ b/test/gigs/5104.gie.failing @@ -0,0 +1,264 @@ +-------------------------------------------------------------------------------- + +Test 5104, Oblique stereographic, v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4289 +inv + +step +init=epsg:28992 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 5 58 +expect 132023.27 1114054.87 + +tolerance 0.05 m +accept 5 57 +expect 131405.466 1002468.081 + +tolerance 0.05 m +accept 5 56 +expect 130792.264 890981.281 + +tolerance 0.05 m +accept 5 55 +expect 130183.56 779577.7 + +tolerance 0.05 m +accept 5 54 +expect 129579.26 668240.58 + +tolerance 0.05 m +accept 5 53 +expect 128979.26 556953.19 + +tolerance 0.05 m +accept 5.38763888889 52.1561605556 +expect 155000 463000 + +tolerance 0.05 m +accept 4 51 +expect 57605.946 335312.662 + +tolerance 0.05 m +accept 4 50 +expect 55502.306 224086.514 + +tolerance 0.05 m +accept 4.0 49.0 +expect 53412.76 112842.73 + +tolerance 0.05 m +accept 3.31372805556 47.9752611111 +expect 0 0 + +tolerance 0.05 m +accept 3 53 +expect -5253.06 559535.55 + +tolerance 0.05 m +accept 4 53 +expect 61856.78 557779.12 + +tolerance 0.05 m +accept 5 53 +expect 128979.26 556953.19 + +tolerance 0.05 m +accept 6 53 +expect 196105.28 557057.74 + +tolerance 0.05 m +accept 7 53 +expect 263225.72 558092.77 + +tolerance 0.05 m +accept 8 53 +expect 330331.46 560058.31 + +tolerance 0.05 m +accept 9 53 +expect 397413.385 562954.436 + +tolerance 0.05 m +accept 10 53 +expect 464462.35 566781.24 + +tolerance 0.05 m +accept 11 53 +expect 531469.2 571538.84 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:28992 +inv + +step +init=epsg:4289 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 132023.27 1114054.87 +expect 5 58 + +tolerance 0.05 m +accept 131405.466 1002468.081 +expect 5 57 + +tolerance 0.05 m +accept 130792.264 890981.281 +expect 5 56 + +tolerance 0.05 m +accept 130183.56 779577.7 +expect 5 55 + +tolerance 0.05 m +accept 129579.26 668240.58 +expect 5 54 + +tolerance 0.05 m +accept 128979.26 556953.19 +expect 5 53 + +tolerance 0.05 m +accept 155000 463000 +expect 5.38763888889 52.1561605556 + +tolerance 0.05 m +accept 57605.946 335312.662 +expect 4 51 + +tolerance 0.05 m +accept 55502.306 224086.514 +expect 4 50 + +tolerance 0.05 m +accept 53412.76 112842.73 +expect 4.0 49.0 + +tolerance 0.05 m +accept 0 0 +expect 3.31372805556 47.9752611111 + +tolerance 0.05 m +accept -5253.06 559535.55 +expect 3 53 + +tolerance 0.05 m +accept 61856.78 557779.12 +expect 4 53 + +tolerance 0.05 m +accept 128979.26 556953.19 +expect 5 53 + +tolerance 0.05 m +accept 196105.28 557057.74 +expect 6 53 + +tolerance 0.05 m +accept 263225.72 558092.77 +expect 7 53 + +tolerance 0.05 m +accept 330331.46 560058.31 +expect 8 53 + +tolerance 0.05 m +accept 397413.385 562954.436 +expect 9 53 + +tolerance 0.05 m +accept 464462.35 566781.24 +expect 10 53 + +tolerance 0.05 m +accept 531469.2 571538.84 +expect 11 53 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4289 +inv + +step +init=epsg:28992 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 5 58 +roundtrip 1000 + +tolerance 0.006 m +accept 5 57 +roundtrip 1000 + +tolerance 0.006 m +accept 5 56 +roundtrip 1000 + +tolerance 0.006 m +accept 5 55 +roundtrip 1000 + +tolerance 0.006 m +accept 5 54 +roundtrip 1000 + +tolerance 0.006 m +accept 5 53 +roundtrip 1000 + +tolerance 0.006 m +accept 5.38763888889 52.1561605556 +roundtrip 1000 + +tolerance 0.006 m +accept 4 51 +roundtrip 1000 + +tolerance 0.006 m +accept 4 50 +roundtrip 1000 + +tolerance 0.006 m +accept 4.0 49.0 +roundtrip 1000 + +tolerance 0.006 m +accept 3.31372805556 47.9752611111 +roundtrip 1000 + +tolerance 0.006 m +accept 3 53 +roundtrip 1000 + +tolerance 0.006 m +accept 4 53 +roundtrip 1000 + +tolerance 0.006 m +accept 5 53 +roundtrip 1000 + +tolerance 0.006 m +accept 6 53 +roundtrip 1000 + +tolerance 0.006 m +accept 7 53 +roundtrip 1000 + +tolerance 0.006 m +accept 8 53 +roundtrip 1000 + +tolerance 0.006 m +accept 9 53 +roundtrip 1000 + +tolerance 0.006 m +accept 10 53 +roundtrip 1000 + +tolerance 0.006 m +accept 11 53 +roundtrip 1000 + + diff --git a/test/gigs/5104.gie_failing b/test/gigs/5104.gie_failing deleted file mode 100644 index 10c42935..00000000 --- a/test/gigs/5104.gie_failing +++ /dev/null @@ -1,264 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5104, Oblique stereographic, v2-0_2011-06-28. - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4289 +inv - +step +init=epsg:28992 --------------------------------------------------------------------------------- -tolerance 0.05 m -accept 5 58 -expect 132023.27 1114054.87 - -tolerance 0.05 m -accept 5 57 -expect 131405.466 1002468.081 - -tolerance 0.05 m -accept 5 56 -expect 130792.264 890981.281 - -tolerance 0.05 m -accept 5 55 -expect 130183.56 779577.7 - -tolerance 0.05 m -accept 5 54 -expect 129579.26 668240.58 - -tolerance 0.05 m -accept 5 53 -expect 128979.26 556953.19 - -tolerance 0.05 m -accept 5.38763888889 52.1561605556 -expect 155000 463000 - -tolerance 0.05 m -accept 4 51 -expect 57605.946 335312.662 - -tolerance 0.05 m -accept 4 50 -expect 55502.306 224086.514 - -tolerance 0.05 m -accept 4.0 49.0 -expect 53412.76 112842.73 - -tolerance 0.05 m -accept 3.31372805556 47.9752611111 -expect 0 0 - -tolerance 0.05 m -accept 3 53 -expect -5253.06 559535.55 - -tolerance 0.05 m -accept 4 53 -expect 61856.78 557779.12 - -tolerance 0.05 m -accept 5 53 -expect 128979.26 556953.19 - -tolerance 0.05 m -accept 6 53 -expect 196105.28 557057.74 - -tolerance 0.05 m -accept 7 53 -expect 263225.72 558092.77 - -tolerance 0.05 m -accept 8 53 -expect 330331.46 560058.31 - -tolerance 0.05 m -accept 9 53 -expect 397413.385 562954.436 - -tolerance 0.05 m -accept 10 53 -expect 464462.35 566781.24 - -tolerance 0.05 m -accept 11 53 -expect 531469.2 571538.84 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:28992 +inv - +step +init=epsg:4289 --------------------------------------------------------------------------------- -tolerance 0.05 m -accept 132023.27 1114054.87 -expect 5 58 - -tolerance 0.05 m -accept 131405.466 1002468.081 -expect 5 57 - -tolerance 0.05 m -accept 130792.264 890981.281 -expect 5 56 - -tolerance 0.05 m -accept 130183.56 779577.7 -expect 5 55 - -tolerance 0.05 m -accept 129579.26 668240.58 -expect 5 54 - -tolerance 0.05 m -accept 128979.26 556953.19 -expect 5 53 - -tolerance 0.05 m -accept 155000 463000 -expect 5.38763888889 52.1561605556 - -tolerance 0.05 m -accept 57605.946 335312.662 -expect 4 51 - -tolerance 0.05 m -accept 55502.306 224086.514 -expect 4 50 - -tolerance 0.05 m -accept 53412.76 112842.73 -expect 4.0 49.0 - -tolerance 0.05 m -accept 0 0 -expect 3.31372805556 47.9752611111 - -tolerance 0.05 m -accept -5253.06 559535.55 -expect 3 53 - -tolerance 0.05 m -accept 61856.78 557779.12 -expect 4 53 - -tolerance 0.05 m -accept 128979.26 556953.19 -expect 5 53 - -tolerance 0.05 m -accept 196105.28 557057.74 -expect 6 53 - -tolerance 0.05 m -accept 263225.72 558092.77 -expect 7 53 - -tolerance 0.05 m -accept 330331.46 560058.31 -expect 8 53 - -tolerance 0.05 m -accept 397413.385 562954.436 -expect 9 53 - -tolerance 0.05 m -accept 464462.35 566781.24 -expect 10 53 - -tolerance 0.05 m -accept 531469.2 571538.84 -expect 11 53 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4289 +inv - +step +init=epsg:28992 --------------------------------------------------------------------------------- -tolerance 0.006 m -accept 5 58 -roundtrip 1000 - -tolerance 0.006 m -accept 5 57 -roundtrip 1000 - -tolerance 0.006 m -accept 5 56 -roundtrip 1000 - -tolerance 0.006 m -accept 5 55 -roundtrip 1000 - -tolerance 0.006 m -accept 5 54 -roundtrip 1000 - -tolerance 0.006 m -accept 5 53 -roundtrip 1000 - -tolerance 0.006 m -accept 5.38763888889 52.1561605556 -roundtrip 1000 - -tolerance 0.006 m -accept 4 51 -roundtrip 1000 - -tolerance 0.006 m -accept 4 50 -roundtrip 1000 - -tolerance 0.006 m -accept 4.0 49.0 -roundtrip 1000 - -tolerance 0.006 m -accept 3.31372805556 47.9752611111 -roundtrip 1000 - -tolerance 0.006 m -accept 3 53 -roundtrip 1000 - -tolerance 0.006 m -accept 4 53 -roundtrip 1000 - -tolerance 0.006 m -accept 5 53 -roundtrip 1000 - -tolerance 0.006 m -accept 6 53 -roundtrip 1000 - -tolerance 0.006 m -accept 7 53 -roundtrip 1000 - -tolerance 0.006 m -accept 8 53 -roundtrip 1000 - -tolerance 0.006 m -accept 9 53 -roundtrip 1000 - -tolerance 0.006 m -accept 10 53 -roundtrip 1000 - -tolerance 0.006 m -accept 11 53 -roundtrip 1000 - - diff --git a/test/gigs/5105.1.gie.failing b/test/gigs/5105.1.gie.failing new file mode 100644 index 00000000..a0803d2b --- /dev/null +++ b/test/gigs/5105.1.gie.failing @@ -0,0 +1,300 @@ +-------------------------------------------------------------------------------- + +Test 5105 (part 1), Oblique Mercator (variant B), v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4742 +inv + +step +proj=somerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +no_uoff +gamma=53.13010236111111 +ellps=GRS80 +units=m +no_defs +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 117 12 +expect 807919.14 1329535.33 + +tolerance 0.05 m +accept 117 10 +expect 808784.98 1107678.47 + +tolerance 0.05 m +accept 117 9 +expect 809334.18 996918.21 + +tolerance 0.05 m +accept 117 8 +expect 809939.3 886240.18 + +tolerance 0.05 m +accept 116.8465522 6.8784583 +expect 793704.63 762081.05 + +tolerance 0.05 m +accept 117 6 +expect 811253.3 665041.27 + +tolerance 0.05 m +accept 117 5 +expect 811930.35 554475.63 + +tolerance 0.05 m +accept 117 4 +expect 812599.58 443902.71 + +tolerance 0.05 m +accept 115 4 +expect 590521.15 442890.86 + +tolerance 0.05 m +accept 117 3 +expect 813245.13 333300.13 + +tolerance 0.05 m +accept 117 2 +expect 813851.07 222645.51 + +tolerance 0.05 m +accept 117.0 1.0 +expect 814401.38 111916.45 + +tolerance 0.05 m +accept 109.6858208 -0.0001733 +expect 0 0 + +tolerance 0.05 m +accept 123 6 +expect 1475669.28 673118.57 + +tolerance 0.05 m +accept 122 6 +expect 1364854.86 671146.25 + +tolerance 0.05 m +accept 121 6 +expect 1254086.17 669446.25 + +tolerance 0.05 m +accept 120.0 6.0 +expect 1143352.6 668002.07 + +tolerance 0.05 m +accept 119.0 6.0 +expect 1032643.31 666797.35 + +tolerance 0.05 m +accept 118.0 6.0 +expect 921947.29 665815.82 + +tolerance 0.05 m +accept 117.0 6.0 +expect 811253.3 665041.27 + +tolerance 0.05 m +accept 116.0 6.0 +expect 700549.97 664457.59 + +tolerance 0.05 m +accept 115.0 6.0 +expect 589825.71 664048.72 + +tolerance 0.05 m +accept 114 6 +expect 479068.802 663798.63 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +proj=somerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +no_uoff +gamma=53.13010236111111 +ellps=GRS80 +units=m +no_defs +inv + +step +init=epsg:4742 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 807919.14 1329535.33 +expect 117 12 + +tolerance 0.05 m +accept 808784.98 1107678.47 +expect 117 10 + +tolerance 0.05 m +accept 809334.18 996918.21 +expect 117 9 + +tolerance 0.05 m +accept 809939.3 886240.18 +expect 117 8 + +tolerance 0.05 m +accept 793704.63 762081.05 +expect 116.8465522 6.8784583 + +tolerance 0.05 m +accept 811253.3 665041.27 +expect 117 6 + +tolerance 0.05 m +accept 811930.35 554475.63 +expect 117 5 + +tolerance 0.05 m +accept 812599.58 443902.71 +expect 117 4 + +tolerance 0.05 m +accept 590521.15 442890.86 +expect 115 4 + +tolerance 0.05 m +accept 813245.13 333300.13 +expect 117 3 + +tolerance 0.05 m +accept 813851.07 222645.51 +expect 117 2 + +tolerance 0.05 m +accept 814401.38 111916.45 +expect 117.0 1.0 + +tolerance 0.05 m +accept 0 0 +expect 109.6858208 -0.0001733 + +tolerance 0.05 m +accept 1475669.28 673118.57 +expect 123 6 + +tolerance 0.05 m +accept 1364854.86 671146.25 +expect 122 6 + +tolerance 0.05 m +accept 1254086.17 669446.25 +expect 121 6 + +tolerance 0.05 m +accept 1143352.6 668002.07 +expect 120.0 6.0 + +tolerance 0.05 m +accept 1032643.31 666797.35 +expect 119.0 6.0 + +tolerance 0.05 m +accept 921947.29 665815.82 +expect 118.0 6.0 + +tolerance 0.05 m +accept 811253.3 665041.27 +expect 117.0 6.0 + +tolerance 0.05 m +accept 700549.97 664457.59 +expect 116.0 6.0 + +tolerance 0.05 m +accept 589825.71 664048.72 +expect 115.0 6.0 + +tolerance 0.05 m +accept 479068.802 663798.63 +expect 114 6 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4742 +inv + +step +proj=somerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +no_uoff +gamma=53.13010236111111 +ellps=GRS80 +units=m +no_defs +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 117 12 +roundtrip 1000 + +tolerance 0.006 m +accept 117 10 +roundtrip 1000 + +tolerance 0.006 m +accept 117 9 +roundtrip 1000 + +tolerance 0.006 m +accept 117 8 +roundtrip 1000 + +tolerance 0.006 m +accept 116.8465522 6.8784583 +roundtrip 1000 + +tolerance 0.006 m +accept 117 6 +roundtrip 1000 + +tolerance 0.006 m +accept 117 5 +roundtrip 1000 + +tolerance 0.006 m +accept 117 4 +roundtrip 1000 + +tolerance 0.006 m +accept 115 4 +roundtrip 1000 + +tolerance 0.006 m +accept 117 3 +roundtrip 1000 + +tolerance 0.006 m +accept 117 2 +roundtrip 1000 + +tolerance 0.006 m +accept 117.0 1.0 +roundtrip 1000 + +tolerance 0.006 m +accept 109.6858208 -0.0001733 +roundtrip 1000 + +tolerance 0.006 m +accept 123 6 +roundtrip 1000 + +tolerance 0.006 m +accept 122 6 +roundtrip 1000 + +tolerance 0.006 m +accept 121 6 +roundtrip 1000 + +tolerance 0.006 m +accept 120.0 6.0 +roundtrip 1000 + +tolerance 0.006 m +accept 119.0 6.0 +roundtrip 1000 + +tolerance 0.006 m +accept 118.0 6.0 +roundtrip 1000 + +tolerance 0.006 m +accept 117.0 6.0 +roundtrip 1000 + +tolerance 0.006 m +accept 116.0 6.0 +roundtrip 1000 + +tolerance 0.006 m +accept 115.0 6.0 +roundtrip 1000 + +tolerance 0.006 m +accept 114 6 +roundtrip 1000 + + diff --git a/test/gigs/5105.1.gie_failing b/test/gigs/5105.1.gie_failing deleted file mode 100644 index a0803d2b..00000000 --- a/test/gigs/5105.1.gie_failing +++ /dev/null @@ -1,300 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5105 (part 1), Oblique Mercator (variant B), v2-0_2011-06-28. - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4742 +inv - +step +proj=somerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +no_uoff +gamma=53.13010236111111 +ellps=GRS80 +units=m +no_defs --------------------------------------------------------------------------------- -tolerance 0.05 m -accept 117 12 -expect 807919.14 1329535.33 - -tolerance 0.05 m -accept 117 10 -expect 808784.98 1107678.47 - -tolerance 0.05 m -accept 117 9 -expect 809334.18 996918.21 - -tolerance 0.05 m -accept 117 8 -expect 809939.3 886240.18 - -tolerance 0.05 m -accept 116.8465522 6.8784583 -expect 793704.63 762081.05 - -tolerance 0.05 m -accept 117 6 -expect 811253.3 665041.27 - -tolerance 0.05 m -accept 117 5 -expect 811930.35 554475.63 - -tolerance 0.05 m -accept 117 4 -expect 812599.58 443902.71 - -tolerance 0.05 m -accept 115 4 -expect 590521.15 442890.86 - -tolerance 0.05 m -accept 117 3 -expect 813245.13 333300.13 - -tolerance 0.05 m -accept 117 2 -expect 813851.07 222645.51 - -tolerance 0.05 m -accept 117.0 1.0 -expect 814401.38 111916.45 - -tolerance 0.05 m -accept 109.6858208 -0.0001733 -expect 0 0 - -tolerance 0.05 m -accept 123 6 -expect 1475669.28 673118.57 - -tolerance 0.05 m -accept 122 6 -expect 1364854.86 671146.25 - -tolerance 0.05 m -accept 121 6 -expect 1254086.17 669446.25 - -tolerance 0.05 m -accept 120.0 6.0 -expect 1143352.6 668002.07 - -tolerance 0.05 m -accept 119.0 6.0 -expect 1032643.31 666797.35 - -tolerance 0.05 m -accept 118.0 6.0 -expect 921947.29 665815.82 - -tolerance 0.05 m -accept 117.0 6.0 -expect 811253.3 665041.27 - -tolerance 0.05 m -accept 116.0 6.0 -expect 700549.97 664457.59 - -tolerance 0.05 m -accept 115.0 6.0 -expect 589825.71 664048.72 - -tolerance 0.05 m -accept 114 6 -expect 479068.802 663798.63 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +proj=somerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +no_uoff +gamma=53.13010236111111 +ellps=GRS80 +units=m +no_defs +inv - +step +init=epsg:4742 --------------------------------------------------------------------------------- -tolerance 0.05 m -accept 807919.14 1329535.33 -expect 117 12 - -tolerance 0.05 m -accept 808784.98 1107678.47 -expect 117 10 - -tolerance 0.05 m -accept 809334.18 996918.21 -expect 117 9 - -tolerance 0.05 m -accept 809939.3 886240.18 -expect 117 8 - -tolerance 0.05 m -accept 793704.63 762081.05 -expect 116.8465522 6.8784583 - -tolerance 0.05 m -accept 811253.3 665041.27 -expect 117 6 - -tolerance 0.05 m -accept 811930.35 554475.63 -expect 117 5 - -tolerance 0.05 m -accept 812599.58 443902.71 -expect 117 4 - -tolerance 0.05 m -accept 590521.15 442890.86 -expect 115 4 - -tolerance 0.05 m -accept 813245.13 333300.13 -expect 117 3 - -tolerance 0.05 m -accept 813851.07 222645.51 -expect 117 2 - -tolerance 0.05 m -accept 814401.38 111916.45 -expect 117.0 1.0 - -tolerance 0.05 m -accept 0 0 -expect 109.6858208 -0.0001733 - -tolerance 0.05 m -accept 1475669.28 673118.57 -expect 123 6 - -tolerance 0.05 m -accept 1364854.86 671146.25 -expect 122 6 - -tolerance 0.05 m -accept 1254086.17 669446.25 -expect 121 6 - -tolerance 0.05 m -accept 1143352.6 668002.07 -expect 120.0 6.0 - -tolerance 0.05 m -accept 1032643.31 666797.35 -expect 119.0 6.0 - -tolerance 0.05 m -accept 921947.29 665815.82 -expect 118.0 6.0 - -tolerance 0.05 m -accept 811253.3 665041.27 -expect 117.0 6.0 - -tolerance 0.05 m -accept 700549.97 664457.59 -expect 116.0 6.0 - -tolerance 0.05 m -accept 589825.71 664048.72 -expect 115.0 6.0 - -tolerance 0.05 m -accept 479068.802 663798.63 -expect 114 6 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4742 +inv - +step +proj=somerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +no_uoff +gamma=53.13010236111111 +ellps=GRS80 +units=m +no_defs --------------------------------------------------------------------------------- -tolerance 0.006 m -accept 117 12 -roundtrip 1000 - -tolerance 0.006 m -accept 117 10 -roundtrip 1000 - -tolerance 0.006 m -accept 117 9 -roundtrip 1000 - -tolerance 0.006 m -accept 117 8 -roundtrip 1000 - -tolerance 0.006 m -accept 116.8465522 6.8784583 -roundtrip 1000 - -tolerance 0.006 m -accept 117 6 -roundtrip 1000 - -tolerance 0.006 m -accept 117 5 -roundtrip 1000 - -tolerance 0.006 m -accept 117 4 -roundtrip 1000 - -tolerance 0.006 m -accept 115 4 -roundtrip 1000 - -tolerance 0.006 m -accept 117 3 -roundtrip 1000 - -tolerance 0.006 m -accept 117 2 -roundtrip 1000 - -tolerance 0.006 m -accept 117.0 1.0 -roundtrip 1000 - -tolerance 0.006 m -accept 109.6858208 -0.0001733 -roundtrip 1000 - -tolerance 0.006 m -accept 123 6 -roundtrip 1000 - -tolerance 0.006 m -accept 122 6 -roundtrip 1000 - -tolerance 0.006 m -accept 121 6 -roundtrip 1000 - -tolerance 0.006 m -accept 120.0 6.0 -roundtrip 1000 - -tolerance 0.006 m -accept 119.0 6.0 -roundtrip 1000 - -tolerance 0.006 m -accept 118.0 6.0 -roundtrip 1000 - -tolerance 0.006 m -accept 117.0 6.0 -roundtrip 1000 - -tolerance 0.006 m -accept 116.0 6.0 -roundtrip 1000 - -tolerance 0.006 m -accept 115.0 6.0 -roundtrip 1000 - -tolerance 0.006 m -accept 114 6 -roundtrip 1000 - - diff --git a/test/gigs/5108.gie.failing b/test/gigs/5108.gie.failing new file mode 100644 index 00000000..6a979118 --- /dev/null +++ b/test/gigs/5108.gie.failing @@ -0,0 +1,235 @@ +-------------------------------------------------------------------------------- + +Test 5108, Cassini-Soldner, v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + +# GDM2000 +<4742> +proj=longlat +ellps=GRS80 +no_defs <> + +# GDM2000 / Johor Grid +<3377> +proj=cass +lat_0=2.121679744444445 +lon_0=103.4279362361111 +x_0=-14810.562 +y_0=8758.32 +ellps=GRS80 +units=m +no_defs <> + + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4742 +inv + +step +init=epsg:3377 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 106 10 +expect 267186.017 881108.902 + +tolerance 0.05 m +accept 106 9 +expect 268006.024 770398.186 + +tolerance 0.05 m +accept 106 8 +expect 268740.351 659692.254 + +tolerance 0.05 m +accept 106 7 +expect 269388.786 548990.588 + +tolerance 0.05 m +accept 106 6 +expect 269951.141 438292.666 + +tolerance 0.05 m +accept 106 5 +expect 270427.255 327597.962 + +tolerance 0.05 m +accept 106 4 +expect 270816.99 216905.945 + +tolerance 0.05 m +accept 106 3 +expect 271120.234 106216.081 + +tolerance 0.05 m +accept 103.561065778 2.0424676812 +expect 0 0 + +tolerance 0.05 m +accept 103.64025984 1.82776484381 +expect 8813.252 -23740.095 + +tolerance 0.05 m +accept 106 1 +expect 271466.923 -115159.332 + +tolerance 0.05 m +accept 109 5 +expect 603116.703 329668.599 + +tolerance 0.05 m +accept 108 5 +expect 492221.308 328807.336 + +tolerance 0.05 m +accept 107 5 +expect 381324.74 328117.472 + +tolerance 0.05 m +accept 106 5 +expect 270427.255 327597.962 + +tolerance 0.05 m +accept 105 5 +expect 159529.111 327248.012 + +tolerance 0.05 m +accept 104 5 +expect 48630.563 327067.097 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:3377 +inv + +step +init=epsg:4742 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 267186.017 881108.902 +expect 106 10 + +tolerance 0.05 m +accept 268006.024 770398.186 +expect 106 9 + +tolerance 0.05 m +accept 268740.351 659692.254 +expect 106 8 + +tolerance 0.05 m +accept 269388.786 548990.588 +expect 106 7 + +tolerance 0.05 m +accept 269951.141 438292.666 +expect 106 6 + +tolerance 0.05 m +accept 270427.255 327597.962 +expect 106 5 + +tolerance 0.05 m +accept 270816.99 216905.945 +expect 106 4 + +tolerance 0.05 m +accept 271120.234 106216.081 +expect 106 3 + +tolerance 0.05 m +accept 0 0 +expect 103.561065778 2.0424676812 + +tolerance 0.05 m +accept 8813.252 -23740.095 +expect 103.64025984 1.82776484381 + +tolerance 0.05 m +accept 271466.923 -115159.332 +expect 106 1 + +tolerance 0.05 m +accept 603116.703 329668.599 +expect 109 5 + +tolerance 0.05 m +accept 492221.308 328807.336 +expect 108 5 + +tolerance 0.05 m +accept 381324.74 328117.472 +expect 107 5 + +tolerance 0.05 m +accept 270427.255 327597.962 +expect 106 5 + +tolerance 0.05 m +accept 159529.111 327248.012 +expect 105 5 + +tolerance 0.05 m +accept 48630.563 327067.097 +expect 104 5 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4742 +inv + +step +init=epsg:3377 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 106 10 +roundtrip 1000 + +tolerance 0.006 m +accept 106 9 +roundtrip 1000 + +tolerance 0.006 m +accept 106 8 +roundtrip 1000 + +tolerance 0.006 m +accept 106 7 +roundtrip 1000 + +tolerance 0.006 m +accept 106 6 +roundtrip 1000 + +tolerance 0.006 m +accept 106 5 +roundtrip 1000 + +tolerance 0.006 m +accept 106 4 +roundtrip 1000 + +tolerance 0.006 m +accept 106 3 +roundtrip 1000 + +tolerance 0.006 m +accept 103.561065778 2.0424676812 +roundtrip 1000 + +tolerance 0.006 m +accept 103.64025984 1.82776484381 +roundtrip 1000 + +tolerance 0.006 m +accept 106 1 +roundtrip 1000 + +tolerance 0.006 m +accept 109 5 +roundtrip 1000 + +tolerance 0.006 m +accept 108 5 +roundtrip 1000 + +tolerance 0.006 m +accept 107 5 +roundtrip 1000 + +tolerance 0.006 m +accept 106 5 +roundtrip 1000 + +tolerance 0.006 m +accept 105 5 +roundtrip 1000 + +tolerance 0.006 m +accept 104 5 +roundtrip 1000 + + diff --git a/test/gigs/5108.gie_failing b/test/gigs/5108.gie_failing deleted file mode 100644 index 6a979118..00000000 --- a/test/gigs/5108.gie_failing +++ /dev/null @@ -1,235 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5108, Cassini-Soldner, v2-0_2011-06-28. - --------------------------------------------------------------------------------- - -# GDM2000 -<4742> +proj=longlat +ellps=GRS80 +no_defs <> - -# GDM2000 / Johor Grid -<3377> +proj=cass +lat_0=2.121679744444445 +lon_0=103.4279362361111 +x_0=-14810.562 +y_0=8758.32 +ellps=GRS80 +units=m +no_defs <> - - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4742 +inv - +step +init=epsg:3377 --------------------------------------------------------------------------------- -tolerance 0.05 m -accept 106 10 -expect 267186.017 881108.902 - -tolerance 0.05 m -accept 106 9 -expect 268006.024 770398.186 - -tolerance 0.05 m -accept 106 8 -expect 268740.351 659692.254 - -tolerance 0.05 m -accept 106 7 -expect 269388.786 548990.588 - -tolerance 0.05 m -accept 106 6 -expect 269951.141 438292.666 - -tolerance 0.05 m -accept 106 5 -expect 270427.255 327597.962 - -tolerance 0.05 m -accept 106 4 -expect 270816.99 216905.945 - -tolerance 0.05 m -accept 106 3 -expect 271120.234 106216.081 - -tolerance 0.05 m -accept 103.561065778 2.0424676812 -expect 0 0 - -tolerance 0.05 m -accept 103.64025984 1.82776484381 -expect 8813.252 -23740.095 - -tolerance 0.05 m -accept 106 1 -expect 271466.923 -115159.332 - -tolerance 0.05 m -accept 109 5 -expect 603116.703 329668.599 - -tolerance 0.05 m -accept 108 5 -expect 492221.308 328807.336 - -tolerance 0.05 m -accept 107 5 -expect 381324.74 328117.472 - -tolerance 0.05 m -accept 106 5 -expect 270427.255 327597.962 - -tolerance 0.05 m -accept 105 5 -expect 159529.111 327248.012 - -tolerance 0.05 m -accept 104 5 -expect 48630.563 327067.097 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:3377 +inv - +step +init=epsg:4742 --------------------------------------------------------------------------------- -tolerance 0.05 m -accept 267186.017 881108.902 -expect 106 10 - -tolerance 0.05 m -accept 268006.024 770398.186 -expect 106 9 - -tolerance 0.05 m -accept 268740.351 659692.254 -expect 106 8 - -tolerance 0.05 m -accept 269388.786 548990.588 -expect 106 7 - -tolerance 0.05 m -accept 269951.141 438292.666 -expect 106 6 - -tolerance 0.05 m -accept 270427.255 327597.962 -expect 106 5 - -tolerance 0.05 m -accept 270816.99 216905.945 -expect 106 4 - -tolerance 0.05 m -accept 271120.234 106216.081 -expect 106 3 - -tolerance 0.05 m -accept 0 0 -expect 103.561065778 2.0424676812 - -tolerance 0.05 m -accept 8813.252 -23740.095 -expect 103.64025984 1.82776484381 - -tolerance 0.05 m -accept 271466.923 -115159.332 -expect 106 1 - -tolerance 0.05 m -accept 603116.703 329668.599 -expect 109 5 - -tolerance 0.05 m -accept 492221.308 328807.336 -expect 108 5 - -tolerance 0.05 m -accept 381324.74 328117.472 -expect 107 5 - -tolerance 0.05 m -accept 270427.255 327597.962 -expect 106 5 - -tolerance 0.05 m -accept 159529.111 327248.012 -expect 105 5 - -tolerance 0.05 m -accept 48630.563 327067.097 -expect 104 5 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4742 +inv - +step +init=epsg:3377 --------------------------------------------------------------------------------- -tolerance 0.006 m -accept 106 10 -roundtrip 1000 - -tolerance 0.006 m -accept 106 9 -roundtrip 1000 - -tolerance 0.006 m -accept 106 8 -roundtrip 1000 - -tolerance 0.006 m -accept 106 7 -roundtrip 1000 - -tolerance 0.006 m -accept 106 6 -roundtrip 1000 - -tolerance 0.006 m -accept 106 5 -roundtrip 1000 - -tolerance 0.006 m -accept 106 4 -roundtrip 1000 - -tolerance 0.006 m -accept 106 3 -roundtrip 1000 - -tolerance 0.006 m -accept 103.561065778 2.0424676812 -roundtrip 1000 - -tolerance 0.006 m -accept 103.64025984 1.82776484381 -roundtrip 1000 - -tolerance 0.006 m -accept 106 1 -roundtrip 1000 - -tolerance 0.006 m -accept 109 5 -roundtrip 1000 - -tolerance 0.006 m -accept 108 5 -roundtrip 1000 - -tolerance 0.006 m -accept 107 5 -roundtrip 1000 - -tolerance 0.006 m -accept 106 5 -roundtrip 1000 - -tolerance 0.006 m -accept 105 5 -roundtrip 1000 - -tolerance 0.006 m -accept 104 5 -roundtrip 1000 - - diff --git a/test/gigs/5110.gie.failing b/test/gigs/5110.gie.failing new file mode 100644 index 00000000..2d26d1ab --- /dev/null +++ b/test/gigs/5110.gie.failing @@ -0,0 +1,164 @@ +-------------------------------------------------------------------------------- + +Test 5110, Lambert Azimuthal Equal Area, v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + +# ETRS89 +<4258> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <> + +# ETRS89 / LAEA Europe +<3035> +proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 + +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> + + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4258 +inv + +step +init=epsg:3035 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 5 70 +expect 4127824.65822 5214090.649 + +tolerance 0.05 m +accept 5 60 +expect 4041548.13 4109791.66 + +tolerance 0.05 m +accept 5 50 +expect 3962799.45 2999718.853 + +tolerance 0.05 m +accept 5 40 +expect 3892127.02 1892578.962 + +tolerance 0.05 m +accept 5 30 +expect 3830117.9 796781.677 + +tolerance 0.05 m +accept 10 52 +expect 4321000.0 3210000.0 + +tolerance 0.05 m +accept 0.0 50.0 +expect 3606514.43 3036305.967 + +tolerance 0.05 m +accept 3.0 50.0 +expect 3819948.288 3011432.894 + +tolerance 0.05 m +accept 5.0 50.0 +expect 3962799.451 2999718.853 + +tolerance 0.05 m +accept 8.0 50.0 +expect 4177612.521 2989464.315 + +tolerance 0.05 m +accept 10.0 50.0 +expect 4321000.0 2987510.567 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:3035 +inv + +step +init=epsg:4258 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 4127824.65822 5214090.649 +expect 5 70 + +tolerance 0.05 m +accept 4041548.13 4109791.66 +expect 5 60 + +tolerance 0.05 m +accept 3962799.45 2999718.853 +expect 5 50 + +tolerance 0.05 m +accept 3892127.02 1892578.962 +expect 5 40 + +tolerance 0.05 m +accept 3830117.9 796781.677 +expect 5 30 + +tolerance 0.05 m +accept 4321000.0 3210000.0 +expect 10 52 + +tolerance 0.05 m +accept 3606514.43 3036305.967 +expect 0.0 50.0 + +tolerance 0.05 m +accept 3819948.288 3011432.894 +expect 3.0 50.0 + +tolerance 0.05 m +accept 3962799.451 2999718.853 +expect 5.0 50.0 + +tolerance 0.05 m +accept 4177612.521 2989464.315 +expect 8.0 50.0 + +tolerance 0.05 m +accept 4321000.0 2987510.567 +expect 10.0 50.0 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4258 +inv + +step +init=epsg:3035 +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept 5 70 +roundtrip 1000 + +tolerance 0.006 m +accept 5 60 +roundtrip 1000 + +tolerance 0.006 m +accept 5 50 +roundtrip 1000 + +tolerance 0.006 m +accept 5 40 +roundtrip 1000 + +tolerance 0.006 m +accept 5 30 +roundtrip 1000 + +tolerance 0.006 m +accept 10 52 +roundtrip 1000 + +tolerance 0.006 m +accept 0.0 50.0 +roundtrip 1000 + +tolerance 0.006 m +accept 3.0 50.0 +roundtrip 1000 + +tolerance 0.006 m +accept 5.0 50.0 +roundtrip 1000 + +tolerance 0.006 m +accept 8.0 50.0 +roundtrip 1000 + +tolerance 0.006 m +accept 10.0 50.0 +roundtrip 1000 + + diff --git a/test/gigs/5110.gie_failing b/test/gigs/5110.gie_failing deleted file mode 100644 index 2d26d1ab..00000000 --- a/test/gigs/5110.gie_failing +++ /dev/null @@ -1,164 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5110, Lambert Azimuthal Equal Area, v2-0_2011-06-28. - --------------------------------------------------------------------------------- - -# ETRS89 -<4258> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <> - -# ETRS89 / LAEA Europe -<3035> +proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 - +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <> - - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4258 +inv - +step +init=epsg:3035 --------------------------------------------------------------------------------- -tolerance 0.05 m -accept 5 70 -expect 4127824.65822 5214090.649 - -tolerance 0.05 m -accept 5 60 -expect 4041548.13 4109791.66 - -tolerance 0.05 m -accept 5 50 -expect 3962799.45 2999718.853 - -tolerance 0.05 m -accept 5 40 -expect 3892127.02 1892578.962 - -tolerance 0.05 m -accept 5 30 -expect 3830117.9 796781.677 - -tolerance 0.05 m -accept 10 52 -expect 4321000.0 3210000.0 - -tolerance 0.05 m -accept 0.0 50.0 -expect 3606514.43 3036305.967 - -tolerance 0.05 m -accept 3.0 50.0 -expect 3819948.288 3011432.894 - -tolerance 0.05 m -accept 5.0 50.0 -expect 3962799.451 2999718.853 - -tolerance 0.05 m -accept 8.0 50.0 -expect 4177612.521 2989464.315 - -tolerance 0.05 m -accept 10.0 50.0 -expect 4321000.0 2987510.567 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:3035 +inv - +step +init=epsg:4258 --------------------------------------------------------------------------------- -tolerance 0.05 m -accept 4127824.65822 5214090.649 -expect 5 70 - -tolerance 0.05 m -accept 4041548.13 4109791.66 -expect 5 60 - -tolerance 0.05 m -accept 3962799.45 2999718.853 -expect 5 50 - -tolerance 0.05 m -accept 3892127.02 1892578.962 -expect 5 40 - -tolerance 0.05 m -accept 3830117.9 796781.677 -expect 5 30 - -tolerance 0.05 m -accept 4321000.0 3210000.0 -expect 10 52 - -tolerance 0.05 m -accept 3606514.43 3036305.967 -expect 0.0 50.0 - -tolerance 0.05 m -accept 3819948.288 3011432.894 -expect 3.0 50.0 - -tolerance 0.05 m -accept 3962799.451 2999718.853 -expect 5.0 50.0 - -tolerance 0.05 m -accept 4177612.521 2989464.315 -expect 8.0 50.0 - -tolerance 0.05 m -accept 4321000.0 2987510.567 -expect 10.0 50.0 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4258 +inv - +step +init=epsg:3035 --------------------------------------------------------------------------------- -tolerance 0.006 m -accept 5 70 -roundtrip 1000 - -tolerance 0.006 m -accept 5 60 -roundtrip 1000 - -tolerance 0.006 m -accept 5 50 -roundtrip 1000 - -tolerance 0.006 m -accept 5 40 -roundtrip 1000 - -tolerance 0.006 m -accept 5 30 -roundtrip 1000 - -tolerance 0.006 m -accept 10 52 -roundtrip 1000 - -tolerance 0.006 m -accept 0.0 50.0 -roundtrip 1000 - -tolerance 0.006 m -accept 3.0 50.0 -roundtrip 1000 - -tolerance 0.006 m -accept 5.0 50.0 -roundtrip 1000 - -tolerance 0.006 m -accept 8.0 50.0 -roundtrip 1000 - -tolerance 0.006 m -accept 10.0 50.0 -roundtrip 1000 - - diff --git a/test/gigs/5111.2.gie.failing b/test/gigs/5111.2.gie.failing new file mode 100644 index 00000000..dfa6bca2 --- /dev/null +++ b/test/gigs/5111.2.gie.failing @@ -0,0 +1,444 @@ +-------------------------------------------------------------------------------- + +Test 5111 (part 2), Mercator (variant A), v2-0_2011-06-28. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4813 +inv + +step +proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept -6.7200711 77.6534822 +expect 2800000.0 15000000.0 + +tolerance 0.05 m +accept -6.7200711 73.1442856 +expect 2800000.0 13000000.0 + +tolerance 0.05 m +accept -6.7200711 67.0518325 +expect 2800000.0 11000000.0 + +tolerance 0.05 m +accept -6.7200711 58.9140458 +expect 2800000.0 9000000.0 + +tolerance 0.05 m +accept -6.7200711 48.2638981 +expect 2800000.0 7000000.0 + +tolerance 0.05 m +accept -6.7200711 34.8029044 +expect 2800000.0 5000000.0 + +tolerance 0.05 m +accept -6.7200711 18.7048581 +expect 2800000.0 3000000.0 + +tolerance 0.05 m +accept -6.7200711 0.9071392 +expect 2800000.0 1000000.0 + +tolerance 0.05 m +accept 3.1922806 0.0 +expect 3900000.0 900000.0 + +tolerance 0.05 m +accept -6.7200711 0.9071392 +expect 2800000.0 800000.0 + +tolerance 0.05 m +accept -6.7200711 1.8140483 +expect 2800000.0 700000.0 + +tolerance 0.05 m +accept -6.7200711 2.0 +expect 2800000.0 679490.65 + +tolerance 0.05 m +accept -6.7200711 3.6262553 +expect 2800000.0 500000.0 + +tolerance 0.05 m +accept -6.7200711 4.531095 +expect 2800000.0 400000.0 + +tolerance 0.05 m +accept -6.7200711 5.4347892 +expect 2800000.0 300000.0 + +tolerance 0.05 m +accept -6.7200711 6.3371111 +expect 2800000.0 200000.0 + +tolerance 0.05 m +accept -6.7200711 7.2378372 +expect 2800000.0 100000.0 + +tolerance 0.05 m +accept -31.9515111 8.136745 +expect 0.0 0.0 + +tolerance 0.05 m +accept -177.8077194 2.0 +expect 23764105.84 679490.65 + +tolerance 0.05 m +accept 163.1922806 2.0 +expect 21655625.33 679490.65 + +tolerance 0.05 m +accept 133.1922806 2.0 +expect 18326445.58 679490.65 + +tolerance 0.05 m +accept 103.1922806 2.0 +expect 14997265.83 679490.65 + +tolerance 0.05 m +accept 73.1922806 2.0 +expect 11668086.08 679490.65 + +tolerance 0.05 m +accept 43.1922806 2.0 +expect 8338906.33 679490.65 + +tolerance 0.05 m +accept 13.1922806 2.0 +expect 5009726.58 679490.65 + +tolerance 0.05 m +accept 3.1922806 2.0 +expect 3900000.0 679490.65 + +tolerance 0.05 m +accept 0.0 2.0 +expect 3545744.14 679490.65 + +tolerance 0.05 m +accept -6.7200711 2.0 +expect 2800000.0 679490.65 + +tolerance 0.05 m +accept -16.8077194 2.0 +expect 1680546.83 679490.65 + +tolerance 0.05 m +accept -46.8077194 2.0 +expect -1648632.92 679490.65 + +tolerance 0.05 m +accept -76.8077194 2.0 +expect -4977812.67 679490.65 + +tolerance 0.05 m +accept -106.8077194 2.0 +expect -8306992.42 679490.65 + +tolerance 0.05 m +accept -136.8077194 2.0 +expect -11636172.17 679490.65 + +tolerance 0.05 m +accept -166.8077194 2.0 +expect -14965351.92 679490.65 + +tolerance 0.05 m +accept -175.8077194 2.0 +expect -15964105.84 679490.65 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs +inv + +step +init=epsg:4813 +-------------------------------------------------------------------------------- +tolerance 0.05 m +accept 2800000.0 15000000.0 +expect -6.7200711 77.6534822 + +tolerance 0.05 m +accept 2800000.0 13000000.0 +expect -6.7200711 73.1442856 + +tolerance 0.05 m +accept 2800000.0 11000000.0 +expect -6.7200711 67.0518325 + +tolerance 0.05 m +accept 2800000.0 9000000.0 +expect -6.7200711 58.9140458 + +tolerance 0.05 m +accept 2800000.0 7000000.0 +expect -6.7200711 48.2638981 + +tolerance 0.05 m +accept 2800000.0 5000000.0 +expect -6.7200711 34.8029044 + +tolerance 0.05 m +accept 2800000.0 3000000.0 +expect -6.7200711 18.7048581 + +tolerance 0.05 m +accept 2800000.0 1000000.0 +expect -6.7200711 0.9071392 + +tolerance 0.05 m +accept 3900000.0 900000.0 +expect 3.1922806 0.0 + +tolerance 0.05 m +accept 2800000.0 800000.0 +expect -6.7200711 0.9071392 + +tolerance 0.05 m +accept 2800000.0 700000.0 +expect -6.7200711 1.8140483 + +tolerance 0.05 m +accept 2800000.0 679490.65 +expect -6.7200711 2.0 + +tolerance 0.05 m +accept 2800000.0 500000.0 +expect -6.7200711 3.6262553 + +tolerance 0.05 m +accept 2800000.0 400000.0 +expect -6.7200711 4.531095 + +tolerance 0.05 m +accept 2800000.0 300000.0 +expect -6.7200711 5.4347892 + +tolerance 0.05 m +accept 2800000.0 200000.0 +expect -6.7200711 6.3371111 + +tolerance 0.05 m +accept 2800000.0 100000.0 +expect -6.7200711 7.2378372 + +tolerance 0.05 m +accept 0.0 0.0 +expect -31.9515111 8.136745 + +tolerance 0.05 m +accept 23764105.84 679490.65 +expect -177.8077194 2.0 + +tolerance 0.05 m +accept 21655625.33 679490.65 +expect 163.1922806 2.0 + +tolerance 0.05 m +accept 18326445.58 679490.65 +expect 133.1922806 2.0 + +tolerance 0.05 m +accept 14997265.83 679490.65 +expect 103.1922806 2.0 + +tolerance 0.05 m +accept 11668086.08 679490.65 +expect 73.1922806 2.0 + +tolerance 0.05 m +accept 8338906.33 679490.65 +expect 43.1922806 2.0 + +tolerance 0.05 m +accept 5009726.58 679490.65 +expect 13.1922806 2.0 + +tolerance 0.05 m +accept 3900000.0 679490.65 +expect 3.1922806 2.0 + +tolerance 0.05 m +accept 3545744.14 679490.65 +expect 0.0 2.0 + +tolerance 0.05 m +accept 2800000.0 679490.65 +expect -6.7200711 2.0 + +tolerance 0.05 m +accept 1680546.83 679490.65 +expect -16.8077194 2.0 + +tolerance 0.05 m +accept -1648632.92 679490.65 +expect -46.8077194 2.0 + +tolerance 0.05 m +accept -4977812.67 679490.65 +expect -76.8077194 2.0 + +tolerance 0.05 m +accept -8306992.42 679490.65 +expect -106.8077194 2.0 + +tolerance 0.05 m +accept -11636172.17 679490.65 +expect -136.8077194 2.0 + +tolerance 0.05 m +accept -14965351.92 679490.65 +expect -166.8077194 2.0 + +tolerance 0.05 m +accept -15964105.84 679490.65 +expect -175.8077194 2.0 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4813 +inv + +step +proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs +-------------------------------------------------------------------------------- +tolerance 0.006 m +accept -6.7200711 77.6534822 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 73.1442856 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 67.0518325 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 58.9140458 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 48.2638981 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 34.8029044 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 18.7048581 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 0.9071392 +roundtrip 1000 + +tolerance 0.006 m +accept 3.1922806 0.0 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 0.9071392 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 1.8140483 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 3.6262553 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 4.531095 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 5.4347892 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 6.3371111 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 7.2378372 +roundtrip 1000 + +tolerance 0.006 m +accept -31.9515111 8.136745 +roundtrip 1000 + +tolerance 0.006 m +accept -177.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 163.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 133.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 103.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 73.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 43.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 13.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 3.1922806 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept 0.0 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -6.7200711 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -16.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -46.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -76.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -106.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -136.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -166.8077194 2.0 +roundtrip 1000 + +tolerance 0.006 m +accept -175.8077194 2.0 +roundtrip 1000 + + diff --git a/test/gigs/5111.2.gie_failing b/test/gigs/5111.2.gie_failing deleted file mode 100644 index dfa6bca2..00000000 --- a/test/gigs/5111.2.gie_failing +++ /dev/null @@ -1,444 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5111 (part 2), Mercator (variant A), v2-0_2011-06-28. - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4813 +inv - +step +proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs --------------------------------------------------------------------------------- -tolerance 0.05 m -accept -6.7200711 77.6534822 -expect 2800000.0 15000000.0 - -tolerance 0.05 m -accept -6.7200711 73.1442856 -expect 2800000.0 13000000.0 - -tolerance 0.05 m -accept -6.7200711 67.0518325 -expect 2800000.0 11000000.0 - -tolerance 0.05 m -accept -6.7200711 58.9140458 -expect 2800000.0 9000000.0 - -tolerance 0.05 m -accept -6.7200711 48.2638981 -expect 2800000.0 7000000.0 - -tolerance 0.05 m -accept -6.7200711 34.8029044 -expect 2800000.0 5000000.0 - -tolerance 0.05 m -accept -6.7200711 18.7048581 -expect 2800000.0 3000000.0 - -tolerance 0.05 m -accept -6.7200711 0.9071392 -expect 2800000.0 1000000.0 - -tolerance 0.05 m -accept 3.1922806 0.0 -expect 3900000.0 900000.0 - -tolerance 0.05 m -accept -6.7200711 0.9071392 -expect 2800000.0 800000.0 - -tolerance 0.05 m -accept -6.7200711 1.8140483 -expect 2800000.0 700000.0 - -tolerance 0.05 m -accept -6.7200711 2.0 -expect 2800000.0 679490.65 - -tolerance 0.05 m -accept -6.7200711 3.6262553 -expect 2800000.0 500000.0 - -tolerance 0.05 m -accept -6.7200711 4.531095 -expect 2800000.0 400000.0 - -tolerance 0.05 m -accept -6.7200711 5.4347892 -expect 2800000.0 300000.0 - -tolerance 0.05 m -accept -6.7200711 6.3371111 -expect 2800000.0 200000.0 - -tolerance 0.05 m -accept -6.7200711 7.2378372 -expect 2800000.0 100000.0 - -tolerance 0.05 m -accept -31.9515111 8.136745 -expect 0.0 0.0 - -tolerance 0.05 m -accept -177.8077194 2.0 -expect 23764105.84 679490.65 - -tolerance 0.05 m -accept 163.1922806 2.0 -expect 21655625.33 679490.65 - -tolerance 0.05 m -accept 133.1922806 2.0 -expect 18326445.58 679490.65 - -tolerance 0.05 m -accept 103.1922806 2.0 -expect 14997265.83 679490.65 - -tolerance 0.05 m -accept 73.1922806 2.0 -expect 11668086.08 679490.65 - -tolerance 0.05 m -accept 43.1922806 2.0 -expect 8338906.33 679490.65 - -tolerance 0.05 m -accept 13.1922806 2.0 -expect 5009726.58 679490.65 - -tolerance 0.05 m -accept 3.1922806 2.0 -expect 3900000.0 679490.65 - -tolerance 0.05 m -accept 0.0 2.0 -expect 3545744.14 679490.65 - -tolerance 0.05 m -accept -6.7200711 2.0 -expect 2800000.0 679490.65 - -tolerance 0.05 m -accept -16.8077194 2.0 -expect 1680546.83 679490.65 - -tolerance 0.05 m -accept -46.8077194 2.0 -expect -1648632.92 679490.65 - -tolerance 0.05 m -accept -76.8077194 2.0 -expect -4977812.67 679490.65 - -tolerance 0.05 m -accept -106.8077194 2.0 -expect -8306992.42 679490.65 - -tolerance 0.05 m -accept -136.8077194 2.0 -expect -11636172.17 679490.65 - -tolerance 0.05 m -accept -166.8077194 2.0 -expect -14965351.92 679490.65 - -tolerance 0.05 m -accept -175.8077194 2.0 -expect -15964105.84 679490.65 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs +inv - +step +init=epsg:4813 --------------------------------------------------------------------------------- -tolerance 0.05 m -accept 2800000.0 15000000.0 -expect -6.7200711 77.6534822 - -tolerance 0.05 m -accept 2800000.0 13000000.0 -expect -6.7200711 73.1442856 - -tolerance 0.05 m -accept 2800000.0 11000000.0 -expect -6.7200711 67.0518325 - -tolerance 0.05 m -accept 2800000.0 9000000.0 -expect -6.7200711 58.9140458 - -tolerance 0.05 m -accept 2800000.0 7000000.0 -expect -6.7200711 48.2638981 - -tolerance 0.05 m -accept 2800000.0 5000000.0 -expect -6.7200711 34.8029044 - -tolerance 0.05 m -accept 2800000.0 3000000.0 -expect -6.7200711 18.7048581 - -tolerance 0.05 m -accept 2800000.0 1000000.0 -expect -6.7200711 0.9071392 - -tolerance 0.05 m -accept 3900000.0 900000.0 -expect 3.1922806 0.0 - -tolerance 0.05 m -accept 2800000.0 800000.0 -expect -6.7200711 0.9071392 - -tolerance 0.05 m -accept 2800000.0 700000.0 -expect -6.7200711 1.8140483 - -tolerance 0.05 m -accept 2800000.0 679490.65 -expect -6.7200711 2.0 - -tolerance 0.05 m -accept 2800000.0 500000.0 -expect -6.7200711 3.6262553 - -tolerance 0.05 m -accept 2800000.0 400000.0 -expect -6.7200711 4.531095 - -tolerance 0.05 m -accept 2800000.0 300000.0 -expect -6.7200711 5.4347892 - -tolerance 0.05 m -accept 2800000.0 200000.0 -expect -6.7200711 6.3371111 - -tolerance 0.05 m -accept 2800000.0 100000.0 -expect -6.7200711 7.2378372 - -tolerance 0.05 m -accept 0.0 0.0 -expect -31.9515111 8.136745 - -tolerance 0.05 m -accept 23764105.84 679490.65 -expect -177.8077194 2.0 - -tolerance 0.05 m -accept 21655625.33 679490.65 -expect 163.1922806 2.0 - -tolerance 0.05 m -accept 18326445.58 679490.65 -expect 133.1922806 2.0 - -tolerance 0.05 m -accept 14997265.83 679490.65 -expect 103.1922806 2.0 - -tolerance 0.05 m -accept 11668086.08 679490.65 -expect 73.1922806 2.0 - -tolerance 0.05 m -accept 8338906.33 679490.65 -expect 43.1922806 2.0 - -tolerance 0.05 m -accept 5009726.58 679490.65 -expect 13.1922806 2.0 - -tolerance 0.05 m -accept 3900000.0 679490.65 -expect 3.1922806 2.0 - -tolerance 0.05 m -accept 3545744.14 679490.65 -expect 0.0 2.0 - -tolerance 0.05 m -accept 2800000.0 679490.65 -expect -6.7200711 2.0 - -tolerance 0.05 m -accept 1680546.83 679490.65 -expect -16.8077194 2.0 - -tolerance 0.05 m -accept -1648632.92 679490.65 -expect -46.8077194 2.0 - -tolerance 0.05 m -accept -4977812.67 679490.65 -expect -76.8077194 2.0 - -tolerance 0.05 m -accept -8306992.42 679490.65 -expect -106.8077194 2.0 - -tolerance 0.05 m -accept -11636172.17 679490.65 -expect -136.8077194 2.0 - -tolerance 0.05 m -accept -14965351.92 679490.65 -expect -166.8077194 2.0 - -tolerance 0.05 m -accept -15964105.84 679490.65 -expect -175.8077194 2.0 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4813 +inv - +step +proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs --------------------------------------------------------------------------------- -tolerance 0.006 m -accept -6.7200711 77.6534822 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 73.1442856 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 67.0518325 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 58.9140458 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 48.2638981 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 34.8029044 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 18.7048581 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 0.9071392 -roundtrip 1000 - -tolerance 0.006 m -accept 3.1922806 0.0 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 0.9071392 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 1.8140483 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 3.6262553 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 4.531095 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 5.4347892 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 6.3371111 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 7.2378372 -roundtrip 1000 - -tolerance 0.006 m -accept -31.9515111 8.136745 -roundtrip 1000 - -tolerance 0.006 m -accept -177.8077194 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept 163.1922806 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept 133.1922806 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept 103.1922806 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept 73.1922806 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept 43.1922806 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept 13.1922806 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept 3.1922806 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept 0.0 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept -6.7200711 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept -16.8077194 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept -46.8077194 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept -76.8077194 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept -106.8077194 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept -136.8077194 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept -166.8077194 2.0 -roundtrip 1000 - -tolerance 0.006 m -accept -175.8077194 2.0 -roundtrip 1000 - - diff --git a/test/gigs/5203.1.gie.failing b/test/gigs/5203.1.gie.failing new file mode 100644 index 00000000..960b9171 --- /dev/null +++ b/test/gigs/5203.1.gie.failing @@ -0,0 +1,192 @@ +-------------------------------------------------------------------------------- + +GIGS Test 5203 (part 1), Position Vector 7-parameter transformation, v2.0_2011-06-28. Geographic 2D domain (EPSG method code 9606). + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4277 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 150.00567472 79.99487333 +expect 150.0 80.0 + +tolerance 2.77777777778e-07 m +accept 120.0 60.0 +expect 119.99435889 60.00569306 + +tolerance 2.77777777778e-07 m +accept 60.00446778 29.99566778 +expect 60.0 30.0 + +tolerance 2.77777777778e-07 m +accept 0.0 0.0 +expect -0.00089056 0.00483333 + +tolerance 2.77777777778e-07 m +accept -60.00357056 -30.00504639 +expect -60.0 -30.0 + +tolerance 2.77777777778e-07 m +accept -120.0 -60.0 +expect -119.9918525 -59.99907361 + +tolerance 2.77777777778e-07 m +accept -150.01693111 -79.99778139 +expect -150.0 -80.0 + +tolerance 2.77777777778e-07 m +accept -180.0 70.0 +expect -179.99637361 70.005945 + +tolerance 2.77777777778e-07 m +accept -135.00596333 49.99458694 +expect -135.0 50.0 + +tolerance 2.77777777778e-07 m +accept -90.0 25.0 +expect -89.99531139 25.00445833 + +tolerance 2.77777777778e-07 m +accept 0.00089056 -0.00483333 +expect 0.0 0.0 + +tolerance 2.77777777778e-07 m +accept 143.9279419 -37.6532236 +expect 143.92634806 -37.65235306 + +tolerance 2.77777777778e-07 m +accept 135.00291194 -49.99973028 +expect 135.0 -50.0 + +tolerance 2.77777777778e-07 m +accept 180.0 -70.0 +expect -179.99660139 -70.002485 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4326 +inv + +step +init=epsg:4277 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 150.0 80.0 +expect 150.00567472 79.99487333 + +tolerance 2.77777777778e-07 m +accept 119.99435889 60.00569306 +expect 120.0 60.0 + +tolerance 2.77777777778e-07 m +accept 60.0 30.0 +expect 60.00446778 29.99566778 + +tolerance 2.77777777778e-07 m +accept -0.00089056 0.00483333 +expect 0.0 0.0 + +tolerance 2.77777777778e-07 m +accept -60.0 -30.0 +expect -60.00357056 -30.00504639 + +tolerance 2.77777777778e-07 m +accept -119.9918525 -59.99907361 +expect -120.0 -60.0 + +tolerance 2.77777777778e-07 m +accept -150.0 -80.0 +expect -150.01693111 -79.99778139 + +tolerance 2.77777777778e-07 m +accept -179.99637361 70.005945 +expect -180.0 70.0 + +tolerance 2.77777777778e-07 m +accept -135.0 50.0 +expect -135.00596333 49.99458694 + +tolerance 2.77777777778e-07 m +accept -89.99531139 25.00445833 +expect -90.0 25.0 + +tolerance 2.77777777778e-07 m +accept 0.0 0.0 +expect 0.00089056 -0.00483333 + +tolerance 2.77777777778e-07 m +accept 143.92634806 -37.65235306 +expect 143.9279419 -37.6532236 + +tolerance 2.77777777778e-07 m +accept 135.0 -50.0 +expect 135.00291194 -49.99973028 + +tolerance 2.77777777778e-07 m +accept -179.99660139 -70.002485 +expect 180.0 -70.0 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4277 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept 150.00567472 79.99487333 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 120.0 60.0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 60.00446778 29.99566778 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 0.0 0.0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -60.00357056 -30.00504639 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -120.0 -60.0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -150.01693111 -79.99778139 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -180.0 70.0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -135.00596333 49.99458694 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -90.0 25.0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 0.00089056 -0.00483333 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 143.9279419 -37.6532236 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 135.00291194 -49.99973028 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 180.0 -70.0 +roundtrip 1000 + + diff --git a/test/gigs/5203.1.gie_failing b/test/gigs/5203.1.gie_failing deleted file mode 100644 index 960b9171..00000000 --- a/test/gigs/5203.1.gie_failing +++ /dev/null @@ -1,192 +0,0 @@ --------------------------------------------------------------------------------- - -GIGS Test 5203 (part 1), Position Vector 7-parameter transformation, v2.0_2011-06-28. Geographic 2D domain (EPSG method code 9606). - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4277 +inv - +step +init=epsg:4326 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept 150.00567472 79.99487333 -expect 150.0 80.0 - -tolerance 2.77777777778e-07 m -accept 120.0 60.0 -expect 119.99435889 60.00569306 - -tolerance 2.77777777778e-07 m -accept 60.00446778 29.99566778 -expect 60.0 30.0 - -tolerance 2.77777777778e-07 m -accept 0.0 0.0 -expect -0.00089056 0.00483333 - -tolerance 2.77777777778e-07 m -accept -60.00357056 -30.00504639 -expect -60.0 -30.0 - -tolerance 2.77777777778e-07 m -accept -120.0 -60.0 -expect -119.9918525 -59.99907361 - -tolerance 2.77777777778e-07 m -accept -150.01693111 -79.99778139 -expect -150.0 -80.0 - -tolerance 2.77777777778e-07 m -accept -180.0 70.0 -expect -179.99637361 70.005945 - -tolerance 2.77777777778e-07 m -accept -135.00596333 49.99458694 -expect -135.0 50.0 - -tolerance 2.77777777778e-07 m -accept -90.0 25.0 -expect -89.99531139 25.00445833 - -tolerance 2.77777777778e-07 m -accept 0.00089056 -0.00483333 -expect 0.0 0.0 - -tolerance 2.77777777778e-07 m -accept 143.9279419 -37.6532236 -expect 143.92634806 -37.65235306 - -tolerance 2.77777777778e-07 m -accept 135.00291194 -49.99973028 -expect 135.0 -50.0 - -tolerance 2.77777777778e-07 m -accept 180.0 -70.0 -expect -179.99660139 -70.002485 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4326 +inv - +step +init=epsg:4277 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept 150.0 80.0 -expect 150.00567472 79.99487333 - -tolerance 2.77777777778e-07 m -accept 119.99435889 60.00569306 -expect 120.0 60.0 - -tolerance 2.77777777778e-07 m -accept 60.0 30.0 -expect 60.00446778 29.99566778 - -tolerance 2.77777777778e-07 m -accept -0.00089056 0.00483333 -expect 0.0 0.0 - -tolerance 2.77777777778e-07 m -accept -60.0 -30.0 -expect -60.00357056 -30.00504639 - -tolerance 2.77777777778e-07 m -accept -119.9918525 -59.99907361 -expect -120.0 -60.0 - -tolerance 2.77777777778e-07 m -accept -150.0 -80.0 -expect -150.01693111 -79.99778139 - -tolerance 2.77777777778e-07 m -accept -179.99637361 70.005945 -expect -180.0 70.0 - -tolerance 2.77777777778e-07 m -accept -135.0 50.0 -expect -135.00596333 49.99458694 - -tolerance 2.77777777778e-07 m -accept -89.99531139 25.00445833 -expect -90.0 25.0 - -tolerance 2.77777777778e-07 m -accept 0.0 0.0 -expect 0.00089056 -0.00483333 - -tolerance 2.77777777778e-07 m -accept 143.92634806 -37.65235306 -expect 143.9279419 -37.6532236 - -tolerance 2.77777777778e-07 m -accept 135.0 -50.0 -expect 135.00291194 -49.99973028 - -tolerance 2.77777777778e-07 m -accept -179.99660139 -70.002485 -expect 180.0 -70.0 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4277 +inv - +step +init=epsg:4326 --------------------------------------------------------------------------------- -tolerance 5.55555555556e-08 m -accept 150.00567472 79.99487333 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 120.0 60.0 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 60.00446778 29.99566778 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 0.0 0.0 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -60.00357056 -30.00504639 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -120.0 -60.0 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -150.01693111 -79.99778139 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -180.0 70.0 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -135.00596333 49.99458694 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -90.0 25.0 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 0.00089056 -0.00483333 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 143.9279419 -37.6532236 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 135.00291194 -49.99973028 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 180.0 -70.0 -roundtrip 1000 - - diff --git a/test/gigs/5204.1.gie.failing b/test/gigs/5204.1.gie.failing new file mode 100644 index 00000000..3c7e3fff --- /dev/null +++ b/test/gigs/5204.1.gie.failing @@ -0,0 +1,192 @@ +-------------------------------------------------------------------------------- + +GIGS Test 5204, Coordinate Frame 7-parameter transformation, v2.0_2011-06-28. Geographic 2D domain (EPSG method code 9607) + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4313 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 149.99825389 80.00155167 +expect 150 80 + +tolerance 2.77777777778e-07 m +accept 120 60 +expect 120.00197111 59.99807333 + +tolerance 2.77777777778e-07 m +accept 59.99822194 30.00134083 +expect 60 30 + +tolerance 2.77777777778e-07 m +accept 0 0 +expect 0.00098139 -0.00081028 + +tolerance 2.77777777778e-07 m +accept -59.99991333 -29.99943917 +expect -60 -30 + +tolerance 2.77777777778e-07 m +accept -120 -60 +expect -120.00150694 -59.999835 + +tolerance 2.77777777778e-07 m +accept -149.99532167 -80.00054917 +expect -150 -80 + +tolerance 2.77777777778e-07 m +accept -180 70 +expect 179.99939778 69.99812806 + +tolerance 2.77777777778e-07 m +accept -134.99891389 50.00183 +expect -135 50 + +tolerance 2.77777777778e-07 m +accept -90 25 +expect -90.00060583 24.99862667 + +tolerance 2.77777777778e-07 m +accept -0.00098139 0.00081028 +expect 0 0 + +tolerance 2.77777777778e-07 m +accept 143.9279419 -37.6532236 +expect 143.92857222 -37.65257083 + +tolerance 2.77777777778e-07 m +accept 134.99913472 -50.00096139 +expect 135 -50 + +tolerance 2.77777777778e-07 m +accept 180 -70 +expect 179.99888667 -69.99901667 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4326 +inv + +step +init=epsg:4313 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 150 80 +expect 149.99825389 80.00155167 + +tolerance 2.77777777778e-07 m +accept 120.00197111 59.99807333 +expect 120 60 + +tolerance 2.77777777778e-07 m +accept 60 30 +expect 59.99822194 30.00134083 + +tolerance 2.77777777778e-07 m +accept 0.00098139 -0.00081028 +expect 0 0 + +tolerance 2.77777777778e-07 m +accept -60 -30 +expect -59.99991333 -29.99943917 + +tolerance 2.77777777778e-07 m +accept -120.00150694 -59.999835 +expect -120 -60 + +tolerance 2.77777777778e-07 m +accept -150 -80 +expect -149.99532167 -80.00054917 + +tolerance 2.77777777778e-07 m +accept 179.99939778 69.99812806 +expect -180 70 + +tolerance 2.77777777778e-07 m +accept -135 50 +expect -134.99891389 50.00183 + +tolerance 2.77777777778e-07 m +accept -90.00060583 24.99862667 +expect -90 25 + +tolerance 2.77777777778e-07 m +accept 0 0 +expect -0.00098139 0.00081028 + +tolerance 2.77777777778e-07 m +accept 143.92857222 -37.65257083 +expect 143.9279419 -37.6532236 + +tolerance 2.77777777778e-07 m +accept 135 -50 +expect 134.99913472 -50.00096139 + +tolerance 2.77777777778e-07 m +accept 179.99888667 -69.99901667 +expect 180 -70 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4313 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept 149.99825389 80.00155167 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 120 60 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 59.99822194 30.00134083 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 0 0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -59.99991333 -29.99943917 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -120 -60 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -149.99532167 -80.00054917 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -180 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -134.99891389 50.00183 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -90 25 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -0.00098139 0.00081028 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 143.9279419 -37.6532236 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 134.99913472 -50.00096139 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 180 -70 +roundtrip 1000 + + diff --git a/test/gigs/5204.1.gie_failing b/test/gigs/5204.1.gie_failing deleted file mode 100644 index 3c7e3fff..00000000 --- a/test/gigs/5204.1.gie_failing +++ /dev/null @@ -1,192 +0,0 @@ --------------------------------------------------------------------------------- - -GIGS Test 5204, Coordinate Frame 7-parameter transformation, v2.0_2011-06-28. Geographic 2D domain (EPSG method code 9607) - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4313 +inv - +step +init=epsg:4326 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept 149.99825389 80.00155167 -expect 150 80 - -tolerance 2.77777777778e-07 m -accept 120 60 -expect 120.00197111 59.99807333 - -tolerance 2.77777777778e-07 m -accept 59.99822194 30.00134083 -expect 60 30 - -tolerance 2.77777777778e-07 m -accept 0 0 -expect 0.00098139 -0.00081028 - -tolerance 2.77777777778e-07 m -accept -59.99991333 -29.99943917 -expect -60 -30 - -tolerance 2.77777777778e-07 m -accept -120 -60 -expect -120.00150694 -59.999835 - -tolerance 2.77777777778e-07 m -accept -149.99532167 -80.00054917 -expect -150 -80 - -tolerance 2.77777777778e-07 m -accept -180 70 -expect 179.99939778 69.99812806 - -tolerance 2.77777777778e-07 m -accept -134.99891389 50.00183 -expect -135 50 - -tolerance 2.77777777778e-07 m -accept -90 25 -expect -90.00060583 24.99862667 - -tolerance 2.77777777778e-07 m -accept -0.00098139 0.00081028 -expect 0 0 - -tolerance 2.77777777778e-07 m -accept 143.9279419 -37.6532236 -expect 143.92857222 -37.65257083 - -tolerance 2.77777777778e-07 m -accept 134.99913472 -50.00096139 -expect 135 -50 - -tolerance 2.77777777778e-07 m -accept 180 -70 -expect 179.99888667 -69.99901667 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4326 +inv - +step +init=epsg:4313 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept 150 80 -expect 149.99825389 80.00155167 - -tolerance 2.77777777778e-07 m -accept 120.00197111 59.99807333 -expect 120 60 - -tolerance 2.77777777778e-07 m -accept 60 30 -expect 59.99822194 30.00134083 - -tolerance 2.77777777778e-07 m -accept 0.00098139 -0.00081028 -expect 0 0 - -tolerance 2.77777777778e-07 m -accept -60 -30 -expect -59.99991333 -29.99943917 - -tolerance 2.77777777778e-07 m -accept -120.00150694 -59.999835 -expect -120 -60 - -tolerance 2.77777777778e-07 m -accept -150 -80 -expect -149.99532167 -80.00054917 - -tolerance 2.77777777778e-07 m -accept 179.99939778 69.99812806 -expect -180 70 - -tolerance 2.77777777778e-07 m -accept -135 50 -expect -134.99891389 50.00183 - -tolerance 2.77777777778e-07 m -accept -90.00060583 24.99862667 -expect -90 25 - -tolerance 2.77777777778e-07 m -accept 0 0 -expect -0.00098139 0.00081028 - -tolerance 2.77777777778e-07 m -accept 143.92857222 -37.65257083 -expect 143.9279419 -37.6532236 - -tolerance 2.77777777778e-07 m -accept 135 -50 -expect 134.99913472 -50.00096139 - -tolerance 2.77777777778e-07 m -accept 179.99888667 -69.99901667 -expect 180 -70 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4313 +inv - +step +init=epsg:4326 --------------------------------------------------------------------------------- -tolerance 5.55555555556e-08 m -accept 149.99825389 80.00155167 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 120 60 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 59.99822194 30.00134083 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 0 0 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -59.99991333 -29.99943917 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -120 -60 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -149.99532167 -80.00054917 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -180 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -134.99891389 50.00183 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -90 25 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -0.00098139 0.00081028 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 143.9279419 -37.6532236 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 134.99913472 -50.00096139 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 180 -70 -roundtrip 1000 - - diff --git a/test/gigs/5205.1.gie.failing b/test/gigs/5205.1.gie.failing new file mode 100644 index 00000000..df4cb674 --- /dev/null +++ b/test/gigs/5205.1.gie.failing @@ -0,0 +1,192 @@ +-------------------------------------------------------------------------------- + +GIGS Test 5205 (Part 1), Molodensky-Badekas 10-parameter transformation, v2.0_2011-06-28. Geographic 2D domain (EPSG method code 9636) + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4289 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 150.01814371 79.99494639 +expect 150 80 + +tolerance 2.77777777778e-07 m +accept 120 60 +expect 119.99001559 60.00441792 + +tolerance 2.77777777778e-07 m +accept 60.00535007 29.99746103 +expect 60 30 + +tolerance 2.77777777778e-07 m +accept 0 0 +expect -7.025e-05 0.0041133 + +tolerance 2.77777777778e-07 m +accept -60.00473241 -30.0042486 +expect -60 -30 + +tolerance 2.77777777778e-07 m +accept -120 -60 +expect -119.9922412 -60.00081456 + +tolerance 2.77777777778e-07 m +accept -150.01209192 -79.99612229 +expect -150 -80 + +tolerance 2.77777777778e-07 m +accept -180 70 +expect 179.99786174 70.00666951 + +tolerance 2.77777777778e-07 m +accept -135.00454845 49.99357566 +expect -135 50 + +tolerance 2.77777777778e-07 m +accept -90 25 +expect -89.99487454 25.00457271 + +tolerance 2.77777777778e-07 m +accept 7.032e-05 -0.00411349 +expect 0 0 + +tolerance 2.77777777778e-07 m +accept 143.9279419 -37.6532236 +expect 143.92330599 -37.65282034 + +tolerance 2.77777777778e-07 m +accept 135.00641074 -49.99958243 +expect 135 -50 + +tolerance 2.77777777778e-07 m +accept 180 -70 +expect 179.99847886 -70.00362084 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4326 +inv + +step +init=epsg:4289 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept 150 80 +expect 150.01814371 79.99494639 + +tolerance 2.77777777778e-07 m +accept 119.99001559 60.00441792 +expect 120 60 + +tolerance 2.77777777778e-07 m +accept 60 30 +expect 60.00535007 29.99746103 + +tolerance 2.77777777778e-07 m +accept -7.025e-05 0.0041133 +expect 0 0 + +tolerance 2.77777777778e-07 m +accept -60 -30 +expect -60.00473241 -30.0042486 + +tolerance 2.77777777778e-07 m +accept -119.9922412 -60.00081456 +expect -120 -60 + +tolerance 2.77777777778e-07 m +accept -150 -80 +expect -150.01209192 -79.99612229 + +tolerance 2.77777777778e-07 m +accept 179.99786174 70.00666951 +expect -180 70 + +tolerance 2.77777777778e-07 m +accept -135 50 +expect -135.00454845 49.99357566 + +tolerance 2.77777777778e-07 m +accept -89.99487454 25.00457271 +expect -90 25 + +tolerance 2.77777777778e-07 m +accept 0 0 +expect 7.032e-05 -0.00411349 + +tolerance 2.77777777778e-07 m +accept 143.92330599 -37.65282034 +expect 143.9279419 -37.6532236 + +tolerance 2.77777777778e-07 m +accept 135 -50 +expect 135.00641074 -49.99958243 + +tolerance 2.77777777778e-07 m +accept 179.99847886 -70.00362084 +expect 180 -70 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4289 +inv + +step +init=epsg:4326 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept 150.01814371 79.99494639 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 120 60 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 60.00535007 29.99746103 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 0 0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -60.00473241 -30.0042486 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -120 -60 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -150.01209192 -79.99612229 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -180 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -135.00454845 49.99357566 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -90 25 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 7.032e-05 -0.00411349 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 143.9279419 -37.6532236 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 135.00641074 -49.99958243 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 180 -70 +roundtrip 1000 + + diff --git a/test/gigs/5205.1.gie_failing b/test/gigs/5205.1.gie_failing deleted file mode 100644 index df4cb674..00000000 --- a/test/gigs/5205.1.gie_failing +++ /dev/null @@ -1,192 +0,0 @@ --------------------------------------------------------------------------------- - -GIGS Test 5205 (Part 1), Molodensky-Badekas 10-parameter transformation, v2.0_2011-06-28. Geographic 2D domain (EPSG method code 9636) - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4289 +inv - +step +init=epsg:4326 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept 150.01814371 79.99494639 -expect 150 80 - -tolerance 2.77777777778e-07 m -accept 120 60 -expect 119.99001559 60.00441792 - -tolerance 2.77777777778e-07 m -accept 60.00535007 29.99746103 -expect 60 30 - -tolerance 2.77777777778e-07 m -accept 0 0 -expect -7.025e-05 0.0041133 - -tolerance 2.77777777778e-07 m -accept -60.00473241 -30.0042486 -expect -60 -30 - -tolerance 2.77777777778e-07 m -accept -120 -60 -expect -119.9922412 -60.00081456 - -tolerance 2.77777777778e-07 m -accept -150.01209192 -79.99612229 -expect -150 -80 - -tolerance 2.77777777778e-07 m -accept -180 70 -expect 179.99786174 70.00666951 - -tolerance 2.77777777778e-07 m -accept -135.00454845 49.99357566 -expect -135 50 - -tolerance 2.77777777778e-07 m -accept -90 25 -expect -89.99487454 25.00457271 - -tolerance 2.77777777778e-07 m -accept 7.032e-05 -0.00411349 -expect 0 0 - -tolerance 2.77777777778e-07 m -accept 143.9279419 -37.6532236 -expect 143.92330599 -37.65282034 - -tolerance 2.77777777778e-07 m -accept 135.00641074 -49.99958243 -expect 135 -50 - -tolerance 2.77777777778e-07 m -accept 180 -70 -expect 179.99847886 -70.00362084 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4326 +inv - +step +init=epsg:4289 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept 150 80 -expect 150.01814371 79.99494639 - -tolerance 2.77777777778e-07 m -accept 119.99001559 60.00441792 -expect 120 60 - -tolerance 2.77777777778e-07 m -accept 60 30 -expect 60.00535007 29.99746103 - -tolerance 2.77777777778e-07 m -accept -7.025e-05 0.0041133 -expect 0 0 - -tolerance 2.77777777778e-07 m -accept -60 -30 -expect -60.00473241 -30.0042486 - -tolerance 2.77777777778e-07 m -accept -119.9922412 -60.00081456 -expect -120 -60 - -tolerance 2.77777777778e-07 m -accept -150 -80 -expect -150.01209192 -79.99612229 - -tolerance 2.77777777778e-07 m -accept 179.99786174 70.00666951 -expect -180 70 - -tolerance 2.77777777778e-07 m -accept -135 50 -expect -135.00454845 49.99357566 - -tolerance 2.77777777778e-07 m -accept -89.99487454 25.00457271 -expect -90 25 - -tolerance 2.77777777778e-07 m -accept 0 0 -expect 7.032e-05 -0.00411349 - -tolerance 2.77777777778e-07 m -accept 143.92330599 -37.65282034 -expect 143.9279419 -37.6532236 - -tolerance 2.77777777778e-07 m -accept 135 -50 -expect 135.00641074 -49.99958243 - -tolerance 2.77777777778e-07 m -accept 179.99847886 -70.00362084 -expect 180 -70 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4289 +inv - +step +init=epsg:4326 --------------------------------------------------------------------------------- -tolerance 5.55555555556e-08 m -accept 150.01814371 79.99494639 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 120 60 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 60.00535007 29.99746103 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 0 0 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -60.00473241 -30.0042486 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -120 -60 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -150.01209192 -79.99612229 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -180 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -135.00454845 49.99357566 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -90 25 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 7.032e-05 -0.00411349 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 143.9279419 -37.6532236 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 135.00641074 -49.99958243 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 180 -70 -roundtrip 1000 - - diff --git a/test/gigs/5206.gie.failing b/test/gigs/5206.gie.failing new file mode 100644 index 00000000..5f3d6eb6 --- /dev/null +++ b/test/gigs/5206.gie.failing @@ -0,0 +1,540 @@ +-------------------------------------------------------------------------------- + +Test 5206, NADCON transformation, v2.0_2011-06-28. Out of transform grid area error tests have been removed. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4267 +inv + +step +init=epsg:4269 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept -89.5177272 29.9997978 +expect -89.5177778 30.0 + +tolerance 2.77777777778e-07 m +accept -90.5177778 29.2833333 +expect -90.5178639 29.2835592 + +tolerance 2.77777777778e-07 m +accept -91.5176758 28.2830864 +expect -91.5177778 28.2833333 + +tolerance 2.77777777778e-07 m +accept -92.5177778 27.2833333 +expect -92.5178811 27.2836106 + +tolerance 2.77777777778e-07 m +accept -93.5176731 26.2830225 +expect -93.5177778 26.2833333 + +tolerance 2.77777777778e-07 m +accept -94.5177778 25 +expect -94.5178744 25.0003486 + +tolerance 2.77777777778e-07 m +accept -142.9972522 70.0001631 +expect -143 70 + +tolerance 2.77777777778e-07 m +accept -142 70.0 +expect -142.0026922 69.9998422 + +tolerance 2.77777777778e-07 m +accept -141.9973078 70.0001578 +expect -142 70 + +tolerance 2.77777777778e-07 m +accept -140.9971981 70.0001481 +expect -141 70 + +tolerance 2.77777777778e-07 m +accept -140 70 +expect -140.0027922 69.9998617 + +tolerance 2.77777777778e-07 m +accept -138.9973075 70.0001297 +expect -139 70 + +tolerance 2.77777777778e-07 m +accept -138 70 +expect -138.0026767 69.9998867 + +tolerance 2.77777777778e-07 m +accept -134.9973733 70.000055 +expect -135 70 + +tolerance 2.77777777778e-07 m +accept -130 70 +expect -130.0025347 70.0000511 + +tolerance 2.77777777778e-07 m +accept -128.0009742 69.9999053 +expect -128.0034722 70 + +tolerance 2.77777777778e-07 m +accept -179 70 +expect -179.0035064 69.9990142 + +tolerance 2.77777777778e-07 m +accept -179.9964664 70.0010089 +expect 180 70 + +tolerance 2.77777777778e-07 m +accept 180 70 +expect 179.9964664 69.9989911 + +tolerance 2.77777777778e-07 m +accept 179 70 +expect 178.9964394 69.9989678 + +tolerance 2.77777777778e-07 m +accept -111.9991714 49.9999556 +expect -112 49.9999997 + +tolerance 2.77777777778e-07 m +accept -112 49.9999997 +expect -112.0008286 50.0000439 + +tolerance 2.77777777778e-07 m +accept -111.9991214 49.0000033 +expect -112 49 + +tolerance 2.77777777778e-07 m +accept -112 48 +expect -112.0008492 47.9999606 + +tolerance 2.77777777778e-07 m +accept -111.9991678 47.0000569 +expect -112 47 + +tolerance 2.77777777778e-07 m +accept -112 47 +expect -112.0008325 46.9999431 + +tolerance 2.77777777778e-07 m +accept -111.9991756 46.0000733 +expect -112 46 + +tolerance 2.77777777778e-07 m +accept -112 45 +expect -112.0008022 44.9999197 + +tolerance 2.77777777778e-07 m +accept -130.5177467 51 +expect -130.5193953 50.9997114 + +tolerance 2.77777777778e-07 m +accept -130.5160981 51.0002886 +expect -130.5177467 51 + +tolerance 2.77777777778e-07 m +accept -130.5161206 50.0002897 +expect -130.5177467 49.9999997 + +tolerance 2.77777777778e-07 m +accept -130.5177467 49.9999997 +expect -130.5193731 49.9997097 + +tolerance 2.77777777778e-07 m +accept -130.5161458 49.0002717 +expect -130.5177467 49 + +tolerance 2.77777777778e-07 m +accept -130.5177467 48.1166667 +expect -130.5193258 48.1164106 + +tolerance 2.77777777778e-07 m +accept -130.5161942 47.0002378 +expect -130.5177467 47 + +tolerance 2.77777777778e-07 m +accept -130.5177467 47 +expect -130.5192992 46.9997622 + +tolerance 2.77777777778e-07 m +accept -130.5162172 46.0002222 +expect -130.5177467 46 + +tolerance 2.77777777778e-07 m +accept -130.5177467 45 +expect -130.5192539 44.9997925 + +tolerance 2.77777777778e-07 m +accept -132.9984775 48.1169867 +expect -133 48.1166667 + +tolerance 2.77777777778e-07 m +accept -131.4555556 48.1166667 +expect -131.4571578 48.1163964 + +tolerance 2.77777777778e-07 m +accept -130.5161675 48.1169228 +expect -130.5177467 48.1166667 + +tolerance 2.77777777778e-07 m +accept -128.4555556 48.1166667 +expect -128.4570433 48.1164319 + +tolerance 2.77777777778e-07 m +accept -128.5444444 48.1166667 +expect -128.5459361 48.1164311 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4269 +inv + +step +init=epsg:4267 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept -89.5177778 30.0 +expect -89.5177272 29.9997978 + +tolerance 2.77777777778e-07 m +accept -90.5178639 29.2835592 +expect -90.5177778 29.2833333 + +tolerance 2.77777777778e-07 m +accept -91.5177778 28.2833333 +expect -91.5176758 28.2830864 + +tolerance 2.77777777778e-07 m +accept -92.5178811 27.2836106 +expect -92.5177778 27.2833333 + +tolerance 2.77777777778e-07 m +accept -93.5177778 26.2833333 +expect -93.5176731 26.2830225 + +tolerance 2.77777777778e-07 m +accept -94.5178744 25.0003486 +expect -94.5177778 25 + +tolerance 2.77777777778e-07 m +accept -143 70 +expect -142.9972522 70.0001631 + +tolerance 2.77777777778e-07 m +accept -142.0026922 69.9998422 +expect -142 70.0 + +tolerance 2.77777777778e-07 m +accept -142 70 +expect -141.9973078 70.0001578 + +tolerance 2.77777777778e-07 m +accept -141 70 +expect -140.9971981 70.0001481 + +tolerance 2.77777777778e-07 m +accept -140.0027922 69.9998617 +expect -140 70 + +tolerance 2.77777777778e-07 m +accept -139 70 +expect -138.9973075 70.0001297 + +tolerance 2.77777777778e-07 m +accept -138.0026767 69.9998867 +expect -138 70 + +tolerance 2.77777777778e-07 m +accept -135 70 +expect -134.9973733 70.000055 + +tolerance 2.77777777778e-07 m +accept -130.0025347 70.0000511 +expect -130 70 + +tolerance 2.77777777778e-07 m +accept -128.0034722 70 +expect -128.0009742 69.9999053 + +tolerance 2.77777777778e-07 m +accept -179.0035064 69.9990142 +expect -179 70 + +tolerance 2.77777777778e-07 m +accept 180 70 +expect -179.9964664 70.0010089 + +tolerance 2.77777777778e-07 m +accept 179.9964664 69.9989911 +expect 180 70 + +tolerance 2.77777777778e-07 m +accept 178.9964394 69.9989678 +expect 179 70 + +tolerance 2.77777777778e-07 m +accept -112 49.9999997 +expect -111.9991714 49.9999556 + +tolerance 2.77777777778e-07 m +accept -112.0008286 50.0000439 +expect -112 49.9999997 + +tolerance 2.77777777778e-07 m +accept -112 49 +expect -111.9991214 49.0000033 + +tolerance 2.77777777778e-07 m +accept -112.0008492 47.9999606 +expect -112 48 + +tolerance 2.77777777778e-07 m +accept -112 47 +expect -111.9991678 47.0000569 + +tolerance 2.77777777778e-07 m +accept -112.0008325 46.9999431 +expect -112 47 + +tolerance 2.77777777778e-07 m +accept -112 46 +expect -111.9991756 46.0000733 + +tolerance 2.77777777778e-07 m +accept -112.0008022 44.9999197 +expect -112 45 + +tolerance 2.77777777778e-07 m +accept -130.5193953 50.9997114 +expect -130.5177467 51 + +tolerance 2.77777777778e-07 m +accept -130.5177467 51 +expect -130.5160981 51.0002886 + +tolerance 2.77777777778e-07 m +accept -130.5177467 49.9999997 +expect -130.5161206 50.0002897 + +tolerance 2.77777777778e-07 m +accept -130.5193731 49.9997097 +expect -130.5177467 49.9999997 + +tolerance 2.77777777778e-07 m +accept -130.5177467 49 +expect -130.5161458 49.0002717 + +tolerance 2.77777777778e-07 m +accept -130.5193258 48.1164106 +expect -130.5177467 48.1166667 + +tolerance 2.77777777778e-07 m +accept -130.5177467 47 +expect -130.5161942 47.0002378 + +tolerance 2.77777777778e-07 m +accept -130.5192992 46.9997622 +expect -130.5177467 47 + +tolerance 2.77777777778e-07 m +accept -130.5177467 46 +expect -130.5162172 46.0002222 + +tolerance 2.77777777778e-07 m +accept -130.5192539 44.9997925 +expect -130.5177467 45 + +tolerance 2.77777777778e-07 m +accept -133 48.1166667 +expect -132.9984775 48.1169867 + +tolerance 2.77777777778e-07 m +accept -131.4571578 48.1163964 +expect -131.4555556 48.1166667 + +tolerance 2.77777777778e-07 m +accept -130.5177467 48.1166667 +expect -130.5161675 48.1169228 + +tolerance 2.77777777778e-07 m +accept -128.4570433 48.1164319 +expect -128.4555556 48.1166667 + +tolerance 2.77777777778e-07 m +accept -128.5459361 48.1164311 +expect -128.5444444 48.1166667 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4267 +inv + +step +init=epsg:4269 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept -89.5177272 29.9997978 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -90.5177778 29.2833333 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -91.5176758 28.2830864 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -92.5177778 27.2833333 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -93.5176731 26.2830225 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -94.5177778 25 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -142.9972522 70.0001631 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -142 70.0 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -141.9973078 70.0001578 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -140.9971981 70.0001481 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -140 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.9973075 70.0001297 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -134.9973733 70.000055 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128.0009742 69.9999053 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -179 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -179.9964664 70.0010089 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 180 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept 179 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.9991714 49.9999556 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 49.9999997 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.9991214 49.0000033 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 48 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.9991678 47.0000569 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 47 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.9991756 46.0000733 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 45 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5177467 51 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5160981 51.0002886 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5161206 50.0002897 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5177467 49.9999997 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5161458 49.0002717 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5177467 48.1166667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5161942 47.0002378 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5177467 47 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5162172 46.0002222 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5177467 45 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -132.9984775 48.1169867 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -131.4555556 48.1166667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.5161675 48.1169228 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128.4555556 48.1166667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128.5444444 48.1166667 +roundtrip 1000 + + diff --git a/test/gigs/5206.gie_failing b/test/gigs/5206.gie_failing deleted file mode 100644 index 5f3d6eb6..00000000 --- a/test/gigs/5206.gie_failing +++ /dev/null @@ -1,540 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5206, NADCON transformation, v2.0_2011-06-28. Out of transform grid area error tests have been removed. - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4267 +inv - +step +init=epsg:4269 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept -89.5177272 29.9997978 -expect -89.5177778 30.0 - -tolerance 2.77777777778e-07 m -accept -90.5177778 29.2833333 -expect -90.5178639 29.2835592 - -tolerance 2.77777777778e-07 m -accept -91.5176758 28.2830864 -expect -91.5177778 28.2833333 - -tolerance 2.77777777778e-07 m -accept -92.5177778 27.2833333 -expect -92.5178811 27.2836106 - -tolerance 2.77777777778e-07 m -accept -93.5176731 26.2830225 -expect -93.5177778 26.2833333 - -tolerance 2.77777777778e-07 m -accept -94.5177778 25 -expect -94.5178744 25.0003486 - -tolerance 2.77777777778e-07 m -accept -142.9972522 70.0001631 -expect -143 70 - -tolerance 2.77777777778e-07 m -accept -142 70.0 -expect -142.0026922 69.9998422 - -tolerance 2.77777777778e-07 m -accept -141.9973078 70.0001578 -expect -142 70 - -tolerance 2.77777777778e-07 m -accept -140.9971981 70.0001481 -expect -141 70 - -tolerance 2.77777777778e-07 m -accept -140 70 -expect -140.0027922 69.9998617 - -tolerance 2.77777777778e-07 m -accept -138.9973075 70.0001297 -expect -139 70 - -tolerance 2.77777777778e-07 m -accept -138 70 -expect -138.0026767 69.9998867 - -tolerance 2.77777777778e-07 m -accept -134.9973733 70.000055 -expect -135 70 - -tolerance 2.77777777778e-07 m -accept -130 70 -expect -130.0025347 70.0000511 - -tolerance 2.77777777778e-07 m -accept -128.0009742 69.9999053 -expect -128.0034722 70 - -tolerance 2.77777777778e-07 m -accept -179 70 -expect -179.0035064 69.9990142 - -tolerance 2.77777777778e-07 m -accept -179.9964664 70.0010089 -expect 180 70 - -tolerance 2.77777777778e-07 m -accept 180 70 -expect 179.9964664 69.9989911 - -tolerance 2.77777777778e-07 m -accept 179 70 -expect 178.9964394 69.9989678 - -tolerance 2.77777777778e-07 m -accept -111.9991714 49.9999556 -expect -112 49.9999997 - -tolerance 2.77777777778e-07 m -accept -112 49.9999997 -expect -112.0008286 50.0000439 - -tolerance 2.77777777778e-07 m -accept -111.9991214 49.0000033 -expect -112 49 - -tolerance 2.77777777778e-07 m -accept -112 48 -expect -112.0008492 47.9999606 - -tolerance 2.77777777778e-07 m -accept -111.9991678 47.0000569 -expect -112 47 - -tolerance 2.77777777778e-07 m -accept -112 47 -expect -112.0008325 46.9999431 - -tolerance 2.77777777778e-07 m -accept -111.9991756 46.0000733 -expect -112 46 - -tolerance 2.77777777778e-07 m -accept -112 45 -expect -112.0008022 44.9999197 - -tolerance 2.77777777778e-07 m -accept -130.5177467 51 -expect -130.5193953 50.9997114 - -tolerance 2.77777777778e-07 m -accept -130.5160981 51.0002886 -expect -130.5177467 51 - -tolerance 2.77777777778e-07 m -accept -130.5161206 50.0002897 -expect -130.5177467 49.9999997 - -tolerance 2.77777777778e-07 m -accept -130.5177467 49.9999997 -expect -130.5193731 49.9997097 - -tolerance 2.77777777778e-07 m -accept -130.5161458 49.0002717 -expect -130.5177467 49 - -tolerance 2.77777777778e-07 m -accept -130.5177467 48.1166667 -expect -130.5193258 48.1164106 - -tolerance 2.77777777778e-07 m -accept -130.5161942 47.0002378 -expect -130.5177467 47 - -tolerance 2.77777777778e-07 m -accept -130.5177467 47 -expect -130.5192992 46.9997622 - -tolerance 2.77777777778e-07 m -accept -130.5162172 46.0002222 -expect -130.5177467 46 - -tolerance 2.77777777778e-07 m -accept -130.5177467 45 -expect -130.5192539 44.9997925 - -tolerance 2.77777777778e-07 m -accept -132.9984775 48.1169867 -expect -133 48.1166667 - -tolerance 2.77777777778e-07 m -accept -131.4555556 48.1166667 -expect -131.4571578 48.1163964 - -tolerance 2.77777777778e-07 m -accept -130.5161675 48.1169228 -expect -130.5177467 48.1166667 - -tolerance 2.77777777778e-07 m -accept -128.4555556 48.1166667 -expect -128.4570433 48.1164319 - -tolerance 2.77777777778e-07 m -accept -128.5444444 48.1166667 -expect -128.5459361 48.1164311 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4269 +inv - +step +init=epsg:4267 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept -89.5177778 30.0 -expect -89.5177272 29.9997978 - -tolerance 2.77777777778e-07 m -accept -90.5178639 29.2835592 -expect -90.5177778 29.2833333 - -tolerance 2.77777777778e-07 m -accept -91.5177778 28.2833333 -expect -91.5176758 28.2830864 - -tolerance 2.77777777778e-07 m -accept -92.5178811 27.2836106 -expect -92.5177778 27.2833333 - -tolerance 2.77777777778e-07 m -accept -93.5177778 26.2833333 -expect -93.5176731 26.2830225 - -tolerance 2.77777777778e-07 m -accept -94.5178744 25.0003486 -expect -94.5177778 25 - -tolerance 2.77777777778e-07 m -accept -143 70 -expect -142.9972522 70.0001631 - -tolerance 2.77777777778e-07 m -accept -142.0026922 69.9998422 -expect -142 70.0 - -tolerance 2.77777777778e-07 m -accept -142 70 -expect -141.9973078 70.0001578 - -tolerance 2.77777777778e-07 m -accept -141 70 -expect -140.9971981 70.0001481 - -tolerance 2.77777777778e-07 m -accept -140.0027922 69.9998617 -expect -140 70 - -tolerance 2.77777777778e-07 m -accept -139 70 -expect -138.9973075 70.0001297 - -tolerance 2.77777777778e-07 m -accept -138.0026767 69.9998867 -expect -138 70 - -tolerance 2.77777777778e-07 m -accept -135 70 -expect -134.9973733 70.000055 - -tolerance 2.77777777778e-07 m -accept -130.0025347 70.0000511 -expect -130 70 - -tolerance 2.77777777778e-07 m -accept -128.0034722 70 -expect -128.0009742 69.9999053 - -tolerance 2.77777777778e-07 m -accept -179.0035064 69.9990142 -expect -179 70 - -tolerance 2.77777777778e-07 m -accept 180 70 -expect -179.9964664 70.0010089 - -tolerance 2.77777777778e-07 m -accept 179.9964664 69.9989911 -expect 180 70 - -tolerance 2.77777777778e-07 m -accept 178.9964394 69.9989678 -expect 179 70 - -tolerance 2.77777777778e-07 m -accept -112 49.9999997 -expect -111.9991714 49.9999556 - -tolerance 2.77777777778e-07 m -accept -112.0008286 50.0000439 -expect -112 49.9999997 - -tolerance 2.77777777778e-07 m -accept -112 49 -expect -111.9991214 49.0000033 - -tolerance 2.77777777778e-07 m -accept -112.0008492 47.9999606 -expect -112 48 - -tolerance 2.77777777778e-07 m -accept -112 47 -expect -111.9991678 47.0000569 - -tolerance 2.77777777778e-07 m -accept -112.0008325 46.9999431 -expect -112 47 - -tolerance 2.77777777778e-07 m -accept -112 46 -expect -111.9991756 46.0000733 - -tolerance 2.77777777778e-07 m -accept -112.0008022 44.9999197 -expect -112 45 - -tolerance 2.77777777778e-07 m -accept -130.5193953 50.9997114 -expect -130.5177467 51 - -tolerance 2.77777777778e-07 m -accept -130.5177467 51 -expect -130.5160981 51.0002886 - -tolerance 2.77777777778e-07 m -accept -130.5177467 49.9999997 -expect -130.5161206 50.0002897 - -tolerance 2.77777777778e-07 m -accept -130.5193731 49.9997097 -expect -130.5177467 49.9999997 - -tolerance 2.77777777778e-07 m -accept -130.5177467 49 -expect -130.5161458 49.0002717 - -tolerance 2.77777777778e-07 m -accept -130.5193258 48.1164106 -expect -130.5177467 48.1166667 - -tolerance 2.77777777778e-07 m -accept -130.5177467 47 -expect -130.5161942 47.0002378 - -tolerance 2.77777777778e-07 m -accept -130.5192992 46.9997622 -expect -130.5177467 47 - -tolerance 2.77777777778e-07 m -accept -130.5177467 46 -expect -130.5162172 46.0002222 - -tolerance 2.77777777778e-07 m -accept -130.5192539 44.9997925 -expect -130.5177467 45 - -tolerance 2.77777777778e-07 m -accept -133 48.1166667 -expect -132.9984775 48.1169867 - -tolerance 2.77777777778e-07 m -accept -131.4571578 48.1163964 -expect -131.4555556 48.1166667 - -tolerance 2.77777777778e-07 m -accept -130.5177467 48.1166667 -expect -130.5161675 48.1169228 - -tolerance 2.77777777778e-07 m -accept -128.4570433 48.1164319 -expect -128.4555556 48.1166667 - -tolerance 2.77777777778e-07 m -accept -128.5459361 48.1164311 -expect -128.5444444 48.1166667 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4267 +inv - +step +init=epsg:4269 --------------------------------------------------------------------------------- -tolerance 5.55555555556e-08 m -accept -89.5177272 29.9997978 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -90.5177778 29.2833333 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -91.5176758 28.2830864 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -92.5177778 27.2833333 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -93.5176731 26.2830225 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -94.5177778 25 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -142.9972522 70.0001631 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -142 70.0 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -141.9973078 70.0001578 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -140.9971981 70.0001481 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -140 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.9973075 70.0001297 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -134.9973733 70.000055 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -128.0009742 69.9999053 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -179 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -179.9964664 70.0010089 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 180 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept 179 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -111.9991714 49.9999556 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -112 49.9999997 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -111.9991214 49.0000033 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -112 48 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -111.9991678 47.0000569 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -112 47 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -111.9991756 46.0000733 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -112 45 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5177467 51 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5160981 51.0002886 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5161206 50.0002897 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5177467 49.9999997 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5161458 49.0002717 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5177467 48.1166667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5161942 47.0002378 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5177467 47 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5162172 46.0002222 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5177467 45 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -132.9984775 48.1169867 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -131.4555556 48.1166667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.5161675 48.1169228 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -128.4555556 48.1166667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -128.5444444 48.1166667 -roundtrip 1000 - - diff --git a/test/gigs/5207.1.gie.failing b/test/gigs/5207.1.gie.failing new file mode 100644 index 00000000..8384bf0e --- /dev/null +++ b/test/gigs/5207.1.gie.failing @@ -0,0 +1,252 @@ +-------------------------------------------------------------------------------- + +Test 5207, NTv2 transformation, v2.0_2011-06-28. Out of transform grid area error tests have been removed. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4202 +inv + +step +init=epsg:4283 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept -115 -10.05 +expect -115.001251111 -10.0486372222 + +tolerance 2.77777777778e-07 m +accept -114.998744167 -11.0013594444 +expect -115 -11 + +tolerance 2.77777777778e-07 m +accept -115 -12 +expect -115.001261389 -11.9986441667 + +tolerance 2.77777777778e-07 m +accept -138.04 -9 +expect -138.041132778 -8.99854333333 + +tolerance 2.77777777778e-07 m +accept -138.043867222 -9.00145666667 +expect -138.045 -9 + +tolerance 2.77777777778e-07 m +accept -138.05 -9 +expect -138.051132778 -8.99854333333 + +tolerance 2.77777777778e-07 m +accept -138.048867222 -9.00145666667 +expect -138.05 -9 + +tolerance 2.77777777778e-07 m +accept -138.053867222 -9.00145666667 +expect -138.055 -9 + +tolerance 2.77777777778e-07 m +accept -138.06 -9 +expect -138.061132778 -8.99854333333 + +tolerance 2.77777777778e-07 m +accept -138.038730833 -27.1264763889 +expect -138.04 -27.125 + +tolerance 2.77777777778e-07 m +accept -138.045 -27.125 +expect -138.046268889 -27.1235236111 + +tolerance 2.77777777778e-07 m +accept -138.05 -27.125 +expect -138.051268889 -27.1235236111 + +tolerance 2.77777777778e-07 m +accept -138.048731111 -27.1264763889 +expect -138.05 -27.125 + +tolerance 2.77777777778e-07 m +accept -138.055 -27.125 +expect -138.056268889 -27.1235233333 + +tolerance 2.77777777778e-07 m +accept -138.058731111 -27.1264766667 +expect -138.06 -27.125 + +tolerance 2.77777777778e-07 m +accept -136.847222222 -28.05 +expect -136.848525278 -28.0485269444 + +tolerance 2.77777777778e-07 m +accept -137.847222222 -28.05 +expect -137.848505556 -28.0485311111 + +tolerance 2.77777777778e-07 m +accept -138.847222222 -28.05 +expect -138.8484925 -28.0485188889 + +tolerance 2.77777777778e-07 m +accept -139.847222222 -28.05 +expect -139.848475278 -28.0485072222 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4283 +inv + +step +init=epsg:4202 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept -115.001251111 -10.0486372222 +expect -115 -10.05 + +tolerance 2.77777777778e-07 m +accept -115 -11 +expect -114.998744167 -11.0013594444 + +tolerance 2.77777777778e-07 m +accept -115.001261389 -11.9986441667 +expect -115 -12 + +tolerance 2.77777777778e-07 m +accept -138.041132778 -8.99854333333 +expect -138.04 -9 + +tolerance 2.77777777778e-07 m +accept -138.045 -9 +expect -138.043867222 -9.00145666667 + +tolerance 2.77777777778e-07 m +accept -138.051132778 -8.99854333333 +expect -138.05 -9 + +tolerance 2.77777777778e-07 m +accept -138.05 -9 +expect -138.048867222 -9.00145666667 + +tolerance 2.77777777778e-07 m +accept -138.055 -9 +expect -138.053867222 -9.00145666667 + +tolerance 2.77777777778e-07 m +accept -138.061132778 -8.99854333333 +expect -138.06 -9 + +tolerance 2.77777777778e-07 m +accept -138.04 -27.125 +expect -138.038730833 -27.1264763889 + +tolerance 2.77777777778e-07 m +accept -138.046268889 -27.1235236111 +expect -138.045 -27.125 + +tolerance 2.77777777778e-07 m +accept -138.051268889 -27.1235236111 +expect -138.05 -27.125 + +tolerance 2.77777777778e-07 m +accept -138.05 -27.125 +expect -138.048731111 -27.1264763889 + +tolerance 2.77777777778e-07 m +accept -138.056268889 -27.1235233333 +expect -138.055 -27.125 + +tolerance 2.77777777778e-07 m +accept -138.06 -27.125 +expect -138.058731111 -27.1264766667 + +tolerance 2.77777777778e-07 m +accept -136.848525278 -28.0485269444 +expect -136.847222222 -28.05 + +tolerance 2.77777777778e-07 m +accept -137.848505556 -28.0485311111 +expect -137.847222222 -28.05 + +tolerance 2.77777777778e-07 m +accept -138.8484925 -28.0485188889 +expect -138.847222222 -28.05 + +tolerance 2.77777777778e-07 m +accept -139.848475278 -28.0485072222 +expect -139.847222222 -28.05 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4202 +inv + +step +init=epsg:4283 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept -115 -10.05 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -114.998744167 -11.0013594444 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -115 -12 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.04 -9 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.043867222 -9.00145666667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.05 -9 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.048867222 -9.00145666667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.053867222 -9.00145666667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.06 -9 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.038730833 -27.1264763889 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.045 -27.125 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.05 -27.125 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.048731111 -27.1264763889 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.055 -27.125 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.058731111 -27.1264766667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -136.847222222 -28.05 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -137.847222222 -28.05 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.847222222 -28.05 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -139.847222222 -28.05 +roundtrip 1000 + + diff --git a/test/gigs/5207.1.gie_failing b/test/gigs/5207.1.gie_failing deleted file mode 100644 index 8384bf0e..00000000 --- a/test/gigs/5207.1.gie_failing +++ /dev/null @@ -1,252 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5207, NTv2 transformation, v2.0_2011-06-28. Out of transform grid area error tests have been removed. - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4202 +inv - +step +init=epsg:4283 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept -115 -10.05 -expect -115.001251111 -10.0486372222 - -tolerance 2.77777777778e-07 m -accept -114.998744167 -11.0013594444 -expect -115 -11 - -tolerance 2.77777777778e-07 m -accept -115 -12 -expect -115.001261389 -11.9986441667 - -tolerance 2.77777777778e-07 m -accept -138.04 -9 -expect -138.041132778 -8.99854333333 - -tolerance 2.77777777778e-07 m -accept -138.043867222 -9.00145666667 -expect -138.045 -9 - -tolerance 2.77777777778e-07 m -accept -138.05 -9 -expect -138.051132778 -8.99854333333 - -tolerance 2.77777777778e-07 m -accept -138.048867222 -9.00145666667 -expect -138.05 -9 - -tolerance 2.77777777778e-07 m -accept -138.053867222 -9.00145666667 -expect -138.055 -9 - -tolerance 2.77777777778e-07 m -accept -138.06 -9 -expect -138.061132778 -8.99854333333 - -tolerance 2.77777777778e-07 m -accept -138.038730833 -27.1264763889 -expect -138.04 -27.125 - -tolerance 2.77777777778e-07 m -accept -138.045 -27.125 -expect -138.046268889 -27.1235236111 - -tolerance 2.77777777778e-07 m -accept -138.05 -27.125 -expect -138.051268889 -27.1235236111 - -tolerance 2.77777777778e-07 m -accept -138.048731111 -27.1264763889 -expect -138.05 -27.125 - -tolerance 2.77777777778e-07 m -accept -138.055 -27.125 -expect -138.056268889 -27.1235233333 - -tolerance 2.77777777778e-07 m -accept -138.058731111 -27.1264766667 -expect -138.06 -27.125 - -tolerance 2.77777777778e-07 m -accept -136.847222222 -28.05 -expect -136.848525278 -28.0485269444 - -tolerance 2.77777777778e-07 m -accept -137.847222222 -28.05 -expect -137.848505556 -28.0485311111 - -tolerance 2.77777777778e-07 m -accept -138.847222222 -28.05 -expect -138.8484925 -28.0485188889 - -tolerance 2.77777777778e-07 m -accept -139.847222222 -28.05 -expect -139.848475278 -28.0485072222 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4283 +inv - +step +init=epsg:4202 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept -115.001251111 -10.0486372222 -expect -115 -10.05 - -tolerance 2.77777777778e-07 m -accept -115 -11 -expect -114.998744167 -11.0013594444 - -tolerance 2.77777777778e-07 m -accept -115.001261389 -11.9986441667 -expect -115 -12 - -tolerance 2.77777777778e-07 m -accept -138.041132778 -8.99854333333 -expect -138.04 -9 - -tolerance 2.77777777778e-07 m -accept -138.045 -9 -expect -138.043867222 -9.00145666667 - -tolerance 2.77777777778e-07 m -accept -138.051132778 -8.99854333333 -expect -138.05 -9 - -tolerance 2.77777777778e-07 m -accept -138.05 -9 -expect -138.048867222 -9.00145666667 - -tolerance 2.77777777778e-07 m -accept -138.055 -9 -expect -138.053867222 -9.00145666667 - -tolerance 2.77777777778e-07 m -accept -138.061132778 -8.99854333333 -expect -138.06 -9 - -tolerance 2.77777777778e-07 m -accept -138.04 -27.125 -expect -138.038730833 -27.1264763889 - -tolerance 2.77777777778e-07 m -accept -138.046268889 -27.1235236111 -expect -138.045 -27.125 - -tolerance 2.77777777778e-07 m -accept -138.051268889 -27.1235236111 -expect -138.05 -27.125 - -tolerance 2.77777777778e-07 m -accept -138.05 -27.125 -expect -138.048731111 -27.1264763889 - -tolerance 2.77777777778e-07 m -accept -138.056268889 -27.1235233333 -expect -138.055 -27.125 - -tolerance 2.77777777778e-07 m -accept -138.06 -27.125 -expect -138.058731111 -27.1264766667 - -tolerance 2.77777777778e-07 m -accept -136.848525278 -28.0485269444 -expect -136.847222222 -28.05 - -tolerance 2.77777777778e-07 m -accept -137.848505556 -28.0485311111 -expect -137.847222222 -28.05 - -tolerance 2.77777777778e-07 m -accept -138.8484925 -28.0485188889 -expect -138.847222222 -28.05 - -tolerance 2.77777777778e-07 m -accept -139.848475278 -28.0485072222 -expect -139.847222222 -28.05 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4202 +inv - +step +init=epsg:4283 --------------------------------------------------------------------------------- -tolerance 5.55555555556e-08 m -accept -115 -10.05 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -114.998744167 -11.0013594444 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -115 -12 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.04 -9 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.043867222 -9.00145666667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.05 -9 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.048867222 -9.00145666667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.053867222 -9.00145666667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.06 -9 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.038730833 -27.1264763889 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.045 -27.125 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.05 -27.125 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.048731111 -27.1264763889 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.055 -27.125 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.058731111 -27.1264766667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -136.847222222 -28.05 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -137.847222222 -28.05 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.847222222 -28.05 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -139.847222222 -28.05 -roundtrip 1000 - - diff --git a/test/gigs/5207.2.gie.failing b/test/gigs/5207.2.gie.failing new file mode 100644 index 00000000..bc76504a --- /dev/null +++ b/test/gigs/5207.2.gie.failing @@ -0,0 +1,456 @@ +-------------------------------------------------------------------------------- + +Test 5206, NADCON transformation, v2.0_2011-06-28. Out of transform grid area error tests have been removed. + +-------------------------------------------------------------------------------- + + + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4267 +inv + +step +init=epsg:4269 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept -142 70 +expect -142.002804722 69.9998069444 + +tolerance 2.77777777778e-07 m +accept -141.997195278 70.0001930556 +expect -142 70 + +tolerance 2.77777777778e-07 m +accept -140.997219722 70.0001791667 +expect -141 70 + +tolerance 2.77777777778e-07 m +accept -140 70 +expect -140.002795278 69.9998280556 + +tolerance 2.77777777778e-07 m +accept -138.997199444 70.0001608333 +expect -139 70 + +tolerance 2.77777777778e-07 m +accept -138 70 +expect -138.002957222 69.9998755556 + +tolerance 2.77777777778e-07 m +accept -134.997081944 70.0000463889 +expect -135 70 + +tolerance 2.77777777778e-07 m +accept -130 70 +expect -130.002737222 70.0000533333 + +tolerance 2.77777777778e-07 m +accept -128.000734722 69.9998663889 +expect -128.003472222 70 + +tolerance 2.77777777778e-07 m +accept -128 70 +expect -128.002737778 70.0001336111 + +tolerance 2.77777777778e-07 m +accept -125.997388333 69.9997780556 +expect -126 70 + +tolerance 2.77777777778e-07 m +accept -88.005575 70 +expect -88.0056825 70.0006094444 + +tolerance 2.77777777778e-07 m +accept -88 70 +expect -88.0001072222 70.0006091667 + +tolerance 2.77777777778e-07 m +accept -87.9998933333 69.9993908333 +expect -88 70 + +tolerance 2.77777777778e-07 m +accept -87.6610917 70 +expect -87.6611716667 70.0006033333 + +tolerance 2.77777777778e-07 m +accept -112.165693333 51.0169555556 +expect -112.166607778 51.0170094444 + +tolerance 2.77777777778e-07 m +accept -111.999093889 50.9999491667 +expect -112 51 + +tolerance 2.77777777778e-07 m +accept -111.999095278 49.9999597222 +expect -112 49.9999997222 + +tolerance 2.77777777778e-07 m +accept -112 49.9999997222 +expect -112.000904639 50.0000396667 + +tolerance 2.77777777778e-07 m +accept -111.9991175 49.0000063889 +expect -112 49 + +tolerance 2.77777777778e-07 m +accept -112 48 +expect -112.0008525 47.9999888889 + +tolerance 2.77777777778e-07 m +accept -111.999174722 47.0000097222 +expect -112 47 + +tolerance 2.77777777778e-07 m +accept -112 47 +expect -112.000825278 46.9999902778 + +tolerance 2.77777777778e-07 m +accept -130.517746667 51 +expect -130.519401944 50.9997713889 + +tolerance 2.77777777778e-07 m +accept -130.516091667 51.0002286111 +expect -130.517746667 51 + +tolerance 2.77777777778e-07 m +accept -130.516041667 50.0002461111 +expect -130.517746667 49.9999997222 + +tolerance 2.77777777778e-07 m +accept -130.517746667 49.9999997222 +expect -130.519451667 49.9997533333 + +tolerance 2.77777777778e-07 m +accept -130.516067222 49.0002825 +expect -130.517746667 49 + +tolerance 2.77777777778e-07 m +accept -130.517746667 48 +expect -130.519391111 47.9996794444 + +tolerance 2.77777777778e-07 m +accept -130.516146944 47.0003611111 +expect -130.517746667 47 + +tolerance 2.77777777778e-07 m +accept -130.517746667 47 +expect -130.519346389 46.9996386111 + +tolerance 2.77777777778e-07 m +accept -132.998205278 48.1170263889 +expect -133 48.1166666667 + +tolerance 2.77777777778e-07 m +accept -131.455555556 48.1166666667 +expect -131.457260278 48.1163330556 + +tolerance 2.77777777778e-07 m +accept -130.516098056 48.1169827778 +expect -130.517746667 48.1166666667 + +tolerance 2.77777777778e-07 m +accept -128.455555556 48.1166666667 +expect -128.457086944 48.1163927778 + +tolerance 2.77777777778e-07 m +accept -128.5444 48.1167066 +expect -128.545936111 48.1164311111 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4269 +inv + +step +init=epsg:4267 +-------------------------------------------------------------------------------- +tolerance 2.77777777778e-07 m +accept -142.002804722 69.9998069444 +expect -142 70 + +tolerance 2.77777777778e-07 m +accept -142 70 +expect -141.997195278 70.0001930556 + +tolerance 2.77777777778e-07 m +accept -141 70 +expect -140.997219722 70.0001791667 + +tolerance 2.77777777778e-07 m +accept -140.002795278 69.9998280556 +expect -140 70 + +tolerance 2.77777777778e-07 m +accept -139 70 +expect -138.997199444 70.0001608333 + +tolerance 2.77777777778e-07 m +accept -138.002957222 69.9998755556 +expect -138 70 + +tolerance 2.77777777778e-07 m +accept -135 70 +expect -134.997081944 70.0000463889 + +tolerance 2.77777777778e-07 m +accept -130.002737222 70.0000533333 +expect -130 70 + +tolerance 2.77777777778e-07 m +accept -128.003472222 70 +expect -128.000734722 69.9998663889 + +tolerance 2.77777777778e-07 m +accept -128.002737778 70.0001336111 +expect -128 70 + +tolerance 2.77777777778e-07 m +accept -126 70 +expect -125.997388333 69.9997780556 + +tolerance 2.77777777778e-07 m +accept -88.0056825 70.0006094444 +expect -88.005575 70 + +tolerance 2.77777777778e-07 m +accept -88.0001072222 70.0006091667 +expect -88 70 + +tolerance 2.77777777778e-07 m +accept -88 70 +expect -87.9998933333 69.9993908333 + +tolerance 2.77777777778e-07 m +accept -87.6611716667 70.0006033333 +expect -87.6610917 70 + +tolerance 2.77777777778e-07 m +accept -112.166607778 51.0170094444 +expect -112.165693333 51.0169555556 + +tolerance 2.77777777778e-07 m +accept -112 51 +expect -111.999093889 50.9999491667 + +tolerance 2.77777777778e-07 m +accept -112 49.9999997222 +expect -111.999095278 49.9999597222 + +tolerance 2.77777777778e-07 m +accept -112.000904639 50.0000396667 +expect -112 49.9999997222 + +tolerance 2.77777777778e-07 m +accept -112 49 +expect -111.9991175 49.0000063889 + +tolerance 2.77777777778e-07 m +accept -112.0008525 47.9999888889 +expect -112 48 + +tolerance 2.77777777778e-07 m +accept -112 47 +expect -111.999174722 47.0000097222 + +tolerance 2.77777777778e-07 m +accept -112.000825278 46.9999902778 +expect -112 47 + +tolerance 2.77777777778e-07 m +accept -130.519401944 50.9997713889 +expect -130.517746667 51 + +tolerance 2.77777777778e-07 m +accept -130.517746667 51 +expect -130.516091667 51.0002286111 + +tolerance 2.77777777778e-07 m +accept -130.517746667 49.9999997222 +expect -130.516041667 50.0002461111 + +tolerance 2.77777777778e-07 m +accept -130.519451667 49.9997533333 +expect -130.517746667 49.9999997222 + +tolerance 2.77777777778e-07 m +accept -130.517746667 49 +expect -130.516067222 49.0002825 + +tolerance 2.77777777778e-07 m +accept -130.519391111 47.9996794444 +expect -130.517746667 48 + +tolerance 2.77777777778e-07 m +accept -130.517746667 47 +expect -130.516146944 47.0003611111 + +tolerance 2.77777777778e-07 m +accept -130.519346389 46.9996386111 +expect -130.517746667 47 + +tolerance 2.77777777778e-07 m +accept -133 48.1166666667 +expect -132.998205278 48.1170263889 + +tolerance 2.77777777778e-07 m +accept -131.457260278 48.1163330556 +expect -131.455555556 48.1166666667 + +tolerance 2.77777777778e-07 m +accept -130.517746667 48.1166666667 +expect -130.516098056 48.1169827778 + +tolerance 2.77777777778e-07 m +accept -128.457086944 48.1163927778 +expect -128.455555556 48.1166666667 + +tolerance 2.77777777778e-07 m +accept -128.545936111 48.1164311111 +expect -128.5444 48.1167066 + +-------------------------------------------------------------------------------- +operation +proj=pipeline + +step +init=epsg:4267 +inv + +step +init=epsg:4269 +-------------------------------------------------------------------------------- +tolerance 5.55555555556e-08 m +accept -142 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -141.997195278 70.0001930556 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -140.997219722 70.0001791667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -140 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138.997199444 70.0001608333 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -138 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -134.997081944 70.0000463889 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128.000734722 69.9998663889 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -125.997388333 69.9997780556 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -88.005575 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -88 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -87.9998933333 69.9993908333 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -87.6610917 70 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112.165693333 51.0169555556 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.999093889 50.9999491667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.999095278 49.9999597222 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 49.9999997222 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.9991175 49.0000063889 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 48 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -111.999174722 47.0000097222 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -112 47 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.517746667 51 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.516091667 51.0002286111 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.516041667 50.0002461111 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.517746667 49.9999997222 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.516067222 49.0002825 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.517746667 48 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.516146944 47.0003611111 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.517746667 47 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -132.998205278 48.1170263889 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -131.455555556 48.1166666667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -130.516098056 48.1169827778 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128.455555556 48.1166666667 +roundtrip 1000 + +tolerance 5.55555555556e-08 m +accept -128.5444 48.1167066 +roundtrip 1000 + + diff --git a/test/gigs/5207.2.gie_failing b/test/gigs/5207.2.gie_failing deleted file mode 100644 index bc76504a..00000000 --- a/test/gigs/5207.2.gie_failing +++ /dev/null @@ -1,456 +0,0 @@ --------------------------------------------------------------------------------- - -Test 5206, NADCON transformation, v2.0_2011-06-28. Out of transform grid area error tests have been removed. - --------------------------------------------------------------------------------- - - - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4267 +inv - +step +init=epsg:4269 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept -142 70 -expect -142.002804722 69.9998069444 - -tolerance 2.77777777778e-07 m -accept -141.997195278 70.0001930556 -expect -142 70 - -tolerance 2.77777777778e-07 m -accept -140.997219722 70.0001791667 -expect -141 70 - -tolerance 2.77777777778e-07 m -accept -140 70 -expect -140.002795278 69.9998280556 - -tolerance 2.77777777778e-07 m -accept -138.997199444 70.0001608333 -expect -139 70 - -tolerance 2.77777777778e-07 m -accept -138 70 -expect -138.002957222 69.9998755556 - -tolerance 2.77777777778e-07 m -accept -134.997081944 70.0000463889 -expect -135 70 - -tolerance 2.77777777778e-07 m -accept -130 70 -expect -130.002737222 70.0000533333 - -tolerance 2.77777777778e-07 m -accept -128.000734722 69.9998663889 -expect -128.003472222 70 - -tolerance 2.77777777778e-07 m -accept -128 70 -expect -128.002737778 70.0001336111 - -tolerance 2.77777777778e-07 m -accept -125.997388333 69.9997780556 -expect -126 70 - -tolerance 2.77777777778e-07 m -accept -88.005575 70 -expect -88.0056825 70.0006094444 - -tolerance 2.77777777778e-07 m -accept -88 70 -expect -88.0001072222 70.0006091667 - -tolerance 2.77777777778e-07 m -accept -87.9998933333 69.9993908333 -expect -88 70 - -tolerance 2.77777777778e-07 m -accept -87.6610917 70 -expect -87.6611716667 70.0006033333 - -tolerance 2.77777777778e-07 m -accept -112.165693333 51.0169555556 -expect -112.166607778 51.0170094444 - -tolerance 2.77777777778e-07 m -accept -111.999093889 50.9999491667 -expect -112 51 - -tolerance 2.77777777778e-07 m -accept -111.999095278 49.9999597222 -expect -112 49.9999997222 - -tolerance 2.77777777778e-07 m -accept -112 49.9999997222 -expect -112.000904639 50.0000396667 - -tolerance 2.77777777778e-07 m -accept -111.9991175 49.0000063889 -expect -112 49 - -tolerance 2.77777777778e-07 m -accept -112 48 -expect -112.0008525 47.9999888889 - -tolerance 2.77777777778e-07 m -accept -111.999174722 47.0000097222 -expect -112 47 - -tolerance 2.77777777778e-07 m -accept -112 47 -expect -112.000825278 46.9999902778 - -tolerance 2.77777777778e-07 m -accept -130.517746667 51 -expect -130.519401944 50.9997713889 - -tolerance 2.77777777778e-07 m -accept -130.516091667 51.0002286111 -expect -130.517746667 51 - -tolerance 2.77777777778e-07 m -accept -130.516041667 50.0002461111 -expect -130.517746667 49.9999997222 - -tolerance 2.77777777778e-07 m -accept -130.517746667 49.9999997222 -expect -130.519451667 49.9997533333 - -tolerance 2.77777777778e-07 m -accept -130.516067222 49.0002825 -expect -130.517746667 49 - -tolerance 2.77777777778e-07 m -accept -130.517746667 48 -expect -130.519391111 47.9996794444 - -tolerance 2.77777777778e-07 m -accept -130.516146944 47.0003611111 -expect -130.517746667 47 - -tolerance 2.77777777778e-07 m -accept -130.517746667 47 -expect -130.519346389 46.9996386111 - -tolerance 2.77777777778e-07 m -accept -132.998205278 48.1170263889 -expect -133 48.1166666667 - -tolerance 2.77777777778e-07 m -accept -131.455555556 48.1166666667 -expect -131.457260278 48.1163330556 - -tolerance 2.77777777778e-07 m -accept -130.516098056 48.1169827778 -expect -130.517746667 48.1166666667 - -tolerance 2.77777777778e-07 m -accept -128.455555556 48.1166666667 -expect -128.457086944 48.1163927778 - -tolerance 2.77777777778e-07 m -accept -128.5444 48.1167066 -expect -128.545936111 48.1164311111 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4269 +inv - +step +init=epsg:4267 --------------------------------------------------------------------------------- -tolerance 2.77777777778e-07 m -accept -142.002804722 69.9998069444 -expect -142 70 - -tolerance 2.77777777778e-07 m -accept -142 70 -expect -141.997195278 70.0001930556 - -tolerance 2.77777777778e-07 m -accept -141 70 -expect -140.997219722 70.0001791667 - -tolerance 2.77777777778e-07 m -accept -140.002795278 69.9998280556 -expect -140 70 - -tolerance 2.77777777778e-07 m -accept -139 70 -expect -138.997199444 70.0001608333 - -tolerance 2.77777777778e-07 m -accept -138.002957222 69.9998755556 -expect -138 70 - -tolerance 2.77777777778e-07 m -accept -135 70 -expect -134.997081944 70.0000463889 - -tolerance 2.77777777778e-07 m -accept -130.002737222 70.0000533333 -expect -130 70 - -tolerance 2.77777777778e-07 m -accept -128.003472222 70 -expect -128.000734722 69.9998663889 - -tolerance 2.77777777778e-07 m -accept -128.002737778 70.0001336111 -expect -128 70 - -tolerance 2.77777777778e-07 m -accept -126 70 -expect -125.997388333 69.9997780556 - -tolerance 2.77777777778e-07 m -accept -88.0056825 70.0006094444 -expect -88.005575 70 - -tolerance 2.77777777778e-07 m -accept -88.0001072222 70.0006091667 -expect -88 70 - -tolerance 2.77777777778e-07 m -accept -88 70 -expect -87.9998933333 69.9993908333 - -tolerance 2.77777777778e-07 m -accept -87.6611716667 70.0006033333 -expect -87.6610917 70 - -tolerance 2.77777777778e-07 m -accept -112.166607778 51.0170094444 -expect -112.165693333 51.0169555556 - -tolerance 2.77777777778e-07 m -accept -112 51 -expect -111.999093889 50.9999491667 - -tolerance 2.77777777778e-07 m -accept -112 49.9999997222 -expect -111.999095278 49.9999597222 - -tolerance 2.77777777778e-07 m -accept -112.000904639 50.0000396667 -expect -112 49.9999997222 - -tolerance 2.77777777778e-07 m -accept -112 49 -expect -111.9991175 49.0000063889 - -tolerance 2.77777777778e-07 m -accept -112.0008525 47.9999888889 -expect -112 48 - -tolerance 2.77777777778e-07 m -accept -112 47 -expect -111.999174722 47.0000097222 - -tolerance 2.77777777778e-07 m -accept -112.000825278 46.9999902778 -expect -112 47 - -tolerance 2.77777777778e-07 m -accept -130.519401944 50.9997713889 -expect -130.517746667 51 - -tolerance 2.77777777778e-07 m -accept -130.517746667 51 -expect -130.516091667 51.0002286111 - -tolerance 2.77777777778e-07 m -accept -130.517746667 49.9999997222 -expect -130.516041667 50.0002461111 - -tolerance 2.77777777778e-07 m -accept -130.519451667 49.9997533333 -expect -130.517746667 49.9999997222 - -tolerance 2.77777777778e-07 m -accept -130.517746667 49 -expect -130.516067222 49.0002825 - -tolerance 2.77777777778e-07 m -accept -130.519391111 47.9996794444 -expect -130.517746667 48 - -tolerance 2.77777777778e-07 m -accept -130.517746667 47 -expect -130.516146944 47.0003611111 - -tolerance 2.77777777778e-07 m -accept -130.519346389 46.9996386111 -expect -130.517746667 47 - -tolerance 2.77777777778e-07 m -accept -133 48.1166666667 -expect -132.998205278 48.1170263889 - -tolerance 2.77777777778e-07 m -accept -131.457260278 48.1163330556 -expect -131.455555556 48.1166666667 - -tolerance 2.77777777778e-07 m -accept -130.517746667 48.1166666667 -expect -130.516098056 48.1169827778 - -tolerance 2.77777777778e-07 m -accept -128.457086944 48.1163927778 -expect -128.455555556 48.1166666667 - -tolerance 2.77777777778e-07 m -accept -128.545936111 48.1164311111 -expect -128.5444 48.1167066 - --------------------------------------------------------------------------------- -operation +proj=pipeline - +step +init=epsg:4267 +inv - +step +init=epsg:4269 --------------------------------------------------------------------------------- -tolerance 5.55555555556e-08 m -accept -142 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -141.997195278 70.0001930556 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -140.997219722 70.0001791667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -140 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138.997199444 70.0001608333 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -138 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -134.997081944 70.0000463889 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -128.000734722 69.9998663889 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -128 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -125.997388333 69.9997780556 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -88.005575 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -88 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -87.9998933333 69.9993908333 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -87.6610917 70 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -112.165693333 51.0169555556 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -111.999093889 50.9999491667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -111.999095278 49.9999597222 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -112 49.9999997222 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -111.9991175 49.0000063889 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -112 48 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -111.999174722 47.0000097222 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -112 47 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.517746667 51 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.516091667 51.0002286111 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.516041667 50.0002461111 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.517746667 49.9999997222 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.516067222 49.0002825 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.517746667 48 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.516146944 47.0003611111 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.517746667 47 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -132.998205278 48.1170263889 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -131.455555556 48.1166666667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -130.516098056 48.1169827778 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -128.455555556 48.1166666667 -roundtrip 1000 - -tolerance 5.55555555556e-08 m -accept -128.5444 48.1167066 -roundtrip 1000 - - -- cgit v1.2.3 From 62854317de0de4c4de436f837376c3e60321a3c1 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Wed, 14 Feb 2018 12:08:27 +0100 Subject: revert tolerances for chamb and vandg2 to previous values --- test/gie/builtins.gie | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index 66916cdc..a8a440e3 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -627,7 +627,7 @@ Chamberlin Trimetric ------------------------------------------------------------------------------- operation +proj=chamb +R=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.1 mm +tolerance 0.5 mm accept 2 1 expect -27864.779586801 -223364.324593274 accept 2 -1 @@ -4315,7 +4315,7 @@ van der Grinten II ------------------------------------------------------------------------------- operation +proj=vandg2 +a=6400000 +lat_1=0.5 +lat_2=2 ------------------------------------------------------------------------------- -tolerance 0.1 mm +tolerance 0.5 mm accept 2 1 expect 223395.247850437 111718.491037226 accept 2 -1 -- cgit v1.2.3 From 6f50a7ffcb3494141e5f361e4c976e5cd32d4488 Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Wed, 14 Feb 2018 13:54:14 +0100 Subject: Fix case of proj-datumgrid filename. (#805) Fix case of proj-datumgrid and proj tarball filenames. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2d7bb39c..fd8bd053 100644 --- a/README.md +++ b/README.md @@ -89,12 +89,12 @@ The `makefile.vc` builds `proj.exe`, `proj.dll` and `proj.lib`. ### Distribution files and format Sources are distributed in one or more files. The principle elements -of the system are in a compress tar file named `PROJ-x.y.z.tar.gz` where +of the system are in a compress tar file named `proj-x.y.z.tar.gz` where "x" will indicate major release number, "y" indicates minor release number and "z" indicates the patch number of the release. In addition to the PROJ software package, a distribution of datum conversion grid files is also available. The grid package is -distributed under the name `PROJ-datumgrid-x.y.zip`, where "x" is the +distributed under the name `proj-datumgrid-x.y.zip`, where "x" is the major release version and "y" the minor release version numbers. The grid package can be downloaded from the PROJ.4 website. -- cgit v1.2.3 From 4ce25c3762f1247916a51e0bda081bb3d738263a Mon Sep 17 00:00:00 2001 From: Raul Marin Date: Mon, 19 Feb 2018 18:13:58 +0100 Subject: proj_errno_reset: Also reset pj_errno --- src/proj_4D_api.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index dab4b409..fb20978b 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -734,6 +734,7 @@ int proj_errno_reset (const PJ *P) { pj_ctx_set_errno (pj_get_ctx ((PJ *) P), 0); errno = 0; + pj_errno = 0; return last_errno; } -- cgit v1.2.3