pygeodesy 24.6.1__py2.py3-none-any.whl → 24.6.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 (89) hide show
  1. {PyGeodesy-24.6.1.dist-info → PyGeodesy-24.6.24.dist-info}/METADATA +2 -2
  2. PyGeodesy-24.6.24.dist-info/RECORD +117 -0
  3. pygeodesy/__init__.py +33 -32
  4. pygeodesy/albers.py +2 -2
  5. pygeodesy/auxilats/__init__.py +1 -1
  6. pygeodesy/auxilats/auxAngle.py +40 -39
  7. pygeodesy/auxilats/auxDLat.py +3 -2
  8. pygeodesy/auxilats/auxLat.py +16 -18
  9. pygeodesy/auxilats/auxily.py +1 -1
  10. pygeodesy/azimuthal.py +10 -10
  11. pygeodesy/basics.py +9 -1
  12. pygeodesy/booleans.py +53 -66
  13. pygeodesy/cartesianBase.py +143 -155
  14. pygeodesy/css.py +14 -18
  15. pygeodesy/datums.py +6 -6
  16. pygeodesy/deprecated/__init__.py +1 -1
  17. pygeodesy/deprecated/classes.py +16 -2
  18. pygeodesy/deprecated/datum.py +3 -3
  19. pygeodesy/deprecated/functions.py +6 -8
  20. pygeodesy/dms.py +23 -27
  21. pygeodesy/ecef.py +49 -55
  22. pygeodesy/elevations.py +4 -4
  23. pygeodesy/ellipsoidalBase.py +28 -70
  24. pygeodesy/ellipsoidalBaseDI.py +19 -23
  25. pygeodesy/ellipsoidalExact.py +3 -3
  26. pygeodesy/ellipsoidalGeodSolve.py +15 -23
  27. pygeodesy/ellipsoidalKarney.py +37 -60
  28. pygeodesy/ellipsoidalNvector.py +44 -50
  29. pygeodesy/ellipsoidalVincenty.py +11 -14
  30. pygeodesy/ellipsoids.py +107 -101
  31. pygeodesy/errors.py +101 -49
  32. pygeodesy/etm.py +32 -44
  33. pygeodesy/formy.py +55 -58
  34. pygeodesy/frechet.py +20 -23
  35. pygeodesy/fsums.py +4 -4
  36. pygeodesy/gars.py +3 -4
  37. pygeodesy/geodesici.py +909 -0
  38. pygeodesy/geodesicw.py +11 -13
  39. pygeodesy/geodesicx/__init__.py +4 -4
  40. pygeodesy/geodesicx/gx.py +18 -28
  41. pygeodesy/geodesicx/gxbases.py +20 -8
  42. pygeodesy/geodesicx/gxline.py +16 -22
  43. pygeodesy/geodsolve.py +102 -34
  44. pygeodesy/geohash.py +39 -60
  45. pygeodesy/geoids.py +28 -37
  46. pygeodesy/hausdorff.py +21 -23
  47. pygeodesy/heights.py +15 -28
  48. pygeodesy/internals.py +19 -12
  49. pygeodesy/interns.py +4 -10
  50. pygeodesy/iters.py +2 -2
  51. pygeodesy/karney.py +20 -4
  52. pygeodesy/ktm.py +13 -16
  53. pygeodesy/latlonBase.py +202 -191
  54. pygeodesy/lazily.py +96 -59
  55. pygeodesy/lcc.py +29 -32
  56. pygeodesy/ltp.py +43 -24
  57. pygeodesy/ltpTuples.py +190 -183
  58. pygeodesy/mgrs.py +35 -9
  59. pygeodesy/named.py +106 -72
  60. pygeodesy/namedTuples.py +43 -14
  61. pygeodesy/nvectorBase.py +23 -27
  62. pygeodesy/osgr.py +9 -9
  63. pygeodesy/points.py +7 -7
  64. pygeodesy/rhumb/__init__.py +1 -1
  65. pygeodesy/rhumb/aux_.py +5 -5
  66. pygeodesy/rhumb/bases.py +30 -31
  67. pygeodesy/rhumb/ekx.py +3 -4
  68. pygeodesy/rhumb/solve.py +8 -61
  69. pygeodesy/solveBase.py +22 -19
  70. pygeodesy/sphericalBase.py +26 -21
  71. pygeodesy/sphericalNvector.py +13 -13
  72. pygeodesy/sphericalTrigonometry.py +86 -97
  73. pygeodesy/streprs.py +8 -36
  74. pygeodesy/trf.py +3 -3
  75. pygeodesy/triaxials.py +117 -91
  76. pygeodesy/units.py +229 -321
  77. pygeodesy/unitsBase.py +116 -108
  78. pygeodesy/ups.py +26 -31
  79. pygeodesy/utily.py +12 -11
  80. pygeodesy/utm.py +35 -40
  81. pygeodesy/utmups.py +43 -46
  82. pygeodesy/utmupsBase.py +9 -10
  83. pygeodesy/vector3d.py +59 -62
  84. pygeodesy/vector3dBase.py +17 -15
  85. pygeodesy/webmercator.py +19 -21
  86. pygeodesy/wgrs.py +18 -20
  87. PyGeodesy-24.6.1.dist-info/RECORD +0 -116
  88. {PyGeodesy-24.6.1.dist-info → PyGeodesy-24.6.24.dist-info}/WHEEL +0 -0
  89. {PyGeodesy-24.6.1.dist-info → PyGeodesy-24.6.24.dist-info}/top_level.txt +0 -0
pygeodesy/datums.py CHANGED
@@ -94,7 +94,7 @@ from pygeodesy.units import _isRadius, Radius_, radians
94
94
  # import operator as _operator # from .fmath
95
95
 
96
96
  __all__ = _ALL_LAZY.datums
97
- __version__ = '24.05.21'
97
+ __version__ = '24.06.24'
98
98
 
99
99
  _a_ellipsoid_ = _UNDER_(_a_, _ellipsoid_)
