New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test failures with RDNAPTRANS2018 (Dutch National Grid) #1663
Comments
Perhaps worth filing a dedicated ticket to https://github.com/OSGeo/proj-datumgrid/issues |
I'll prepare a PR for proj-datumgrid once EPSG has been updated to use the new grids. |
Some additional information: There are 2 variants of the transformation. Variant 1 uses a NTv2 grid AND a 7 parameter transformation. Variant 2 uses only a NTv2 grid. The NTv2 grid has a course parent grid and a dense subgrid. In variant 1, the course grid and the edge of the dense grid only contain zero values, as the datum tranformation is done with a 7 parameter transformation and grid corrections are only needed upto 50 km outside the Netherlands. In variant 2, the course grid gives the same result as the 7 parameter transformation. The edge of the dense grid should also give the same results as the 7 parameter transformation. However, errors of about 1.5 cm occur on and near the edge of the dense grid. Edit: The errors also occur on and near the edge of the course grid. So, it seems that it is a more general problem in the grid interpolation operation and it has nothing to do with the complications of having a subgrid nor of having two variants. The more complicated variant 1 next to the more straightforward variant 2 only reveil the error in the interpolation operation. |
@Jochem-L Looking quickly at the PROJ pipelines in RDNAPTRANS2018.pdf, I've the feeling that some of the plays with egm96 and z_out=1e32 (at least this last one) to apparently compensate for the change of height due to the Helmert step could be more elegantly replaced by using the |
@rouault Push and pop can be used for this problem, but only if one uses the real height in the Helmert transformation. Since we use a fixed height (0 m from RD Bessel to ETRS89 and 43 m from ETRS89 to RD Bessel) in the Helmert transformation (to get the same results as when using a horizontal grid shift file), this doesn't work. I think it is possible to do it slightly more elegant, by using |
…n switching between (sub)grids (fixes OSGeo#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 ```
@Jochem-L I've investigated and fixed the issue in rouault@f36d237. This fix is queued in my rfc4_gtiff branch for convenience. It could theoretically be backported to 6.3 but this would require reworking internal interfaces... which I've done per RFC4, so I think this will be 7.0 only material |
Actually backporting to 6.3 was not so bad: #1797 |
…v2_subgrids Horizontal grid shift: fix issue on iterative inverse computation when switching between (sub)grids (fixes #1663)
Thanks! That will hopefully make my work much easier after 6.3... |
While this change was triggered by the 2018 Dutch grids, it seems to have affected the 2008 grids as well.
https://ci.debian.net/data/autopkgtest/testing/amd64/p/proj-rdnap/3743126/log.gz It does now:
https://ci.debian.net/data/autopkgtest/testing/amd64/p/proj-rdnap/3844406/log.gz So while better, it still exceeds the allowed margin. I'll update the test configuration to allow it for these edge cases, I'm mostly noting it here for the record. |
The Dutch national grids have been updated (but not in EPSG yet) and are available via:
https://www.nsgi.nl/geodetische-infrastructuur/producten/programma-rdnaptrans
Or directly from the proj-rdnap Debian package git repository:
https://salsa.debian.org/debian-gis-team/proj-rdnap
The license changed to CC-BY-4.0 so they can be included in proj-datumgrid.
Unfortunately some of the tests for the 2018 grids (Variant 2 - From ETRS89 to RD/NAP) fail with PROJ 6.2.0.
The following tarball contains a subset of the proj-rdnap Debian package to reproduce this issue:
https://linuxminded.nl/tmp/proj-rdnap-2018.tar.gz (6.6M)
Description of the content:
RDNAPTRANS2018.pdf
Upstream documentation about the grids, including
cct
commands to use the grids.testrdtrans2018.pl
Script to execute all tests for both variants from ETRS89 to RD/NAP and vice versa.
Z001_ETRS89andRDNAP.txt
The self-validation dataset (ETRS89 & RD/NAP coordinates to test)
Variant1/
Directory with variant 1 of the grids.
Variant2/
DIrectory with variant 2 of the grids
The output of the test script for my run can be found at:
https://linuxminded.nl/tmp/testrdtrans2018.log.gz
The subset of coordinates from
Z001_ETRS89andRDNAP.txt
that fail can be found at:https://linuxminded.nl/tmp/testrdtrans2018_FAILED.txt
According to Jochem Lesparre of Kadaster these failues are a known issue with PROJ due to points on the edge of the grid not being handled correctly, but he hadn't reported this issue yet. I'm taking the liberty to do so now.
The text was updated successfully, but these errors were encountered: