From 29a59cadb9d1371479477af517f3431784e880f9 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Thu, 14 Feb 2019 12:00:45 +0100 Subject: Reverse direction of deformation operations/transformations/deformation Changed the direction of dt-calculation to follow the same convention as helmert. Changed from dt = t_c - t_obs to dt = t_obs - t_c, which effectively reverses the direction of the operation. Existing projstrings using deformation can simply reverse the direction of the operation to achieve the same results as before this commit. --- test/gie/deformation.gie | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') diff --git a/test/gie/deformation.gie b/test/gie/deformation.gie index 03071d1e..e4d87fe2 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 +direction inverse ignore pjd_err_failed_to_load_grid accept -3004295.5882503074 -1093474.1690603832 5500477.1338251457 expect -3004295.7025 -1093474.2106 5500477.3444 @@ -38,6 +39,7 @@ 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.7025 -1093474.2106 5500477.3444 2000.0 -- cgit v1.2.3 From 12689e3d858d66e5e00e8d99f9326ef91cc0a384 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Thu, 14 Feb 2019 14:51:39 +0100 Subject: deformation: Replace +t_obs with +dt The +t_obs parameter was confusing for users since it effectively overwrote the observation time in input coordinates. To make it more clear what is the operation is doing, users are now required to directly specify the time span for which they wish to apply a given deformation. The parameter +dt has been added for that purpose. The new parameter is mutually exclusive with +t_epoch. +dt is used when deformation for a set amount of time is needed and +t_epoch is used (in conjunction with the observation time of the input coordinate) when deformation from a specific epoch to the observation time is needed. --- test/gie/deformation.gie | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/gie/deformation.gie b/test/gie/deformation.gie index e4d87fe2..37f62e6e 100644 --- a/test/gie/deformation.gie +++ b/test/gie/deformation.gie @@ -12,13 +12,12 @@ The input coordinate is located at lon=60, lam=-160 - somewhere in Alaska. ------------------------------------------------------------------------------- -Test using both horizontal and vertical grids as well as the +tobs parameter +Test the +dt parameter ------------------------------------------------------------------------------- operation +proj=deformation +xy_grids=alaska +z_grids=egm96_15.gtx - +t_epoch=2016.0 +t_obs=2000.0 +ellps=GRS80 + +ellps=GRS80 +dt=16.0 # 2016.0 - 2000.0 ------------------------------------------------------------------------------- tolerance 0.1 mm -direction inverse ignore pjd_err_failed_to_load_grid accept -3004295.5882503074 -1093474.1690603832 5500477.1338251457 expect -3004295.7025 -1093474.2106 5500477.3444 @@ -28,7 +27,7 @@ roundtrip 5 # 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 2000 +accept -2446353.8001 -4237209.0750 4077985.572 expect failure errno grid_area @@ -46,20 +45,20 @@ 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 +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 t_epoch=2016.0 t_obs=2017.0 +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 - t_epoch=2016.0 t_obs=2017.0 ellps=GRS80 + +dt=1.0 ellps=GRS80 expect failure pjd_err_failed_to_load_grid operation proj=deformation xy_grids=alaska z_grids=nonexisting - t_epoch=2016.0 t_obs=2017.0 ellps=GRS80 + +dt=1.0 ellps=GRS80 expect failure pjd_err_failed_to_load_grid operation proj=deformation xy_grids=alaska z_grids=nonexisting ellps=GRS80 -- cgit v1.2.3