From 6a4f9cc673e247e1ca76e94d7b1aaaf3e0648c13 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 14 Dec 2019 15:40:17 +0100 Subject: 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 ``` --- test/cli/testntv2 | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/cli/testntv2') 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} < Date: Tue, 24 Dec 2019 12:52:13 +0100 Subject: proj_trans: add retry logic to select other transformation if the best one fails. Relates to https://github.com/OSGeo/PROJ/issues/1808 --- test/cli/testntv2 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/cli/testntv2') diff --git a/test/cli/testntv2 b/test/cli/testntv2 index 2a31304e..ab72d199 100755 --- a/test/cli/testntv2 +++ b/test/cli/testntv2 @@ -60,6 +60,12 @@ $EXE +proj=latlong +datum=NAD83 +to +proj=latlong +ellps=clrk66 +nadgrids=ntv2_0 -112.5839956 49.4914451 0 EOF +echo "##############################################################" >> ${OUT} +echo Attempt first with ntv2_0.gsb and then conus >> ${OUT} +$EXE +proj=longlat +datum=NAD27 +to +proj=longlat +datum=WGS84 -E -d 8 >>${OUT} < Date: Wed, 25 Dec 2019 16:23:31 +0100 Subject: Database: tune accuracy of Canadian NTv1 file w.r.t NTv2 As on import of EPSG, we remove the supersession of Canadian NTv1 file w.r.t NTv2 (because the default behaviour of PROJ is to ignore superseded operations). However the NTv1 operation is advertized with an accuracy of 1m, whereas NTv2 is advertized with 1.5m. Consequently on areas where both files are valid, and if both files are available, NTv1 would be selected. So as a workaround, worsen the NTv1 accuracy to 2m so that NTv2 is used in priority. --- test/cli/testntv2 | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/cli/testntv2') diff --git a/test/cli/testntv2 b/test/cli/testntv2 index ab72d199..72a0f9a2 100755 --- a/test/cli/testntv2 +++ b/test/cli/testntv2 @@ -65,6 +65,14 @@ echo Attempt first with ntv2_0.gsb and then conus >> ${OUT} $EXE +proj=longlat +datum=NAD27 +to +proj=longlat +datum=WGS84 -E -d 8 >>${OUT} <> ${OUT} +echo "NAD27 -> NAD83: 1st through ntv2, 2nd through conus" >> ${OUT} +# +$EXE NAD27 NAD83 -E >>${OUT} <