pygeodesy 24.6.9__py2.py3-none-any.whl → 24.7.7__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 (87) hide show
  1. {PyGeodesy-24.6.9.dist-info → PyGeodesy-24.7.7.dist-info}/METADATA +2 -2
  2. PyGeodesy-24.7.7.dist-info/RECORD +117 -0
  3. pygeodesy/__init__.py +39 -32
  4. pygeodesy/__main__.py +6 -1
  5. pygeodesy/albers.py +2 -2
  6. pygeodesy/auxilats/__init__.py +1 -1
  7. pygeodesy/auxilats/auxAngle.py +40 -39
  8. pygeodesy/auxilats/auxDLat.py +3 -2
  9. pygeodesy/auxilats/auxLat.py +16 -18
  10. pygeodesy/auxilats/auxily.py +1 -1
  11. pygeodesy/azimuthal.py +10 -10
  12. pygeodesy/basics.py +16 -4
  13. pygeodesy/booleans.py +4 -4
  14. pygeodesy/cartesianBase.py +11 -14
  15. pygeodesy/css.py +14 -18
  16. pygeodesy/datums.py +6 -6
  17. pygeodesy/deprecated/__init__.py +1 -1
  18. pygeodesy/deprecated/classes.py +25 -4
  19. pygeodesy/deprecated/datum.py +3 -3
  20. pygeodesy/deprecated/functions.py +6 -8
  21. pygeodesy/dms.py +23 -27
  22. pygeodesy/ecef.py +4 -4
  23. pygeodesy/elevations.py +4 -4
  24. pygeodesy/ellipsoidalBase.py +23 -28
  25. pygeodesy/ellipsoidalBaseDI.py +19 -23
  26. pygeodesy/ellipsoidalExact.py +3 -3
  27. pygeodesy/ellipsoidalGeodSolve.py +15 -23
  28. pygeodesy/ellipsoidalKarney.py +37 -60
  29. pygeodesy/ellipsoidalNvector.py +38 -44
  30. pygeodesy/ellipsoidalVincenty.py +11 -14
  31. pygeodesy/ellipsoids.py +107 -101
  32. pygeodesy/errors.py +109 -48
  33. pygeodesy/etm.py +32 -44
  34. pygeodesy/formy.py +55 -58
  35. pygeodesy/frechet.py +18 -20
  36. pygeodesy/fsums.py +3 -3
  37. pygeodesy/gars.py +3 -4
  38. pygeodesy/geodesici.py +1696 -0
  39. pygeodesy/geodesicw.py +15 -15
  40. pygeodesy/geodesicx/__init__.py +4 -4
  41. pygeodesy/geodesicx/gx.py +34 -55
  42. pygeodesy/geodesicx/gxbases.py +20 -8
  43. pygeodesy/geodesicx/gxline.py +93 -88
  44. pygeodesy/geodsolve.py +108 -59
  45. pygeodesy/geohash.py +26 -34
  46. pygeodesy/geoids.py +28 -37
  47. pygeodesy/hausdorff.py +17 -18
  48. pygeodesy/heights.py +2 -2
  49. pygeodesy/internals.py +46 -13
  50. pygeodesy/interns.py +2 -2
  51. pygeodesy/karney.py +78 -15
  52. pygeodesy/ktm.py +13 -16
  53. pygeodesy/latlonBase.py +17 -19
  54. pygeodesy/lazily.py +28 -25
  55. pygeodesy/lcc.py +28 -31
  56. pygeodesy/ltp.py +7 -8
  57. pygeodesy/ltpTuples.py +71 -73
  58. pygeodesy/mgrs.py +8 -9
  59. pygeodesy/named.py +19 -10
  60. pygeodesy/nvectorBase.py +9 -10
  61. pygeodesy/osgr.py +9 -9
  62. pygeodesy/points.py +6 -6
  63. pygeodesy/rhumb/__init__.py +1 -1
  64. pygeodesy/rhumb/aux_.py +5 -5
  65. pygeodesy/rhumb/bases.py +30 -31
  66. pygeodesy/rhumb/ekx.py +3 -4
  67. pygeodesy/rhumb/solve.py +21 -22
  68. pygeodesy/solveBase.py +177 -123
  69. pygeodesy/sphericalBase.py +10 -11
  70. pygeodesy/sphericalNvector.py +13 -13
  71. pygeodesy/sphericalTrigonometry.py +86 -97
  72. pygeodesy/streprs.py +4 -34
  73. pygeodesy/triaxials.py +48 -43
  74. pygeodesy/units.py +208 -275
  75. pygeodesy/unitsBase.py +115 -107
  76. pygeodesy/ups.py +26 -31
  77. pygeodesy/utily.py +8 -8
  78. pygeodesy/utm.py +35 -40
  79. pygeodesy/utmups.py +43 -46
  80. pygeodesy/utmupsBase.py +8 -9
  81. pygeodesy/vector3d.py +26 -27
  82. pygeodesy/vector3dBase.py +6 -7
  83. pygeodesy/webmercator.py +19 -21
  84. pygeodesy/wgrs.py +18 -20
  85. PyGeodesy-24.6.9.dist-info/RECORD +0 -116
  86. {PyGeodesy-24.6.9.dist-info → PyGeodesy-24.7.7.dist-info}/WHEEL +0 -0
  87. {PyGeodesy-24.6.9.dist-info → PyGeodesy-24.7.7.dist-info}/top_level.txt +0 -0
