pygeodesy 24.5.15__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 (72) hide show
  1. {PyGeodesy-24.5.15.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 +1 -1
  4. pygeodesy/albers.py +41 -41
  5. pygeodesy/auxilats/__init__.py +1 -1
  6. pygeodesy/auxilats/auxAngle.py +32 -31
  7. pygeodesy/auxilats/auxLat.py +80 -51
  8. pygeodesy/azimuthal.py +123 -124
  9. pygeodesy/basics.py +8 -6
  10. pygeodesy/booleans.py +11 -12
  11. pygeodesy/cartesianBase.py +25 -23
  12. pygeodesy/clipy.py +3 -3
  13. pygeodesy/css.py +50 -42
  14. pygeodesy/datums.py +42 -41
  15. pygeodesy/dms.py +6 -6
  16. pygeodesy/ecef.py +23 -24
  17. pygeodesy/ellipsoidalBase.py +28 -27
  18. pygeodesy/ellipsoidalBaseDI.py +3 -4
  19. pygeodesy/ellipsoidalNvector.py +11 -12
  20. pygeodesy/ellipsoids.py +41 -35
  21. pygeodesy/elliptic.py +3 -4
  22. pygeodesy/epsg.py +4 -3
  23. pygeodesy/errors.py +34 -12
  24. pygeodesy/etm.py +62 -54
  25. pygeodesy/fmath.py +36 -30
  26. pygeodesy/formy.py +93 -65
  27. pygeodesy/frechet.py +117 -102
  28. pygeodesy/fstats.py +21 -14
  29. pygeodesy/fsums.py +67 -57
  30. pygeodesy/gars.py +10 -9
  31. pygeodesy/geodesicw.py +19 -17
  32. pygeodesy/geodesicx/__init__.py +1 -1
  33. pygeodesy/geodesicx/gx.py +40 -32
  34. pygeodesy/geodesicx/gxarea.py +12 -9
  35. pygeodesy/geodesicx/gxbases.py +3 -4
  36. pygeodesy/geodesicx/gxline.py +6 -8
  37. pygeodesy/geodsolve.py +28 -27
  38. pygeodesy/geohash.py +47 -44
  39. pygeodesy/geoids.py +34 -32
  40. pygeodesy/hausdorff.py +112 -99
  41. pygeodesy/heights.py +134 -127
  42. pygeodesy/internals.py +14 -9
  43. pygeodesy/interns.py +3 -6
  44. pygeodesy/iters.py +19 -17
  45. pygeodesy/karney.py +15 -12
  46. pygeodesy/ktm.py +25 -18
  47. pygeodesy/latlonBase.py +12 -11
  48. pygeodesy/lazily.py +4 -4
  49. pygeodesy/lcc.py +24 -25
  50. pygeodesy/ltp.py +83 -71
  51. pygeodesy/ltpTuples.py +7 -5
  52. pygeodesy/mgrs.py +3 -3
  53. pygeodesy/named.py +126 -42
  54. pygeodesy/namedTuples.py +33 -25
  55. pygeodesy/nvectorBase.py +7 -7
  56. pygeodesy/points.py +9 -9
  57. pygeodesy/rhumb/__init__.py +1 -1
  58. pygeodesy/solveBase.py +5 -5
  59. pygeodesy/sphericalTrigonometry.py +5 -5
  60. pygeodesy/streprs.py +5 -5
  61. pygeodesy/trf.py +5 -5
  62. pygeodesy/triaxials.py +67 -63
  63. pygeodesy/units.py +35 -35
  64. pygeodesy/unitsBase.py +24 -11
  65. pygeodesy/utm.py +53 -53
  66. pygeodesy/utmupsBase.py +10 -8
  67. pygeodesy/vector2d.py +6 -7
  68. pygeodesy/vector3d.py +16 -17
  69. pygeodesy/vector3dBase.py +4 -5
  70. PyGeodesy-24.5.15.dist-info/RECORD +0 -116
  71. {PyGeodesy-24.5.15.dist-info → PyGeodesy-24.5.24.dist-info}/WHEEL +0 -0
  72. {PyGeodesy-24.5.15.dist-info → PyGeodesy-24.5.24.dist-info}/top_level.txt +0 -0
pygeodesy/solveBase.py CHANGED
@@ -11,7 +11,7 @@ from pygeodesy.datums import _earth_datum, _WGS84, _EWGS84
11
11
  from pygeodesy.errors import _AssertionError, _xkwds_get, _xkwds_item2
12
12
  from pygeodesy.internals import _enquote, printf
13
13
  from pygeodesy.interns import NN, _0_, _BACKSLASH_, _COMMASPACE_, \
14
- _EQUAL_, _Error_, _not_, _SPACE_, _UNUSED_
14
+ _EQUAL_, _Error_, _SPACE_, _UNUSED_
15
15
  from pygeodesy.karney import Caps, _CapsBase, GDict
16
16
  from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _unlazy
17
17
  from pygeodesy.named import callername, notOverloaded
@@ -23,7 +23,7 @@ from pygeodesy.utily import unroll180, wrap360 # PYCHOK shared
23
23
  from subprocess import PIPE as _PIPE, Popen as _Popen, STDOUT as _STDOUT
24
24
 
25
25
  __all__ = _ALL_LAZY.solveBase
26
- __version__ = '24.03.15'
26
+ __version__ = '24.05.20'
27
27
 
28
28
  _ERROR_ = 'ERROR'
29
29
  _text_True = dict() if _unlazy else dict(text=True)
@@ -106,7 +106,7 @@ class _SolveLineSolveBase(_CapsBase):
106
106
  if floats:
107
107
  v = map(float, v)
108
108
  r = GDict(_zip(n, v)) # strict=True
109
- return self._iter2tion(r, r)
109
+ return self._iter2tion(r, **r)
110
110
 
111
111
  @property_RO
112
112
  def invokation(self):
@@ -137,7 +137,7 @@ class _SolveLineSolveBase(_CapsBase):
137
137
  s = self.status
138
138
  if s:
139
139
  raise self._Error(cmd=_cmd_stdin_(c, i), status=s,
140
- txt=_not_(_0_))
140
+ txt_not_=_0_)
141
141
  if self.verbose: # PYCHOK no cover
