Coverage for pyrdnap / __init__.py: 100%
15 statements
« prev ^ index » next coverage.py v7.14.0, created at 2026-08-21 15:30 -0400
« prev ^ index » next coverage.py v7.14.0, created at 2026-08-21 15:30 -0400
2# -*- coding: utf-8 -*-
4u'''A pure Python implementation of the 2018 v220627 version of Netherlands' U{RD NAP<https://
5www.NSGI.NL/coordinatenstelsels-en-transformaties/coordinatentransformaties/rdnap-etrs89-rdnaptrans>}
6specification to convert between GRS80 (ETRS89) geodetic lat-, longitudes and ellipsoidal height
7C{h} and local I{B{R}ijksB{D}riehoeksmeeting (B{RD})} coordinates and orthometric height C{H} using
8bilinear interpolation of I{B{N}ormaal B{A}msterdams B{P}eil quasi-geoid heights (B{NAPh})}.
10The results of both B{C{pyrdnap}} transformer classes L{RDNAP2018v1} and L{RDNAP2018v2} have been
11formally validated and B{C{PyRDNAP}} has been certified to carry the trademark B{C{RDNAPTRANS(tm)}}.
13See module L{pyrdnap.rdnap2018} for further information, usage and implementation details.
15See modules L{pyrdnap.v1grid} and L{pyrdnap.v2grid} for the C{RDNAPTRANS(tm)2018_v220627} grid
16files, each the original, unmodified ASCII C{.txt} but compressed as C{.txt.zip}.
18See function L{pyrdnap.validation3} for C{.../Z001_ETRSandRDNAP.txt} test set details.
20See files C{testresults/v1_..._round_trips.txt} for "round-trip" (forward plus reverse) test
21results of the L{RDNAP2018v1} transformer, especially the final, summary lines in each file.
22'''
23import os.path as os_path
24import sys
26# _isfrozen = getattr(_sys, 'frozen', False)
27pyrdnap_abspath = os_path.dirname(os_path.abspath(__file__)) # _sys._MEIPASS + '/pyrdnap'
28_pyrdnap_ = __package__ or os_path.basename(pyrdnap_abspath)
30# setting __path__ should ...
31__path__ = [pyrdnap_abspath]
32try: # ... make this import work, ...
33 import pyrdnap.__pygeodesy as __pygeodesy # noqa: F401
34except ImportError: # ... if not, extend sys.path
35 if pyrdnap_abspath not in sys.path:
36 sys.path.insert(0, pyrdnap_abspath)
37 import pyrdnap.__pygeodesy as __pygeodesy # noqa: F401
39import pyrdnap.rd0 as _rd0 # noqa: F401
40import pyrdnap.rdnap2018 as _rdnap2018 # noqa: F401
41import pyrdnap.v_self as _v_self # noqa: F401
43__all__ = __pygeodesy._ALL_STAR(_pyrdnap_, _rd0, _rdnap2018, _v_self, __pygeodesy)
44__version__ = '26.08.18'
46del _rd0, _rdnap2018, _v_self, os_path, sys
49def _versions(**sep): # in .__main__, .v_self, .test/bases
50 # Get the pyrdnap, pygeodesy, Python ... versions (C{str}).
51 return __pygeodesy._versions(pyrdnap=__version__, **sep)
53# **) MIT License
54#
55# Copyright (C) 2026-2026 -- mrJean1 at Gmail -- All Rights Reserved.
56#
57# Permission is hereby granted, free of charge, to any person obtaining a
58# copy of this software and associated documentation files (the "Software"),
59# to deal in the Software without restriction, including without limitation
60# the rights to use, copy, modify, merge, publish, distribute, sublicense,
61# and/or sell copies of the Software, and to permit persons to whom the
62# Software is furnished to do so, subject to the following conditions:
63#
64# The above copyright notice and this permission notice shall be included
65# in all copies or substantial portions of the Software.
66#
67# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
68# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
69# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
70# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
71# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
72# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
73# OTHER DEALINGS IN THE SOFTWARE.