diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-12-14 00:16:14 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-12-14 00:16:17 +0100 |
| commit | f36d2374268608d276da45c96a7b4792ab8ffdb5 (patch) | |
| tree | a66a3e3d062e23a91c61e1a31671866b9a94cfd8 /test | |
| parent | b934fd3885fa017b0c7a5ca59083a7f52fdaafc0 (diff) | |
| download | PROJ-f36d2374268608d276da45c96a7b4792ab8ffdb5.tar.gz PROJ-f36d2374268608d276da45c96a7b4792ab8ffdb5.zip | |
Horizontal grid shift: fix issue on iterative inverse computation when switching between (sub)grids (fixes #1663)
Given in.txt with
53.999759140 5.144478208 252.6995
Before the fix,
cct -t 0 -d 4 +proj=pipeline +step +proj=axisswap +order=2,1,3,4 +step +proj=hgridshift +inv +grids=rdtrans2018.gsb +step +proj=vgridshift +grids=naptrans2018.gtx +step +proj=sterea +lat_0=52.156160556 +lon_0=5.387638889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel in.txt
returned:
139079.8814 668306.0302 212.1724 0.0000
It now returns:
139079.8850 668306.0458 212.1724 0.0000
which meets with the 1mm accuracy the expected result of test point
```
30010049 53.999759140 5.144478208 252.6995 139079.8850 668306.0460 212.1723
```
Diffstat (limited to 'test')
| -rw-r--r-- | test/cli/ntv2_out.dist | 3 | ||||
| -rwxr-xr-x | test/cli/testntv2 | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/test/cli/ntv2_out.dist b/test/cli/ntv2_out.dist index 9a97f9cf..650a69d8 100644 --- a/test/cli/ntv2_out.dist +++ b/test/cli/ntv2_out.dist @@ -9,3 +9,6 @@ Try with NTv2 and NTv1 together ... falls back to NTv1 99d00'00.000"W 65d00'00.000"N 0.0 99d0'1.5885"W 65d0'1.3482"N 0.000 111d00'00.000"W 46d00'00.000"N 0.0 111d0'3.1897"W 45d59'59.7489"N 0.000 111d00'00.000"W 47d30'00.000"N 0.0 111d0'2.7989"W 47d29'59.9896"N 0.000 +############################################################## +Switching between NTv2 subgrids +-112.5839956 49.4914451 0 -112.58307487 49.49145197 0.00000000 diff --git a/test/cli/testntv2 b/test/cli/testntv2 index 73371dbe..2a31304e 100755 --- a/test/cli/testntv2 +++ b/test/cli/testntv2 @@ -52,6 +52,14 @@ $EXE +proj=latlong +ellps=clrk66 +nadgrids=ntv2_0.gsb,ntv1_can.dat,conus \ 111d00'00.000"W 46d00'00.000"N 0.0 111d00'00.000"W 47d30'00.000"N 0.0 EOF + +echo "##############################################################" >> ${OUT} +echo Switching between NTv2 subgrids >> ${OUT} +# Initial guess is in ALraymnd, going to parent CAwest afterwards +$EXE +proj=latlong +datum=NAD83 +to +proj=latlong +ellps=clrk66 +nadgrids=ntv2_0.gsb -E -d 8 >>${OUT} <<EOF +-112.5839956 49.4914451 0 +EOF + # ############################################################################## # Done! |
