diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/gie/GDA.gie | 4 | ||||
| -rw-r--r-- | test/gie/more_builtins.gie | 80 |
2 files changed, 78 insertions, 6 deletions
diff --git a/test/gie/GDA.gie b/test/gie/GDA.gie index 3157eef6..beec7c9c 100644 --- a/test/gie/GDA.gie +++ b/test/gie/GDA.gie @@ -26,6 +26,7 @@ GDA94 to GDA2020 Just the Helmert transformation, to verify that we are within 100 um ----------------------------------------------------------------------------------- operation proj=helmert + convention=coordinate_frame x = 0.06155 rx = -0.0394924 y = -0.01087 ry = -0.0327221 z = -0.04019 rz = -0.0328979 s = -0.009994 @@ -45,6 +46,7 @@ All the way from geographic-to-cartesian-and-back-to-geographic operation proj = pipeline ellps=GRS80; step proj = cart; step proj = helmert + convention=coordinate_frame x = 0.06155; rx = -0.0394924; y = -0.01087; ry = -0.0327221; z = -0.04019; rz = -0.0328979; s = -0.009994; @@ -61,7 +63,7 @@ ITRF2014@2018 to GDA2020 - Test point ALIC (Alice Springs) ----------------------------------------------------------------------------------- Just the Helmert transformation, to verify that we are within 100 um ----------------------------------------------------------------------------------- -operation proj = helmert exact +operation proj = helmert exact convention=coordinate_frame x = 0 rx = 0 dx = 0 drx = 0.00150379 y = 0 ry = 0 dy = 0 dry = 0.00118346 diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index 15964a37..fd1ff10f 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -253,7 +253,7 @@ 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 +operation proj=helmert convention=coordinate_frame x=0.67678 y=0.65495 z=-0.52827 rx=-0.022742 ry=0.012667 rz=0.022704 s=-0.01070 ------------------------------------------------------------------------------- @@ -266,7 +266,7 @@ expect 3565285.41342351 855948.67986759 5201382.72939791 ------------------------------------------------------------------------------- This example is a random point, transformed from ED50 to ETRS89 using KMStrans2 ------------------------------------------------------------------------------- -operation proj=helmert exact +operation proj=helmert exact convention=coordinate_frame x=-081.0703 rx=-0.48488 y=-089.3603 ry=-0.02436 z=-115.7526 rz=-0.41321 s=-0.540645 @@ -284,7 +284,7 @@ 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 transpose +operation proj=helmert convention=position_vector 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 @@ -306,7 +306,7 @@ 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 +operation proj=helmert convention=coordinate_frame x=-9597.3572 y=.6112 s=0.304794780637 theta=-1.244048 ------------------------------------------------------------------------------- @@ -322,7 +322,7 @@ rotation matrix is updated when necessary. Test coordinates from GNSStrans. ------------------------------------------------------------------------------- -operation proj=helmert transpose +operation proj=helmert convention=position_vector 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 @@ -336,6 +336,26 @@ accept 3370658.378 711877.314 5349787.086 2018.0 expect 3370658.18087 711877.42750 5349787.12648 2018.0 ------------------------------------------------------------------------------- +------------------------------------------------------------------------------- +Test error cases of helmert +------------------------------------------------------------------------------- +# A rotational term implies an explicit convention to be specified +operation proj=helmert rx=1 +expect failure errno missing_arg + +operation proj=helmert rx=1 convention=foo +expect failure errno invalid_arg + +operation proj=helmert rx=1 convention=1 +expect failure errno invalid_arg + +# towgs84 in helmert context should alwas be position_vector +operation proj=helmert towgs84=1,2,3,4,5,6,7 convention=coordinate_frame +expect failure errno invalid_arg + +# Transpose no longer accepted +operation proj=helmert transpose +expect failure errno invalid_arg ------------------------------------------------------------------------------- @@ -430,6 +450,56 @@ accept 0 0 expect 0 0 accept -180 90 +expect -10216474.79 8392927.6 + +accept 0 90 +expect 0 8392927.6 + +accept 180 90 +expect 10216474.79 8392927.6 + +accept 180 45 +expect 14792474.75 5466867.76 + +accept 180 0 +expect 17243959.06 0 + +accept -70 -31.2 +expect -6241081.64 -3907019.16 + + +direction inverse + +accept -6241081.64 -3907019.16 +expect -70 -31.2 + +accept 17243959.06 0 +expect 180 0 + +accept 14792474.75 5466867.76 +expect 180 45 + +accept 0 0 +expect 0 0 + +accept -10216474.79 8392927.6 +expect -180 90 + +accept 0 8392927.6 +expect 0 90 + +accept 10216474.79 8392927.6 +expect 180 90 + + +operation +proj=eqearth +R=6378137 +direction forward +tolerance 1cm + +accept 0 0 +expect 0 0 + +accept -180 90 expect -10227908.09 8402320.16 accept 0 90 |
