pygeodesy 24.5.6__py2.py3-none-any.whl → 24.5.15__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. {PyGeodesy-24.5.6.dist-info → PyGeodesy-24.5.15.dist-info}/METADATA +4 -4
  2. {PyGeodesy-24.5.6.dist-info → PyGeodesy-24.5.15.dist-info}/RECORD +51 -50
  3. pygeodesy/__init__.py +18 -14
  4. pygeodesy/__main__.py +9 -10
  5. pygeodesy/albers.py +2 -2
  6. pygeodesy/auxilats/__main__.py +7 -10
  7. pygeodesy/auxilats/auxLat.py +2 -1
  8. pygeodesy/basics.py +161 -165
  9. pygeodesy/booleans.py +4 -4
  10. pygeodesy/constants.py +8 -6
  11. pygeodesy/datums.py +9 -8
  12. pygeodesy/ecef.py +5 -4
  13. pygeodesy/elevations.py +2 -2
  14. pygeodesy/ellipsoidalBaseDI.py +7 -5
  15. pygeodesy/elliptic.py +10 -7
  16. pygeodesy/errors.py +6 -6
  17. pygeodesy/etm.py +3 -2
  18. pygeodesy/fmath.py +14 -13
  19. pygeodesy/fstats.py +281 -219
  20. pygeodesy/fsums.py +133 -104
  21. pygeodesy/geodesicw.py +14 -14
  22. pygeodesy/geodesicx/__main__.py +4 -4
  23. pygeodesy/geodesicx/gxarea.py +4 -4
  24. pygeodesy/geodsolve.py +3 -2
  25. pygeodesy/geoids.py +6 -6
  26. pygeodesy/heights.py +4 -4
  27. pygeodesy/internals.py +571 -0
  28. pygeodesy/interns.py +5 -202
  29. pygeodesy/iters.py +3 -2
  30. pygeodesy/karney.py +4 -4
  31. pygeodesy/ktm.py +7 -7
  32. pygeodesy/lazily.py +139 -217
  33. pygeodesy/mgrs.py +3 -2
  34. pygeodesy/named.py +13 -10
  35. pygeodesy/nvectorBase.py +4 -3
  36. pygeodesy/osgr.py +14 -12
  37. pygeodesy/points.py +5 -5
  38. pygeodesy/props.py +7 -7
  39. pygeodesy/rhumb/bases.py +3 -2
  40. pygeodesy/rhumb/solve.py +2 -2
  41. pygeodesy/solveBase.py +3 -2
  42. pygeodesy/streprs.py +5 -4
  43. pygeodesy/trf.py +4 -4
  44. pygeodesy/units.py +15 -17
  45. pygeodesy/ups.py +7 -6
  46. pygeodesy/utily.py +4 -4
  47. pygeodesy/utm.py +5 -4
  48. pygeodesy/utmupsBase.py +4 -3
  49. pygeodesy/vector3dBase.py +2 -1
  50. {PyGeodesy-24.5.6.dist-info → PyGeodesy-24.5.15.dist-info}/WHEEL +0 -0
  51. {PyGeodesy-24.5.6.dist-info → PyGeodesy-24.5.15.dist-info}/top_level.txt +0 -0
pygeodesy/named.py CHANGED
@@ -14,25 +14,25 @@ standard Python C{namedtuple}s.
14
14
  '''
15
15
 
16
16
  from pygeodesy.basics import isclass, isidentifier, iskeyword, isstr, issubclassof, \
17
- itemsorted, len2, _sizeof, _xcopy, _xdup, _zip
17
+ itemsorted, len2, _xcopy, _xdup, _zip
18
18
  from pygeodesy.errors import _AssertionError, _AttributeError, _incompatible, \
19
19
  _IndexError, _IsnotError, _KeyError, LenError, \
20
20
  _NameError, _NotImplementedError, _TypeError, \
21
21
  _TypesError, UnitError, _ValueError, _xattr, _xkwds, \
22
22
  _xkwds_get, _xkwds_item2, _xkwds_pop2
23
+ from pygeodesy.internals import _caller3, _dunder_nameof, _isPyPy, _sizeof, _under
23
24
  from pygeodesy.interns import MISSING, NN, _AT_, _COLON_, _COLONSPACE_, _COMMA_, \
24
25
  _COMMASPACE_, _doesn_t_exist_, _DOT_, _DUNDER_, _EQUAL_, \
25
- _exists_, _immutable_, _name_, _NL_, _NN_, _no_, _other_, \
26
- _s_, _SPACE_, _std_, _UNDER_, _valid_, _vs_, \
27
- _dunder_nameof, _isPyPy, _under
28
- from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS, _caller3, _getenv
26
+ _exists_, _immutable_, _name_, _NL_, _NN_, _no_, \
27
+ _other_, _s_, _SPACE_, _std_, _UNDER_, _valid_, _vs_
28
+ from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS, _getenv
29
29
  from pygeodesy.props import _allPropertiesOf_n, deprecated_method, _hasProperty, \
30
30
  _update_all, property_doc_, Property_RO, property_RO, \
31
31
  _update_attrs
32
32
  from pygeodesy.streprs import attrs, Fmt, lrstrip, pairs, reprs, unstr
33
33
 
34
34
  __all__ = _ALL_LAZY.named
35
- __version__ = '24.05.04'
35
+ __version__ = '24.05.13'
36
36
 
37
37
  _COMMANL_ = _COMMA_ + _NL_
38
38
  _COMMASPACEDOT_ = _COMMASPACE_ + _DOT_
@@ -44,6 +44,7 @@ _name = _under(_name_)
44
44
  _Names_ = '_Names_'
45
45
  _registered_ = 'registered' # PYCHOK used!
46
46
  _std_NotImplemented = _getenv('PYGEODESY_NOTIMPLEMENTED', NN).lower() == _std_
47
+ _such_ = 'such'
47
48
  _Units_ = '_Units_'
48
49
  _UP = 2
49
50
 
@@ -662,12 +663,13 @@ class _NamedEnum(_NamedDict):
662
663
  '''(INTERNAL) Check attribute name against given, registered name.
