Coverage for pybelbg / __init__.py: 100%

13 statements  

« prev     ^ index     » next       coverage.py v7.14.0, created at 2026-08-21 15:07 -0400

1 

2# -*- coding: utf-8 -*- 

3 

4u'''A pure Python implementation of the C{Belgian hybrid quasi-geoid} U{hBG18 

5<https://DOI.org/10.5880/isg.2018.003>} with several Belgian C{Lambert 2018}, 

6C{-1972s} and C{-1950} conic projections to convert between geodetic lat-, 

7longitudes and ellipsoidal height C{h} and local easting, northing and 

8orthometric height C{H} using bilinear interpolation of hybrid quasi-geoid 

9height C{hBGh}. 

10''' 

11import os.path as os_path 

12import sys 

13 

14# _isfrozen = getattr(_sys, 'frozen', False) 

15pybelbg_abspath = os_path.dirname(os_path.abspath(__file__)) # _sys._MEIPASS + '/pyrdnap' 

16_pybelbg_ = __package__ or os_path.basename(pybelbg_abspath) 

17 

18# setting __path__ should ... 

19__path__ = [pybelbg_abspath] 

20try: # ... make this import work, ... 

21 import pybelbg.__pygeodesy as __pygeodesy # noqa: F401 

22except ImportError: # ... if not, extend sys.path 

23 if pybelbg_abspath not in sys.path: 

24 sys.path.insert(0, pybelbg_abspath) 

25 import pybelbg.__pygeodesy as __pygeodesy # noqa: F401 

26 

27import pybelbg.belbgs as _belbgs 

28 

29__all__ = __pygeodesy._ALL_STAR(_pybelbg_, _belbgs, __pygeodesy) 

30__version__ = '26.08.18' 

31 

32del _belbgs, os_path, sys 

33 

34 

35def _versions(**sep): # in .__main__, .test/bases 

36 # Get the pybelbg, pygeodesy, Python ... versions (C{str}). 

37 return __pygeodesy._versions(pybelbg=__version__, **sep) 

38 

39# **) MIT License 

40# 

41# Copyright (C) 2026-2026 -- mrJean1 at Gmail -- All Rights Reserved. 

42# 

43# Permission is hereby granted, free of charge, to any person obtaining a 

44# copy of this software and associated documentation files (the "Software"), 

45# to deal in the Software without restriction, including without limitation 

46# the rights to use, copy, modify, merge, publish, distribute, sublicense, 

47# and/or sell copies of the Software, and to permit persons to whom the 

48# Software is furnished to do so, subject to the following conditions: 

49# 

50# The above copyright notice and this permission notice shall be included 

51# in all copies or substantial portions of the Software. 

52# 

53# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 

54# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 

55# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 

56# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 

57# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 

58# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 

59# OTHER DEALINGS IN THE SOFTWARE.