pygeodesy 24.7.7__py2.py3-none-any.whl → 24.7.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.
pygeodesy/solveBase.py CHANGED
@@ -11,8 +11,9 @@ from pygeodesy.datums import _earth_datum, _WGS84, _EWGS84
11
11
  from pygeodesy.errors import _AssertionError, _xkwds_get, _xkwds_get1, \
12
12
  _xkwds_item2
13
13
  from pygeodesy.internals import _enquote, printf
14
- from pygeodesy.interns import NN, _0_, _BACKSLASH_, _COMMASPACE_, \
15
- _EQUAL_, _Error_, _SPACE_, _UNUSED_
14
+ from pygeodesy.interns import NN, _0_, _AT_,_BACKSLASH_, _COLONSPACE_, \
15
+ _COMMASPACE_, _EQUAL_, _Error_, _SPACE_, \
16
+ _UNUSED_
16
17
  from pygeodesy.karney import Caps, _CapsBase, GDict
17
18
  from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _sys_version_info2
18
19
  from pygeodesy.named import callername, _name2__, notOverloaded
@@ -24,7 +25,7 @@ from pygeodesy.utily import unroll180, wrap360 # PYCHOK shared
24
25
  from subprocess import PIPE as _PIPE, Popen as _Popen, STDOUT as _STDOUT
25
26
 
26
27
  __all__ = _ALL_LAZY.solveBase
27
- __version__ = '24.07.08'
28
+ __version__ = '24.07.11'
28
29
 
29
30
  _ERROR_ = 'ERROR'
30
31
  _Popen_kwds = dict(creationflags=0,
@@ -54,7 +55,7 @@ def _cmd_stdin_(cmd, stdin): # PYCHOK no cover
54
55
 
55
56
  def _popen2(cmd, stdin=None): # in .mgrs, test.bases, .testMgrs
56
57
  '''(INTERNAL) Invoke C{B{cmd} tuple} and return C{exitcode}
57
- and all output from C{stdout/-err}.
58
+ and all output from C{stdout/-err}, I{stripped}.
58
59
  '''
59
60
  p = _Popen(cmd, **_Popen_kwds) # PYCHOK kwArgs
60
61
  r = p.communicate(stdin)[0] # stdout + NL + stderr
@@ -67,6 +68,7 @@ class _SolveCapsBase(_CapsBase):
67
68
  _datum = _WGS84
68
69
  _Error = None
69
70
  _Exact = True
71
+ _invokat = _AT_
70
72
  _invokation = 0
71
73
  _linelimit = 0
72
74
  _prec = Precision_(prec=DIG)
@@ -100,7 +102,7 @@ class _SolveCapsBase(_CapsBase):
100
102
  v = map(float, v) # _float_int, see Intersectool._XDistInvoke
101
103
  return Dict(_zip(n, v)) # strict=True
102
104
 
103
- def _DictInvoke2(self, cmd, Names, Dict, args, **floats_R):
105
+ def _DictInvoke2(self, cmd, args, Names, Dict, **floats_R):
104
106
  '''(INTERNAL) Invoke C{Solve}, return results as C{Dict}.
105
107
  '''
106
108
  N = len(Names)
@@ -172,6 +174,16 @@ class _SolveCapsBase(_CapsBase):
172
174
 
173
175
  f = flattening
174
176
 
177
+ def invokat(self, *prefix):
178
+ '''Get and set the invokation number C{"@"} prefix (C{str}).
179
+
180
+ @return: Previous prefix (C{str}).
181
+ '''
182
+ p = self._invokat
183
+ if prefix:
184
+ set._invokat = str(prefix[0])
185
+ return p
186
+
175
187
  @property_RO
176
188
  def invokation(self):
177
189
  '''Get the most recent C{Solve} invokation number (C{int}).
@@ -223,7 +235,7 @@ class _SolveCapsBase(_CapsBase):
223
235
  raise self._Error(cmd=t or _cmd_stdin_(cmd, stdin), cause=x)
224
236
  self._status = s
225
237
  if self.verbose: # and _R is None: # PYCHOK no cover
226
- self._print(repr(r))
238
+ self._print(repr(r), 'stdout/-err')
227
239
  return r
228
240
 
229
241
  def linelimit(self, *limit):
@@ -268,14 +280,16 @@ class _SolveCapsBase(_CapsBase):
268
280
  _update_all(self)
269
281
  self._prec = prec
270
282
 
271
- def _print(self, line): # PYCHOK no cover
283
+ def _print(self, line, *suffix): # PYCHOK no cover
272
284
  '''(INTERNAL) Print a status line.
273
285
  '''
274
286
  if self._linelimit:
275
287
  line = clips(line, limit=self._linelimit, length=True)
276
288
  if self.status is not None:
277
- line = _SPACE_(line, Fmt.PAREN(self.status))
278
- printf('%s@%d: %s', self.named2, self.invokation, line)
289
+ s = _COMMASPACE_(self.status, *suffix)
290
+ line = _SPACE_(line, Fmt.PAREN(s))
291
+ p = NN(self.named2, self._invokat, self.invokation)
292
+ printf(_COLONSPACE_(p, line))
279
293
 
280
294
  def _setXable(self, path, **Xable_path):
281
295
  '''(INTERNAL) Set the executable C{path}.
@@ -411,7 +425,7 @@ class _SolveGDictBase(_SolveBase):
411
425
  lat, lon, azi, s12_a12, **floats)