pygeodesy/rhumb/bases.py CHANGED
@@ -52,11 +52,11 @@ from pygeodesy.vector3d import _intersect3d3, Vector3d # in .Intersection below
52
52
  from math import cos, fabs
53
53
 
54
54
  __all__ = ()
55
- __version__ = '24.05.29'
55
+ __version__ = '24.06.18'
56
56
 
57
57
  _anti_ = _Dash('anti')
58
58
  _rls = [] # instances of C{RbumbLine...} to be updated
59
- _TRIPS = 65 # .Intersection, .PlumbTo, 19+
59
+ _TRIPS = 129 # .Intersection, .PlumbTo, 19+
60
60
 
61
61
 
62
62
  class _Lat(Lat):
@@ -716,7 +716,7 @@ class RhumbLineBase(_CapsBase):
716
716
  t = _xTMr(v.x, v.y, lon0=p.lon) # PYCHOK Reverse4Tuple
717
717
  d = _diff(t.lon - p.lon, t.lat) # PYCHOK t.lat + p.lat - p.lat
718
718
  p = _LL2T(t.lat + p.lat, t.lon) # PYCHOK t.lon + p.lon = lon0
719
- if d < tol: # 19 trips
719
+ if d < tol: # 19+ trips
720
720
  break
721
721
  else:
722
722
  raise ValueError(Fmt.no_convergence(d, tol))
@@ -724,7 +724,7 @@ class RhumbLineBase(_CapsBase):
724
724
  P = GDict(lat1=self.lat1, lat2=p.lat, lat0=other.lat1,
725
725
  lon1=self.lon1, lon2=p.lon, lon0=other.lon1,
726
726
  name=_dunder_nameof(self.Intersection, self.name))
727
- r = self.Inverse( p.lat, p.lon, outmask=Caps.DISTANCE)
727
+ r = self.Inverse(p.lat, p.lon, outmask=Caps.DISTANCE)
728
728
  t = other.Inverse(p.lat, p.lon, outmask=Caps.DISTANCE)