142
142
  self._print(r)
143
143
  return r
@@ -221,7 +221,7 @@ class _SolveLineSolveBase(_CapsBase):
221
221
  _ = self.version # test path and ...
222
222
  if self.status: # ... return code
223
223
  S_p = Solve_path or {self._Solve_name: _enquote(path)}
224
- raise self._Error(status=self.status, txt=_not_(_0_), **S_p)
224
+ raise self._Error(status=self.status, txt_not_=_0_, **S_p)
225
225
  hold = path
226
226
  finally: # restore in case of error
227
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
@@ -12,8 +12,8 @@ from pygeodesy.errors import _or, _AttributeError, _IsnotError, _TypeError, \
12
12
  # from pygeodesy.internals import _dunder_nameof # from .lazily
13
13
  from pygeodesy.interns import NN, _0_, _0to9_, MISSING, _BAR_, _COMMASPACE_, \
14
14
  _DOT_, _E_, _ELLIPSIS_, _EQUAL_, _H_, _LR_PAIRS, \
15
- _N_, _name_, _not_, _not_scalar_, _PERCENT_, \
16
- _SPACE_, _STAR_, _UNDER_
15
+ _N_, _name_, _not_scalar_, _PERCENT_, _SPACE_, \
16
+ _STAR_, _UNDER_
17
17
  from pygeodesy.interns import _convergence_, _distant_, _e_, _eps_, _exceeds_, \
18
18
  _EQUALSPACED_, _f_, _F_, _g_, _limit_, _no_, \
19
19
  _tolerance_ # PYCHOK used!
@@ -22,7 +22,7 @@ from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _dunder_nameof
22
22
  from math import fabs, log10 as _log10
23
23
 
24
24
  __all__ = _ALL_LAZY.streprs
25
- __version__ = '24.05.13'
25
+ __version__ = '24.05.19'
26
26
 
27
27
  _at_ = 'at' # PYCHOK used!
28
28
  _EN_PREC = 6 # max MGRS/OSGR precision, 1 micrometer
@@ -499,11 +499,11 @@ def _streprs(prec, objs, fmt, ints, force, strepr):
499
499
  f = fmt.replace(_DOTSTAR_, Fmt.DOT(abs(prec)))
500
500
  _ = f % (_0_0,)
501
501
  except (TypeError, ValueError):
502
- raise _ValueError(fmt=fmt, txt=_not_(repr(_DOTSTAR_)))
502
+ raise _ValueError(fmt=fmt, txt_not_=repr(_DOTSTAR_))
503
503
  fmt = f
504
504
 
505
505
  else:
506
- raise _ValueError(fmt=fmt, txt=_not_(repr(_Fspec_)))
506
+ raise _ValueError(fmt=fmt, txt_not_=repr(_Fspec_))
507
507
 
508
508
  for i, o in enumerate(objs):
509
509
  if force or isinstance(o, float):
pygeodesy/trf.py CHANGED
@@ -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.05.13'
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
 
pygeodesy/triaxials.py CHANGED
@@ -46,8 +46,8 @@ from pygeodesy.interns import NN, _a_, _b_, _beta_, _c_, _distant_, _finite_, \
46
46
  _NOTEQUAL_, _null_, _opposite_, _outside_, _SPACE_, \
47
47
  _spherical_, _too_, _x_, _y_
48
48
  # from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS # from .vector3d
