aboutsummaryrefslogtreecommitdiff
path: root/test/gie/geotiff_grids.gie
blob: 62a5b16d0866552b9ab2ed8952ae5bf7b7652120 (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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324

-------------------------------------------------------------------------------
===============================================================================
Test GeoTIFF grids
===============================================================================

<gie>

# Those first tests using +proj=vgridshift only test the capability of reading
# correctly a value from various formulations of GeoTIFF file, hence only the
# forward path is tested (reverse path is tested in other files)

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_pixelispoint.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.5        52.5        0
expect      4.5        52.5        11.5
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_pixelisarea.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.5        52.5        0
expect      4.5        52.5        11.5
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_deflate.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.5        52.5        0
expect      4.5        52.5        11.5
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_deflate_floatingpointpredictor.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.5        52.5        0
expect      4.5        52.5        11.5
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_uint16.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.5        52.5        0
expect      4.5        52.5        11.5
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_uint16_with_scale_offset.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.5        52.5        0
expect      4.5        52.5        11.5
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_int16.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.5        52.5        0
expect      4.5        52.5        11.5
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_int32.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.5        52.5        0
expect      4.5        52.5        11.5
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_uint32.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.5        52.5        0
expect      4.5        52.5        11.5
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_float64.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.5        52.5        0
expect      4.5        52.5        11.5
-------------------------------------------------------------------------------

# The overview should be ignored
-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_with_overview.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.5        52.5        0
expect      4.5        52.5        11.5
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_in_second_channel.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.5        52.5        0
expect      4.5        52.5        11.5
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_bigtiff.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.5        52.5        0
expect      4.5        52.5        11.5
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_bigendian.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.5        52.5        0
expect      4.5        52.5        11.5
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_bigendian_bigtiff.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.5        52.5        0
expect      4.5        52.5        11.5
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_bottomup_with_scale.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.5        52.5        0
expect      4.5        52.5        11.5
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_bottomup_with_matrix.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.5        52.5        0
expect      4.5        52.5        11.5
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_with_subgrid.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.5        52.5        0
expect      4.5        52.5        11.5

# In subgrid
accept      5.5        53.5        0
expect      5.5        53.5        110.0
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_nodata.tif +multiplier=1
-------------------------------------------------------------------------------
accept      4.05        52.1        0
expect      4.05        52.1        10
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_invalid_channel_type.tif +multiplier=1
-------------------------------------------------------------------------------
expect      failure errno failed_to_load_grid
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_vgrid_unsupported_byte.tif +multiplier=1
-------------------------------------------------------------------------------
expect      failure errno failed_to_load_grid
-------------------------------------------------------------------------------



-------------------------------------------------------------------------------
operation   +proj=hgridshift +grids=tests/test_hgrid.tif
-------------------------------------------------------------------------------
tolerance   2 mm
accept      4.5        52.5        0
expect      5.875      55.375      0
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=hgridshift +grids=tests/test_hgrid_separate.tif
-------------------------------------------------------------------------------
tolerance   2 mm
accept      4.5        52.5        0
expect      5.875      55.375      0
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=hgridshift +grids=tests/test_hgrid_strip.tif
-------------------------------------------------------------------------------
tolerance   2 mm
accept      4.5        52.5        0
expect      5.875      55.375      0
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=hgridshift +grids=tests/test_hgrid_tiled.tif
-------------------------------------------------------------------------------
tolerance   2 mm
accept      4.5        52.5        0
expect      5.875      55.375      0
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=hgridshift +grids=tests/test_hgrid_tiled_separate.tif
-------------------------------------------------------------------------------
tolerance   2 mm
accept      4.5        52.5        0
expect      5.875      55.375      0
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=hgridshift +grids=tests/test_hgrid_positive_west.tif
-------------------------------------------------------------------------------
tolerance   2 mm
accept      4.5        52.5        0
expect      5.875      55.375      0
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=hgridshift +grids=tests/test_hgrid_lon_shift_first.tif
-------------------------------------------------------------------------------
tolerance   2 mm
accept      4.5        52.5        0
expect      5.875      55.375      0
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=hgridshift +grids=tests/test_hgrid_radian.tif
-------------------------------------------------------------------------------
tolerance   2 mm
accept      4.5        52.5        0
expect      5.875      55.375      0
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=hgridshift +grids=tests/test_hgrid_degree.tif
-------------------------------------------------------------------------------
tolerance   2 mm
accept      4.5        52.5        0
expect      5.875      55.375      0
-------------------------------------------------------------------------------

# The overview should be ignored
-------------------------------------------------------------------------------
operation   +proj=hgridshift +grids=tests/test_hgrid_with_overview.tif
-------------------------------------------------------------------------------
tolerance   2 mm
accept      4.5        52.5        0
expect      5.875      55.375      0
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
operation   +proj=hgridshift +grids=tests/test_hgrid_extra_ifd_with_other_info.tif
-------------------------------------------------------------------------------
tolerance   2 mm
accept      4.5        52.5        0
expect      5.875      55.375      0
-------------------------------------------------------------------------------

# Subset of NTv2_0.gsb
-------------------------------------------------------------------------------
operation   +proj=hgridshift +grids=tests/test_hgrid_with_subgrid.tif
-------------------------------------------------------------------------------
# In subgrid ALbanff, of parent CAwest
accept     -115.5416667      51.1666667        0
expect     -115.5427092888   51.1666899972     0

# In subgrid ONtronto, of parent CAeast
accept     -80.5041667       44.5458333        0
expect     -80.50401615833   44.5458827236     0
-------------------------------------------------------------------------------

# Subset of NTv2_0.gsb
-------------------------------------------------------------------------------
operation   +proj=hgridshift +grids=tests/test_hgrid_with_subgrid_no_grid_name.tif
-------------------------------------------------------------------------------
# In subgrid ALbanff, of parent CAwest
accept     -115.5416667      51.1666667        0
expect     -115.5427092888   51.1666899972     0

# In subgrid ONtronto, of parent CAeast
accept     -80.5041667       44.5458333        0
expect     -80.50401615833   44.5458827236     0
-------------------------------------------------------------------------------

# Check a nested grid of a nested grid only based on spatial extent analysis
-------------------------------------------------------------------------------
operation   +proj=hgridshift +grids=tests/test_hgrid_with_two_level_of_subgrids_no_grid_name.tif
-------------------------------------------------------------------------------
accept      -45.0              22.5
accept      -44.9983333334     22.5013888889

# Check a nested grid of a nested grid only based on spatial extent analysis
-------------------------------------------------------------------------------
operation   +proj=vgridshift +grids=tests/test_hgrid_with_two_level_of_subgrids_no_grid_name.tif +multiplier=1
-------------------------------------------------------------------------------
accept      -45.0              22.5             0
accept      -45.0              22.5             5

-------------------------------------------------------------------------------
operation   +proj=hgridshift +grids=tests/test_vgrid.tif
-------------------------------------------------------------------------------
expect      failure errno failed_to_load_grid
-------------------------------------------------------------------------------


# IGNF:LAMBE to IGNF:LAMB93 using xyzgridshift operation
-------------------------------------------------------------------------------
operation   +proj=pipeline
                +step +inv +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0
                    +k_0=0.99987742 +x_0=600000 +y_0=2200000 +ellps=clrk80ign +pm=paris
                +step +proj=push +v_3
                +step +proj=cart +ellps=clrk80ign
                +step +proj=xyzgridshift +grids=tests/subset_of_gr3df97a.tif +grid_ref=output_crs +ellps=GRS80
                +step +proj=cart +ellps=GRS80 +inv
                +step +proj=pop +v_3
                +step +proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=49 +lat_2=44
                    +x_0=700000 +y_0=6600000 +ellps=GRS80
-------------------------------------------------------------------------------
tolerance 1 mm

accept    814149.529   1887019.768   0
expect    860690.804   6319036.849   0
# If using ntf_r93.gsb, one gets: 860690.805   6319036.850

roundtrip 1
-------------------------------------------------------------------------------


</gie>