663
664
  '''
664
665
  pypy = _isPyPy()
666
+ _isa = isinstance
665
667
  for n, v in kwds.items():
666
- if isinstance(v, _LazyNamedEnumItem): # property
668
+ if _isa(v, _LazyNamedEnumItem): # property
667
669
  assert (n == v.name) if pypy else (n is v.name)
668
670
  # assert not hasattr(self.__class__, n)
669
671
  setattr(self.__class__, n, v)
670
- elif isinstance(v, self._item_Classes): # PYCHOK no cover
672
+ elif _isa(v, self._item_Classes): # PYCHOK no cover
671
673
  assert self[n] is v and getattr(self, n) \
672
674
  and self.find(v) == n
673
675
  else:
@@ -710,8 +712,9 @@ class _NamedEnum(_NamedDict):
710
712
  case-insensitive} order (C{bool}).
711
713
  '''
712
714
  if all: # instantiate any remaining L{_LazyNamedEnumItem}
715
+ _isa = isinstance
713
716
  for n, p in tuple(self.__class__.__dict__.items()):
714
- if isinstance(p, _LazyNamedEnumItem):
717
+ if _isa(p, _LazyNamedEnumItem):
715
718
  _ = getattr(self, n)
716
719
  return itemsorted(self) if asorted else ADict.items(self)
717
720
 
@@ -778,7 +781,7 @@ class _NamedEnum(_NamedDict):
778
781
  else:
779
782
  name = self.find(name_or_item, dflt=MISSING) # all=True?
780
783
  if name is MISSING:
781
- t = _SPACE_(_no_, 'such', self.classname, _item_)
784
+ t = _SPACE_(_no_, _such_, self.classname, _item_)
782
785
  raise _AttributeError(t, txt=repr(name_or_item))
783
786
  try:
784
787
  item = ADict.pop(self, name)
pygeodesy/nvectorBase.py CHANGED
@@ -19,13 +19,14 @@ from pygeodesy.fmath import fdot, fidw, hypot_ # PYCHOK fdot shared
19
19
  from pygeodesy.fsums import Fsum, fsumf_
20
20
  from pygeodesy.formy import _isequalTo, n_xyz2latlon, n_xyz2philam, \
21
21
  _spherical_datum
22
+ # from pygeodesy.internals import _under # from .named
22
23
  from pygeodesy.interns import NN, _1_, _2_, _3_, _bearing_, _coincident_, \
23
24
  _COMMASPACE_, _distance_, _h_, _insufficient_, \
24
25
  _intersection_, _no_, _NorthPole_, _point_, \
25
- _pole_, _SPACE_, _SouthPole_, _under
26
+ _pole_, _SPACE_, _SouthPole_
26
27
  from pygeodesy.latlonBase import LatLonBase, _ALL_DOCS, _ALL_LAZY, _MODS
27
28
  # from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS # from .latlonBase
28
- from pygeodesy.named import _xother3
29
+ from pygeodesy.named import _xother3, _under
29
30
  from pygeodesy.namedTuples import Trilaterate5Tuple, Vector3Tuple, \
30
31
  Vector4Tuple, map1
31
32
  from pygeodesy.props import deprecated_method, Property_RO, property_doc_, \
@@ -38,7 +39,7 @@ from pygeodesy.vector3d import Vector3d, _xyzhdn3
38
39
  from math import fabs, sqrt