49
- from pygeodesy.named import _NamedEnum, _NamedEnumItem, _NamedTuple, _Pass, \
50
- _lazyNamedEnumItem as _lazy
49
+ from pygeodesy.named import _lazyNamedEnumItem as _lazy, _name__, _NamedEnum, \
50
+ _NamedEnumItem, _NamedTuple, _Pass
51
51
  from pygeodesy.namedTuples import LatLon3Tuple, Vector3Tuple, Vector4Tuple
52
52
  from pygeodesy.props import Property_RO, property_RO
53
53
  # from pygeodesy.streprs import Fmt # from .datums
@@ -59,7 +59,7 @@ from pygeodesy.vector3d import _otherV3d, Vector3d, _ALL_LAZY, _MODS
59
59
  from math import atan2, fabs, sqrt
60
60
 
61
61
  __all__ = _ALL_LAZY.triaxials
62
- __version__ = '24.04.30'
62
+ __version__ = '24.05.21'
63
63
 
64
64
  _not_ordered_ = _not_('ordered')
65
65
  _omega_ = 'omega'
@@ -185,7 +185,7 @@ class Triaxial_(_NamedEnumItem):
185
185
  _ijk = _kji = None
186
186
  _unordered = True
187
187
 
188
- def __init__(self, a_triaxial, b=None, c=None, name=NN):
188
+ def __init__(self, a_triaxial, b=None, c=None, **name):
189
189
  '''New I{unordered} L{Triaxial_}.
190
190
 
191
191
  @arg a_triaxial: Large, C{X} semi-axis (C{scalar}, conventionally in
@@ -194,14 +194,16 @@ class Triaxial_(_NamedEnumItem):
194
194
  if C{B{a_triaxial} is scalar}, ignored otherwise.
195
195
  @kwarg c: Small, C{Z} semi-axis (C{meter}, same units as B{C{a}}), required
196
196
  if C{B{a_triaxial} is scalar}, ignored otherwise.
197
- @kwarg name: Optional name (C{str}).
197
+ @kwarg name: Optional C{B{name}=NN} (C{str}).
198
198
 
199
199
  @raise TriaxialError: Invalid semi-axis or -axes.
200
200
  '''
201
201
  try:
202
- a = a_triaxial
203
- t = a._abc3 if isinstance(a, Triaxial_) else (
204
- Radius(a=a), Radius(b=b), Radius(c=c))
202
+ try:
203
+ a = a_triaxial
204
+ t = a._abc3
205
+ except AttributeError:
206
+ t = Radius(a=a), Radius(b=b), Radius(c=c)
205
207
  except (TypeError, ValueError) as x:
206
208
  raise TriaxialError(a=a, b=b, c=c, cause=x)
207
209
  if name:
@@ -345,15 +347,15 @@ class Triaxial_(_NamedEnumItem):
345
347
  Triaxial_._Elliptic = E = _MODS.elliptic.Elliptic # overwrite property_RO
346
348
  return E
347
349
 
348
- def hartzell4(self, pov, los=False, name=NN):
350
+ def hartzell4(self, pov, los=False, **name):
349
351
  '''Compute the intersection of this triaxial's surface with a Line-Of-Sight
350
352
  from a Point-Of-View in space.
351
353
 
352
354
  @see: Function L{hartzell4<triaxials.hartzell4>} for further details.
353
355
  '''
354
- return hartzell4(pov, los=los, tri_biax=self, name=name)
356
+ return hartzell4(pov, los=los, tri_biax=self, **name)
355
357
 
356
- def height4(self, x_xyz, y=None, z=None, normal=True, eps=EPS):
358
+ def height4(self, x_xyz, y=None, z=None, normal=True, eps=EPS, **name):
357
359
  '''Compute the projection on and the height above or below this triaxial's surface.
358
360
 
359
361
  @arg x_xyz: X component (C{scalar}) or a cartesian (C{Cartesian}, L{Ecef9Tuple},
@@ -364,6 +366,7 @@ class Triaxial_(_NamedEnumItem):
364
366
  otherwise the C{radial} line to the center of this triaxial (C{bool}).
365
367
  @kwarg eps: Tolerance for root finding and validation (C{scalar}), use a negative
366
368
  value to skip validation.
369
+ @kwarg name: Optional, overriding C{B{name}="heigh4"} (C{str}).
367
370
 
368
371
  @return: L{Vector4Tuple}C{(x, y, z, h)} with the cartesian coordinates C{x}, C{y}
369
372
  and C{z} of the projection on or the intersection with and with the height
@@ -396,7 +399,8 @@ class Triaxial_(_NamedEnumItem):
396
399
  raise TriaxialError(x=x, y=y, z=z, cause=e)
397
400
  if h > 0 and self.sideOf(v, eps=EPS0) < 0:
398
401
  h = -h # below the surface
399
- return Vector4Tuple(x, y, z, h, iteration=i, name=self.height4.__name__)
402
+ return Vector4Tuple(x, y, z, h, iteration=i,
403
+ name=_name__(name, name__=self.height4))
400
404
 
401
405
  @Property_RO
402
406
  def isOrdered(self):
@@ -453,7 +457,7 @@ class Triaxial_(_NamedEnumItem):
453
457
  '''