729
729
  P.set_(azi12= self.azi12, a12=r.a12, s12=r.s12,
730
730
  azi02=other.azi12, a02=t.a12, s02=t.s12,
@@ -824,9 +824,9 @@ class RhumbLineBase(_CapsBase):
824
824
  @kwarg exact: If C{None}, use a rhumb line perpendicular to this rhumb line,
825
825
  otherwise use an I{exact} C{Geodesic...} from the given point
826
826
  perpendicular to this rhumb line (C{bool} or C{Geodesic...}),
827
- see method L{Ellipsoid.geodesic_}.
828
- @kwarg eps: Optional tolerance for L{pygeodesy.intersection3d3} (C{EPS}),
829
- used only if C{B{exact} is None}.
827
+ see method L{geodesic_<pygeodesy.Ellipsoid.geodesic_>}.
828
+ @kwarg eps: Optional tolerance (C{EPS}), used only if C{B{exact} is None},
829
+ see function L{intersection3d3<pygeodesy.intersection3d3>}.
830
830
  @kwarg est: Optionally, an initial estimate for the distance C{s12} of the
831
831
  intersection I{along} this rhumb line (C{meter}), used only if
832
832
  C{B{exact} is not None}.
@@ -849,11 +849,11 @@ class RhumbLineBase(_CapsBase):
849
849
  <https://PyPI.org/project/geographiclib>}
850
850
  package not found or not installed.
851
851
 
852
- @raise IntersectionError: No convergence for this B{C{eps}} or no
853
- intersection for some other reason.
852
+ @raise IntersectionError: No convergence for this B{C{eps}} or B{C{tol}} or
853
+ no intersection for some other reason.
854
854
 
855
- @see: Methods C{distance2}, C{Intersecant2} and C{Intersection}
856
- and function L{pygeodesy.intersection3d3}.
855
+ @see: Methods C{distance2}, C{Intersecant2} and C{Intersection} and function
856
+ L{intersection3d3<pygeodesy.intersection3d3>}.
857
857
  '''
858
858
  Cs, tol = Caps, Float_(tol=tol, low=EPS, high=None)
859
859
 
@@ -899,7 +899,7 @@ class RhumbLineBase(_CapsBase):
899
899
  lat0=lat0, lon0=lon0, iteration=i, at=r.azi2 - self.azi12,
900
900
  name=_dunder_nameof(self.PlumbTo, self.name))
901
901
  except Exception as x: # Fsum(NAN) Value-, ZeroDivisionError
902
- raise IntersectionError(lat0, lon0, tol=tol, exact=exact,
902
+ raise IntersectionError(lat0=lat0, lon0=lon0, tol=tol, exact=exact,
903
903
  eps=eps, est=est, iteration=i, cause=x)
904
904
 
905
905
  return P
@@ -907,29 +907,28 @@ class RhumbLineBase(_CapsBase):
907
907
  def Position(self, s12, outmask=Caps.LATITUDE_LONGITUDE):
908
908
  '''Compute a point at a given distance on this rhumb line.
909
909
 
910
- @arg s12: The distance along this rhumb line from its origin to
911
- the point (C{meters}), can be negative.
912
- @kwarg outmask: Bit-or'ed combination of L{Caps} values specifying
913
- the quantities to be returned.
910
+ @arg s12: The distance along this rhumb line from its origin to the point
911
+ (C{meters}), can be negative.
912
+ @kwarg outmask: Bit-or'ed combination of L{Caps} values specifying the
913
+ quantities to be returned.
914
914
 
915
- @return: L{GDict} with 4 to 8 items C{azi12, a12, s12, S12, lat2,
916
- lat1, lon2, lon1} with latitude C{lat2} and longitude
917
- C{lon2} of the point in C{degrees}, the rhumb angle C{a12}
918
- in C{degrees} from the start point of and the area C{S12}
919
- under this rhumb line in C{meter} I{squared}.
915
+ @return: L{GDict} with 4 to 8 items C{azi12, a12, s12, S12, lat2, lat1,
916
+ lon2, lon1} with latitude C{lat2} and longitude C{lon2} of the
917
+ point in C{degrees}, the rhumb angle C{a12} in C{degrees} from
918
+ the start point of and the area C{S12} under this rhumb line
919
+ in C{meter} I{squared}.
920
920
 
921
- @raise ImportError: Package C{numpy} not found or not installed,
922
- only required for L{RhumbLineAux} area C{S12}
923
- when C{B{exact} is True}.
921
+ @raise ImportError: Package C{numpy} not found or not installed, required
922
+ only for L{RhumbLineAux} area C{S12} when C{B{exact}
923
+ is True}.
924
924
 
925
- @note: If B{C{s12}} is large enough that the rhumb line crosses a
926
- pole, the longitude of the second point is indeterminate and
927
- C{NAN} is returned for C{lon2} and area C{S12}.
925
+ @note: If B{C{s12}} is large enough that the rhumb line crosses a pole, the
926
+ longitude of the second point is indeterminate and C{NAN} is returned
927
+ for C{lon2} and area C{S12}.
928
928
 
929
- If the first point is a pole, the cosine of its latitude is
930
- taken to be C{sqrt(L{EPS})}. This position is extremely
931
- close to the actual pole and allows the calculation to be
932
- carried out in finite terms.
929
+ If the first point is a pole, the cosine of its latitude is taken to
930
+ be C{sqrt(L{EPS})}. This position is extremely close to the actual
931
+ pole and allows the calculation to be carried out in finite terms.
933
932
  '''
934
933
  return self._Position(self.m2degrees(s12), s12, outmask)
935
934
 
pygeodesy/rhumb/ekx.py CHANGED
@@ -43,7 +43,7 @@ from pygeodesy.utily import atan1, sincos2_
43
43
  from math import asinh, atan, cos, cosh, radians, sin, sinh, sqrt, tan
44
44
 
45
45
  __all__ = _ALL_LAZY.rhumb_ekx
46
- __version__ = '24.05.30'
46
+ __version__ = '24.06.11'
47
47
 
48
48
 
49
49
  class Rhumb(RhumbBase):
@@ -61,13 +61,12 @@ class Rhumb(RhumbBase):
61
61
  @kwarg a_earth: This rhumb's earth model (L{Datum}, L{Ellipsoid},
62
62
  L{Ellipsoid2}, L{a_f2Tuple}, 2-tuple C{(a, f)}) or
63
63
  the (equatorial) radius (C{meter}, conventionally).
64
- @kwarg f: The ellipsoid's flattening (C{scalar}), iff B{C{a_earth}} is
65
- C{scalar}, ignored otherwise.
64
+ @kwarg f: The ellipsoid's flattening (C{scalar}), required if B{C{a_earth}}
65
+ is C{scalar}, ignored otherwise.
66
66
  @kwarg exact: If C{True}, use an addition theorem for elliptic integrals
67
67
  to compute I{Divided differences}, otherwise use the I{Krüger}
68
68
  series expansion (C{bool} or C{None}), see also properties
69
69
  C{exact} and C{TMorder}.
70
- @kwarg name: Optional name (C{str}).
71
70
  @kwarg RA_TMorder_name: Optional C{B{name}=NN} (C{str}) and optional keyword
72
71
  arguments B{C{RAorder}=6} and B{C{TMorder}=6} to set the respective
73
72
  C{order}, see properties C{RAorder} and C{TMorder}.
pygeodesy/rhumb/solve.py CHANGED
@@ -17,21 +17,21 @@ from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS, _getenv,
17
17
  _PYGEODESY_RHUMBSOLVE_
18
18
  from pygeodesy.namedTuples import Destination3Tuple, Distance3Tuple
19
19
  from pygeodesy.props import deprecated_method, Property, Property_RO
20
- from pygeodesy.solveBase import _SolveBase, _SolveLineBase
20
+ from pygeodesy.solveBase import _SolveGDictBase, _SolveGDictLineBase
21
21
  from pygeodesy.utily import _unrollon, _Wrap, wrap360
22
22
 
23
23
  __all__ = _ALL_LAZY.rhumb_solve
24
- __version__ = '24.06.04'
24
+ __version__ = '24.06.28'
25
25
 
26
26
 
27
- class _RhumbSolveBase(_SolveBase):
27
+ class _RhumbSolveBase(_SolveGDictBase):
28
28
  '''(INTERNAL) Base class for L{RhumbSolve} and L{RhumbLineSolve}.
29
29
  '''
30
30
  _Error = RhumbError
31
31
  _Names_Direct = _lat2_, _lon2_, _S12_
32
32
  _Names_Inverse = _azi12_, _s12_, _S12_
33
- _Solve_name = 'RhumbSolve'
34
- _Solve_path = _getenv(_PYGEODESY_RHUMBSOLVE_, _PYGEODESY_RHUMBSOLVE_)
33
+ _Xable_name = 'RhumbSolve'
34
+ _Xable_path = _getenv(_PYGEODESY_RHUMBSOLVE_, _PYGEODESY_RHUMBSOLVE_)
35
35
 
36
36
  @Property_RO
37
37
  def _cmdBasic(self):
@@ -46,7 +46,7 @@ class _RhumbSolveBase(_SolveBase):
46
46
  '''Get the U{RhumbSolve<https://GeographicLib.SourceForge.io/C++/doc/RhumbSolve.1.html>}
47
47
  executable (C{filename}).
48
48
  '''
49
- return self._Solve_path
49
+ return self._Xable_path
50
50
 
51
51
  @RhumbSolve.setter # PYCHOK setter!
52
52
  def RhumbSolve(self, path):
@@ -56,7 +56,7 @@ class _RhumbSolveBase(_SolveBase):
56
56
  @raise RhumbError: Invalid B{C{path}}, B{C{path}} doesn't exist or isn't
57
57
  the C{RhumbSolve} executable.
58
58
  '''
59
- self._setSolve(path)
59
+ self._setXable(path)
60
60
 
61
61
  @Property_RO
62
62
  def _s_option(self): # == not -E for GeodSolve
@@ -65,11 +65,11 @@ class _RhumbSolveBase(_SolveBase):
65
65
  def toStr(self, **prec_sep): # PYCHOK signature
66
66
  '''Return this C{RhumbSolve} as string.
67
67
 
68
- @kwarg prec_sep: Keyword argumens C{B{prec}=6} and C{B{sep}=', '}
68
+ @kwarg prec_sep: Keyword argumens C{B{prec}=6} and C{B{sep}=", "}
69
69
  for the C{float} C{prec}ision, number of decimal digits
70
70
  (0..9) and the C{sep}arator string to join. Trailing
71
- zero decimals are stripped for B{C{prec}} values of
72
- 1 and above, but kept for negative B{C{prec}} values.
71
+ zero decimals are stripped for B{C{prec}} values of 1
72
+ and above, but kept for negative B{C{prec}} values.
73
73
 
74
74
  @return: RhumbSolve items (C{str}).
75
75
  '''
@@ -173,8 +173,7 @@ class RhumbSolve(_RhumbSolveBase):
173
173
  return r
174
174
 
175
175
  def _GDictInverse(self, lat1, lon1, lat2, lon2, *unused, **floats): # PYCHOK signature
176
- '''(INTERNAL) Get C{_GenInverse}-like result as an 8-item C{GDict}, but
177
- I{without} C{_SALPs_CALPs_}.
176
+ '''(INTERNAL) Get C{_GenInverse}-like result as an 8-item C{GDict}, but I{without} C{_S_CALPs_}.
178
177
  '''
179
178
  i = _RhumbSolveBase._GDictInverse(self, lat1, lon1, lat2, lon2, **floats)
180
179
  a = _over(float(i.s12), self._mpd) # for .Inverse1
@@ -231,7 +230,7 @@ class RhumbSolve(_RhumbSolveBase):
231
230
  Line = DirectLine
232
231
 
233
232
 
234
- class RhumbLineSolve(_RhumbSolveBase, _SolveLineBase):
233
+ class RhumbLineSolve(_RhumbSolveBase, _SolveGDictLineBase):
235
234
  '''Wrapper to invoke I{Karney}'s U{RhumbSolve<https://GeographicLib.SourceForge.io/C++/doc/RhumbSolve.1.html>}
236
235
  like a class, similar to L{pygeodesy.RhumbLine} and L{pygeodesy.RhumbLineAux}.
237
236
 
@@ -267,7 +266,7 @@ class RhumbLineSolve(_RhumbSolveBase, _SolveLineBase):
267
266
  _xinstanceof(RhumbSolve, rhumb=rhumb)
268
267
  if (caps & Caps.LINE_OFF): # copy to avoid updates
269
268
  rhumb = rhumb.copy(deep=False, name=NN(_UNDER_, rhumb.name))
270
- _SolveLineBase.__init__(self, rhumb, lat1, lon1, caps, azi12=azi12, **name)
269
+ _SolveGDictLineBase.__init__(self, rhumb, lat1, lon1, caps, azi12=azi12, **name)
271
270
  try:
272
271
  self.RhumbSolve = rhumb.RhumbSolve # rhumb or copy of rhumb
273
272
  except RhumbError:
@@ -283,7 +282,7 @@ class RhumbLineSolve(_RhumbSolveBase, _SolveLineBase):
283
282
  # azi12, a12, s12, S12}.
284
283
  # '''
285
284
  # s = a12 * self._mpd
286
- # a = self._GDictInvoke(self._cmdArc, True, self._Names_Direct, s)
285
+ # a = self._GDictInvoke(self._cmdArc, self._Names_Direct, s)
287
286
  # r = GDict(a12=a12, s12=s, **self._lla1)
288
287
  # r.updated(a)
289
288
  # return r
@@ -318,7 +317,7 @@ class RhumbLineSolve(_RhumbSolveBase, _SolveLineBase):
318
317
  @return: A L{GDict} with 7 items C{lat1, lon1, lat2, lon2,
319
318
  azi12, s12, S12}.
320
319
  '''
321
- d = self._GDictInvoke(self._cmdDistance, True, self._Names_Direct, s12)
320
+ d = self._GDictInvoke(self._cmdDistance, self._Names_Direct, s12)
322
321
  r = GDict(s12=s12, **self._lla1) # a12=_over(s12, self._mpd)
323
322
  r.update(d)
324
323
  return r
@@ -326,16 +325,16 @@ class RhumbLineSolve(_RhumbSolveBase, _SolveLineBase):
326
325
  def toStr(self, **prec_sep): # PYCHOK signature
327
326
  '''Return this C{RhumbLineSolve} as string.
328
327
 
329
- @kwarg prec_sep: Keyword argumens C{B{prec}=6} and C{B{sep}=', '}
328
+ @kwarg prec_sep: Keyword argumens C{B{prec}=6} and C{B{sep}=", "}
330
329
  for the C{float} C{prec}ision, number of decimal digits
331
330
  (0..9) and the C{sep}arator string to join. Trailing
332
- zero decimals are stripped for B{C{prec}} values of
333
- 1 and above, but kept for negative B{C{prec}} values.
331
+ zero decimals are stripped for B{C{prec}} values of 1
332
+ and above, but kept for negative B{C{prec}} values.
334
333
 
335
334
  @return: RhumbLineSolve items (C{str}).
336
335
  '''
337
- return _SolveLineBase._toStr(self, azi12=self.azi12, rhumb=self._solve,
338
- RhumbSolve=self.RhumbSolve, **prec_sep)
336
+ return _SolveGDictLineBase._toStr(self, azi12=self.azi12, rhumb=self._solve,
337
+ RhumbSolve=self.RhumbSolve, **prec_sep)
339
338
 
340
339
 
341
340
  class RhumbSolve7Tuple(Rhumb8Tuple):
@@ -396,7 +395,7 @@ if __name__ == '__main__':
396
395
  rS.verbose = '--verbose' in argv # or '-v' in argv
397
396
 
398
397
  if rS.RhumbSolve in (_PYGEODESY_RHUMBSOLVE_, None): # not set
399
- rS.RhumbSolve = '/opt/local/bin/RhumbSolve' # '/opt/local/Cellar/geographiclib/2.2/bin/RhumbSolve' # HomeBrew
398
+ rS.RhumbSolve = '/opt/local/bin/RhumbSolve' # '/opt/local/Cellar/geographiclib/2.3/bin/RhumbSolve' # HomeBrew
400
399
  printf('version: %s', rS.version)
401
400
 
402
401
  if len(argv) > 6: # 60 0 30 0 45 1e6