Package pyrdnap
[frames] | no frames]

Package pyrdnap

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

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

See modules pyrdnap.v1grid and pyrdnap.v2grid for the original RDNAPTRANS2018_v220627, unmodified .txt grid files for each variant, but compressed as .txt.zip.

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

See file testresults/Z001_ETRSandRDNAP_v1_results.txt for the self-validation results of the RDNAP2018v1 transformer, especially the summary in the last 4 lines.


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

Version: 26.05.14

Submodules
  • pyrdnap.__main__: Run a RD NAP 2018 forward or reverse conversion examples or run the NSGI or RD NAP 2018 validation test set in "round-trip" fashion.
  • 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: Extract from the original, compressed, variant 1 grid files nlgeo2018.txt.zip and rdcorr2018.txt.zip the NAP_..., lat_corr_ and lon_corr_ columns only and encode each in Python as a row-order matrix, a 481-tuple of 301-arrays of single- or double precision floats.
  • pyrdnap.v2grid: Extract from the original, compressed, variant 2 grid files naptrans2018.txt.zip and rdtrans2018.txt.zip the NAP_..., lat_corr_ and lon_corr_ columns only and encode each in Python as a row-order matrix, a 481-tuple of 301-arrays of single- or double precision 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, NAP and unzip 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...
  Datums = Datums.Sphere: Datum(name='Sphere', ellipsoid=Ellipso...
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 points in_out the RD region.

Variables Details

pyrdnap_abspath

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

Datums

Value:
Datums.Sphere: Datum(name='Sphere', ellipsoid=Ellipsoids.Sphere, trans\
form=Transforms.WGS84),
Datums.NAD83: Datum(name='NAD83', ellipsoid=Ellipsoids.GRS80, transfor\
m=Transforms.NAD83),
Datums.OSGB36: Datum(name='OSGB36', ellipsoid=Ellipsoids.Airy1830, tra\
nsform=Transforms.OSGB36),
Datums.WGS84: Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transfor\
m=Transforms.WGS84),
...