454
458
  d = max(self._abc3)
455
459
  t = tuple(((d / x)**2 if x != d else _1_0) for x in self._abc3)
456
- return Vector3d(*t, name=self.normal3d.__name__)
460
+ return Vector3d(*t, name__=self.normal3d)
457
461
 
458
462
  def _order3(self, *abc, **reverse): # reverse=False
459
463
  '''(INTERNAL) Un-/Order C{a}, C{b} and C{c}.
@@ -546,9 +550,11 @@ class Triaxial_(_NamedEnumItem):
546
550
  '''
547
551
  return _sideOf(_otherV3d_(x_xyz, y, z).xyz, self._abc3, eps=eps)
548
552
 
549
- def toEllipsoid(self, name=NN):
553
+ def toEllipsoid(self, **name):
550
554
  '''Convert this triaxial to an L{Ellipsoid}, provided 2 axes match.
551
555
 
556
+ @kwarg name: Optional, overriding C{B{name}=NN} (C{str})=.
557
+
552
558
  @return: An L{Ellipsoid} with north along this C{Z} axis if C{a == b},
553
559
  this C{Y} axis if C{a == c} or this C{X} axis if C{b == c}.
554
560
 
@@ -564,14 +570,14 @@ class Triaxial_(_NamedEnumItem):
564
570
  elif a != c: # N = b-Y
565
571
  t = _SPACE_(_a_, _NOTEQUAL_, _b_, _NOTEQUAL_, _c_)
566
572
  raise TriaxialError(a=a, b=b, c=c, txt=t)
567
- return Ellipsoid(a, b=b, name=name or self.name)
573
+ return Ellipsoid(a, b=b, name=self._name__(name))
568
574
 
569
575
  def toStr(self, prec=9, name=NN, **unused): # PYCHOK signature
570
576
  '''Return this C{Triaxial} as a string.
571
577
 
572
578
  @kwarg prec: Precision, number of decimal digits (0..9).
573
- @kwarg name: Override name (C{str}) or C{None} to exclude
574
- this triaxial's name.
579
+ @kwarg name: Optional, overriding C{B{name}=NN} (C{str})
580
+ or C{None} to exclude this triaxial's name.
575
581
 
576
582
  @return: This C{Triaxial}'s attributes (C{str}).
577
583
  '''
@@ -584,7 +590,7 @@ class Triaxial_(_NamedEnumItem):
584
590
  if isinstance(self, J):
585
591
  t += J.xyQ2,
586
592
  t += T.volume, T.area
587
- return self._instr(name, prec, props=t, area_p=self.area_p())
593
+ return self._instr(name, prec, props=t, area_p=self.area_p()) # __name__
588
594
 
589
595
  @Property_RO
590
596
  def volume(self):
@@ -601,7 +607,7 @@ class Triaxial(Triaxial_):
601
607
  '''
602
608
  _unordered = False
603
609
 
604
- def __init__(self, a_triaxial, b=None, c=None, name=NN):
610
+ def __init__(self, a_triaxial, b=None, c=None, **name):
605
611
  '''New I{ordered} L{Triaxial}.
606
612
 
607
613
  @arg a_triaxial: Largest semi-axis (C{scalar}, conventionally in C{meter})
@@ -610,14 +616,14 @@ class Triaxial(Triaxial_):
610
616
  if C{B{a_triaxial} is scalar}, ignored otherwise.
611
617
  @kwarg c: Smallest semi-axis (C{meter}, same units as B{C{a}}), required
612
618
  if C{B{a_triaxial} is scalar}, ignored otherwise.
613
- @kwarg name: Optional name (C{str}).
619
+ @kwarg name: Optional C{B{name}=NN} (C{str}).
614
620
 
615
621
  @note: The semi-axes must be ordered as C{B{a} >= B{b} >= B{c} > 0} and
616
622
  must be ellipsoidal, C{B{a} > B{c}}.
617
623
 
618
624
  @raise TriaxialError: Semi-axes not ordered, spherical or invalid.
619
625
  '''
620
- Triaxial_.__init__(self, a_triaxial, b=b, c=c, name=name)
626
+ Triaxial_.__init__(self, a_triaxial, b=b, c=c, **name)
621
627
 
622
628
  @Property_RO
623
629
  def _a2b2_a2c2(self):
@@ -656,7 +662,7 @@ class Triaxial(Triaxial_):
656
662
  x = y = u = _0_0
657
663
  return x, y, u
658
664
 
