aboutsummaryrefslogtreecommitdiff
path: root/test/gie/4D-API_cs2cs-style.gie
blob: 4cace784ca4c10e4950b9f4035af64325118dbf0 (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
===============================================================================

Test the 4D API handling of cs2cs style transformation options.

These tests are mostly based on the same material as those in
more_builtins.gie, since we are testing the same kinds of things,
but provided through a different interface.

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


<gie>

-------------------------------------------------------------------------------
Test the handling of the +towgs84 parameter.
-------------------------------------------------------------------------------
(additional tests of the towgs84 handling can be found in DHDN_ETRS89.gie)
-------------------------------------------------------------------------------


-------------------------------------------------------------------------------
This example is from Lotti Jivall: "Simplified transformations from
ITRF2008/IGS08 to ETRS89 for maritime applications" (see also more_builtins.gie)
-------------------------------------------------------------------------------
operation  proj=geocent ellps=WGS84
           towgs84 = 0.676780, 0.654950, -0.528270,
                    -0.022742, 0.012667,  0.022704,
                    -0.01070
-------------------------------------------------------------------------------
tolerance 1 um

direction inverse

accept     3565285.00000000  855949.00000000  5201383.00000000
expect     3565285.41342351  855948.67986759  5201382.72939791
-------------------------------------------------------------------------------



-------------------------------------------------------------------------------
This example is a random point, transformed from ED50 to ETRS89 using KMStrans2.
-------------------------------------------------------------------------------
operation proj=latlong ellps=intl
          towgs84 =  -081.07030, -089.36030, -115.75260,
                      000.48488, 000.02436, 000.41321, -0.540645
-------------------------------------------------------------------------------
tolerance  25 mm

accept     16.82    55.17        61.0
expect     16.8210462130   55.1705688946       29.0317
-------------------------------------------------------------------------------




-------------------------------------------------------------------------------
# operation  proj=latlong nadgrids=nzgd2kgrid0005.gsb  ellps=GRS80
-------------------------------------------------------------------------------
Note: This test appears to use wrong coordinate data, and is commented out.
We need a set of authoritative test cases to test the nzgd2000 grid.

This functionality is sufficiently tested in DHDN_ETRS89.gie
-------------------------------------------------------------------------------
# tolerance 1 um
# ignore    pjd_err_failed_to_load_grid
# accept    173                 -45                  0 0
# expect    172.999892181021551 -45.001620431954613  0 0
# direction inverse
# accept    172.999892181021551 -45.001620431954613  0 0
# expect    173                 -45                  0 0
-------------------------------------------------------------------------------



-------------------------------------------------------------------------------
operation  proj=latlong geoidgrids=egm96_15.gtx  ellps=GRS80
-------------------------------------------------------------------------------
tolerance 15 cm      # lax tolerance due to widespread bad egm96 file
ignore    pjd_err_failed_to_load_grid

accept    12.5 55.5   0
expect    12.5 55.5 -36.0213

direction inverse

accept    12.5 55.5 -36.0213
expect    12.5 55.5  0
-------------------------------------------------------------------------------
operation  proj=merc geoidgrids=egm96_15.gtx  ellps=GRS80
-------------------------------------------------------------------------------
tolerance 0.1 mm
ignore    pjd_err_failed_to_load_grid
accept    12.5 55.5 0
expect    1391493.63492   7424275.19462  -36.0213
direction inverse
accept    1391493.63492   7424275.19462  -36.0213
expect    12.5 55.5 0
-------------------------------------------------------------------------------



-------------------------------------------------------------------------------
Same as the two above, but also do axis swapping.
-------------------------------------------------------------------------------
NOTE: A number of the tests below are commented out. The actually do the
right thing, but the gie distance computation is not yet able to cope
with "unusual" axis orders
-------------------------------------------------------------------------------
operation  proj=latlong geoidgrids=egm96_15.gtx  axis=neu ellps=GRS80
-------------------------------------------------------------------------------
tolerance 15 cm      # lax tolerance due to widely distributed, bad egm96 file
ignore    pjd_err_failed_to_load_grid
accept    12.5 55.5  0
expect    55.5 12.5 -36.0213
direction inverse
accept    55.5 12.5 -36.0213
expect    12.5 55.5  0
-------------------------------------------------------------------------------
operation  proj=latlong geoidgrids=egm96_15.gtx  axis=dne ellps=GRS80
-------------------------------------------------------------------------------
tolerance 15 cm      # lax tolerance due to widely distributed, bad egm96 file
ignore    pjd_err_failed_to_load_grid
# accept    12.5 55.5  0
# expect    36.0213 55.5 12.5
# direction inverse
# accept    36.0213 55.5 12.5
# expect    12.5 55.5  0
-------------------------------------------------------------------------------
operation  proj=merc geoidgrids=egm96_15.gtx  ellps=GRS80
-------------------------------------------------------------------------------
tolerance 0.1 mm
ignore    pjd_err_failed_to_load_grid
accept    12.5 55.5 0
expect    1391493.63492   7424275.19462  -36.0213
direction inverse
accept    1391493.63492   7424275.19462  -36.0213
expect    12.5 55.5 0
-------------------------------------------------------------------------------


-------------------------------------------------------------------------------
Some more complex axis swapping.
-------------------------------------------------------------------------------
operation  proj=latlong geoidgrids=egm96_15.gtx  axis=nue ellps=GRS80
-------------------------------------------------------------------------------
tolerance 15 cm      # lax tolerance due to widely distributed, bad egm96 file
ignore    pjd_err_failed_to_load_grid
accept    12.5 55.5 0
expect    55.5 -36.0213 12.5
# direction inverse
# accept    55.5 -36.0213 12.5
# expect    12.5 55.5 0
-------------------------------------------------------------------------------
operation  proj=merc geoidgrids=egm96_15.gtx axis=sue ellps=GRS80
-------------------------------------------------------------------------------
tolerance 15 cm
ignore    pjd_err_failed_to_load_grid
accept    12.5 55.5 0
expect    -7424275.1946 -36.0213  1391493.6349 0.0000
# direction inverse
# accept    -7424275.1946 -36.0213  1391493.6349 0.0000
# expect    12.5 55.5 0
-------------------------------------------------------------------------------
</gie>