Package pyrdnap
[frames] | no frames]

Package pyrdnap

A pure Python implementation of 2018 version of the Netherlands' RD NAP specification to convert between geodetic GRS80 (ETRS89) lat-/longitudes in degrees and local RijksDriehoeksmeeting (RD) coordinates and Normaal Amsterdams Peil (NAP) quasi-geoid-height in meter.

See module pyrdnap.rdnap2018 for further information and usage, implementation details.

See modules pyrdnap.v1grid and pyrdnap.v2grid for the pythonic grid files for variant 1 respectively 2 included in pyrdnap.

See function pyrdnap.validation3 for self-validation testing details.

See file testresults/Z001_ETRSandRDNAP-self-validation-v1-results.txt for the self-validation results of the RDNAP2018v1 transformer, especially the summary in the final 3 lines.


Note: PyRDNAP and pyrdnap have not been formally validated and are not certified to carry the trademark name RDNAPTRANS(tm).

Version: 26.05.08

Submodules
  • pyrdnap.__main__: Run a RD NAP 2018 forward or reverse conversion round-trip examples or run the entire RD NAP 2018 self-validation test suite in various ways.
  • pyrdnap.__pygeodesy: (INTERNAL) pyrdnap access to some private pygeodesy attributes.
  • pyrdnap.rd0: (INTERNAL) RD and RD0 constants and RDNAP7Tuple and RDregion classes.
  • pyrdnap.rdnap2018: Main classes RDNAP2018v1 and RDNAP2018v2 follow variant 1 respectively variant 2 of the specification RDNAPTRANS(tm)2018.
  • pyrdnap.v1grid: Variant 1 grid files, but only columns NAP_h_..., lat_corr_ and lon_corr_ of the original RDNAPTRANS2018_v220627/...1/nlgeo2018.txt and ...1/rdcorr2018.txt grid files and encoded into Python as 3 row-order matrices, each a 481-tuple of 301-arrays of floats.
    • pyrdnap.v1grid.nlgeo2018_txt_NAP_h: Variant 1 grid file ...1/nlgeo2018.txt, only the 3rd column NAP_quasi_geoid_height_...(m) and encoded in Python as a 481-tuple of 301-arrays of floats.
    • pyrdnap.v1grid.rdcorr2018_txt_lat_corr: Variant 1 grid file ...1/rdcorr2018.txt, only the 3rd column lat_corr_(deg) with +0.00000* shrunk to 0.*, -0.00000* to -.* and encoded in Python as an n-tuple of runs of non-zeros.
    • pyrdnap.v1grid.rdcorr2018_txt_lon_corr: Variant 1 grid file ...1/rdcorr2018.txt, only the 4th column lon_corr_(deg) with +0.00000* shrunk to 0.*, -0.00000* to -.* and encoded in Python as an n-tuple of runs of non-zeros.
  • pyrdnap.v2grid: Variant 2 grid files, but only columns NAP_h_..., lat_corr_ and lon_corr_ of the original RDNAPTRANS2018_v220627/...2/naptrans2018.txt and ...2/rdtrans2018.txt grid files and encoded into Python as 3 row-order matrices, each a 481-tuple of 301-arrays of floats.
    • pyrdnap.v2grid.naptrans2018_txt_NAP_h: Variant 2 grid file ...2/naptrans2018.txt, only the 3rd column NAP_quasi_geoid_height_...(m) and encoded in Python as a 481-tuple of 301-arrays of floats.
    • pyrdnap.v2grid.rdtrans2018_txt_lat_corr: Variant 2 grid file ...2/rdtrans2018.txt, only the 3rd column lon_corr_(deg) only with 0.00* shrunk to 0.*, -0.00* to -.* and encoded in Python as a 481-tuple of 301-arrays of floats.
    • pyrdnap.v2grid.rdtrans2018_txt_lon_corr: Variant 2 grid file ...2/rdtrans2018.txt, only the 4th column lon_corr_(deg) only with 0.000* shrunk to 0.*, -0.000* to -.* and encoded in Python as a 481-tuple of 301-arrays of floats.
  • pyrdnap.v_grids: (INTERNAL) RD NAP 2018 v#grid utilities.
  • pyrdnap.v_self: Function validation3 to run the RD NAP 2018 self-validation tests .../RDNAPTRANS2018_v220627/.../Z001_ETRS89andRDNAP.txt obtainable from NSGI.NL after registration.

Classes
  Datum
Ellipsoid and transform parameters for an earth model.
  Ellipsoid
Ellipsoid with equatorial and polar radii, flattening, inverse flattening and other, often used, cached attributes, supporting oblate and prolate ellipsoidal and spherical earth models.
  LatLon2Tuple
2-Tuple (lat, lon) in degrees90 and degrees180.
  PhiLam2Tuple
2-Tuple (phi, lam) with latitude phi in radians[PI_2] and longitude lam in radians[PI].
  RDNAP2018v1
Transformer implementing RD NAP 2018 variant 1.
  RDNAP2018v2
Transformer implementing RD NAP 2018 variant 2.
  RDNAP7Tuple
7-Tuple (RDx, RDy, NAPh, lat, lon, height, datum) with local RDx, RDy and NAPh quasi-geoid_height, geodetic lat, lon, height and datum with lat and lon in degrees and RDx, RDy, NAPh and height in meter, conventionally.
  RDNAPError
Error raised for RD and NAP issues.
  RDregion4Tuple
4-Tuple (S, W, N, E) with RD region in GRS80 (ETRS89) degrees.
  Similarity
Similarity transformation.
  Vector2Tuple
2-Tuple (x, y) of (geocentric) components, each in meter or the same units.
  Vector3Tuple
3-Tuple (x, y, z) of (geocentric) components, all in meter or the same units.
Functions
 
validation3(self_txt, R, all_=False, in_out=True, _print=None, _printest=None)
Run the official RD NAP 2018 self-validation tests.
Variables
  pyrdnap_abspath = '..../PyRDNA...
Function Details

validation3 (self_txt, R, all_=False, in_out=True, _print=None, _printest=None)

 

Run the official RD NAP 2018 self-validation tests.

Arguments:
  • self_txt - Name of the file containing the RDNAP 2018 self-validation tests (str), .../RDNAPTRANS2018_v220627/.../Z001_ETRS89andRDNAP.txt.
  • R - An RDNAP2018v# transformer (RDNAP2018v1 or RDNAP2018v2 instance).
  • all_ - If True print all tests and test results, otherwise only failing tests (bool).
  • in_out - If True test only points inside the RD region, if False only points outside (bool).
  • _print - A Python 3+ print-like callable or None to not print the header and the final, summary lines.
  • _printest - A Python 3+ print-like callable or None to not print all_ in_out tests or only the failing ones.
Returns:
3-Tuple (failed, total, in_outside) with the number of FAILED tests, the total number of tests and the number of test lines in_out the RD region.

Variables Details

pyrdnap_abspath

Value:
'..../PyRDNAP/pyrdnap'