659
- def forwardBetaOmega(self, beta, omega, height=0, name=NN):
665
+ def forwardBetaOmega(self, beta, omega, height=0, **name):
660
666
  '''Convert I{ellipsoidal} lat- and longitude C{beta}, C{omega}
661
667
  and height to cartesian.
662
668
 
@@ -664,7 +670,7 @@ class Triaxial(Triaxial_):
664
670
  @arg omega: Ellipsoidal longitude (C{radians} or L{Degrees}).
665
671
  @arg height: Height above or below the ellipsoid's surface (C{meter}, same
666
672
  units as this triaxial's C{a}, C{b} and C{c} semi-axes).
667
- @kwarg name: Optional name (C{str}).
673
+ @kwarg name: Optional C{B{name}=NN} (C{str}).
668
674
 
669
675
  @return: A L{Vector3Tuple}C{(x, y, z)}.
670
676
 
@@ -684,9 +690,9 @@ class Triaxial(Triaxial_):
684
690
  x *= cb * sqrt0(ca**2 + r * sa**2, Error=TriaxialError)
685
691
  y *= ca * sb
686
692
  z *= sa * sqrt0(_1_0 - r * cb**2, Error=TriaxialError)
687
- return Vector3Tuple(x, y, z, name=name)
693
+ return Vector3Tuple(x, y, z, **name)
688
694
 
689
- def forwardBetaOmega_(self, sbeta, cbeta, somega, comega, name=NN):
695
+ def forwardBetaOmega_(self, sbeta, cbeta, somega, comega, **name):
690
696
  '''Convert I{ellipsoidal} lat- and longitude C{beta} and C{omega}
691
697
  to cartesian coordinates I{on the triaxial's surface}.
692
698
 
@@ -694,7 +700,7 @@ class Triaxial(Triaxial_):
694
700
  @arg cbeta: Ellipsoidal latitude C{cos(beta)} (C{scalar}).
695
701
  @arg somega: Ellipsoidal longitude C{sin(omega)} (C{scalar}).
696
702
  @arg comega: Ellipsoidal longitude C{cos(omega)} (C{scalar}).
697
- @kwarg name: Optional name (C{str}).
703
+ @kwarg name: Optional C{B{name}=NN} (C{str}).
698
704
 
699
705
  @return: A L{Vector3Tuple}C{(x, y, z)} on the surface.
700
706
 
@@ -706,34 +712,32 @@ class Triaxial(Triaxial_):
706
712
  www.Topo.Auth.GR/wp-content/uploads/sites/111/2021/12/09_Panou.pdf>}.
707
713
  '''
708
714
  t = self._radialTo3(sbeta, cbeta, somega, comega)
709
- return Vector3Tuple(*t, name=name)
715
+ return Vector3Tuple(*t, **name)
710
716
 
711
- def forwardCartesian(self, x_xyz, y=None, z=None, name=NN, **normal_eps):
717
+ def forwardCartesian(self, x_xyz, y=None, z=None, **normal_eps_name):
712
718
  '''Project a cartesian on this triaxial.
713
719
 
714
720
  @arg x_xyz: X component (C{scalar}) or a cartesian (C{Cartesian},
715
721
  L{Ecef9Tuple}, L{Vector3d}, L{Vector3Tuple} or L{Vector4Tuple}).
716
722
  @kwarg y: Y component (C{scalar}), required if B{C{x_xyz}} if C{scalar}.
717
723
  @kwarg z: Z component (C{scalar}), required if B{C{x_xyz}} if C{scalar}.
718
- @kwarg name: Optional name (C{str}).
719
- @kwarg normal_eps: Optional keyword arguments C{B{normal}=True} and
720
- C{B{eps}=EPS}, see method L{Triaxial.height4}.
724
+ @kwarg normal_eps_name: Optional keyword arguments C{B{normal}=True},
725
+ C{B{eps}=EPS} and overriding C{B{name}="height4"} (C{str}),
726
+ see method L{Triaxial.height4}.
721
727
 
722
728
  @see: Method L{Triaxial.height4} for further information and method
723
729
  L{Triaxial.reverseCartesian} to reverse the projection.
724
730
  '''
725
- t = self.height4(x_xyz, y, z, **normal_eps)
726
- _ = t.rename(name)
727
- return t
731
+ return self.height4(x_xyz, y, z, **normal_eps_name)
728
732
 
729
- def forwardLatLon(self, lat, lon, height=0, name=NN):
733
+ def forwardLatLon(self, lat, lon, height=0, **name):
730
734
  '''Convert I{geodetic} lat-, longitude and heigth to cartesian.
731
735
 
732
736
  @arg lat: Geodetic latitude (C{degrees}).
733
737
  @arg lon: Geodetic longitude (C{degrees}).
734
738
  @arg height: Height above the ellipsoid (C{meter}, same units
735
739
  as this triaxial's C{a}, C{b} and C{c} axes).
736
- @kwarg name: Optional name (C{str}).
740
+ @kwarg name: Optional C{B{name}=NN} (C{str}).
737
741
 
738
742
  @return: A L{Vector3Tuple}C{(x, y, z)}.
739
743
 
@@ -742,7 +746,7 @@ class Triaxial(Triaxial_):
742
746
  '''
743
747
  return self._forwardLatLon3(height, name, *sincos2d_(lat, lon))
744
748
 
745
- def forwardLatLon_(self, slat, clat, slon, clon, height=0, name=NN):
749
+ def forwardLatLon_(self, slat, clat, slon, clon, height=0, **name):
746
750
  '''Convert I{geodetic} lat-, longitude and heigth to cartesian.
747
751
 
748
752
  @arg slat: Geodetic latitude C{sin(lat)} (C{scalar}).
@@ -751,7 +755,7 @@ class Triaxial(Triaxial_):
751
755
  @arg clon: Geodetic longitude C{cos(lon)} (C{scalar}).
752
756
  @arg height: Height above the ellipsoid (C{meter}, same units
753
757
  as this triaxial's axes C{a}, C{b} and C{c}).
754
- @kwarg name: Optional name (C{str}).
758
+ @kwarg name: Optional C{B{name}=NN} (C{str}).
755
759
 
756
760
  @return: A L{Vector3Tuple}C{(x, y, z)}.
757
761
 
@@ -762,7 +766,7 @@ class Triaxial(Triaxial_):
762
766
  sb, cb = self._norm2(slon, clon)
763
767
  return self._forwardLatLon3(height, name, sa, ca, sb, cb)
764
768
 
765
- def _forwardLatLon3(self, height, name, sa, ca, sb, cb):
769
+ def _forwardLatLon3(self, height, name, sa, ca, sb, cb): # name always **name
766
770
  '''(INTERNAL) Helper for C{.forwardLatLon} and C{.forwardLatLon_}.
767
771
  '''
768
772
  ca_x_sb = ca * sb
@@ -773,7 +777,7 @@ class Triaxial(Triaxial_):
773
777
  x = (h + n) * ca * cb
774
778
  y = (h + n * self._1e2ab) * ca_x_sb
775
779
  z = (h + n * self._1e2ac) * sa
776
- return Vector3Tuple(x, y, z, name=name)
780
+ return Vector3Tuple(x, y, z, **name)
777
781
 
778
782
  def _Height(self, height):
779
783
  '''(INTERNAL) Validate a C{height}.
@@ -814,7 +818,7 @@ class Triaxial(Triaxial_):
814
818
  z *= sa * sqrt0(z2, Error=TriaxialError)
815
819
  return x, y, z
816
820
 
817
- def reverseBetaOmega(self, x_xyz, y=None, z=None, name=NN):
821
+ def reverseBetaOmega(self, x_xyz, y=None, z=None, **name):
818
822
  '''Convert cartesian to I{ellipsoidal} lat- and longitude, C{beta}, C{omega}
819
823
  and height.
820
824
 
@@ -822,7 +826,7 @@ class Triaxial(Triaxial_):
822
826
  L{Ecef9Tuple}, L{Vector3d}, L{Vector3Tuple} or L{Vector4Tuple}).
823
827
  @kwarg y: Y component (C{scalar}), required if B{C{x_xyz}} if C{scalar}.
824
828
  @kwarg z: Z component (C{scalar}), required if B{C{x_xyz}} if C{scalar}.
825
- @kwarg name: Optional name (C{str}).
829
+ @kwarg name: Optional C{B{name}=NN} (C{str}).
826
830
 
827
831
  @return: A L{BetaOmega3Tuple}C{(beta, omega, height)} with C{beta} and
828
832
  C{omega} in L{Radians} and (radial) C{height} in C{meter}, same
@@ -834,9 +838,9 @@ class Triaxial(Triaxial_):
834
838
  '''
835
839
  v = _otherV3d_(x_xyz, y, z)
836
840
  a, b, h = self._reverseLatLon3(v, atan2, v, self.forwardBetaOmega_)
837
- return BetaOmega3Tuple(Radians(beta=a), Radians(omega=b), h, name=name)
841
+ return BetaOmega3Tuple(Radians(beta=a), Radians(omega=b), h, **name)
838
842
 
839
- def reverseCartesian(self, x_xyz, y=None, z=None, h=0, normal=True, eps=_EPS2e4, name=NN):
843
+ def reverseCartesian(self, x_xyz, y=None, z=None, h=0, normal=True, eps=_EPS2e4, **name):
840
844
  '''"Unproject" a cartesian on to a cartesion I{off} this triaxial's surface.
841
845
 
842
846
  @arg x_xyz: X component (C{scalar}) or a cartesian (C{Cartesian},
@@ -848,7 +852,7 @@ class Triaxial(Triaxial_):
848
852
  @kwarg normal: If C{True} the height is C{normal} to the surface, otherwise
849
853
  C{radially} to the center of this triaxial (C{bool}).
850
854
  @kwarg eps: Tolerance for surface test (C{scalar}).
851
- @kwarg name: Optional name (C{str}).
855
+ @kwarg name: Optional C{B{name}=NN} (C{str}).
852
856
 
853
857
  @return: A L{Vector3Tuple}C{(x, y, z)}.
854
858
 
@@ -856,7 +860,7 @@ class Triaxial(Triaxial_):
856
860
 
857
861
  @see: Methods L{Triaxial.forwardCartesian} and L{Triaxial.height4}.
858
862
  '''
859
- v = _otherV3d_(x_xyz, y, z, name=name)
863
+ v = _otherV3d_(x_xyz, y, z, **name)
860
864
  s = _sideOf(v.xyz, self._abc3, eps=eps)
861
865
  if s: # PYCHOK no cover
862
866
  t = _SPACE_((_inside_ if s < 0 else _outside_), self.toRepr())
@@ -869,14 +873,14 @@ class Triaxial(Triaxial_):
869
873
  v = v.times(_1_0 + (h / v.length))
870
874
  return v.xyz # Vector3Tuple
871
875
 
872
- def reverseLatLon(self, x_xyz, y=None, z=None, name=NN):
876
+ def reverseLatLon(self, x_xyz, y=None, z=None, **name):
873
877
  '''Convert cartesian to I{geodetic} lat-, longitude and height.
874
878
 
875
879
  @arg x_xyz: X component (C{scalar}) or a cartesian (C{Cartesian},
876
880
  L{Ecef9Tuple}, L{Vector3d}, L{Vector3Tuple} or L{Vector4Tuple}).
877
881
  @kwarg y: Y component (C{scalar}), required if B{C{x_xyz}} if C{scalar}.
878
882
  @kwarg z: Z component (C{scalar}), required if B{C{x_xyz}} if C{scalar}.
879
- @kwarg name: Optional name (C{str}).
883
+ @kwarg name: Optional C{B{name}=NN} (C{str}).
880
884
 
881
885
  @return: A L{LatLon3Tuple}C{(lat, lon, height)} with C{lat} and C{lon}
882
886
  in C{degrees} and (radial) C{height} in C{meter}, same units
@@ -891,7 +895,7 @@ class Triaxial(Triaxial_):
891
895
  self._1e2bc, # == 1 - e_sub_y**2
892
896
  _1_0)
893
897
  t = self._reverseLatLon3(s, atan2d, v, self.forwardLatLon_)
894
- return LatLon3Tuple(*t, name=name)
898
+ return LatLon3Tuple(*t, **name)
895
899
 
896
900
  def _reverseLatLon3(self, s, atan2_, v, forward_):
897
901
  '''(INTERNAL) Helper for C{.reverseBetOmg} and C{.reverseLatLon}.
@@ -962,32 +966,32 @@ class JacobiConformal(Triaxial):
962
966
  Radians(y=self._c2_b2 * self._yE.cPi),
963
967
  name=JacobiConformal.xyQ2.name)
964
968
 
965
- def xyR2(self, beta, omega, name=NN):
969
+ def xyR2(self, beta, omega, **name):
966
970
  '''Compute a Jacobi Conformal C{x} and C{y} projection.
967
971
 
968
972
  @arg beta: Ellipsoidal latitude (C{radians} or L{Degrees}).
969
973
  @arg omega: Ellipsoidal longitude (C{radians} or L{Degrees}).
970
- @kwarg name: Optional name (C{str}).
974
+ @kwarg name: Optional, overriding C{B{name}="xyR2"} (C{str}).
971
975
 
972
976
  @return: A L{Jacobi2Tuple}C{(x, y)}.
973
977
  '''
974
978
  return self.xyR2_(*(SinCos2(beta) + SinCos2(omega)),
975
- name=name or self.xyR2.__name__)
979
+ name=_name__(name, name__=self.xyR2))
976
980
 
977
- def xyR2_(self, sbeta, cbeta, somega, comega, name=NN):
981
+ def xyR2_(self, sbeta, cbeta, somega, comega, **name):
978
982
  '''Compute a Jacobi Conformal C{x} and C{y} projection.
979
983
 
980
984
  @arg sbeta: Ellipsoidal latitude C{sin(beta)} (C{scalar}).
981
985
  @arg cbeta: Ellipsoidal latitude C{cos(beta)} (C{scalar}).
982
986
  @arg somega: Ellipsoidal longitude C{sin(omega)} (C{scalar}).
983
987
  @arg comega: Ellipsoidal longitude C{cos(omega)} (C{scalar}).
984
- @kwarg name: Optional name (C{str}).
988
+ @kwarg name: Optional, overriding C{B{name}="xyR2_"} (C{str}).
985
989
 
986
990
  @return: A L{Jacobi2Tuple}C{(x, y)}.
987
991
  '''
988
992
  return Jacobi2Tuple(self.xR_(somega, comega),
989
993
  self.yR_(sbeta, cbeta),
990
- name=name or self.xyR2_.__name__)
994
+ name=_name__(name, name__=self.xyR2_))
991
995
 
992
996
  @Property_RO
993
997
  def _yE(self):
@@ -1025,7 +1029,7 @@ class JacobiConformalSpherical(JacobiConformal):
1025
1029
  '''
1026
1030
  _ab = _bc = 0
1027
1031
 
1028
- def __init__(self, radius_triaxial, ab=0, bc=0, name=NN):
1032
+ def __init__(self, radius_triaxial, ab=0, bc=0, **name):
1029
1033
  '''New L{JacobiConformalSpherical}.
1030
1034
 
1031
1035
  @arg radius_triaxial: Radius (C{scalar}, conventionally in
@@ -1035,7 +1039,7 @@ class JacobiConformalSpherical(JacobiConformal):
1035
1039
  same units as C{scalar B{radius}}.
1036
1040
  @kwarg bc: Relative magnitude of C{B{b} - B{c}} (C{meter},
1037
1041
  same units as C{scalar B{radius}}.
1038
- @kwarg name: Optional name (C{str}).
1042
+ @kwarg name: Optional C{B{name}=NN} (C{str}).
1039
1043
 
1040
1044
  @raise TriaxialError: Invalid B{C{radius_triaxial}}, negative
1041
1045
  B{C{ab}}, negative B{C{bc}} or C{(B{ab}
@@ -1210,7 +1214,7 @@ def _hartzell3(pov, los, Tun): # in .ellipsoids.hartzell4, .formy.hartzell
1210
1214
  return T._order3d(v, reverse=True), h, None
1211
1215
 
1212
1216
 
1213
- def hartzell4(pov, los=False, tri_biax=_WGS84, name=NN):
1217
+ def hartzell4(pov, los=False, tri_biax=_WGS84, **name):
1214
1218
  '''Compute the intersection of a tri-/biaxial ellipsoid and a Line-Of-Sight
1215
1219
  from a Point-Of-View outside.
1216
1220
 
@@ -1223,7 +1227,7 @@ def hartzell4(pov, los=False, tri_biax=_WGS84, name=NN):
1223
1227
  L{JacobiConformalSpherical}) or biaxial ellipsoid (L{Datum},
1224
1228
  L{Ellipsoid}, L{Ellipsoid2}, L{a_f2Tuple} or C{scalar} radius,
1225
1229
  conventionally in C{meter}).