100
100
  _BD72_ = 'BD72'
@@ -248,18 +248,18 @@ class Transform(_NamedEnumItem):
248
248
  self.s = s = (s1 - _1_0) / _S1_S
249
249
  return s
250
250
 
251
- def toStr(self, prec=5, fmt=Fmt.g, **name): # PYCHOK expected
251
+ def toStr(self, prec=5, fmt=Fmt.g, **sep_name): # PYCHOK expected
252
252
  '''Return this transform as a string.
253
253
 
254
254
  @kwarg prec: Number of (decimal) digits, unstripped (C{int}).
255
255
  @kwarg fmt: Optional C{float} format (C{letter}).
256
- @kwarg name: Optional, override C{B{name}=NN} (C{str}) or
257
- C{None} to exclude this transform's name.
256
+ @kwarg sep_name: Optional C{B{name}=NN} (C{str}) or C{None}
257
+ to exclude this transform's name and separater
258
+ C{B{sep}=", "} to join the items (C{str}).
258
259
 
259
260
  @return: Transform attributes (C{str}).
260
261
  '''
261
- name, _ = _name2__(**name) # name=None
262
- return self._instr(name, prec, *_Names11, fmt=fmt)
262
+ return self._instr(*_Names11, fmt=fmt, prec=prec, **sep_name)
263
263
 
264
264
  def transform(self, x, y, z, inverse=False, **Vector_and_kwds):
265
265
  '''Transform a (cartesian) position, forward or inverse.
@@ -27,7 +27,7 @@ __all__ = (_ALL_DEPRECATED.deprecated_bases +
27
27
  _ALL_DEPRECATED.deprecated_classes +
28
28
  _ALL_DEPRECATED.deprecated_consterns +
29
29
  _ALL_DEPRECATED.deprecated_functions)
30
- __version__ = '24.04.17'
30
+ __version__ = '24.06.15'
31
31
 
32
32
  if _unLazy0:
33
33
  from pygeodesy.deprecated import bases, datum, nvector, rhumbBase, \
@@ -19,10 +19,10 @@ from pygeodesy.namedTuples import Forward4Tuple as _Forward4Tuple, \
19
19
  from pygeodesy.props import deprecated_class, deprecated_method
20
20
  from pygeodesy.resections import TriAngle5Tuple as _TriAngle5Tuple
21
21
  from pygeodesy.trf import TRFXform7Tuple as _TRFXform7Tuple
22
- from pygeodesy.units import Bearing, Int, Lat, Lon, Meter
22
+ from pygeodesy.units import Bearing, Int, Lamd, Lat, Lon, Meter, Phid
23
23
 
24
24
  __all__ = _ALL_DEPRECATED.deprecated_classes
25
- __version__ = '24.04.17'
25
+ __version__ = '24.06.15'
26
26
 
27
27
 
28
28
  class _Deprecated_NamedTuple(_NamedTuple):
@@ -151,6 +151,13 @@ def HeightIDW3(knots, **kwds): # PYCHOK no cover
151
151
  return HeightIDW3(knots, **kwds)
152
152
 
153
153
 
154
+ class Lam_(Lamd):
155
+ '''DEPRECATED on 2024.06.15, use class L{Lamd}.'''
156
+ def __init__(self, *args, **kwds): # PYCHOK signature
157
+ deprecated_class(self.__class__)
158
+ Lamd.__init__(self, *args, **kwds)
159
+
160
+
154
161
  class LatLonExact4Tuple(_Deprecated_NamedTuple):
155
162
  '''DEPRECATED, use class L{Reverse4Tuple}, item C{gamma} for C{convergence}.'''
156
163
  _Names_ = _reNames(_Reverse4Tuple._Names_, _gamma_, _convergence_)
@@ -163,6 +170,13 @@ class NearestOn4Tuple(_Deprecated_NamedTuple): # PYCHOK no cover
163
170
  _Units_ = ( Lat, Lon, Meter, Bearing)
164
171
 
165
172
 
173
+ class Phi_(Phid):
174
+ '''DEPRECATED on 2024.06.15, use class L{Phid}.'''
175
+ def __init__(self, *args, **kwds): # PYCHOK signature
176
+ deprecated_class(self.__class__)
177
+ Phid.__init__(self, *args, **kwds)
178
+
179
+
166
180
  class Ned3Tuple(_Deprecated_NamedTuple): # was in .ellipsoidalNvector
167
181
  '''DEPRECATED, use class L{Ned4Tuple}, ignoring item C{ltp}.'''
168
182
  assert _Ned4Tuple._Names_.index(_ltp_) == 3
@@ -5,17 +5,17 @@ u'''DEPRECATED on 2022.09.12, use module L{pygeodesy.datums} or L{pygeodesy.elli
5
5
  '''
6
6
 
7
7
  # XXX only the items previously public
8
- from pygeodesy.constants import R_M, R_MA, R_MB, R_KM, R_NM, R_SM, R_FM, R_VM
8
+ from pygeodesy.constants import R_FM, R_KM, R_M, R_MA, R_MB, R_NM, R_SM, R_VM
9
9
  from pygeodesy.datums import Datum, Datums, Transform, Transforms
10
10
  from pygeodesy.ellipsoids import Ellipsoid, Ellipsoids, Curvature2Tuple
11
11
  from pygeodesy.lazily import _ALL_DEPRECATED, _ALL_OTHER
12
12
 
13
13
  __all__ = _ALL_DEPRECATED.deprecated_datum
14
- __version__ = '23.11.26'
14
+ __version__ = '24.06.15'
15
15
 
16
16
  assert _ALL_OTHER(Curvature2Tuple, Datum, Ellipsoid, Transform) + \
17
17
  tuple(_.name for _ in (Datums, Ellipsoids, Transforms,
18
- R_M, R_MA, R_MB, R_KM, R_NM, R_SM, R_FM, R_VM)) == __all__
18
+ R_FM, R_KM, R_M, R_MA, R_MB, R_NM, R_SM, R_VM)) == __all__
19
19
 
20
20
  # **) MIT License
21
21
  #
@@ -14,7 +14,7 @@ from pygeodesy.props import deprecated_function
14
14
  from pygeodesy.units import Number_, Scalar_
15
15
 
16
16
  __all__ = _ALL_DEPRECATED.deprecated_functions
17
- __version__ = '24.05.25'
17
+ __version__ = '24.06.11'
18
18
 
19
19
  _WGS84 = _UTM = object()
20
20
 
@@ -41,9 +41,8 @@ def atand(x):
41
41
  def bounds(points, wrap=True, LatLon=None): # PYCHOK no cover
42
42
  '''DEPRECATED, use function L{pygeodesy.boundsOf}.
43
43
 
44
- @return: 2-Tuple C{(latlonSW, latlonNE)} as B{C{LatLon}}
45
- or 4-Tuple C{(latS, lonW, latN, lonE)} if
46
- B{C{LatLon}} is C{None}.
44
+ @return: 2-Tuple C{(latlonSW, latlonNE)}, each a B{C{LatLon}} or
45
+ 4-Tuple C{(latS, lonW, latN, lonE)} if C{B{LatLon} is None}.
47
46
  '''
48
47
  return tuple(_MODS.points.boundsOf(points, wrap=wrap, LatLon=LatLon))
49
48
 
@@ -253,7 +252,7 @@ def parseUTM(strUTM, datum=_WGS84, Utm=_UTM, name=NN): # PYCHOK no cover
253
252
  '''DEPRECATED, use function L{parseUTM5}.
254
253
 
255
254
  @return: The UTM coordinate (B{L{Utm}}) or 4-tuple C{(zone,
256
- hemisphere, easting, northing)} if B{C{Utm}} is C{None}.
255
+ hemisphere, easting, northing)} if C{B{Utm} is None}.
257
256
  '''
258
257
  d = _MODS.datums.Datums.WGS84 if datum is _WGS84 else datum # PYCHOK shadows?
259
258
  U = _MODS.utm.Utm if Utm is _UTM else Utm
@@ -305,9 +304,8 @@ def tienstra(pointA, pointB, pointC, alpha, **beta_gamma_useZ_Clas_and_kwds):
305
304
  def toUtm(latlon, lon=None, datum=None, Utm=_UTM, cmoff=True, name=NN): # PYCHOK no cover
306
305
  '''DEPRECATED, use function L{pygeodesy.toUtm8}.
