RDNAP for Debian
================

Kadaster and Rijkswaterstaat CIV, working together under the name RDNAP,
developed RDNAPTRANSTM2008, the precise and official transformation
between ETRS89 and the dutch national horizontal and vertical coordinate
reference systems the Stelsel van de Rijksdriehoeksmeting (RD) and the
Normaal Amsterdams Peil (NAP).

The Kadaster website has some general information (in dutch) about RDNAP
transformation at: 

https://www.kadaster.nl/transformatie-van-coordinaten

To download the RDNAPTRANSTM2008.zip file you need to fill in a form that
requires your name, email address and phone number, before you're sent a
link to the download page via email.

Direct links to the relevant pages:

- RDNAPTRANS2008 request form
  https://formulieren.kadaster.nl/aanvragen_rdnaptrans2008

- RDNAPTRANS2008 download page
  https://www.kadaster.nl/rdnaptrans2008-download-

- RDNAPTRANS2008.zip file
  http://gnss-data.kadaster.nl/root/misc/rdnaptrans2008/RDNAPTRANS2008.zip

For the 2018 update of the grids, more information (in dutch) is available
on the Nederlandse Samenwerking Geodetische Infrastructuur (NSGI) website:

https://www.nsgi.nl/geodetische-infrastructuur/producten/programma-rdnaptrans

Like the 2008 grids, you need to fill inn a form before you can download
the RDNAPTRANS.zip file.

Direct links to the relevant pages:

- RDNAPTRANS2018 request form
  https://formulieren.kadaster.nl/aanvragen_rdnaptrans

- RDNAPTRANS2018 download page
  https://formulieren.kadaster.nl/page/download-rdnaptrans

- RDNAPTRANS2018.zip file
  https://kadaster.nl/documents/1888506/2496175/RDNAPTRANS.zip/827827a3-b88a-5d16-55b6-7f83010e1b2f

The license contained in the RDNAPTRANS2008.zip file is problematic, because
it doesn't allow distribution. The license is documented in the file
"Use of RDNAPTRANS2008.doc" (use `antiword "Use of RDNAPTRANS2008.doc"` to
display it in a terminal). Quote:

"
 Use of the name RDNAPTRANSTM2008

 Kadaster and Rijkswaterstaat DID, working together under the name RDNAP,
 developed RDNAPTRANSTM2008 the precise and official transformation between
 ETRS89 and RD/NAP for the Netherlands. This transformation will replace
 RDNAPTRANSTM2008 as a result of a re-adjustment of the ETRS89 coordinates
 of the AGRS.NL-stations. The validity of RDNAPTRANSTM2008  will start 25-04-
 2009. The validity of RDNAPTRANSTM2004 will stop 1-4-2010.

 RDNAP makes the program rdnaptrans2008 and accessory data files for
 RDNAPTRANSTM2008 freely available under the following conditions:

   1. rdnaptrans2008 gives examples of routines for the transformation.
      RDNAP is not responsible for the correctness of a program using these
      routines.
   2. rdnaptrans2008 may not be distributed to others.
   3. The trademark in RDNAPTRANSTM2008 indicates that all rights on the use
      of this name are in the hands of Kadaster and DID.

 A written permission for the use of the name RDNAPTRANSTM2008 can be
 obtained by sending this completely filled in sheet to:
 RDNAP p/a
 Kadaster GEO/MB/GRS
 P.O. box 9046
 7300 GH Apeldoorn
 or fax to:
 0031 (0)88 183 2079
 .
 .
 The permission for the use of the name RDNAPTRANSTM2008 can be stopped by
 RDNAP at any moment when the software does not meet the specifications as
 mentioned at the RDNAPTRANSTM2008 test sheet in the appendix.
"

The RDNAPTRANS2008.zip file contains another zip file: NTv2_2008.zip. The
NTv2_2008.zip file contains a different license which limits modification
but allows distribution. The license is documented in the file 
"Use of RDTRANS2008 and NAPTRANS2008.pdf" (use
`pdf2txt "Use of RDTRANS2008 and NAPTRANS2008.pdf"` to display it in a
terminal). Quote:

"
 License

 RDNAP makes the rdtrans2008.gsb and naptrans.gtx grid correction files
 freely available.
 Implementation and distribution of the rdtrans2008 NTv2-grid and
 naptrans2008 VDatum-grid in combination with other tools/software that
 require these grids for transformation between ETRS89 and RD/NAP is allowed,
 under the following conditions:

    1. It is not allowed to modify the correction values of the grid
       correction files. (It is allowed to convert the grid data to a
       different file format or data structure as long as this does not
       affect the results of the calculations.)
    2. It should be clear from the documentation of the software using the
       grid correction files that the transformation procedure using the grid
       correction files is not identical to RDNAPTRANS™2008.
    3. The correct implementation of the grid corrections has to be tested as
       specified in Appendix 2

 Disclaimer

 The correction grids for RD and NAP in NTv2 and VDatum format are provided
 ‘as is’ and any express or implied warranties, including, but not limited
 to, the implied warranties of merchantability and fitness for a particular
 purpose are disclaimed. In no event shall Kadaster or Rijkswaterstaat be
 liable for any direct, indirect, incidental, special, exemplary or
 consequential damages (including but not limited to procurement of substitute
 goods or services, loss of use, data or profits, or business interruption)
 however caused and on any theory of liability, whether in contract, strict
 liability, or tort (including negligence or otherwise) arising in any way out
 of the use of the correction grids for RD and NAP in NTv2 and Vdatum format.”
"

The get-orig-source script used to download the RDNAPTRANS2008.zip file,
extract the content of NTv2_2008.zip file from within it, and create a
tarball from the NTv2_2008.zip file content (documentation in PDF and grid
files).

Because the RDNAPTRANS2008.zip file is no longer online, the get-orig-source
script now downloads the content of the NTv2_2008.zip file from the git
repository of the proj-rdnap Debian package.

The 2018 grids have a different license, Creative Commons
Attribution-NoDerivatives 4.0 International License (CC-BY-ND-4.0) for the
documentation, and Creative Commons Attribution 4.0 International License
(CC-BY-4.0) for the grid files.

The get-orig-source script includes the content of the RDNAPTRANS.zip file
as-is, the 2018 grids don't require special treatment.

...

To use the 2008 grid correction files the definitions as suggested by Kadaster
are available in the /usr/share/proj/rdnap file when using PROJ < 6:

 # RDNAP with NTv2 and VDatum
 <rdnap> +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +nadgrids=rdtrans2008.gsb +geoidgrids=naptrans2008.gtx +units=m +no_defs <>

 # RD with NTv2 only
 <rd> +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +nadgrids=rdtrans2008.gsb +units=m +no_defs <>

These were suggested by Lennard Huisman from Kadaster on the Dutch OSGeo
mailinglist:

 https://lists.osgeo.org/pipermail/dutch/2014-October/000975.html

To use these definitions with cs2cs specify the rnap file:

 cs2cs +init=rdnap:rdnap +to +init=epsg:4258
 cs2cs +init=rdnap:rd +to +init=epsg:4258

To use the grid files with cs2cs when using PROJ 6 or later,
use EPSG:7415 & EPSG:4937:

 cs2cs EPSG:7415 +to EPSG:4937

Beware that the transformation procedure is not identical to RDNAPTRANS™2008.

The file "Use of RDTRANS2008 and NAPTRANS2008.pdf" documents a list of
limitations of the procedure with NTv2 grid correction files. Quote:

"
    1) The rdtrans2008 NTv2-grid can only give identical results to 
       RDNAPTRANS™2008 within 1 millimeter at ground level onshore and
       at mean seal level offshore. The horizontal deviation is
       approximately 1 millimeter per 50 meter height difference from
       ground level or mean sea level.
    2) An exception to 1) is the border of the RDNAPTRANS™2008 correction
       grid. Transformation results within cells of the rdtrans2008
       NTv2-grid that are intersected by the border of the RDNAPTRANS™2008
       correction grid can result in deviations of up to 20 centimeter.
    3) The naptrans2008 VDatum-grid cannot be used to determine deflections
       of the vertical. For this the NLGEO2004 geoid model has to be used.
    4) The naptrans2008 VDatum-grid is referenced to the Bessel-1841
       ellipsoid and cannot be used stand-alone, it has to be used in
       combination with the rdtrans2008 NTv2-grid.
"

The package build includes the mandatory tests documented in Appendix 2 of
"Use of RDTRANS2008 and NAPTRANS2008.pdf". The tests compare the coordinate
transformations by cs2cs to those computed with RDNAPTRANS™2008.

The transformations by cs2cs produce different results, not identical to
RDNAPTRANS™2008. The tests only fail if the difference is greater than
the margin.