1226
- @kwarg name: Optional name (C{str}).
1230
+ @kwarg name: Optional, overriding C{B{name}="hartzell4"} (C{str}).
1227
1231
 
1228
1232
  @return: L{Vector4Tuple}C{(x, y, z, h)} on the tri-/biaxial's surface, with C{h}
1229
1233
  the distance from B{C{pov}} to C{(x, y, z)} I{along the} B{C{los}}, all
@@ -1240,18 +1244,18 @@ def hartzell4(pov, los=False, tri_biax=_WGS84, name=NN):
1240
1244
  Line-of-Sight Intersection with Earth"<https://StephenHartzell.Medium.com/
1241
1245
  satellite-line-of-sight-intersection-with-earth-d786b4a6a9b6>}.
1242
1246
  '''
1243
- n = hartzell4.__name__
1244
1247
  if isinstance(tri_biax, Triaxial_):
1245
1248
  T = tri_biax
1246
1249
  else:
1247
1250
  D = tri_biax if isinstance(tri_biax, Datum) else \
1248
- _spherical_datum(tri_biax, name=n)
1251
+ _spherical_datum(tri_biax, name__=hartzell4) # _dunder_nameof
1249
1252
  T = D.ellipsoid._triaxial
1250
1253
  try:
1251
1254
  v, h, i = _hartzell3(pov, los, T)
1252
1255
  except Exception as x:
1253
1256
  raise TriaxialError(pov=pov, los=los, tri_biax=tri_biax, cause=x)
1254
- return Vector4Tuple(v.x, v.y, v.z, h, iteration=i, name=name or n)
1257
+ return Vector4Tuple(v.x, v.y, v.z, h, iteration=i, # _dunder_nameof
1258
+ name=_name__(name, name__=hartzell4))
1255
1259
 
1256
1260
 
1257
1261
  def _hypot21(x, y, z=0):
@@ -1439,7 +1443,7 @@ def _rootXd(r, s, u, v, w, g, eps):
1439
1443
  break
1440
1444
  else: # PYCHOK no cover
1441
1445
  t = Fmt.no_convergence(e, eps)
1442
- raise _ValueError(t, txt=_rootXd.__name__)
1446
+ raise _ValueError(t, txt__=_rootXd)
1443
1447
  return t, i
1444
1448
 
1445
1449