307
306
 
308
- @return: The UTM coordinate (B{C{Utm}}) or a 6-tuple C{(zone,
309
- easting, northing, band, convergence, scale)} if
310
- B{C{Utm}} is C{None} or B{C{cmoff}} is C{False}.
307
+ @return: The UTM coordinate (B{C{Utm}}) or a 6-tuple C{(zone, easting, northing,
308
+ band, convergence, scale)} if C{B{Utm} is None} or C{B{cmoff} is False}.
311
309
  '''
312
310
  U = _MODS.utm.Utm if Utm is _UTM else Utm
313
311
  r = _MODS.utm.toUtm8(latlon, lon=lon, datum=datum, Utm=U, name=name, falsed=cmoff)
pygeodesy/dms.py CHANGED
@@ -85,7 +85,7 @@ except ImportError: # Python 3+
85
85
  from string import ascii_letters as _LETTERS
86
86
 
87
87
  __all__ = _ALL_LAZY.dms
88
- __version__ = '24.05.18'
88
+ __version__ = '24.06.11'
89
89
 
90
90
  _beyond_ = 'beyond'
91
91
  _DDDMMSS_ = 'DDDMMSS'
@@ -293,8 +293,8 @@ def clipDegrees(deg, limit):
293
293
 
294
294
  @return: Clipped value (C{degrees}).
295
295
 
296
- @raise RangeError: If B{C{deg}} outside the valid C{-/+B{limit}}
297
- range and L{pygeodesy.rangerrors} set to C{True}.
296
+ @raise RangeError: If B{C{deg}} outside the valid C{-/+B{limit}} range
297
+ and L{rangerrors<pygeodesy.rangerrors>} is C{True}.
298
298
  '''
299
299
  return _clip(deg, limit, _degrees_) if limit and limit > 0 else deg
300
300
 
@@ -307,8 +307,8 @@ def clipRadians(rad, limit):
307
307
 
308
308
  @return: Clipped value (C{radians}).
309
309
 
310
- @raise RangeError: If B{C{rad}} outside the valid C{-/+B{limit}}
311
- range and L{pygeodesy.rangerrors} set to C{True}.
310
+ @raise RangeError: If B{C{rad}} outside the valid C{-/+B{limit}} range
311
+ and L{rangerrors<pygeodesy.rangerrors>} is C{True}.
312
312
  '''
313
313
  return _clip(rad, limit, _radians_) if limit and limit > 0 else rad
314
314
 
@@ -456,17 +456,14 @@ def latlonDMS(lls, **m_form_prec_sep_s_D_M_S):
456
456
  C{LatLon.toStr} and functions L{pygeodesy.latDMS} and
457
457
  L{pygeodesy.lonDMS} for more details.
458
458
 
459
- @return: A C{tuple} of C{str}s if B{C{lls}} is a list, sequence,
460
- tuple, etc. of C{LatLon} instances or a single C{str}
461
- if B{C{lls}} is a single C{LatLon}.
459
+ @return: A C{tuple} of C{str}s if B{C{lls}} is a list, sequence, tuple, etc.
460
+ of C{LatLon}s or a single C{str} if B{C{lls}} is a single C{LatLon}.
462
461
 
463
- @see: Functions L{pygeodesy.latlonDMS_}, L{pygeodesy.latDMS},
464
- L{pygeodesy.lonDMS} and L{pygeodesy.toDMS} and method
465
- C{LatLon.toStr}.
462
+ @see: Functions L{pygeodesy.latlonDMS_}, L{pygeodesy.latDMS}, L{pygeodesy.lonDMS}
463
+ and L{pygeodesy.toDMS} and method C{LatLon.toStr}.
466
464
 
467
- @note: Keyword argument C{B{sep}=None} to join a C{str}ing
468
- from the returned C{tuple} has been I{DEPRECATED},
469
- use C{B{sep}.join(B{latlonDMS_}(...))} instead.
465
+ @note: Keyword argument C{B{sep}=None} to join a C{str}ing from the returned C{tuple}
466
+ has been I{DEPRECATED}, use C{B{sep}.join(B{latlonDMS_}(...))} instead.
470
467
  '''