412
426
 
413
427
  def _GDictInverse(self, lat1, lon1, lat2, lon2, outmask=_UNUSED_, **floats): # PYCHOK for .geodesicx.gxarea
414
- '''(INTERNAL) Get C{_GenInverse}-like result as C{GDict}, but I{without} C{_S_CALPs_}.
428
+ '''(INTERNAL) Get C{_GenInverse}-like result as C{GDict}, but I{without} C{_SALP_CALPs_}.
415
429
  '''
416
430
  return self._GDictInvoke(self._cmdInverse, self._Names_Inverse,
417
431
  lat1, lon1, lat2, lon2, **floats)
@@ -419,7 +433,7 @@ class _SolveGDictBase(_SolveBase):
419
433
  def _GDictInvoke(self, cmd, Names, *args, **floats):
420
434
  '''(INTERNAL) Invoke C{Solve}, return results as C{Dict}.
421
435
  '''
422
- return self._DictInvoke2(cmd, Names, GDict, args, **floats)[0] # _R
436
+ return self._DictInvoke2(cmd, args, Names, GDict, **floats)[0] # _R
423
437
 
424
438
  def Inverse(self, lat1, lon1, lat2, lon2, outmask=_UNUSED_): # PYCHOK unused
425
439
  '''Return the C{Inverse} result.
@@ -456,7 +470,7 @@ class _SolveGDictLineBase(_SolveGDictBase):
456
470
  if name:
457
471
  self.name = name
458
472
 
459
- self._caps = caps | Caps._LINE
473
+ self._caps = caps | Caps._AZIMUTH_LATITUDE_LONG_UNROLL
460
474
  self._debug = solve._debug & Caps._DEBUG_ALL
461
475
  self._lla1 = GDict(lat1=lat1, lon1=lon1, **azi)
462
476
  self._solve = solve
pygeodesy/triaxials.py CHANGED
@@ -49,7 +49,7 @@ from pygeodesy.named import _lazyNamedEnumItem as _lazy, _name__, _NamedEnum, \
49
49
  _NamedEnumItem, _Pass
50
50
  from pygeodesy.namedTuples import LatLon3Tuple, _NamedTupleTo, Vector3Tuple, \
51
51
  Vector4Tuple
52
- from pygeodesy.props import Property_RO, property_RO
52
+ from pygeodesy.props import Property_RO, property_ROver
53
53
  # from pygeodesy.streprs import Fmt # from .datums
54
54
  from pygeodesy.units import Degrees, Float, Height_, Meter, Meter2, Meter3, \
55
55
  Radians, Radius, Scalar_
@@ -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.06.24'
62
+ __version__ = '24.07.12'
63
63
 
64
64
  _not_ordered_ = _not_('ordered')
65
65
  _omega_ = 'omega'
@@ -360,12 +360,11 @@ class Triaxial_(_NamedEnumItem):
360
360
 
361
361
  _1e2bc = _c2_b2 # C{1 - e2bc} == C{(c/b)**2}
362
362
 
363
- @property_RO
363
+ @property_ROver
364
364
  def _Elliptic(self):
365
365
  '''(INTERNAL) Get class L{Elliptic}, I{once}.
366
366
  '''
367
- Triaxial_._Elliptic = E = _MODS.elliptic.Elliptic # overwrite property_RO
368
- return E
367
+ return _MODS.elliptic.Elliptic # overwrite propertyROver
369
368
 
370
369
  def hartzell4(self, pov, los=False, **name):
371
370
  '''Compute the intersection of this triaxial's surface with a Line-Of-Sight