pygeodesy 24.5.8__py2.py3-none-any.whl → 24.5.24__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 (83) hide show
  1. {PyGeodesy-24.5.8.dist-info → PyGeodesy-24.5.24.dist-info}/METADATA +2 -2
  2. PyGeodesy-24.5.24.dist-info/RECORD +116 -0
  3. pygeodesy/__init__.py +16 -12
  4. pygeodesy/__main__.py +9 -10
  5. pygeodesy/albers.py +42 -42
  6. pygeodesy/auxilats/__init__.py +1 -1
  7. pygeodesy/auxilats/__main__.py +7 -10
  8. pygeodesy/auxilats/auxAngle.py +32 -31
  9. pygeodesy/auxilats/auxLat.py +81 -51
  10. pygeodesy/azimuthal.py +123 -124
  11. pygeodesy/basics.py +165 -176
  12. pygeodesy/booleans.py +14 -15
  13. pygeodesy/cartesianBase.py +25 -23
  14. pygeodesy/clipy.py +3 -3
  15. pygeodesy/constants.py +8 -6
  16. pygeodesy/css.py +50 -42
  17. pygeodesy/datums.py +50 -48
  18. pygeodesy/dms.py +6 -6
  19. pygeodesy/ecef.py +27 -27
  20. pygeodesy/elevations.py +2 -2
  21. pygeodesy/ellipsoidalBase.py +28 -27
  22. pygeodesy/ellipsoidalBaseDI.py +8 -7
  23. pygeodesy/ellipsoidalNvector.py +11 -12
  24. pygeodesy/ellipsoids.py +41 -35
  25. pygeodesy/elliptic.py +12 -10
  26. pygeodesy/epsg.py +4 -3
  27. pygeodesy/errors.py +35 -13
  28. pygeodesy/etm.py +62 -53
  29. pygeodesy/fmath.py +48 -41
  30. pygeodesy/formy.py +93 -65
  31. pygeodesy/frechet.py +117 -102
  32. pygeodesy/fstats.py +52 -46
  33. pygeodesy/fsums.py +169 -145
  34. pygeodesy/gars.py +10 -9
  35. pygeodesy/geodesicw.py +32 -30
  36. pygeodesy/geodesicx/__init__.py +1 -1
  37. pygeodesy/geodesicx/__main__.py +4 -4
  38. pygeodesy/geodesicx/gx.py +40 -32
  39. pygeodesy/geodesicx/gxarea.py +15 -12
  40. pygeodesy/geodesicx/gxbases.py +3 -4
  41. pygeodesy/geodesicx/gxline.py +6 -8
  42. pygeodesy/geodsolve.py +28 -26
  43. pygeodesy/geohash.py +47 -44
  44. pygeodesy/geoids.py +37 -35
  45. pygeodesy/hausdorff.py +112 -99
  46. pygeodesy/heights.py +136 -129
  47. pygeodesy/internals.py +576 -0
  48. pygeodesy/interns.py +6 -207
  49. pygeodesy/iters.py +22 -19
  50. pygeodesy/karney.py +18 -15
  51. pygeodesy/ktm.py +31 -24
  52. pygeodesy/latlonBase.py +12 -11
  53. pygeodesy/lazily.py +140 -218
  54. pygeodesy/lcc.py +24 -25
  55. pygeodesy/ltp.py +83 -71
  56. pygeodesy/ltpTuples.py +7 -5
  57. pygeodesy/mgrs.py +5 -4
  58. pygeodesy/named.py +136 -49
  59. pygeodesy/namedTuples.py +33 -25
  60. pygeodesy/nvectorBase.py +10 -9
  61. pygeodesy/osgr.py +14 -12
  62. pygeodesy/points.py +13 -13
  63. pygeodesy/props.py +7 -7
  64. pygeodesy/rhumb/__init__.py +1 -1
  65. pygeodesy/rhumb/bases.py +3 -2
  66. pygeodesy/rhumb/solve.py +2 -2
  67. pygeodesy/solveBase.py +8 -7
  68. pygeodesy/sphericalTrigonometry.py +5 -5
  69. pygeodesy/streprs.py +8 -7
  70. pygeodesy/trf.py +8 -8
  71. pygeodesy/triaxials.py +67 -63
  72. pygeodesy/units.py +48 -50
  73. pygeodesy/unitsBase.py +24 -11
  74. pygeodesy/ups.py +7 -6
  75. pygeodesy/utily.py +4 -4
  76. pygeodesy/utm.py +53 -52
  77. pygeodesy/utmupsBase.py +11 -8
  78. pygeodesy/vector2d.py +6 -7
  79. pygeodesy/vector3d.py +16 -17
  80. pygeodesy/vector3dBase.py +5 -5
  81. PyGeodesy-24.5.8.dist-info/RECORD +0 -115
  82. {PyGeodesy-24.5.8.dist-info → PyGeodesy-24.5.24.dist-info}/WHEEL +0 -0
  83. {PyGeodesy-24.5.8.dist-info → PyGeodesy-24.5.24.dist-info}/top_level.txt +0 -0
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
@@ -41,8 +41,8 @@ from pygeodesy.fmath import favg, fdot, hypot, Fsum, fsum
41
41
  from pygeodesy.formy import _bearingTo2, equirectangular_, _spherical_datum
42
42
  from pygeodesy.interns import NN, _colinear_, _COMMASPACE_, _composite_, \
43
43
  _DEQUALSPACED_, _ELLIPSIS_, _EW_, _immutable_, \
44
- _near_, _no_, _not_, _NS_, _point_, _SPACE_, \
45
- _UNDER_, _valid_ # _lat_, _lon_
44
+ _near_, _no_, _NS_, _point_, _SPACE_, _UNDER_, \
45
+ _valid_ # _lat_, _lon_
46
46
  from pygeodesy.iters import LatLon2PsxyIter, PointsIter, points2
47
47
  from pygeodesy.latlonBase import LatLonBase, _latlonheight3, \
48
48
  _ALL_DOCS, _ALL_LAZY, _MODS
@@ -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.19'
66
66
 
67
67
  _ilat_ = 'ilat'
68
68
  _ilon_ = 'ilon'
@@ -92,7 +92,7 @@ class LatLon_(LatLonBase): # XXX in heights._HeightBase.height
92
92
  # python3 -m timeit -s "from pygeodesy... import LatLonBase as LL" "LL(0, 0)" 2.14 usec
93
93
  # python3 -m timeit -s "from pygeodesy import LatLon_" "LatLon_(0, 0)" 216 nsec
94
94
 
95
- def __init__(self, latlonh, lon=None, height=0, wrap=False, name=NN, datum=None):
95
+ def __init__(self, latlonh, lon=None, height=0, wrap=False, datum=None, **name):
96
96
  '''New L{LatLon_}.
97
97
 
98
98
  @note: The lat- and longitude values are taken I{as-given,
@@ -283,7 +283,7 @@ class _Basequence(_Sequence): # immutable, on purpose
283
283
  '''
284
284
  for i in self._findall(point, start_end):
285
285
  return i
286
- raise _IndexError(self._itemname, point, txt=_not_('found'))
286
+ raise _IndexError(self._itemname, point, txt_not_='found')
287
287
 
288
288
  @property_RO
289
289
  def isNumpy2(self): # PYCHOK no cover
@@ -1156,7 +1156,7 @@ def fractional(points, fi, j=None, wrap=None, LatLon=None, Vector=None, **kwds):
1156
1156
  '''
1157
1157
  if LatLon and Vector: # PYCHOK no cover
1158
1158
  kwds = _xkwds(kwds, fi=fi, LatLon=LatLon, Vector=Vector)
1159
- raise _TypeError(txt=fractional.__name__, **kwds)
1159
+ raise _TypeError(txt__=fractional, **kwds)
1160
1160
  w = wrap if LatLon else False # intermediateTo
1161
1161
  try:
1162
1162
  if not isscalar(fi) or fi < 0:
@@ -1168,7 +1168,7 @@ def fractional(points, fi, j=None, wrap=None, LatLon=None, Vector=None, **kwds):
1168
1168
  elif Vector:
1169
1169
  p = Vector(p.x, p.y, p.z, **kwds)
1170
1170
  except (IndexError, TypeError):
1171
- raise _IndexError(fi=fi, points=points, wrap=w, txt=fractional.__name__)
1171
+ raise _IndexError(fi=fi, points=points, wrap=w, txt__=fractional)
1172
1172
  return p
1173
1173
 
1174
1174
 
@@ -1191,12 +1191,12 @@ def _fractional(points, fi, j, fin=None, wrap=None): # in .frechet.py
1191
1191
  elif _isLatLon(p): # backward compatible default
1192
1192
  p = LatLon2Tuple(favg(p.lat, q.lat, f=r),
1193
1193
  favg(p.lon, q.lon, f=r),
1194
- name=fractional.__name__)
1194
+ name__=fractional)
1195
1195
  else: # assume p and q are cartesian or vectorial
1196
1196
  z = p.z if p.z is q.z else favg(p.z, q.z, f=r)
1197
1197
  p = Vector3Tuple(favg(p.x, q.x, f=r),
1198
1198
  favg(p.y, q.y, f=r), z,
1199
- name=fractional.__name__)
1199
+ name__=fractional)
1200
1200
  return p
1201
1201
 
1202
1202
 
@@ -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)
@@ -9,7 +9,7 @@ u'''Package of lazily imported C{rhumb} modules L{rhumb.aux_}, L{rhumb.ekx} and
9
9
  from pygeodesy.lazily import _ALL_LAZY, _ALL_OTHER, _lazy_import_as, _unLazy0
10
10
 
11
11
  __all__ = _ALL_LAZY.rhumb
12
- __version__ = '23.12.29'
12
+ __version__ = '24.05.24'
13
13
 
14
14
  if _unLazy0: # or _isfrozen
15
15
  from pygeodesy.rhumb.aux_ import RhumbAux, RhumbLineAux
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, \
13
- _EQUAL_, _Error_, _not_, _SPACE_, _UNUSED_
12
+ from pygeodesy.internals import _enquote, printf
13
+ from pygeodesy.interns import NN, _0_, _BACKSLASH_, _COMMASPACE_, \
14
+ _EQUAL_, _Error_, _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
@@ -22,7 +23,7 @@ from pygeodesy.utily import unroll180, wrap360 # PYCHOK shared
22
23
  from subprocess import PIPE as _PIPE, Popen as _Popen, STDOUT as _STDOUT
23
24
 
24
25
  __all__ = _ALL_LAZY.solveBase
25
- __version__ = '24.03.15'
26
+ __version__ = '24.05.20'
26
27
 
27
28
  _ERROR_ = 'ERROR'
28
29
  _text_True = dict() if _unlazy else dict(text=True)
@@ -105,7 +106,7 @@ class _SolveLineSolveBase(_CapsBase):
105
106
  if floats:
106
107
  v = map(float, v)
107
108
  r = GDict(_zip(n, v)) # strict=True
108
- return self._iter2tion(r, r)
109
+ return self._iter2tion(r, **r)
109
110
 
110
111
  @property_RO
111
112
  def invokation(self):
@@ -136,7 +137,7 @@ class _SolveLineSolveBase(_CapsBase):
136
137
  s = self.status
137
138
  if s:
138
139
  raise self._Error(cmd=_cmd_stdin_(c, i), status=s,
139
- txt=_not_(_0_))
140
+ txt_not_=_0_)
140
141
  if self.verbose: # PYCHOK no cover
141
142
  self._print(r)
142
143
  return r
@@ -220,7 +221,7 @@ class _SolveLineSolveBase(_CapsBase):
220
221
  _ = self.version # test path and ...
221
222
  if self.status: # ... return code
222
223
  S_p = Solve_path or {self._Solve_name: _enquote(path)}
223
- raise self._Error(status=self.status, txt=_not_(_0_), **S_p)
224
+ raise self._Error(status=self.status, txt_not_=_0_, **S_p)
224
225
  hold = path
225
226
  finally: # restore in case of error
226
227
  if self._Solve_path != hold:
@@ -30,9 +30,9 @@ from pygeodesy.formy import antipode_, bearing_, _bearingTo2, excessAbc_, \
30
30
  excessGirard_, excessLHuilier_, opposing_, _radical2, \
31
31
  vincentys_
32
32
  from pygeodesy.interns import _1_, _2_, _coincident_, _composite_, _colinear_, \
33
- _concentric_, _convex_, _end_, _infinite_, _invalid_,\
34
- _line_, _near_, _not_, _null_, _parallel_, _point_, \
35
- _SPACE_, _too_
33
+ _concentric_, _convex_, _end_, _infinite_, \
34
+ _invalid_, _line_, _near_, _null_, _parallel_, \
35
+ _point_, _SPACE_, _too_
36
36
  from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _ALL_OTHER
37
37
  # from pygeodesy.nvectorBase import NvectorBase, sumOf # _MODE
38
38
  from pygeodesy.namedTuples import LatLon2Tuple, LatLon3Tuple, NearestOn3Tuple, \
@@ -54,7 +54,7 @@ from pygeodesy.vector3d import sumOf, Vector3d
54
54
  from math import asin, atan2, cos, degrees, fabs, radians, sin
55
55
 
56
56
  __all__ = _ALL_LAZY.sphericalTrigonometry
57
- __version__ = '24.04.07'
57
+ __version__ = '24.045.19'
58
58
 
59
59
  _PI_EPS4 = PI - EPS4
60
60
  if _PI_EPS4 >= PI:
@@ -494,7 +494,7 @@ class LatLon(LatLonSphericalBase):
494
494
  s0 = s
495
495
  else:
496
496
  t = _Fmt.SQUARE(points=i)
497
- raise _ValueError(t, p2, wrap=wrap, txt=_not_(_convex_))
497
+ raise _ValueError(t, p2, wrap=wrap, txt_not_=_convex_)
498
498
  gc1, v1 = gc, v2
499
499
 
500
500
  return True # inside
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
- _N_, _name_, _not_, _not_scalar_, _PERCENT_, \
15
- _SPACE_, _STAR_, _UNDER_, _dunder_nameof
15
+ _N_, _name_, _not_scalar_, _PERCENT_, _SPACE_, \
16
+ _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.19'
25
26
 
26
27
  _at_ = 'at' # PYCHOK used!
27
28
  _EN_PREC = 6 # max MGRS/OSGR precision, 1 micrometer
@@ -498,11 +499,11 @@ def _streprs(prec, objs, fmt, ints, force, strepr):
498
499
  f = fmt.replace(_DOTSTAR_, Fmt.DOT(abs(prec)))
499
500
  _ = f % (_0_0,)
500
501
  except (TypeError, ValueError):
501
- raise _ValueError(fmt=fmt, txt=_not_(repr(_DOTSTAR_)))
502
+ raise _ValueError(fmt=fmt, txt_not_=repr(_DOTSTAR_))
502
503
  fmt = f
503
504
 
504
505
  else:
505
- raise _ValueError(fmt=fmt, txt=_not_(repr(_Fspec_)))
506
+ raise _ValueError(fmt=fmt, txt_not_=repr(_Fspec_))
506
507
 
507
508
  for i, o in enumerate(objs):
508
509
  if force or isinstance(o, float):
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.21'
95
95
 
96
96
  _EP0CH = Epoch(0, low=0)
97
97
  _Es = {_EP0CH: _EP0CH} # L{Epoch}s, deleted below
@@ -242,7 +242,7 @@ class RefFrame(_NamedEnumItem):
242
242
  return _toRefFrame(point, reframe2, reframe=self, **_xkwds(epoch_epoch2_name,
243
243
  name=_xattr(reframe2, name=self.name)))
244
244
 
245
- def toStr(self, epoch=None, name=NN, **unused): # PYCHOK expected
245
+ def toStr(self, epoch=None, name=NN, **unused): # PYCHOK signature
246
246
  '''Return this reference frame as a string.
247
247
 
248
248
  @kwarg epoch: Override this reframe's epoch (C{scalar} or C{str}).
@@ -383,14 +383,14 @@ class TransformXform(Transform):
383
383
  def __hash__(self):
384
384
  return Transform.__hash__(self)
385
385
 
386
- def inverse(self, name=NN):
386
+ def inverse(self, **name):
387
387
  '''Return the inverse of this transform.
388
388
 
389
- @kwarg name: Optional, unique name (C{str}).
389
+ @kwarg name: Optional, unique C{B{name}=NN} (C{str}).
390
390
 
391
391
  @return: Inverse (L{TransformXform}), unregistered.
392
392
  '''
393
- r = Transform.inverse(name=name)
393
+ r = Transform.inverse(self, **name)
394
394
  r._Xform = r.Xform.inverse()
395
395
  return r
396
396
 
@@ -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__