471
468
  sep, kwds = _latlonDMS_sep2(latlonDMS, **m_form_prec_sep_s_D_M_S)
472
469
  if isLatLon(lls):
@@ -610,7 +607,7 @@ def parseDDDMMSS(strDDDMMSS, suffix=_NSEW_, sep=S_SEP, clip=0, sexagecimal=False
610
607
  B{C{suffix}} compass point.
611
608
 
612
609
  @raise RangeError: Value of B{C{strDDDMMSS}} outside the valid C{-/+B{clip}}
613
- range and L{pygeodesy.rangerrors} set to C{True}.
610
+ range and L{rangerrors<pygeodesy.rangerrors>} is C{True}.
614
611
 
615
612
  @note: Type C{str} values "[D]DD", "[D]DDMM", "[D]DDMMSS" and "[D]DD.MMSS"
616
613
  for B{C{strDDDMMSS}} are parsed properly only if I{either} unsigned
@@ -746,14 +743,13 @@ def parseDMS(strDMS, suffix=_NSEW_, sep=S_SEP, clip=0, **s_D_M_S): # MCCABE 14
746
743
 
747
744
  @raise ParseError: Invalid B{C{strDMS}} or B{C{clip}}.
748
745
 
749
- @raise RangeError: Value of B{C{strDMS}} outside the valid C{-/+B{clip}}
750
- range and L{pygeodesy.rangerrors} set to C{True}.
746
+ @raise RangeError: Value of B{C{strDMS}} outside the valid C{-/+B{clip}} range
747
+ and L{rangerrors<pygeodesy.rangerrors>} is C{True}.
751
748
 
752
- @note: Unlike function L{parseDDDMMSS}, type C{float}, C{int} and other
753
- non-C{str} B{C{strDMS}} values are considered decimal (and not
754
- sexagecimal) degrees. For example, C{int(1230)} is returned
755
- as 1230.0 I{and not as 12.5} degrees and C{float(345)} as 345.0
756
- I{and not as 3.75} degrees!
749
+ @note: Unlike function L{parseDDDMMSS}, type C{float}, C{int} and other non-C{str}
750
+ B{C{strDMS}} values are considered decimal (and not sexagecimal) degrees.
751
+ For example, C{int(1230)} is returned as 1230.0 I{and not as 12.5} degrees
752
+ and C{float(345)} as 345.0 I{and not as 3.75} degrees!
757
753
 
758
754
  @see: Functions L{pygeodesy.parseDDDMMSS}, L{pygeodesy.parseDMS2},
759
755
  L{pygeodesy.parse3llh} and L{pygeodesy.toDMS}.
@@ -780,7 +776,7 @@ def parseDMS2(strLat, strLon, sep=S_SEP, clipLat=90, clipLon=180, wrap=False, **
780
776
 
781
777
  @raise RangeError: Value of B{C{strLat}} or B{C{strLon}} outside the
782
778
  valid C{-/+B{clipLat}} or C{-/+B{clipLon}} range
783
- and L{pygeodesy.rangerrors} set to C{True}.
779
+ and L{rangerrors<pygeodesy.rangerrors>} is C{True}.
784
780
 
785
781
  @note: See the B{Notes} at function L{parseDMS}.
786
782
 
@@ -829,9 +825,9 @@ def parse3llh(strllh, height=0, sep=_COMMA_, clipLat=90, clipLon=180, wrap=False
829
825
  @return: A L{LatLon3Tuple}C{(lat, lon, height)} in C{degrees},
830
826
  C{degrees} and C{float}.
831
827
 
832
- @raise RangeError: Lat- or longitude value of B{C{strllh}} outside
833
- the valid C{-/+B{clipLat}} or C{-/+B{clipLon}}
834
- range and L{pygeodesy.rangerrors} set to C{True}.
828
+ @raise RangeError: Lat- or longitude value of B{C{strllh}} outside the
829
+ valid C{-/+B{clipLat}} or C{-/+B{clipLon}} range
830
+ and L{rangerrors<pygeodesy.rangerrors>} is C{True}.
835
831
 
836
832
  @raise ValueError: Invalid B{C{strllh}} or B{C{height}}.
837
833
 
@@ -870,7 +866,7 @@ def parseRad(strRad, suffix=_NSEW_, clip=0):
870
866
  @raise ParseError: Invalid B{C{strRad}} or B{C{clip}}.
871
867
 
872
868
  @raise RangeError: Value of B{C{strRad}} outside the valid C{-/+B{clip}}
873
- range and L{pygeodesy.rangerrors} set to C{True}.
869
+ range and L{rangerrors<pygeodesy.rangerrors>} is C{True}.
874
870
  '''
875
871
  def _Rad(strRad, suffix, clip):
876
872
  try:
pygeodesy/ecef.py CHANGED
@@ -86,7 +86,7 @@ from pygeodesy.utily import atan1, atan1d, atan2d, degrees90, degrees180, \
86
86
  from math import atan2, cos, degrees, fabs, radians, sqrt
87
87
 
88
88
  __all__ = _ALL_LAZY.ecef
89
- __version__ = '24.05.31'
89
+ __version__ = '24.06.11'
90
90
 
91
91
  _Ecef_ = 'Ecef'
92
92
  _prolate_ = 'prolate'
@@ -133,13 +133,13 @@ class _EcefBase(_NamedBase):
133
133
  elif _isRadius(E) and isscalar(f):
134
134
  E = a_f2Tuple(E, f)
135
135
  else:
136
- raise ValueError # _invalid_
136
+ raise ValueError() # _invalid_
137
137
 
138
138
  if E not in (_EWGS84, _WGS84):
139
139
  d = _ellipsoidal_datum(E, **name)
140
140
  E = d.ellipsoid
141
141
  if E.a < EPS or E.f > EPS1:
142
- raise ValueError # _invalid_
142
+ raise ValueError() # _invalid_
143
143
  self._datum = d
144
144
  self._E = E
145
145
 
@@ -299,14 +299,14 @@ class _EcefBase(_NamedBase):
299
299
  '''
300
300
  return self._xnamed(EcefMatrix(sa, ca, sb, cb))
301
301
 
302
- def _polon(self, y, x, R, **name_lon00):
302
+ def _polon(self, y, x, R, **lon00_name):
303
303
  '''(INTERNAL) Handle I{"polar"} longitude.
304
304
  '''
305
- return atan2d(y, x) if R else _xkwds_get(name_lon00, lon00=self.lon00)
305
+ return atan2d(y, x) if R else _xkwds_get(lon00_name, lon00=self.lon00)
306
306
 
307
- def reverse(self, xyz, y=None, z=None, M=False, **name_lon00): # PYCHOK no cover
307
+ def reverse(self, xyz, y=None, z=None, M=False, **lon00_name): # PYCHOK no cover
308
308
  '''I{Must be overloaded}.'''
309
- self._notOverloaded(xyz, y=y, z=z, M=M, **name_lon00)
309
+ self._notOverloaded(xyz, y=y, z=z, M=M, **lon00_name)
310
310
 
311
311
  def toStr(self, prec=9, **unused): # PYCHOK signature
312
312
  '''Return this C{Ecef*} as a string.
@@ -324,7 +324,7 @@ class EcefFarrell21(_EcefBase):
324
324
  books?id=fW4foWASY6wC>}, page 29.
325
325
  '''
326
326
 
327
- def reverse(self, xyz, y=None, z=None, M=None, **name_lon00): # PYCHOK unused M
327
+ def reverse(self, xyz, y=None, z=None, M=None, **lon00_name): # PYCHOK unused M
328
328
  '''Convert from geocentric C{(x, y, z)} to geodetic C{(lat, lon, height)} using
329
329
  I{Farrell}'s U{Table 2.1<https://Books.Google.com/books?id=fW4foWASY6wC>},
330
330
  page 29.
@@ -334,10 +334,9 @@ class EcefFarrell21(_EcefBase):
334
334
  @kwarg y: ECEF C{y} coordinate for C{scalar} B{C{xyz}} and B{C{z}} (C{meter}).
335
335
  @kwarg z: ECEF C{z} coordinate for C{scalar} B{C{xyz}} and B{C{y}} (C{meter}).
336
336
  @kwarg M: I{Ignored}, rotation matrix C{M} not available.
337
- @kwarg name_lon00: Optional keyword arguments C{B{name}=NN} (C{str}) and
338
- I{"polar"} longitude C{B{lon00}=INT0} (C{degrees}), overriding
339
- the default and property C{lon00} setting and returned if
340
- C{B{x}=0} and C{B{y}=0}.
337
+ @kwarg lon00_name: Optional C{B{name}=NN} (C{str}) and optional keyword argument
338
+ C{B{lon00}=INT0} (C{degrees}), an arbitrary I{"polar"} longitude
339
+ returned if C{B{x}=0} and C{B{y}=0}, see property C{lon00}.
341
340
 
342
341
  @return: An L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with
343
342
  geodetic coordinates C{(lat, lon, height)} for the given geocentric
@@ -350,7 +349,7 @@ class EcefFarrell21(_EcefBase):
350
349
 
351
350
  @see: L{EcefFarrell22} and L{EcefVeness}.
352
351
  '''
353
- x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **name_lon00)
352
+ x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **lon00_name)
354
353
 
355
354
  E = self.ellipsoid
356
355
  a = E.a
@@ -382,7 +381,7 @@ class EcefFarrell21(_EcefBase):
382
381
 
383
382
  h = hypot(r, z) * (_1_0 - v)
384
383
  lat = atan1d((e2_ * v + _1_0) * z, p)
385
- lon = self._polon(y, x, p, **name_lon00)
384
+ lon = self._polon(y, x, p, **lon00_name)
386
385
  # note, phi and lam are swapped on page 29
387
386
 
388
387
  except (ValueError, ZeroDivisionError) as e:
@@ -399,7 +398,7 @@ class EcefFarrell22(_EcefBase):
399
398
  books?id=fW4foWASY6wC>}, page 30.
