aboutsummaryrefslogtreecommitdiff
path: root/test/gie/deformation.gie
blob: 086c1ebe12c83c5fdd6bc5522b809656c9865ab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
===============================================================================
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.

===============================================================================

<gie-strict>

-------------------------------------------------------------------------------
# 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
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 coord_transfm_outside_grid
accept      -2446353.8001  -4237209.0750  4077985.572
expect      failure errno coord_transfm_outside_grid


-------------------------------------------------------------------------------
# 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
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 errno invalid_op_missing_arg

operation   proj=deformation z_grids=egm96_15.gtx +dt=1.0 ellps=GRS80
expect      failure errno invalid_op_missing_arg

operation   proj=deformation xy_grids=nonexisting z_grids=egm96_15.gtx \
            +dt=1.0 ellps=GRS80
expect      failure errno invalid_op_file_not_found_or_invalid

operation   proj=deformation xy_grids=alaska z_grids=nonexisting \
            +dt=1.0 ellps=GRS80
expect      failure errno invalid_op_file_not_found_or_invalid

operation   proj=deformation xy_grids=alaska z_grids=nonexisting ellps=GRS80
expect      failure errno invalid_op_file_not_found_or_invalid

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=egm96_15.gtx +t_epoch=2010.0 +t_final=2018.0
-------------------------------------------------------------------------------
tolerance   0.1 mm

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

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

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

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


</gie-strict>