=============================================================================== Test for the deformation operation - Kinematic Gridshifting For all the deformation tests the alaska and egm96_15.gtx grids are used even though they are not parts of a deformation model, they are in the proper format and for testing purposes it doesn't really matter all that much... The input coordinate is located at lon=60, lam=-160 - somewhere in Alaska. =============================================================================== ------------------------------------------------------------------------------- # Test with an extract of nkgrf03vel_realigned with ctable2+gtx ------------------------------------------------------------------------------- operation +proj=pipeline \ +step +proj=cart +ellps=GRS80 \ +step +proj=deformation \ +xy_grids=tests/nkgrf03vel_realigned_xy_extract.ct2 \ +z_grids=tests/nkgrf03vel_realigned_z_extract.gtx +ellps=GRS80 +dt=1 \ +step +proj=cart +ellps=GRS80 +inv ------------------------------------------------------------------------------- tolerance 0.05 mm accept 21.5 63 0 expect 21.5000000049 62.9999999937 0.0083 roundtrip 5 ------------------------------------------------------------------------------- # Test with an extract of nkgrf03vel_realigned with GeoTIFF ------------------------------------------------------------------------------- operation +proj=pipeline \ +step +proj=cart +ellps=GRS80 \ +step +proj=deformation \ +grids=tests/nkgrf03vel_realigned_extract.tif +ellps=GRS80 +dt=1 \ +step +proj=cart +ellps=GRS80 +inv ------------------------------------------------------------------------------- tolerance 0.05 mm accept 21.5 63 0 expect 21.5000000049 62.9999999937 0.0083 roundtrip 5 ------------------------------------------------------------------------------- # Test the +dt parameter ------------------------------------------------------------------------------- operation +proj=deformation +xy_grids=alaska +z_grids=egm96_15.gtx \ +ellps=GRS80 +dt=16.0 # 2016.0 - 2000.0 ------------------------------------------------------------------------------- tolerance 0.1 mm ignore pjd_err_failed_to_load_grid accept -3004295.5882503074 -1093474.1690603832 5500477.1338251457 expect -3004295.7000 -1093474.2097 5500477.3397 roundtrip 5 # Test that errors are reported for coordinates outside the grid. # Here we test 120W 40N which is well outside the alaska grid. accept -2446353.8001 -4237209.0750 4077985.572 expect failure errno grid_area accept -2446353.8001 -4237209.0750 4077985.572 expect failure errno grid_area ------------------------------------------------------------------------------- # 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 0.1 mm direction inverse ignore pjd_err_failed_to_load_grid accept -3004295.5882503074 -1093474.1690603832 5500477.1338251457 2000.0 expect -3004295.7000 -1093474.2097 5500477.3397 2000.0 roundtrip 5 ------------------------------------------------------------------------------- operation proj=deformation xy_grids=alaska +dt=1.0 ellps=GRS80 expect failure pjd_err_no_args operation proj=deformation z_grids=egm96_15.gtx +dt=1.0 ellps=GRS80 expect failure pjd_err_no_args operation proj=deformation xy_grids=nonexisting z_grids=egm96_15.gtx \ +dt=1.0 ellps=GRS80 expect failure pjd_err_failed_to_load_grid operation proj=deformation xy_grids=alaska z_grids=nonexisting \ +dt=1.0 ellps=GRS80 expect failure pjd_err_failed_to_load_grid operation proj=deformation xy_grids=alaska z_grids=nonexisting ellps=GRS80 expect failure pjd_err_missing_args ------------------------------------------------------------------------------- operation +proj=vgridshift +grids=egm96_15.gtx +t_epoch=2010.0 +t_final=2018.0 ------------------------------------------------------------------------------- tolerance 0.1 mm ignore pjd_err_failed_to_load_grid accept 12 56 0.0 2000.0 expect 12 56 -36.9960 2000.0 roundtrip 100 accept 12 56 0.0 2011.0 expect 12 56 0.0 2011.0 roundtrip 100 accept 12 56 0.0 2019.0 expect 12 56 0.0 2019.0 roundtrip 100 accept 12 56 0.0 expect 12 56 -36.9960 roundtrip 100 ------------------------------------------------------------------------------- operation +proj=vgridshift +grids=egm96_15.gtx +t_epoch=2010.0 +t_final=now ------------------------------------------------------------------------------- tolerance 0.1 mm ignore pjd_err_failed_to_load_grid accept 12 56 0.0 2000.0 expect 12 56 -36.9960 2000.0 roundtrip 100 accept 12 56 0.0 2011.0 expect 12 56 0.0 2011.0 roundtrip 1000 accept 12 56 0.0 3011.0 expect 12 56 0.0 3011.0 roundtrip 100 ------------------------------------------------------------------------------- operation +proj=hgridshift +grids=alaska +t_epoch=2010.0 +t_final=2018.0 ------------------------------------------------------------------------------- tolerance 0.1 mm ignore pjd_err_failed_to_load_grid accept -147.0 64.0 0.0 2000.0 expect -147.0023233121 63.9995792119 0.0 2000.0 roundtrip 100 accept -147.0 64.0 0.0 2011.0 expect -147.0 64.0 0.0 2011.0 roundtrip 100 accept -147.0 64.0 0.0 2011.0 expect -147.0 64.0 0.0 2020.0 roundtrip 100 ------------------------------------------------------------------------------- operation +proj=hgridshift +grids=alaska +t_epoch=2010.0 +t_final=now ------------------------------------------------------------------------------- tolerance 0.1 mm ignore pjd_err_failed_to_load_grid accept -147.0 64.0 0.0 2000.0 expect -147.0023233121 63.9995792119 0.0 2000.0 roundtrip 100 accept -147.0 64.0 0.0 2011.0 expect -147.0 64.0 0.0 2011.0 roundtrip 100 accept -147.0 64.0 0.0 3011.0 expect -147.0 64.0 0.0 3011.0 roundtrip 100