400
399
  '''
401
400
 
402
- def reverse(self, xyz, y=None, z=None, M=None, **name_lon00): # PYCHOK unused M
401
+ def reverse(self, xyz, y=None, z=None, M=None, **lon00_name): # PYCHOK unused M
403
402
  '''Convert from geocentric C{(x, y, z)} to geodetic C{(lat, lon, height)} using
404
403
  I{Farrell}'s U{Table 2.2<https://Books.Google.com/books?id=fW4foWASY6wC>},
405
404
  page 30.
@@ -409,10 +408,9 @@ class EcefFarrell22(_EcefBase):
409
408
  @kwarg y: ECEF C{y} coordinate for C{scalar} B{C{xyz}} and B{C{z}} (C{meter}).
410
409
  @kwarg z: ECEF C{z} coordinate for C{scalar} B{C{xyz}} and B{C{y}} (C{meter}).
411
410
  @kwarg M: I{Ignored}, rotation matrix C{M} not available.
412
- @kwarg name_lon00: Optional keyword arguments C{B{name}=NN} (C{str}) and
413
- I{"polar"} longitude C{B{lon00}=INT0} (C{degrees}), overriding
414
- the default and property C{lon00} setting and returned in case
415
- C{B{x}=0} and C{B{y}=0}.
411
+ @kwarg lon00_name: Optional C{B{name}=NN} (C{str}) and optional keyword argument
412
+ C{B{lon00}=INT0} (C{degrees}), an arbitrary I{"polar"} longitude
413
+ returned if C{B{x}=0} and C{B{y}=0}, see property C{lon00}.
416
414
 
