From 8c6fe8b673c9876e7301d4a890403a931540c17c Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Tue, 28 Nov 2017 16:09:17 +1300 Subject: Add tests for GDA2020 (#688) Add GDA2020 tests, and correct the PJ_helmert bug they revealed --- test/gie/GDA.gie | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 test/gie/GDA.gie (limited to 'test') diff --git a/test/gie/GDA.gie b/test/gie/GDA.gie new file mode 100644 index 00000000..7ccf6b58 --- /dev/null +++ b/test/gie/GDA.gie @@ -0,0 +1,69 @@ +----------------------------------------------------------------------------------- +Australian datum transformations +----------------------------------------------------------------------------------- +Based on material from: + +Intergovernmental Committee on Surveying and Mapping (ICSM) +Permanent Committee on Geodesy (PCG): + +Geocentric Datum of Australia 2020 Technical Manual +Version 1.0, 25 July 2017 + +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. + +Thomas Knudsen, thokn@sdfe.dk, 2017-11-27 +----------------------------------------------------------------------------------- + +BEGIN +----------------------------------------------------------------------------------- +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 +----------------------------------------------------------------------------------- +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 +----------------------------------------------------------------------------------- +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 +----------------------------------------------------------------------------------- +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 +----------------------------------------------------------------------------------- +Just the Helmert transformation, to verify that we are within 100 um +----------------------------------------------------------------------------------- +operation proj=helmert x=0 y=0 z=0 s=0 rx=0 ry=0 rz=0 \ + dx=0 dy=0 dz=0 \ + drx=0.00150379 dry=0.00118346 drz=0.00120716 \ + ds=0 \ + epoch=2020.0 +----------------------------------------------------------------------------------- +tolerance 50 um + + # Alice Springs ITRF2014@2018.0 +accept -4052052.6588 4212835.9938 -2545104.6946 2018.0 + + # Alice Springs GDA2020 +expect -4052052.7373 4212835.9835 -2545104.5867 + +END -- cgit v1.2.3 From b1ec195f96e1b88de59e2b8d7e36b8e52730392a Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Tue, 28 Nov 2017 07:06:29 +0100 Subject: use full error code checking on failure in more_builtins.gie --- test/gie/more_builtins.gie | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index 8ac8a667..ea37a763 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -140,11 +140,11 @@ roundtrip 100 1 nm ------------------------------------------------------------------------------- Fail on purpose: +grids parameter is mandatory operation proj=vgridshift -expect failure +expect failure errno no_args Fail on purpose: open non-existing grid operation proj=vgridshift grids=nonexistinggrid.gtx -expect failure +expect failure errno failed_to_load_grid @@ -166,11 +166,11 @@ expect 173 -45 0 0 ------------------------------------------------------------------------------- Fail on purpose: +grids parameter is mandatory: operation proj=hgridshift -expect failure +expect failure errno no_args Fail on purpose: open non-existing grid: operation proj=hgridshift grids=@nonexistinggrid.gsb,anothernonexistinggrid.gsb -expect failure +expect failure errno failed_to_load_grid ------------------------------------------------------------------------------- @@ -277,7 +277,7 @@ expect 12 89.999999999989996 0 0 some less used options ------------------------------------------------------------------------------- operation proj=utm ellps=GRS80 zone=32 to_meter=0 -expect failure +expect failure errno unit_factor_less_than_0 operation proj=utm ellps=GRS80 zone=32 to_meter=10 accept 12 55 -- cgit v1.2.3 From e51a6c255822d0a1b1320a2f519610f8802a5e27 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Tue, 28 Nov 2017 08:16:42 +0100 Subject: Free formatting of PROJ key=value pairs --- test/gie/GDA.gie | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'test') diff --git a/test/gie/GDA.gie b/test/gie/GDA.gie index 7ccf6b58..3fe0f3e3 100644 --- a/test/gie/GDA.gie +++ b/test/gie/GDA.gie @@ -18,7 +18,7 @@ directly - I believe it should come from official AU sources. Thomas Knudsen, thokn@sdfe.dk, 2017-11-27 ----------------------------------------------------------------------------------- -BEGIN + ----------------------------------------------------------------------------------- GDA94 to GDA2020 ----------------------------------------------------------------------------------- @@ -52,11 +52,12 @@ ITRF2014@2018 to GDA2020 ----------------------------------------------------------------------------------- Just the Helmert transformation, to verify that we are within 100 um ----------------------------------------------------------------------------------- -operation proj=helmert x=0 y=0 z=0 s=0 rx=0 ry=0 rz=0 \ - dx=0 dy=0 dz=0 \ - drx=0.00150379 dry=0.00118346 drz=0.00120716 \ - ds=0 \ - epoch=2020.0 +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; epoch=2020.0; ----------------------------------------------------------------------------------- tolerance 50 um @@ -66,4 +67,4 @@ accept -4052052.6588 4212835.9938 -2545104.6946 2018.0 # Alice Springs GDA2020 expect -4052052.7373 4212835.9835 -2545104.5867 -END + -- cgit v1.2.3