39
40
 
40
41
  __all__ = _ALL_LAZY.nvectorBase
41
- __version__ = '24.04.07'
42
+ __version__ = '24.05.13'
42
43
 
43
44
 
44
45
  class NvectorBase(Vector3d): # XXX kept private
pygeodesy/osgr.py CHANGED
@@ -53,7 +53,7 @@ from pygeodesy.utily import degrees90, degrees180, sincostan3, truncate
53
53
  from math import cos, fabs, radians, sin, sqrt
54
54
 
55
55
  __all__ = _ALL_LAZY.osgr
56
- __version__ = '23.12.03'
56
+ __version__ = '24.05.13'
57
57
 
58
58
  _equivalent_ = 'equivalent'
59
59
  _OSGR_ = 'OSGR'
@@ -324,17 +324,19 @@ class Osgr(_NamedBase):
324
324
  r = NG.reverse(self)
325
325
 
326
326
  elif self._latlon is None:
327
+ _F = _Fsumf_
327
328
  e0 = self.easting - NG.eas0
328
329
  n0 = m = self.northing - NG.nor0
329
330
 
330
- _M = NG.Mabcd0
331
331
  a0 = NG.a0
332
+ _M = NG.Mabcd0
332
333
  a = NG.phi0
333
- _A = _Fsumf_(a).fsum_
334
+ _a = fabs
335
+ _A = _F(a).fsum_
334
336
  for self._iteration in range(1, _TRIPS):
335
337
  a = _A(m / a0)
336
338
  m = n0 - _M(a) # meridional arc
337
- if fabs(m) < eps:
339
+ if _a(m) < eps:
338
340
  break
339
341
  else: # PYCHOK no cover
340
342
  t = str(self)
@@ -354,14 +356,14 @@ class Osgr(_NamedBase):
354
356
  d2 = d**2
355
357
 
356
358
  a = (d2 * ta * (-1 + # Horner-like
357
- d2 / 12 * (_Fsumf_( 5, 3 * ta2, -9 * ta2 * n2, n2) -
358
- d2 / 30 * _Fsumf_(61, 90 * ta2, 45 * ta4)))).fsum_(a)
359
+ d2 / 12 * (_F( 5, 3 * ta2, -9 * ta2 * n2, n2) -
360
+ d2 / 30 * _F(61, 90 * ta2, 45 * ta4)))).fsum_(a)
359
361
 
360
362
  b = (d / ca * ( 1 - # Horner-like
361
- d2 / 6 * (_Fsumf_(v_r, 2 * ta2) -
362
- d2 / 20 * (_Fsumf_( 5, 28 * ta2, 24 * ta4) +
363
- d2 / 42 * _Fsumf_(61, 662 * ta2, 1320 * ta4,
364
- 720 * ta2 * ta4))))).fsum_(NG.lam0)
363
+ d2 / 6 * (_F(v_r, 2 * ta2) -
364
+ d2 / 20 * (_F( 5, 28 * ta2, 24 * ta4) +
365
+ d2 / 42 * _F(61, 662 * ta2, 1320 * ta4,
366
+ 720 * ta2 * ta4))))).fsum_(NG.lam0)
365
367
 
366
368
  r = _LLEB(degrees90(a), degrees180(b), datum=self.datum, name=self.name)
367
369
  r._iteration = self._iteration # only ellipsoidal LatLon
@@ -541,7 +543,7 @@ def parseOSGR(strOSGR, Osgr=Osgr, name=NN, **Osgr_kwds):
541
543
  if not p:
542
544
  raise ValueError
543
545
  g = s[0]
544
- if p == 2 and isfloat(g): # "easting,northing"
546
+ if p == 2 and isfloat(g, both=True): # "easting,northing"
545
547
  e, n, m = _enstr2m3(*s, wide=_EN_WIDE + 1)
546
548
 
547
549
  else:
@@ -681,7 +683,7 @@ def toOsgr(latlon, lon=None, kTM=False, datum=_WGS84, Osgr=Osgr, name=NN, # MCC
681
683
 
682
684
  if __name__ == '__main__':
683
685
 
684
- from pygeodesy.lazily import printf
686
+ from pygeodesy import printf
685
687
  from random import random, seed
686
688
  from time import localtime
687
689
 
pygeodesy/points.py CHANGED
@@ -26,8 +26,8 @@ C{ilon} longitude index in each 2+tuple.
26
26
  '''
27
27
 
28
28
  from pygeodesy.basics import isclass, isint, isscalar, issequence, \
29
- issubclassof, _Sequence, _xcopy, _xdup, \
30
- _xinstanceof
29
+ _xdup, issubclassof, _Sequence, _xcopy, \
30
+ _xinstanceof
31
31
  from pygeodesy.constants import EPS, EPS1, PI_2, R_M, isnear0, isnear1, \
32
32
  _umod_360, _0_0, _0_5, _1_0, _2_0, _6_0, \
33
33
  _90_0, _N_90_0, _180_0, _360_0
@@ -59,10 +59,10 @@ from pygeodesy.units import Number_, Radius, Scalar, Scalar_
59
59
  from pygeodesy.utily import atan2b, degrees90, degrees180, degrees2m, \
60
60
  unroll180, _unrollon, unrollPI, _Wrap, wrap180
61
61
 
62
- from math import cos, fabs, fmod, radians, sin
62
+ from math import cos, fabs, fmod as _fmod, radians, sin
63
63
 
64
64
  __all__ = _ALL_LAZY.points
65
- __version__ = '24.04.07'
65
+ __version__ = '24.05.10'
66
66
 
67
67
  _ilat_ = 'ilat'
68
68
  _ilon_ = 'ilon'
@@ -1353,7 +1353,7 @@ def isenclosedBy(point, points, wrap=False): # MCCABE 15
1353
1353
  return dx, x2, y2
1354
1354
 
1355
1355
  else:
1356
- x0 = fmod(x0, _360_0) # not x0 % 360!
1356
+ x0 = _fmod(x0, _360_0) # not x0 % 360!
1357
1357
  x0_180_ = x0 - _180_0
1358
1358
  x0_180 = x0 + _180_0
1359
1359
 
pygeodesy/props.py CHANGED
@@ -25,7 +25,7 @@ from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, \
25
25
  from functools import wraps as _wraps
26
26
 
27
27
  __all__ = _ALL_LAZY.props
28
- __version__ = '24.05.03'
28
+ __version__ = '24.05.12'
29
29
 
30
30
  _class_ = 'class'
31
31
  _dont_use_ = _DEPRECATED_ + ", don't use."
@@ -48,11 +48,11 @@ def _allPropertiesOf(Clas_or_inst, *Bases, **excls):
48
48
  except AttributeError:
49
49
  raise
50
50
  S = () # not an inst
51
- B = Bases or _PropertyBase
52
- _is = isinstance
51
+ B = Bases or _PropertyBase
52
+ _isa = isinstance
53
53
  for C in S:
54
54
  for n, p in C.__dict__.items():
55
- if _is(p, B) and p.name == n and n not in excls:
55
+ if _isa(p, B) and p.name == n and n not in excls:
56
56
  yield p
57
57
 
58
58
 
@@ -252,9 +252,9 @@ class Property_RO(_PropertyBase):
252
252
  <https://Docs.Python.org/3/library/functools.html#functools.cache>}
253
253
  to I{cache} or I{memoize} the property value.
254
254
 
255
- @see: Luciano Ramalho, "Fluent Python", page 636, O'Reilly, Example
256
- 19-24, 2016 p. 636 or Example 22-28, 2022 p. 869+ and U{class
257
- Property<https://docs.Python.org/3/howto/descriptor.html>}.
255
+ @see: Luciano Ramalho, "Fluent Python", O'Reilly, Example 19-24, 2016
256
+ p. 636 or Example 22-28, 2022 p. 870 and U{class Property
257
+ <https://docs.Python.org/3/howto/descriptor.html>}.
258
258
  '''
259
259
  _fget = method if _FOR_DOCS else self._fget # XXX force method.__doc__ to epydoc
260
260
  _PropertyBase.__init__(self, method, _fget, self._fset_error)
pygeodesy/rhumb/bases.py CHANGED
@@ -33,8 +33,9 @@ from pygeodesy.errors import IntersectionError, RhumbError, _xdatum, \
33
33
  from pygeodesy.fmath import euclid, favg, sqrt_a, Fsum
34
34
  # from pygeodesy.formy import opposing # _MODS
35
35
  # from pygeodesy.fsums import Fsum # from .fmath
36
+ from pygeodesy.internals import _dunder_nameof, _under
36
37
  from pygeodesy.interns import NN, _coincident_, _COMMASPACE_, _Dash, \
37
- _dunder_nameof, _parallel_, _too_, _under
38
+ _parallel_, _too_
38
39
  from pygeodesy.karney import _atan2d, Caps, _CapsBase, _diff182, _fix90, \
39
40
  _norm180, GDict
40
41
  # from pygeodesy.ktm import KTransverseMercator, _AlpCoeffs # _MODS
@@ -51,7 +52,7 @@ from pygeodesy.vector3d import _intersect3d3, Vector3d # in .Intersection below
51
52
  from math import cos, fabs
52
53
 
53
54
  __all__ = ()
54
- __version__ = '24.04.07'
55
+ __version__ = '24.05.13'
55
56
 
56
57
  _anti_ = _Dash('anti')
57
58
  _rls = [] # instances of C{RbumbLine...} to be updated
pygeodesy/rhumb/solve.py CHANGED
@@ -21,7 +21,7 @@ from pygeodesy.solveBase import _SolveBase, _SolveLineBase
21
21
  from pygeodesy.utily import _unrollon, _Wrap, wrap360
22
22
 
23
23
  __all__ = _ALL_LAZY.rhumb_solve
24
- __version__ = '24.02.21'
24
+ __version__ = '24.04.13'
25
25
 
26
26
 
27
27
  class _RhumbSolveBase(_SolveBase):
@@ -356,7 +356,7 @@ __all__ += _ALL_DOCS(_RhumbSolveBase)
356
356
 
357
357
  if __name__ == '__main__':
358
358
 
359
- from pygeodesy.lazily import printf
359
+ from pygeodesy import printf
360
360
  from sys import argv
361
361
 
362
362
  def rhumb_intercept(rS, lat1, lon1, lat2, lon2, azi2, s23):
pygeodesy/solveBase.py CHANGED
@@ -9,10 +9,11 @@ from pygeodesy.constants import DIG
9
9
  from pygeodesy.datums import _earth_datum, _WGS84, _EWGS84
10
10
  # from pygeodesy.ellipsoids import _EWGS84 # from .datums
11
11
  from pygeodesy.errors import _AssertionError, _xkwds_get, _xkwds_item2
12
- from pygeodesy.interns import NN, _0_, _BACKSLASH_, _COMMASPACE_, _enquote, \
12
+ from pygeodesy.internals import _enquote, printf
13
+ from pygeodesy.interns import NN, _0_, _BACKSLASH_, _COMMASPACE_, \
13
14
  _EQUAL_, _Error_, _not_, _SPACE_, _UNUSED_
14
15
  from pygeodesy.karney import Caps, _CapsBase, GDict
15
- from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, printf, _unlazy
16
+ from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _unlazy
16
17
  from pygeodesy.named import callername, notOverloaded
17
18
  from pygeodesy.props import Property, Property_RO, property_RO, _update_all
18
19
  from pygeodesy.streprs import Fmt, fstr, fstrzs, pairs, strs
pygeodesy/streprs.py CHANGED
@@ -5,23 +5,24 @@ u'''Floating point and other formatting utilities.
5
5
  '''
6
6
 
7
7
  from pygeodesy.basics import isint, islistuple, isscalar, isstr, itemsorted, \
8
- _zip, _0_0
8
+ _zip, _0_0
9
9
  # from pygeodesy.constants import _0_0
10
10
  from pygeodesy.errors import _or, _AttributeError, _IsnotError, _TypeError, \
11
11
  _ValueError, _xkwds_get, _xkwds_item2, _xkwds_pop2
12
+ # from pygeodesy.internals import _dunder_nameof # from .lazily
12
13
  from pygeodesy.interns import NN, _0_, _0to9_, MISSING, _BAR_, _COMMASPACE_, \
13
14
  _DOT_, _E_, _ELLIPSIS_, _EQUAL_, _H_, _LR_PAIRS, \
14
15
  _N_, _name_, _not_, _not_scalar_, _PERCENT_, \
15
- _SPACE_, _STAR_, _UNDER_, _dunder_nameof
16
+ _SPACE_, _STAR_, _UNDER_
16
17
  from pygeodesy.interns import _convergence_, _distant_, _e_, _eps_, _exceeds_, \
17
18
  _EQUALSPACED_, _f_, _F_, _g_, _limit_, _no_, \
18
19
  _tolerance_ # PYCHOK used!
19
- from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS
20
+ from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _dunder_nameof
20
21
 
21
22
  from math import fabs, log10 as _log10
22
23
 
23
24
  __all__ = _ALL_LAZY.streprs
24
- __version__ = '24.05.04'
25
+ __version__ = '24.05.13'
25
26
 
26
27
  _at_ = 'at' # PYCHOK used!
27
28
  _EN_PREC = 6 # max MGRS/OSGR precision, 1 micrometer
pygeodesy/trf.py CHANGED
@@ -69,7 +69,7 @@ en/how-to-deal-with-etrs89-datum-and-time-dependent-transformation-parameters-45
69
69
  @var RefFrames.WGS84g1762: RefFrame(name='WGS84g1762', epoch=2005, datum=Datums.GRS80) .Xforms=(0, 0)
70
70
  '''
71
71
 
72
- from pygeodesy.basics import map1, neg, isidentifier, isstr, _xinstanceof, _xisscalar
72
+ from pygeodesy.basics import map1, neg, isidentifier, isstr, _xinstanceof, _xscalar
73
73
  from pygeodesy.constants import _float as _F, _0_0s, _0_0, _0_001, _0_5, _1_0
74
74
  from pygeodesy.datums import Datums, _earth_datum, _equall, _GDA2020_, _Names7, \
75
75
  _negastr, Transform, _WGS84, _EWGS84, _operator
@@ -91,7 +91,7 @@ from math import ceil as _ceil, fabs
91
91
  # import operator as _operator # from .datums
92
92
 
93
93
  __all__ = _ALL_LAZY.trf
94
- __version__ = '24.03.12'
94
+ __version__ = '24.05.13'
95
95
 
96
96
  _EP0CH = Epoch(0, low=0)
97
97
  _Es = {_EP0CH: _EP0CH} # L{Epoch}s, deleted below
@@ -568,7 +568,7 @@ class TRFXform7Tuple(_NamedTuple):
568
568
  return _NamedTuple.__hash__(self)
569
569
 
570
570
  def __mul__(self, factor):
571
- _xisscalar(factor=factor)
571
+ _xscalar(factor=factor)
572
572
  return type(self)((x * factor for x in self), name=_STAR_) # .fsums._mul_op
573
573
 
574
574
  def __neg__(self):
@@ -1733,7 +1733,7 @@ if __name__ == '__main__':
1733
1733
  def _main():
1734
1734
  from pygeodesy.basics import _args_kwds_names
1735
1735
  from pygeodesy.interns import _COLONSPACE_,_COMMA_, _NL_, _NLATvar_, _vs_
1736
- from pygeodesy.lazily import printf
1736
+ from pygeodesy import printf
1737
1737
  from time import localtime
1738
1738
 
1739
1739
  D = date2epoch.__name__
pygeodesy/units.py CHANGED
@@ -6,32 +6,30 @@ C{Str} from basic C{float}, C{int} respectively C{str} to
6
6
  named units as L{Degrees}, L{Feet}, L{Meter}, L{Radians}, etc.
7
7
  '''
8
8
 
9
- from pygeodesy.basics import isinstanceof, isscalar, isstr, issubclassof, \
10
- signOf
11
- from pygeodesy.constants import EPS, EPS1, PI, PI2, PI_2, \
12
- _umod_360, _0_0, _0_001, \
13
- _0_5, INT0 # PYCHOK for .mgrs, .namedTuples
14
- from pygeodesy.dms import F__F, F__F_, parseDMS, parseRad, \
15
- S_NUL, S_SEP, _toDMS, toDMS
16
- from pygeodesy.errors import _AssertionError, _IsnotError, TRFError, \
17
- UnitError, _xkwds, _xkwds_item2
9
+ from pygeodesy.basics import isinstanceof, isscalar, isstr, issubclassof, signOf
10
+ from pygeodesy.constants import EPS, EPS1, PI, PI2, PI_2, _umod_360, _0_0, \
11
+ _0_001, _0_5, INT0 # PYCHOK for .mgrs, .namedTuples
12
+ from pygeodesy.dms import F__F, F__F_, S_NUL, S_SEP, parseDMS, parseRad, \
13
+ _toDMS, toDMS
14
+ from pygeodesy.errors import _AssertionError, _IsnotError, TRFError, UnitError, \
15
+ _xkwds, _xkwds_item2
18
16
  from pygeodesy.interns import NN, _band_, _bearing_, _degrees_, _degrees2_, \
19
- _distance_, _E_, _easting_, _epoch_, _EW_, \
20
- _feet_, _height_, _lam_, _lat_, \
21
- _LatLon_, _lon_, _meter_, _meter2_, _N_, \
22
- _northing_, _NS_, _NSEW_, _number_, _PERCENT_, \
23
- _phi_, _precision_, _radians_, _radians2_, \
24
- _radius_, _S_, _scalar_, _units_, \
25
- _W_, _zone_, _std_ # PYCHOK used!
17
+ _distance_, _E_, _easting_, _epoch_, _EW_, _feet_, \
18
+ _height_, _lam_, _lat_, _LatLon_, _lon_, _meter_, \
19
+ _meter2_, _N_, _northing_, _NS_, _NSEW_, _number_, \
20
+ _PERCENT_, _phi_, _precision_, _radians_, _radians2_, \
21
+ _radius_, _S_, _scalar_, _units_, _W_, _zone_, \
22
+ _std_ # PYCHOK used!
26
23
  from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS, _getenv
27
24
  from pygeodesy.props import Property_RO
28
25
  # from pygeodesy.streprs import Fmt, fstr # from .unitsBase
29
26
  from pygeodesy.unitsBase import _Error, Float, Fmt, fstr, Int, _NamedUnit, \
30
27
  Radius, Str # PYCHOK shared .namedTuples
28
+
31
29
  from math import degrees, radians
32
30
 
33
31
  __all__ = _ALL_LAZY.units
34
- __version__ = '24.02.20'
32
+ __version__ = '24.05.10'
35
33
 
36
34
  _negative_falsed_ = 'negative, falsed'
37
35
 
pygeodesy/ups.py CHANGED
@@ -28,11 +28,12 @@ from pygeodesy.datums import _ellipsoidal_datum, _WGS84
28
28
  from pygeodesy.dms import degDMS, _neg, parseDMS2
29
29
  from pygeodesy.errors import RangeError, _ValueError
30
30
  from pygeodesy.fmath import hypot, hypot1, sqrt0
31
- from pygeodesy.interns import NN, _COMMASPACE_, _inside_, _N_, _pole_, \
32
- _range_, _S_, _scale0_, _SPACE_, _std_, \
33
- _to_, _UTM_, _under
34
- from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _getenv
35
- from pygeodesy.named import nameof, _xnamed
31
+ # from pygeodesy.internals import _under # from .named
32
+ from pygeodesy.interns import NN, _COMMASPACE_, _inside_, _N_, \
33
+ _pole_, _range_, _S_, _scale0_, \
34
+ _SPACE_, _std_, _to_, _UTM_
35
+ from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _getenv
36
+ from pygeodesy.named import nameof, _xnamed, _under
36
37
  from pygeodesy.namedTuples import EasNor2Tuple, UtmUps5Tuple, \
37
38
  UtmUps8Tuple, UtmUpsLatLon5Tuple
38
39
  from pygeodesy.props import deprecated_method, property_doc_, \
@@ -48,7 +49,7 @@ from pygeodesy.utmupsBase import Fmt, _LLEB, _hemi, _parseUTMUPS5, _to4lldn, \
48
49
  from math import atan2, fabs, radians, tan
49
50
 
50
51
  __all__ = _ALL_LAZY.ups
51
- __version__ = '23.09.29'
52
+ __version__ = '25.05.13'
52
53
 
53
54
  _BZ_UPS = _getenv('PYGEODESY_UPS_POLES', _std_) == _std_
54
55
  _Falsing = Meter(2000e3) # false easting and northing (C{meter})
pygeodesy/utily.py CHANGED
@@ -10,8 +10,7 @@ U{Vector-based geodesy<https://www.Movable-Type.co.UK/scripts/latlong-vectors.ht
10
10
  # make sure int/int division yields float quotient, see .basics
11
11
  from __future__ import division as _; del _ # PYCHOK semicolon
12
12
 
13
- from pygeodesy.basics import _copysign, isinstanceof, isint, isstr, neg, \
14
- _passargs
13
+ from pygeodesy.basics import _copysign, isinstanceof, isint, isstr, neg
15
14
  from pygeodesy.constants import EPS, EPS0, INF, NAN, PI, PI2, PI_2, R_M, \
16
15
  _M_KM, _M_NM, _M_SM, _0_0, _1__90, _0_5, _1_0, \
17
16
  _N_1_0, _2__PI, _10_0, _90_0, _N_90_0, _180_0, \
@@ -19,6 +18,7 @@ from pygeodesy.constants import EPS, EPS0, INF, NAN, PI, PI2, PI_2, R_M, \
19
18
  _float as _F, _isfinite, isnan, isnear0, \
20
19
  _over, _umod_360, _umod_PI2
21
20
  from pygeodesy.errors import _ValueError, _xkwds, _xkwds_get, _ALL_LAZY, _MODS
21
+ from pygeodesy.internals import _passargs # , _MODS?
22
22
  from pygeodesy.interns import _edge_, _radians_, _semi_circular_, _SPACE_
23
23
  # from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS # from .errors
24
24
  from pygeodesy.units import Degrees, Degrees_, Feet, Float, Lam, Lam_, \
@@ -27,7 +27,7 @@ from pygeodesy.units import Degrees, Degrees_, Feet, Float, Lam, Lam_, \
27
27
  from math import acos, asin, atan2, cos, degrees, fabs, radians, sin, tan # pow
28
28
 
29
29
  __all__ = _ALL_LAZY.utily
30
- __version__ = '24.04.04'
30
+ __version__ = '24.05.14'
31
31
 
32
32
  # read constant name "_M_Unit" as "meter per Unit"
33
33
  _M_CHAIN = _F( 20.1168) # yard2m(1) * 22
@@ -907,7 +907,7 @@ def truncate(x, ndigits=None):
907
907
  '''
908
908
  if isint(ndigits):
909
909
  p = _10_0**ndigits
910
- x = int(x * p) / p
910
+ x = int(x * p) / p
911
911
  return x
912
912
 
913
913
 
pygeodesy/utm.py CHANGED
@@ -40,9 +40,10 @@ from pygeodesy.dms import degDMS, parseDMS2
40
40
  from pygeodesy.errors import MGRSError, RangeError, _ValueError, \
41
41
  _xkwds_get
42
42
  from pygeodesy.fmath import fdot3, hypot, hypot1, _operator
43
+ # from pygeodesy.internals import _under # from .utmupsBase
43
44
  from pygeodesy.interns import MISSING, NN, _by_, _COMMASPACE_, _N_, \
44
45
  _NS_, _outside_, _range_, _S_, _scale0_, \
45
- _SPACE_, _UTM_, _V_, _X_, _zone_, _under
46
+ _SPACE_, _UTM_, _V_, _X_, _zone_
46
47
  from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS
47
48
  # from pygeodesy.named import _xnamed # from .utmupsBase
48
49
  from pygeodesy.namedTuples import EasNor2Tuple, UtmUps5Tuple, \
@@ -54,9 +55,9 @@ from pygeodesy.units import Band, Int, Lat, Lon, Meter, Zone
54
55
  from pygeodesy.utily import atan1, degrees90, degrees180, sincos2
55
56
  from pygeodesy.utmupsBase import _hemi, _LLEB, _parseUTMUPS5, _to4lldn, \
56
57
  _to3zBhp, _to3zll, _UPS_LATS, _UPS_ZONE, \
57
- _UTM_LAT_MAX, _UTM_ZONE_MAX, \
58
- _UTM_LAT_MIN, _UTM_ZONE_MIN, \
59
- _UTM_ZONE_OFF_MAX, UtmUpsBase, _xnamed
58
+ _UTM_LAT_MAX, _UTM_ZONE_MAX, _under, \
59
+ _UTM_LAT_MIN, _UTM_ZONE_MIN, _xnamed, \
60
+ _UTM_ZONE_OFF_MAX, UtmUpsBase
60
61
 
61
62
  from math import asinh, atanh, atan2, cos, cosh, degrees, fabs, \
62
63
  radians, sin, sinh, tan, tanh
pygeodesy/utmupsBase.py CHANGED
@@ -13,11 +13,12 @@ from pygeodesy.dms import degDMS, parseDMS2
13
13
  from pygeodesy.ellipsoidalBase import LatLonEllipsoidalBase as _LLEB
14
14
  from pygeodesy.errors import _or, ParseError, _parseX, _ValueError, \
15
15
  _xkwds, _xkwds_get, _xkwds_not
16
+ # from pygeodesy.internals import _under # from .named
16
17
  from pygeodesy.interns import NN, _A_, _B_, _COMMA_, _Error_, \
17
18
  _gamma_, _n_a_, _not_, _N_, _NS_, _PLUS_, \
18
- _scale_, _SPACE_, _Y_, _Z_, _under
19
+ _scale_, _SPACE_, _Y_, _Z_
19
20
  from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
20
- from pygeodesy.named import _NamedBase, nameof, _xnamed
21
+ from pygeodesy.named import _NamedBase, nameof, _xnamed, _under
21
22
  from pygeodesy.namedTuples import EasNor2Tuple, LatLonDatum5Tuple
22
23
  from pygeodesy.props import deprecated_method, property_doc_, _update_all, \
23
24
  deprecated_property_RO, Property_RO, property_RO
@@ -26,7 +27,7 @@ from pygeodesy.units import Band, Easting, Northing, Scalar, Zone
26
27
  from pygeodesy.utily import _Wrap, wrap360
27
28
 
28
29
  __all__ = _ALL_LAZY.utmupsBase
29
- __version__ = '24.04.07'
30
+ __version__ = '24.05.13'
30
31
 
31
32
  _UPS_BANDS = _A_, _B_, _Y_, _Z_ # UPS polar bands SE, SW, NE, NW
32
33
  # _UTM_BANDS = _MODS.utm._Bands
pygeodesy/vector3dBase.py CHANGED
@@ -27,10 +27,11 @@ from pygeodesy.streprs import Fmt, strs, unstr
27
27
  from pygeodesy.units import Float, Scalar
28
28
  # from pygeodesy.utily import sincos2 # _MODS
29
29
 
30
+ # from builtints import hash, int, isinstance, map, max, round, type, zip
30
31
  from math import atan2, ceil, fabs, floor, trunc
31
32
 
32
33
  __all__ = _ALL_LAZY.vector3dBase
33
- __version__ = '24.03.24'
34
+ __version__ = '24.05.10'
34
35
 
35
36
 
36
37
  class Vector3dBase(_NamedBase): # sync __methods__ with .fsums.Fsum