417
415
  @return: An L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with
418
416
  geodetic coordinates C{(lat, lon, height)} for the given geocentric
@@ -425,7 +423,7 @@ class EcefFarrell22(_EcefBase):
425
423
 
426
424
  @see: L{EcefFarrell21} and L{EcefVeness}.
427
425
  '''
428
- x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **name_lon00)
426
+ x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **lon00_name)
429
427
 
430
428
  E = self.ellipsoid
431
429
  a = E.a
@@ -433,7 +431,7 @@ class EcefFarrell22(_EcefBase):
433
431
 
434
432
  try: # see EcefVeness.reverse
435
433
  p = hypot(x, y)
436
- lon = self._polon(y, x, p, **name_lon00)
434
+ lon = self._polon(y, x, p, **lon00_name)
437
435
 
438
436
  s, c = sincos2(atan2(z * a, p * b)) # == _norm3
439
437
  lat = atan1d(z + s**3 * b * E.e22,
@@ -473,7 +471,7 @@ class EcefKarney(_EcefBase):
473
471
  '''
474
472
  return self.equatoradius / EPS_2 # self.equatoradius * _2_EPS, 12M lighyears
475
473
 
476
- def reverse(self, xyz, y=None, z=None, M=False, **name_lon00):
474
+ def reverse(self, xyz, y=None, z=None, M=False, **lon00_name):
477
475
  '''Convert from geocentric C{(x, y, z)} to geodetic C{(lat, lon, height)}.
478
476
 
479
477
  @arg xyz: A geocentric (C{Cartesian}, L{Ecef9Tuple}) or C{scalar} ECEF C{x}
@@ -481,10 +479,9 @@ class EcefKarney(_EcefBase):
481
479
  @kwarg y: ECEF C{y} coordinate for C{scalar} B{C{xyz}} and B{C{z}} (C{meter}).
482
480
  @kwarg z: ECEF C{z} coordinate for C{scalar} B{C{xyz}} and B{C{y}} (C{meter}).
483
481
  @kwarg M: Optionally, return the rotation L{EcefMatrix} (C{bool}).
484
- @kwarg name_lon00: Optional keyword arguments C{B{name}=NN} (C{str}) and
485
- I{"polar"} longitude C{B{lon00}=INT0} (C{degrees}), overriding
486
- the default and property C{lon00} setting and returned in case
487
- C{B{x}=0} and C{B{y}=0}.
482
+ @kwarg lon00_name: Optional C{B{name}=NN} (C{str}) and optional keyword argument
483
+ C{B{lon00}=INT0} (C{degrees}), an arbitrary I{"polar"} longitude
484
+ returned if C{B{x}=0} and C{B{y}=0}, see property C{lon00}.
488
485
 
489
486
  @return: An L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with
490
487
  geodetic coordinates C{(lat, lon, height)} for the given geocentric
@@ -508,7 +505,7 @@ class EcefKarney(_EcefBase):
508
505
  h = hypot(y, x) # EPS0, EPS_2
509
506
  return (y / h, x / h, h) if h > 0 else (_0_0, _1_0, h)
510
507
 
511
- x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **name_lon00)
508
+ x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **lon00_name)
512
509
 
513
510
  E = self.ellipsoid
514
511
  f = E.f
@@ -603,7 +600,7 @@ class EcefKarney(_EcefBase):
603
600
  C = 4
604
601
 
605
602
  # lon00 <https://GitHub.com/mrJean1/PyGeodesy/issues/77>
606
- lon = self._polon(sb, cb, R, **name_lon00)
603
+ lon = self._polon(sb, cb, R, **lon00_name)
607
604
  m = self._Matrix(sa, ca, sb, cb) if M else None
608
605
  return Ecef9Tuple(x, y, z, atan1d(sa, ca), lon, h,
609
606
  C, m, self.datum, name=self._name__(name))
@@ -615,7 +612,7 @@ class EcefSudano(_EcefBase):
615
612
  '''
616
613
  _tol = EPS2
617
614
 
618
- def reverse(self, xyz, y=None, z=None, M=None, **name_lon00): # PYCHOK unused M
615
+ def reverse(self, xyz, y=None, z=None, M=None, **lon00_name): # PYCHOK unused M
619
616
  '''Convert from geocentric C{(x, y, z)} to geodetic C{(lat, lon, height)} using
620
617
  I{Sudano}'s U{iterative method<https://www.ResearchGate.net/publication/3709199>}.
621
618
 
@@ -624,10 +621,9 @@ class EcefSudano(_EcefBase):
624
621
  @kwarg y: ECEF C{y} coordinate for C{scalar} B{C{xyz}} and B{C{z}} (C{meter}).
625
622
  @kwarg z: ECEF C{z} coordinate for C{scalar} B{C{xyz}} and B{C{y}} (C{meter}).
626
623
  @kwarg M: I{Ignored}, rotation matrix C{M} not available.
627
- @kwarg name_lon00: Optional keyword arguments C{B{name}=NN} (C{str}) and
628
- I{"polar"} longitude C{B{lon00}=INT0} (C{degrees}), overriding
629
- the default and property C{lon00} setting and returned in case
630
- C{B{x}=0} and C{B{y}=0}.
624
+ @kwarg lon00_name: Optional C{B{name}=NN} (C{str}) and optional keyword argument
625
+ C{B{lon00}=INT0} (C{degrees}), an arbitrary I{"polar"} longitude
626
+ returned if C{B{x}=0} and C{B{y}=0}, see property C{lon00}.
631
627
 
632
628
  @return: An L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with geodetic
633
629
  coordinates C{(lat, lon, height)} for the given geocentric ones C{(x, y, z)},
@@ -636,7 +632,7 @@ class EcefSudano(_EcefBase):
636
632
  @raise EcefError: Invalid B{C{xyz}} or C{scalar} C{x} or B{C{y}} and/or B{C{z}}
637
633
  not C{scalar} for C{scalar} B{C{xyz}} or no convergence.
638
634
  '''
639
- x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **name_lon00)
635
+ x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **lon00_name)
640
636
 
641
637
  E = self.ellipsoid
642
638
  e = E.e2 * E.a
@@ -678,7 +674,7 @@ class EcefSudano(_EcefBase):
678
674
 
679
675
  if lat is None:
680
676
  lat = copysign0(atan1d(_a(sa), ca), z)
681
- lon = self._polon(y, x, R, **name_lon00)
677
+ lon = self._polon(y, x, R, **lon00_name)
682
678
 
683
679
  h = fsumf_(R * ca, _a(z * sa), -E.a * E.e2s(sa)) # use Veness'
684
680
  # because Sudano's Eq (7) doesn't produce the correct height
@@ -712,7 +708,7 @@ class EcefVeness(_EcefBase):
712
708
  between 3D Cartesian and ellipsoidal latitude, longitude and height coordinates}.
713
709
  '''
714
710
 
715
- def reverse(self, xyz, y=None, z=None, M=None, **name_lon00): # PYCHOK unused M
711
+ def reverse(self, xyz, y=None, z=None, M=None, **lon00_name): # PYCHOK unused M
716
712
  '''Conversion from geocentric C{(x, y, z)} to geodetic C{(lat, lon, height)}
717
713
  transcoded from I{Chris Veness}' U{JavaScript<https://www.Movable-Type.co.UK/
718
714
  scripts/geodesy/docs/latlon-ellipsoidal.js.html>}.
@@ -726,10 +722,9 @@ class EcefVeness(_EcefBase):
726
722
  @kwarg y: ECEF C{y} coordinate for C{scalar} B{C{xyz}} and B{C{z}} (C{meter}).
727
723
  @kwarg z: ECEF C{z} coordinate for C{scalar} B{C{xyz}} and B{C{y}} (C{meter}).
728
724
  @kwarg M: I{Ignored}, rotation matrix C{M} not available.
729
- @kwarg name_lon00: Optional keyword arguments C{B{name}=NN} (C{str}) and
730
- I{"polar"} longitude C{B{lon00}=INT0} (C{degrees}), overriding
731
- the default and property C{lon00} setting and returned in case
732
- C{B{x}=0} and C{B{y}=0}.
725
+ @kwarg lon00_name: Optional C{B{name}=NN} (C{str}) and optional keyword argument
726
+ C{B{lon00}=INT0} (C{degrees}), an arbitrary I{"polar"} longitude
727
+ returned if C{B{x}=0} and C{B{y}=0}, see property C{lon00}.
733
728
 
734
729
  @return: An L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with
735
730
  geodetic coordinates C{(lat, lon, height)} for the given geocentric
@@ -747,7 +742,7 @@ class EcefVeness(_EcefBase):
747
742
  system to latitude longitude and altitude}<https://www.ResearchGate.net/
748
743
  publication/3709199>}.
749
744
  '''
750
- x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **name_lon00)
745
+ x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **lon00_name)
751
746
 
752
747
  E = self.ellipsoid
753
748
  a = E.a
@@ -778,7 +773,7 @@ class EcefVeness(_EcefBase):
778
773
  else: # polar lat, lon arbitrarily lon00
779
774
  C, lat, h = 3, (_N_90_0 if z < 0 else _90_0), (fabs(z) - E.b)
780
775
 
781
- lon = self._polon(y, x, p, **name_lon00)
776
+ lon = self._polon(y, x, p, **lon00_name)
782
777
  return Ecef9Tuple(x, y, z, lat, lon, h,
783
778
  C, None, self.datum, # M=None
784
779
  name=self._name__(name))
@@ -795,8 +790,8 @@ class EcefYou(_EcefBase):
795
790
  pages 1-18 and U{PyMap3D <https://PyPI.org/project/pymap3d>}.
796
791
  '''
797
792
 
798
- def __init__(self, a_ellipsoid=_EWGS84, f=None, **name_lon00): # PYCHOK signature
799
- _EcefBase.__init__(self, a_ellipsoid, f=f, **name_lon00) # inherited documentation
793
+ def __init__(self, a_ellipsoid=_EWGS84, f=None, **lon00_name): # PYCHOK signature
794
+ _EcefBase.__init__(self, a_ellipsoid, f=f, **lon00_name) # inherited documentation
800
795
  self._ee2 = EcefYou._ee2(self.ellipsoid)
801
796
 
802
797
  @staticmethod
@@ -806,7 +801,7 @@ class EcefYou(_EcefBase):
806
801
  raise EcefError(ellipsoid=E, txt=_prolate_)
807
802
  return sqrt0(e2), e2
808
803
 
809
- def reverse(self, xyz, y=None, z=None, M=None, **name_lon00): # PYCHOK unused M
804
+ def reverse(self, xyz, y=None, z=None, M=None, **lon00_name): # PYCHOK unused M
810
805
  '''Convert geocentric C{(x, y, z)} to geodetic C{(lat, lon, height)}
811
806
  using I{Rey-Jer You}'s transformation.
812
807
 
@@ -815,10 +810,9 @@ class EcefYou(_EcefBase):
815
810
  @kwarg y: ECEF C{y} coordinate for C{scalar} B{C{xyz}} and B{C{z}} (C{meter}).
816
811
  @kwarg z: ECEF C{z} coordinate for C{scalar} B{C{xyz}} and B{C{y}} (C{meter}).
817
812
  @kwarg M: I{Ignored}, rotation matrix C{M} not available.
818
- @kwarg name_lon00: Optional keyword arguments C{B{name}=NN} (C{str}) and
819
- I{"polar"} longitude C{B{lon00}=INT0} (C{degrees}), overriding
820
- the default and property C{lon00} setting and returned in case
821
- C{B{x}=0} and C{B{y}=0}.
813
+ @kwarg lon00_name: Optional C{B{name}=NN} (C{str}) and optional keyword argument
814
+ C{B{lon00}=INT0} (C{degrees}), an arbitrary I{"polar"} longitude
815
+ returned if C{B{x}=0} and C{B{y}=0}, see property C{lon00}.
822
816
 
823
817
  @return: An L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with
824
818
  geodetic coordinates C{(lat, lon, height)} for the given geocentric
@@ -829,7 +823,7 @@ class EcefYou(_EcefBase):
829
823
  B{C{z}} not C{scalar} for C{scalar} B{C{xyz}} or the
830
824
  ellipsoid is I{prolate}.
831
825
  '''
832
- x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **name_lon00)
826
+ x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **lon00_name)
833
827
 
834
828
  E = self.ellipsoid
835
829
  e, e2 = self._ee2
@@ -854,7 +848,7 @@ class EcefYou(_EcefBase):
854
848
  sB, cB = _copysign_1_0(z), _0_0
855
849
 
856
850
  lat = atan1d(E.a * sB, E.b * cB) # atan(E.a_b * tan(B))
857
- lon = self._polon(y, x, q, **name_lon00)
851
+ lon = self._polon(y, x, q, **lon00_name)
858
852
 
859
853
  h = hypot(z - E.b * sB, q - E.a * cB)
860
854
  if hypot2_(x, y, z * E.a_b) < E.a2:
@@ -898,7 +892,7 @@ class EcefMatrix(_NamedTuple):
898
892
  t += _more # ... from .multiply
899
893
 
900
894
  elif max(map(fabs, t)) > _1_0:
901
- raise EcefError(unstr(EcefMatrix.__name__, *t))
895
+ raise EcefError(unstr(EcefMatrix, *t))
902
896
 
903
897
  else: # build matrix from the following quaternion operations
904
898
  # qrot(lam, [0,0,1]) * qrot(phi, [0,-1,0]) * [1,1,1,1]/2
@@ -955,7 +949,7 @@ class EcefMatrix(_NamedTuple):
955
949
 
956
950
  @return: The matrix product (L{EcefMatrix}).
957
951
 
958
- @raise TypeError: If B{C{other}} is not L{EcefMatrix}.
952
+ @raise TypeError: If B{C{other}} is not an L{EcefMatrix}.
959
953
  '''
960
954
  _xinstanceof(EcefMatrix, other=other)
961
955
  # like LocalCartesian.MatrixMultiply, C{self.matrixTransposed3 X other.matrix3}
@@ -1191,7 +1185,7 @@ class Ecef9Tuple(_NamedTuple):
1191
1185
  B{C{LatLon}} keyword arguments.
1192
1186
 
1193
1187
  @return: An instance of C{B{LatLon}(lat, lon, **B{LatLon_kwds})}
1194
- or if B{C{LatLon}} is C{None}, a L{LatLon3Tuple}C{(lat, lon,
1188
+ or if C{B{LatLon} is None}, a L{LatLon3Tuple}C{(lat, lon,
1195
1189
  height)} respectively L{LatLon4Tuple}C{(lat, lon, height,
1196
1190
  datum)} depending on whether C{datum} is un-/specified.
1197
1191
 
@@ -1239,7 +1233,7 @@ class Ecef9Tuple(_NamedTuple):
1239
1233
  arguments, ignored if C{B{Vector} is None}.
1240
1234
 
1241
1235
  @return: A C{Vector}C{(x, y, z, **Vector_kwds)} instance or a
1242
- L{Vector3Tuple}C{(x, y, z)} if B{C{Vector}} is C{None}.
1236
+ L{Vector3Tuple}C{(x, y, z)} if C{B{Vector} is None}.
1243
1237
 
1244
1238
  @see: Propertes C{xyz} and C{xyzh}
1245
1239
  '''
pygeodesy/elevations.py CHANGED
@@ -34,7 +34,7 @@ from pygeodesy.units import Lat, Lon, Meter, Scalar, Str
34
34
  # from math import fabs # from .karney
35
35
 
36
36
  __all__ = _ALL_LAZY.elevations
37
- __version__ = '24.05.13'
37
+ __version__ = '24.06.11'
38
38
 
39
39
  try:
40
40
  from urllib2 import urlopen # quote, urlcleanup
@@ -152,7 +152,7 @@ def elevation2(lat, lon, timeout=2.0):
152
152
 
153
153
  @raise ValueError: Invalid B{C{timeout}}.
154
154
 
155
- @note: The returned C{elevation} is C{None} if B{C{lat}} or B{C{lon}} is
155
+ @note: The returned C{elevation is None} if B{C{lat}} or B{C{lon}} is
156
156
  invalid or outside the C{Conterminous US (CONUS)}, if conversion
157
157
  failed or if the query timed out. The C{"error"} is the C{HTTP-,
158
158
  IO-, SSL-} or other C{-Error} as a string (C{str}).
@@ -208,8 +208,8 @@ def geoidHeight2(lat, lon, model=0, timeout=2.0):
208
208
 
209
209
  @raise ValueError: Invalid B{C{timeout}}.
210
210
 
211
- @note: The returned C{height} is C{None} if B{C{lat}} or B{C{lon}}
212
- is invalid or outside the C{Conterminous US (CONUS)}, if the
211
+ @note: The returned C{height is None} if B{C{lat}} or B{C{lon}} is
212
+ invalid or outside the C{Conterminous US (CONUS)}, if the
213
213
  B{C{model}} was invalid, if conversion failed or if the query
214
214
  timed out. The C{"error"} is the C{HTTP-, IO-, SSL-, URL-}
215
215
  or other C{-Error} as a string (C{str}).