pygeodesy 24.10.10__py2.py3-none-any.whl → 24.11.11__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 (76) hide show
  1. {PyGeodesy-24.10.10.dist-info → PyGeodesy-24.11.11.dist-info}/METADATA +12 -12
  2. PyGeodesy-24.11.11.dist-info/RECORD +118 -0
  3. {PyGeodesy-24.10.10.dist-info → PyGeodesy-24.11.11.dist-info}/WHEEL +1 -1
  4. pygeodesy/__init__.py +14 -14
  5. pygeodesy/__main__.py +5 -5
  6. pygeodesy/albers.py +12 -17
  7. pygeodesy/azimuthal.py +51 -61
  8. pygeodesy/basics.py +60 -62
  9. pygeodesy/booleans.py +87 -79
  10. pygeodesy/cartesianBase.py +6 -6
  11. pygeodesy/constants.py +23 -19
  12. pygeodesy/css.py +7 -8
  13. pygeodesy/datums.py +3 -3
  14. pygeodesy/deprecated/__init__.py +1 -1
  15. pygeodesy/deprecated/classes.py +9 -9
  16. pygeodesy/deprecated/functions.py +6 -6
  17. pygeodesy/dms.py +250 -270
  18. pygeodesy/ecef.py +11 -14
  19. pygeodesy/ellipsoidalBase.py +106 -121
  20. pygeodesy/ellipsoidalBaseDI.py +114 -118
  21. pygeodesy/ellipsoidalExact.py +35 -37
  22. pygeodesy/ellipsoidalNvector.py +4 -4
  23. pygeodesy/ellipsoidalVincenty.py +2 -2
  24. pygeodesy/ellipsoids.py +10 -51
  25. pygeodesy/elliptic.py +14 -14
  26. pygeodesy/errors.py +28 -28
  27. pygeodesy/etm.py +92 -68
  28. pygeodesy/fmath.py +42 -40
  29. pygeodesy/formy.py +7 -6
  30. pygeodesy/fsums.py +72 -51
  31. pygeodesy/geodesici.py +43 -40
  32. pygeodesy/geodesicw.py +17 -16
  33. pygeodesy/geodesicx/__init__.py +2 -2
  34. pygeodesy/geodesicx/gxarea.py +3 -2
  35. pygeodesy/geodsolve.py +79 -39
  36. pygeodesy/geohash.py +2 -2
  37. pygeodesy/geoids.py +32 -31
  38. pygeodesy/heights.py +2 -2
  39. pygeodesy/internals.py +201 -147
  40. pygeodesy/interns.py +23 -20
  41. pygeodesy/karney.py +62 -13
  42. pygeodesy/ktm.py +11 -13
  43. pygeodesy/latlonBase.py +18 -20
  44. pygeodesy/lazily.py +210 -218
  45. pygeodesy/lcc.py +4 -4
  46. pygeodesy/ltp.py +10 -10
  47. pygeodesy/ltpTuples.py +74 -75
  48. pygeodesy/mgrs.py +20 -21
  49. pygeodesy/named.py +15 -10
  50. pygeodesy/nvectorBase.py +1 -1
  51. pygeodesy/osgr.py +9 -12
  52. pygeodesy/points.py +2 -2
  53. pygeodesy/props.py +35 -14
  54. pygeodesy/resections.py +9 -10
  55. pygeodesy/rhumb/__init__.py +1 -1
  56. pygeodesy/rhumb/bases.py +5 -5
  57. pygeodesy/rhumb/solve.py +9 -10
  58. pygeodesy/simplify.py +5 -5
  59. pygeodesy/solveBase.py +7 -25
  60. pygeodesy/sphericalBase.py +20 -23
  61. pygeodesy/sphericalNvector.py +103 -145
  62. pygeodesy/sphericalTrigonometry.py +68 -73
  63. pygeodesy/streprs.py +5 -5
  64. pygeodesy/trf.py +6 -4
  65. pygeodesy/triaxials.py +46 -9
  66. pygeodesy/units.py +5 -4
  67. pygeodesy/ups.py +6 -6
  68. pygeodesy/utily.py +2 -2
  69. pygeodesy/utm.py +7 -7
  70. pygeodesy/vector2d.py +13 -13
  71. pygeodesy/vector3d.py +19 -21
  72. pygeodesy/vector3dBase.py +21 -19
  73. pygeodesy/webmercator.py +4 -4
  74. pygeodesy/wgrs.py +4 -4
  75. PyGeodesy-24.10.10.dist-info/RECORD +0 -118
  76. {PyGeodesy-24.10.10.dist-info → PyGeodesy-24.11.11.dist-info}/top_level.txt +0 -0
pygeodesy/lcc.py CHANGED
@@ -48,7 +48,7 @@ from pygeodesy.utily import atan1, degrees90, degrees180, sincos2, tanPI_2_2
48
48
  from math import atan, fabs, log, radians, sin, sqrt
49
49
 
50
50
  __all__ = _ALL_LAZY.lcc
51
- __version__ = '24.06.24'
51
+ __version__ = '24.11.06'
52
52
 
53
53
  _E0_ = 'E0'
54
54
  _N0_ = 'N0'
@@ -620,9 +620,9 @@ def toLcc(latlon, conic=Conics.WRF_Lb, height=None, Lcc=Lcc,
620
620
  @kwarg height: Optional height for the point, overriding the
621
621
  default height (C{meter}).
622
622
  @kwarg Lcc: Class to return the I{Lambert} location (L{Lcc}).
623
- @kwarg name_Lcc_kwds: Optional C{B{name}=NN} (C{str}) and optional,
624
- additional B{C{Lcc}} keyword arguments, ignored if
625
- B{C{Lcc} is None}.
623
+ @kwarg name_Lcc_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
624
+ additional B{C{Lcc}} keyword arguments, ignored if B{C{Lcc}
625
+ is None}.
626
626
 
627
627
  @return: The I{Lambert} location (L{Lcc}) or if C{B{Lcc} is None},
628
628
  an L{EasNor3Tuple}C{(easting, northing, height)}.
pygeodesy/ltp.py CHANGED
@@ -44,7 +44,7 @@ from pygeodesy.vector3d import _ALL_LAZY, Vector3d
44
44
  # from math import fabs, floor as _floor # from .fmath, .fsums
45
45
 
46
46
  __all__ = _ALL_LAZY.ltp
47
- __version__ = '24.08.18'
47
+ __version__ = '24.11.06'
48
48
 
49
49
  _height0_ = _height_ + _0_
50
50
  _narrow_ = 'narrow'
@@ -150,9 +150,9 @@ class Attitude(_NamedBase):
150
150
  @kwarg z: Z component of vector (C{scalar}), same units as B{C{x}}.
151
151
  @kwarg Vector: Class to return transformed point (C{Cartesian}, L{Vector3d}
152
152
  or C{Vector3Tuple}) or C{None}.
153
- @kwarg name_Vector_kwds: Optional C{B{name}=NN} (C{str}) and optional,
154
- additional B{C{Vector}} keyword arguments, ignored if
155
- C{B{Vector} is None}.
153
+ @kwarg name_Vector_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
154
+ additional B{C{Vector}} keyword arguments, ignored if C{B{Vector}
155
+ is None}.
156
156
 
157
157
  @return: A named B{C{Vector}} instance or if C{B{Vector} is None},
158
158
  a named L{Vector3Tuple}C{(x, y, z)}.
@@ -469,9 +469,9 @@ class LocalCartesian(_NamedBase):
469
469
 
470
470
  @arg ecef: Geocentric (and geodetic) (L{Ecef9Tuple}).
471
471
  @arg Xyz: An L{XyzLocal}, L{Enu} or L{Ned} I{class} or C{None}.
472
- @arg name_Xyz_kwds: Optional C{B{name}=NN} (C{str}) and optional,
473
- additional B{C{Xyz}} keyword arguments, ignored if
474
- C{B{Xyz} is None}.
472
+ @arg name_Xyz_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
473
+ additional B{C{Xyz}} keyword arguments, ignored if C{B{Xyz}
474
+ is None}.
475
475
 
476
476
  @return: An C{B{Xyz}(x, y, z, ltp, **B{name_Xyz_kwds}} instance or
477
477
  if C{B{Xyz} is None}, a L{Local9Tuple}C{(x, y, z, lat, lon,
@@ -1098,9 +1098,9 @@ def tyr3d(tilt=INT0, yaw=INT0, roll=INT0, Vector=Vector3d, **name_Vector_kwds):
1098
1098
  (clockwise rotation along and around the y-axis).
1099
1099
  @kwarg Vector: Class to return the direction vector (C{Cartesian},
1100
1100
  L{Vector3d} or C{Vector3Tuple}) or C{None}.
1101
- @kwarg name_Vector_kwds: Optional C{B{name}=NN} (C{str}) and optional,
1102
- additional B{C{Vector}} keyword arguments, ignored if
1103
- C{B{Vector} is None}.
1101
+ @kwarg name_Vector_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
1102
+ additional B{C{Vector}} keyword arguments, ignored if C{B{Vector}
1103
+ is None}.
1104
1104
 
1105
1105
  @return: A named B{C{Vector}} instance or if C{B{Vector} is None},
1106
1106
  a named L{Vector3Tuple}C{(x, y, z)}.
pygeodesy/ltpTuples.py CHANGED
@@ -16,7 +16,7 @@ from pygeodesy.constants import _0_0, _1_0, _90_0, _N_90_0
16
16
  # from pygeodesy.dms import F_D, toDMS # _MODS
17
17
  from pygeodesy.errors import _TypeError, _TypesError, _xattr, _xkwds, \
18
18
  _xkwds_item2
19
- from pygeodesy.fmath import hypot, hypot_
19
+ from pygeodesy.fmath import fdot_, hypot, hypot_
20
20
  from pygeodesy.interns import NN, _4_, _azimuth_, _center_, _COMMASPACE_, \
21
21
  _ecef_, _elevation_, _height_, _lat_, _lon_, \
22
22
  _ltp_, _M_, _name_, _up_, _X_, _x_, _xyz_, \
@@ -36,7 +36,7 @@ from pygeodesy.vector3d import Vector3d
36
36
  # from math import cos, radians # from .utily
37
37
 
38
38
  __all__ = _ALL_LAZY.ltpTuples
39
- __version__ = '24.08.18'
39
+ __version__ = '24.11.07'
40
40
 
41
41
  _aer_ = 'aer'
42
42
  _alt_ = 'alt'
@@ -126,9 +126,9 @@ class _AbcBase(_NamedBase):
126
126
  '''Get the I{local} I{Azimuth, Elevation, slant Range} (AER) components.
127
127
 
128
128
  @kwarg Aer: Class to return AER (L{Aer}) or C{None}.
129
- @kwarg name_Aer_kwds: Optional C{B{name}=NN} (C{str}) and optional,
130
- additional B{L{Aer}} keyword arguments, ignored if
131
- C{B{Aer} is None}.
129
+ @kwarg name_Aer_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
130
+ additional B{L{Aer}} keyword arguments, ignored if C{B{Aer}
131
+ is None}.
132
132
 
133
133
  @return: AER as an L{Aer} instance or if C{B{Aer} is None}, an
134
134
  L{Aer4Tuple}C{(azimuth, elevation, slantrange, ltp)}.
@@ -141,9 +141,9 @@ class _AbcBase(_NamedBase):
141
141
  '''Get the I{local} I{East, North, Up} (ENU) components.
142
142
 
143
143
  @kwarg Enu: Class to return ENU (L{Enu}) or C{None}.
144
- @kwarg name_Enu_kwds: Optional C{B{name}=NN} (C{str}) and optional,
145
- additional B{L{Enu}} keyword arguments, ignored if
146
- C{B{Enu} is None}.
144
+ @kwarg name_Enu_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
145
+ additional B{L{Enu}} keyword arguments, ignored if C{B{Enu}
146
+ is None}.
147
147
 
148
148
  @return: ENU as an L{Enu} instance or if C{B{Enu} is None}, an
149
149
  L{Enu4Tuple}C{(east, north, up, ltp)}.
@@ -156,9 +156,9 @@ class _AbcBase(_NamedBase):
156
156
  '''Get the I{local} I{North, East, Down} (NED) components.
157
157
 
158
158
  @kwarg Ned: Class to return NED (L{Ned}) or C{None}.
159
- @kwarg name_Ned_kwds: Optional C{B{name}=NN} (C{str}) and optional,
160
- additional B{L{Ned}} keyword arguments, ignored if
161
- C{B{Ned} is None}.
159
+ @kwarg name_Ned_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
160
+ additional B{L{Ned}} keyword arguments, ignored if C{B{Ned}
161
+ is None}.
162
162
 
163
163
  @return: NED as an L{Ned} instance or if C{B{Ned} is None}, an
164
164
  L{Ned4Tuple}C{(north, east, down, ltp)}.
@@ -172,9 +172,9 @@ class _AbcBase(_NamedBase):
172
172
 
173
173
  @kwarg Xyz: Class to return XYZ (L{XyzLocal}, L{Enu}, L{Ned}, L{Aer})
174
174
  or C{None}.
175
- @kwarg name_Xyz_kwds: Optional C{B{name}=NN} (C{str}) and optional,
176
- additional B{C{Xyz}} keyword arguments, ignored if
177
- C{B{Xyz} is None}.
175
+ @kwarg name_Xyz_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
176
+ additional B{C{Xyz}} keyword arguments, ignored if C{B{Xyz}
177
+ is None}.
178
178
 
179
179
  @return: XYZ as an B{C{Xyz}} instance or if C{B{Xyz} is None}, an
180
180
  L{Xyz4Tuple}C{(x, y, z, ltp)}.
@@ -814,9 +814,9 @@ class XyzLocal(_Vector3d):
814
814
  '''Get the local I{Azimuth, Elevation, slant Range} components.
815
815
 
816
816
  @kwarg Aer: Class to return AER (L{Aer}) or C{None}.
817
- @kwarg name_Aer_kwds: Optional C{B{name}=NN} (C{str}) and
818
- optional, additional B{C{Aer}} keyword arguments,
819
- ignored if C{B{Aer} is None}.
817
+ @kwarg name_Aer_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
818
+ additional B{C{Aer}} keyword arguments, ignored if C{B{Aer}
819
+ is None}.
820
820
 
821
821
  @return: AER as an L{Aer} instance or if C{B{Aer} is None}, an
822
822
  L{Aer4Tuple}C{(azimuth, elevation, slantrange, ltp)}.
@@ -832,11 +832,11 @@ class XyzLocal(_Vector3d):
832
832
  or C{None}.
833
833
  @kwarg ltp: Optional I{local tangent plane} (LTP) (L{Ltp}), overriding
834
834
  this C{ltp}.
835
- @kwarg name_Cartesian_kwds: Optional C{B{name}=NN} (C{str}) and optional,
835
+ @kwarg name_Cartesian_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
836
836
  additional B{C{Cartesian}} keyword arguments, ignored if
837
837
  C{B{Cartesian} is None}.
838
838
 
839
- @return: A B{C{Cartesian}} instance of if C{B{Cartesian} is None}, an
839
+ @return: A B{C{Cartesian}} instance or if C{B{Cartesian} is None}, an
840
840
  L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with
841
841
  C{M=None}, always.
842
842
 
@@ -856,9 +856,9 @@ class XyzLocal(_Vector3d):
856
856
  '''Get the local I{East, North, Up} (ENU) components.
857
857
 
858
858
  @kwarg Enu: Class to return ENU (L{Enu}) or C{None}.
859
- @kwarg name_Enu_kwds: Optional C{B{name}=NN} (C{str}) and optional,
860
- additional B{C{Enu}} keyword arguments, ignored if
861
- C{B{Enu} is None}.
859
+ @kwarg name_Enu_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
860
+ additional B{C{Enu}} keyword arguments, ignored if C{B{Enu}
861
+ is None}.
862
862
 
863
863
  @return: ENU as an L{Enu} instance or if C{B{Enu} is None}, an
864
864
  L{Enu4Tuple}C{(east, north, up, ltp)}.
@@ -874,11 +874,11 @@ class XyzLocal(_Vector3d):
874
874
  C{None}.
875
875
  @kwarg ltp: Optional I{local tangent plane} (LTP) (L{Ltp}), overriding
876
876
  this ENU/NED/AER/XYZ's LTP.
877
- @kwarg name_LatLon_kwds: Optional C{B{name}=NN} (C{str}) and optional,
878
- additional B{C{LatLon}} keyword arguments, ignored if
879
- C{B{LatLon} is None}.
877
+ @kwarg name_LatLon_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
878
+ additional B{C{LatLon}} keyword arguments, ignored if C{B{LatLon}
879
+ is None}.
880
880
 
881
- @return: An B{C{LatLon}} instance of if C{B{LatLon} is None}, an
881
+ @return: An B{C{LatLon}} instance or if C{B{LatLon} is None}, an
882
882
  L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with
883
883
  C{M=None}, always.
884
884
 
@@ -913,9 +913,9 @@ class XyzLocal(_Vector3d):
913
913
  '''Get the local I{North, East, Down} (Ned) components.
914
914
 
915
915
  @kwarg Ned: Class to return NED (L{Ned}) or C{None}.
916
- @kwarg name_Ned_kwds: Optional C{B{name}=NN} (C{str}) and optional,
917
- additional B{C{Ned}} keyword arguments, ignored if
918
- C{B{Ned} is None}.
916
+ @kwarg name_Ned_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
917
+ additional B{C{Ned}} keyword arguments, ignored if C{B{Ned}
918
+ is None}.
919
919
 
920
920
  @return: NED as an L{Ned} instance or if C{B{Ned} is None}, an
921
921
  L{Ned4Tuple}C{(north, east, down, ltp)}.
@@ -929,9 +929,9 @@ class XyzLocal(_Vector3d):
929
929
 
930
930
  @kwarg Xyz: Class to return XYZ (L{XyzLocal}, L{Enu}, L{Ned}, L{Aer})
931
931
  or C{None}.
932
- @kwarg name_Xyz_kwds: Optional C{B{name}=NN} (C{str}) and optional,
933
- additional B{C{Xyz}} keyword arguments, ignored if
934
- C{B{Xyz} is None}.
932
+ @kwarg name_Xyz_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
933
+ additional B{C{Xyz}} keyword arguments, ignored if C{B{Xyz}
934
+ is None}.
935
935
 
936
936
  @return: XYZ as an B{C{Xyz}} instance or if C{B{Xyz} is None}, an
937
937
  L{Xyz4Tuple}C{(x, y, z, ltp)}.
@@ -1042,9 +1042,9 @@ class Enu(XyzLocal):
1042
1042
  @arg location: The geodetic (C{LatLon}) or geocentric (C{Cartesian},
1043
1043
  L{Vector3d}) location, like a Point-Of-View.
1044
1044
  @kwarg Uvw: Class to return UWV (L{Uvw}) or C{None}.
1045
- @kwarg name_Uvw_kwds: Optional C{B{name}=NN} (C{str}) and optional,
1046
- additional B{L{Uvw}} keyword arguments, ignored if
1047
- C{B{Uvw} is None}.
1045
+ @kwarg name_Uvw_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
1046
+ additional B{L{Uvw}} keyword arguments, ignored if C{B{Uvw}
1047
+ is None}.
1048
1048
 
1049
1049
  @return: UVW as a L{Uvw} instance or if C{B{Uvw} is None}, a
1050
1050
  L{Uvw3Tuple}C{(u, v, w)}.
@@ -1059,10 +1059,10 @@ class Enu(XyzLocal):
1059
1059
  raise _TypeError(location=location, cause=x)
1060
1060
  e, n, u, _ = self.enu4
1061
1061
 
1062
- t = ca * u - sa * n
1063
- U = cb * t - sb * e
1064
- V = cb * e + sb * t
1065
- W = ca * n + sa * u
1062
+ t = fdot_(ca, u, -sa, n)
1063
+ U = fdot_(cb, t, -sb, e)
1064
+ V = fdot_(cb, e, sb, t)
1065
+ W = fdot_(ca, n, sa, u)
1066
1066
 
1067
1067
  n, kwds = _name2__(name_Uvw_kwds, _or_nameof=self)
1068
1068
  return Uvw3Tuple(U, V, W, name=n) if Uvw is None else \
@@ -1185,9 +1185,9 @@ class Local9Tuple(_NamedTuple):
1185
1185
  '''Get the I{local} I{Azimuth, Elevation, slant Range} (AER) components.
1186
1186
 
1187
1187
  @kwarg Aer: Class to return AER (L{Aer}) or C{None}.
1188
- @kwarg name_Aer_kwds: Optional C{B{name}=NN} (C{str}) and optional,
1189
- additional B{L{Aer}} keyword arguments, ignored if
1190
- C{B{Aer} is None}.
1188
+ @kwarg name_Aer_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
1189
+ additional B{L{Aer}} keyword arguments, ignored if C{B{Aer}
1190
+ is None}.
1191
1191
 
1192
1192
  @return: AER as an L{Aer} instance or if C{B{Aer} is None}, an
1193
1193
  L{Aer4Tuple}C{(azimuth, elevation, slantrange, ltp)}.
@@ -1201,7 +1201,7 @@ class Local9Tuple(_NamedTuple):
1201
1201
 
1202
1202
  @kwarg Cartesian: Optional class to return C{(x, y, z)} (C{Cartesian})
1203
1203
  or C{None}.
1204
- @kwarg name_Cartesian_kwds: Optional C{B{name}=NN} (C{str}) and optional,
1204
+ @kwarg name_Cartesian_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
1205
1205
  additional B{C{Cartesian}} keyword arguments, ignored if
1206
1206
  C{B{Cartesian} is None}.
1207
1207
 
@@ -1216,9 +1216,9 @@ class Local9Tuple(_NamedTuple):
1216
1216
  '''Get the I{local} I{East, North, Up} (ENU) components.
1217
1217
 
1218
1218
  @kwarg Enu: Class to return ENU (L{Enu}) or C{None}.
1219
- @kwarg name_Enu_kwds: Optional C{B{name}=NN} (C{str}) and optional,
1220
- additional B{L{Enu}} keyword arguments, ignored if
1221
- C{B{Enu} is None}.
1219
+ @kwarg name_Enu_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
1220
+ additional B{L{Enu}} keyword arguments, ignored if C{B{Enu}
1221
+ is None}.
1222
1222
 
1223
1223
  @return: ENU as an L{Enu} instance or if C{B{Enu} is None}, an
1224
1224
  L{Enu4Tuple}C{(east, north, up, ltp)}.
@@ -1232,14 +1232,14 @@ class Local9Tuple(_NamedTuple):
1232
1232
 
1233
1233
  @kwarg LatLon: Optional class to return C{(lat, lon, height)}
1234
1234
  (C{LatLon}) or C{None}.
1235
- @kwarg name_LatLon_kwds: Optional C{B{name}=NN} (C{str}) and optional,
1236
- additional B{C{LatLon}} keyword arguments, ignored if
1237
- C{B{LatLon} is None}.
1235
+ @kwarg name_LatLon_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
1236
+ additional B{C{LatLon}} keyword arguments, ignored if C{B{LatLon}
1237
+ is None}.
1238
1238
 
1239
- @return: An instance of C{B{LatLon}(lat, lon, **B{LatLon_kwds})}
1240
- or if C{B{LatLon} is None}, a L{LatLon3Tuple}C{(lat, lon,
1241
- height)} respectively L{LatLon4Tuple}C{(lat, lon, height,
1242
- datum)} depending on whether C{datum} is un-/specified.
1239
+ @return: An instance of C{B{LatLon}(lat, lon, **B{LatLon_kwds})} or if
1240
+ C{B{LatLon} is None}, a L{LatLon3Tuple}C{(lat, lon, height)}
1241
+ respectively L{LatLon4Tuple}C{(lat, lon, height, datum)}
1242
+ depending on whether C{datum} is un-/specified.
1243
1243
 
1244
1244
  @raise TypeError: Invalid B{C{LatLon}} or B{C{name_LatLon_kwds}}.
1245
1245
  '''
@@ -1249,9 +1249,9 @@ class Local9Tuple(_NamedTuple):
1249
1249
  '''Get the I{local} I{North, East, Down} (NED) components.
1250
1250
 
1251
1251
  @kwarg Ned: Class to return NED (L{Ned}) or C{None}.
1252
- @kwarg name_Ned_kwds: Optional C{B{name}=NN} (C{str}) and optional,
1253
- additional B{L{Ned}} keyword arguments, ignored if
1254
- C{B{Ned} is None}.
1252
+ @kwarg name_Ned_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
1253
+ additional B{L{Ned}} keyword arguments, ignored if C{B{Ned}
1254
+ is None}.
1255
1255
 
1256
1256
  @return: NED as an L{Ned} instance or if C{B{Ned} is None}, an
1257
1257
  L{Ned4Tuple}C{(north, east, down, ltp)}.
@@ -1264,9 +1264,9 @@ class Local9Tuple(_NamedTuple):
1264
1264
  '''Get the I{local} I{X, Y, Z} (XYZ) components.
1265
1265
 
1266
1266
  @kwarg Xyz: Class to return XYZ (L{XyzLocal}) or C{None}.
1267
- @kwarg name_Xyz_kwds: Optional C{B{name}=NN} (C{str}) and optional,
1268
- additional B{C{Xyz}} keyword arguments, ignored if
1269
- C{B{Xyz} is None}.
1267
+ @kwarg name_Xyz_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
1268
+ additional B{C{Xyz}} keyword arguments, ignored if C{B{Xyz}
1269
+ is None}.
1270
1270
 
1271
1271
  @return: XYZ as an B{C{Xyz}} instance or if C{B{Xyz} is None},
1272
1272
  an L{Xyz4Tuple}C{(x, y, z, ltp)}.
@@ -1324,9 +1324,9 @@ class Uvw(_Vector3d):
1324
1324
  @arg location: The geodetic (C{LatLon}) or geocentric (C{Cartesian},
1325
1325
  L{Vector3d}) location from where to cast the L{Los}.
1326
1326
  @kwarg Enu: Class to return ENU (L{Enu}) or C{None}.
1327
- @kwarg name_Enu_kwds: Optional C{B{name}=NN} (C{str}) and optional,
1328
- additional B{L{Enu}} keyword arguments, ignored if
1329
- C{B{Enu} is None}.
1327
+ @kwarg name_Enu_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
1328
+ additional B{L{Enu}} keyword arguments, ignored if C{B{Enu}
1329
+ is None}.
1330
1330
 
1331
1331
  @return: ENU as an L{Enu} instance or if C{B{Enu} is None}, an
1332
1332
  L{Enu4Tuple}C{(east, north, up, ltp)} with C{ltp=None}.
@@ -1341,10 +1341,10 @@ class Uvw(_Vector3d):
1341
1341
  raise _TypeError(location=location, cause=x)
1342
1342
  u, v, w = self.uvw
1343
1343
 
1344
- t = cb * u + sb * v
1345
- E = cb * v - sb * u
1346
- N = ca * w - sa * t
1347
- U = ca * t + sa * w
1344
+ t = fdot_(cb, u, sb, v)
1345
+ E = fdot_(cb, v, -sb, u)
1346
+ N = fdot_(ca, w, -sa, t)
1347
+ U = fdot_(ca, t, sa, w)
1348
1348
 
1349
1349
  n, kwds = _name2__(name_Enu_kwds, _or_nameof=self)
1350
1350
  return Enu4Tuple(E, N, U, name=n) if Enu is None else \
@@ -1570,15 +1570,14 @@ class Footprint5Tuple(_NamedTuple):
1570
1570
  @kwarg ltp: The I{local tangent plane} (L{Ltp}), overriding this
1571
1571
  footprint's C{center} or C{frustrum} C{ltp}.
1572
1572
  @kwarg LatLon: Optional I{geodetic} class (C{LatLon}) or C{None}.
1573
- @kwarg name_LatLon_kwds: Optional C{B{name}=NN} (C{str}) and optional,
1574
- additional B{C{LatLon}} keyword arguments, ignored if
1575
- C{B{LatLon} is None}.
1576
-
1577
- @return: A L{Footprint5Tuple} of 5 C{B{LatLon}(lat, lon,
1578
- **B{name_LatLon_kwds})} instances or if C{B{LatLon} is None},
1579
- 5 L{LatLon3Tuple}C{(lat, lon, height)}s respectively
1580
- 5 L{LatLon4Tuple}C{(lat, lon, height, datum)}s depending
1581
- on whether keyword argument C{datum} is un-/specified.
1573
+ @kwarg name_LatLon_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
1574
+ additional B{C{LatLon}} keyword arguments, ignored if C{B{LatLon}
1575
+ is None}.
1576
+
1577
+ @return: A L{Footprint5Tuple} of 5 C{B{LatLon}(lat, lon, **B{name_LatLon_kwds})}
1578
+ instances or if C{B{LatLon} is None}, 5 L{LatLon3Tuple}C{(lat, lon,
1579
+ height)}s respectively 5 L{LatLon4Tuple}C{(lat, lon, height, datum)}s
1580
+ depending on whether keyword argument C{datum} is un-/specified.
1582
1581
 
1583
1582
  @raise TypeError: Invalid B{C{ltp}}, B{C{LatLon}} or B{C{name_LatLon_kwds}}.
1584
1583
 
pygeodesy/mgrs.py CHANGED
@@ -55,7 +55,7 @@ from pygeodesy.utm import toUtm8, _to3zBlat, Utm, _UTM_ZONE_MAX, _UTM_ZONE_MIN
55
55
  # from pygeodesy.utmupsBase import _UTM_ZONE_MAX, _UTM_ZONE_MIN # from .utm
56
56
 
57
57
  __all__ = _ALL_LAZY.mgrs
58
- __version__ = '24.09.04'
58
+ __version__ = '24.11.06'
59
59
 
60
60
  _AN_ = 'AN' # default south pole grid tile and band B
61
61
  _AtoPx_ = _AtoZnoIO_.tillP
@@ -594,15 +594,14 @@ def toMgrs(utmups, Mgrs=Mgrs, **name_Mgrs_kwds):
594
594
  '''Convert a UTM or UPS coordinate to an MGRS grid reference.
595
595
 
596
596
  @arg utmups: A UTM or UPS coordinate (L{Utm}, L{Etm} or L{Ups}).
597
- @kwarg Mgrs: Optional class to return the MGRS grid reference
598
- (L{Mgrs}) or C{None}.
599
- @kwarg name_Mgrs_kwds: Optional C{B{name}=NN} (C{str}) and optional,
600
- additional B{C{Mgrs}} keyword arguments, ignored if
601
- C{B{Mgrs} is None}.
597
+ @kwarg Mgrs: Optional class to return the MGRS grid reference (L{Mgrs})
598
+ or C{None}.
599
+ @kwarg name_Mgrs_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
600
+ additional B{C{Mgrs}} keyword arguments, ignored if C{B{Mgrs}
601
+ is None}.
602
602
 
603
- @return: The MGRS grid reference as B{C{Mgrs}} or if C{B{Mgrs} is
604
- None} as an L{Mgrs6Tuple}C{(zone, EN, easting, northing,
605
- band, datum)}.
603
+ @return: The MGRS grid reference as B{C{Mgrs}} or if C{B{Mgrs} is None} as
604
+ an L{Mgrs6Tuple}C{(zone, EN, easting, northing, band, datum)}.
606
605
 
607
606
  @raise MGRSError: Invalid B{C{utmups}}.
608
607
 
@@ -654,32 +653,32 @@ if __name__ == '__main__':
654
653
 
655
654
  def _main():
656
655
 
657
- from pygeodesy.ellipsoidalVincenty import fabs, LatLon
656
+ from pygeodesy.ellipsoidalVincenty import LatLon, fabs
658
657
  from pygeodesy.internals import _fper, printf
659
- from pygeodesy.lazily import _getenv, _PYGEODESY_GEOCONVERT_
658
+ from pygeodesy.karney import _Xables
660
659
 
661
660
  # from math import fabs # from .ellipsoidalVincenty
662
- from os import access as _access, linesep as _NL, X_OK as _X_OK
663
661
 
664
662
  # <https://GeographicLib.sourceforge.io/C++/doc/GeoConvert.1.html>
665
- _GeoConvert = _getenv(_PYGEODESY_GEOCONVERT_, '/opt/local/bin/GeoConvert')
666
- if _access(_GeoConvert, _X_OK):
667
- GC_m = _GeoConvert, '-m' # -m converts latlon to MGRS
668
- printf(' using: %s ...', _SPACE_.join(GC_m))
669
- from pygeodesy.solveBase import _popen2
663
+ G = _Xables.GeoConvert(_Xables.bin_)
664
+ if _Xables.X_OK(G):
665
+ from pygeodesy.internals import _popen2
666
+ printf(' using: %s', _Xables.name_version(G, base=False))
667
+ cmd = G, '-m' # -m converts latlon to MGRS
670
668
  else:
671
- GC_m = _popen2 = None
669
+ printf(' sorry: %s', _Xables.X_not(G))
670
+ cmd = _popen2 = None
672
671
 
673
672
  e = n = 0
674
673
  try:
675
674
  for lat in range(-90, 91, 1):
676
675
  printf('%6s: lat %s ...', n, lat, end=NN, flush=True)
677
- nl = _NL
676
+ nl = _MODS.os.linesep
678
677
  for lon in range(-180, 181, 1):
679
678
  m = LatLon(lat, lon).toMgrs()
680
- if _popen2:
679
+ if _popen2: # and cmd
681
680
  t = '%s %s' % (lat, lon)
682
- g = _popen2(GC_m, stdin=t)[1]
681
+ g = _popen2(cmd, stdin=t)[0]
683
682
  t = m.toStr() # sep=NN
684
683
  if t != g:
685
684
  e += 1
pygeodesy/named.py CHANGED
@@ -20,13 +20,14 @@ from pygeodesy.errors import _AssertionError, _AttributeError, _incompatible, \
20
20
  _NotImplementedError, _TypeError, _TypesError, \
21
21
  _UnexpectedError, UnitError, _ValueError, \
22
22
  _xattr, _xkwds, _xkwds_item2, _xkwds_pop2
23
- from pygeodesy.internals import _caller3, _dunder_nameof, _isPyPy, _sizeof, _under
23
+ from pygeodesy.internals import _caller3, _DUNDER_nameof, _getPYGEODESY, _isPyPy, \
24
+ _sizeof, _under
24
25
  from pygeodesy.interns import MISSING, NN, _AT_, _COLON_, _COLONSPACE_, _COMMA_, \
25
26
  _COMMASPACE_, _doesn_t_exist_, _DOT_, _DUNDER_, \
26
- _dunder_name_, _EQUAL_, _exists_, _immutable_, _name_, \
27
+ _DUNDER_name_, _EQUAL_, _exists_, _immutable_, _name_, \
27
28
  _NL_, _NN_, _no_, _other_, _s_, _SPACE_, _std_, \
28
29
  _UNDER_, _vs_
29
- from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS, _getenv
30
+ from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
30
31
  from pygeodesy.props import _allPropertiesOf_n, deprecated_method, _hasProperty, \
31
32
  _update_all, property_doc_, Property_RO, property_RO, \
32
33
  _update_attrs
@@ -34,7 +35,7 @@ from pygeodesy.streprs import attrs, Fmt, lrstrip, pairs, reprs, unstr
34
35
  # from pygeodesy.units import _toUnit # _MODS
35
36
 
36
37
  __all__ = _ALL_LAZY.named
37
- __version__ = '24.09.02'
38
+ __version__ = '24.10.14'
38
39
 
39
40
  _COMMANL_ = _COMMA_ + _NL_
40
41
  _COMMASPACEDOT_ = _COMMASPACE_ + _DOT_
@@ -45,7 +46,7 @@ _MRO_ = 'MRO'
45
46
  _name = _under(_name_)
46
47
  _Names_ = '_Names_'
47
48
  _registered_ = 'registered' # PYCHOK used!
48
- _std_NotImplemented = _getenv('PYGEODESY_NOTIMPLEMENTED', NN).lower() == _std_
49
+ _std_NotImplemented = _getPYGEODESY('NOTIMPLEMENTED', NN).lower() == _std_
49
50
  _such_ = 'such'
50
51
  _Units_ = '_Units_'
51
52
  _UP = 2
@@ -140,6 +141,10 @@ class _Named(object):
140
141
  _classnaming = False # prefixed (C{bool})
141
142
  # _updates = 0 # OBSOLETE Property/property updates
142
143
 
144
+ def __format__(self, fmt): # PYCHOK no cover
145
+ '''Not implemented.'''
146
+ return _NotImplemented(self, fmt)
147
+
143
148
  def __imatmul__(self, other): # PYCHOK no cover
144
149
  '''Not implemented.'''
145
150
  return _NotImplemented(self, other) # PYCHOK Python 3.5+
@@ -614,7 +619,7 @@ class _NamedEnum(_NamedDict):
614
619
  @arg Classes: Additional, acceptable classes or C{type}s.
615
620
  '''
616
621
  self._item_Classes = (Class,) + Classes
617
- n = _name__(**name) or NN(Class.__name__, _s_) # _dunder_nameof
622
+ n = _name__(**name) or NN(Class.__name__, _s_) # _DUNDER_nameof
618
623
  if n and _xvalid(n, underOK=True):
619
624
  _Named.name.fset(self, n) # see _Named.name
620
625
 
@@ -1237,7 +1242,7 @@ def modulename(clas, prefixed=None): # in .basics._xversion
1237
1242
  try:
1238
1243
  n = clas.__name__
1239
1244
  except AttributeError:
1240
- n = clas if isstr(clas) else _dunder_name_
1245
+ n = clas if isstr(clas) else _DUNDER_name_
1241
1246
  if prefixed or (classnaming() if prefixed is None else False):
1242
1247
  try:
1243
1248
  m = clas.__module__.rsplit(_DOT_, 1)
@@ -1256,7 +1261,7 @@ def modulename(clas, prefixed=None): # in .basics._xversion
1256
1261
  # if name: # is given
1257
1262
  # n = _name__(**name) if isinstance(name, dict) else str(name)
1258
1263
  # elif name__ is not None:
1259
- # n = getattr(name__, _dunder_name_, NN) # _xattr(name__, __name__=NN)
1264
+ # n = getattr(name__, _DUNDER_name_, NN) # _xattr(name__, __name__=NN)
1260
1265
  # else:
1261
1266
  # n = name # NN or None or {} or any False type
1262
1267
  # if _or_nameof is not None and not n:
@@ -1293,7 +1298,7 @@ def _name2__(name=NN, name__=None, _or_nameof=None, **kwds):
1293
1298
  else:
1294
1299
  n = str(name)
1295
1300
  elif name__ is not None:
1296
- n = _dunder_nameof(name__, NN)
1301
+ n = _DUNDER_nameof(name__, NN)
1297
1302
  else:
1298
1303
  n = name if name is None else NN
1299
1304
  if _or_nameof is not None and not n:
@@ -1328,7 +1333,7 @@ def _notDecap(where):
1328
1333
  def _notError(inst, name, args, kwds): # PYCHOK no cover
1329
1334
  '''(INTERNAL) Format an error message.
1330
1335
  '''
1331
- n = _DOT_(classname(inst, prefixed=True), _dunder_nameof(name, name))
1336
+ n = _DOT_(classname(inst, prefixed=True), _DUNDER_nameof(name, name))
1332
1337
  m = _COMMASPACE_.join(modulename(c, prefixed=True) for c in inst.__class__.__mro__[1:-1])
1333
1338
  return _COMMASPACE_(unstr(n, *args, **kwds), Fmt.PAREN(_MRO_, m))
1334
1339
 
pygeodesy/nvectorBase.py CHANGED
@@ -38,7 +38,7 @@ from pygeodesy.vector3d import Vector3d, _xyzhdlln4
38
38
  from math import fabs, sqrt
39
39
 
40
40
  __all__ = _ALL_LAZY.nvectorBase
41
- __version__ = '24.07.12'
41
+ __version__ = '24.10.12'
42
42
 
43
43
 
44
44
  class NvectorBase(Vector3d): # XXX kept private
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__ = '24.08.13'
56
+ __version__ = '24.11.06'
57
57
 
58
58
  _equivalent_ = 'equivalent'
59
59
  _OSGR_ = 'OSGR'
@@ -505,20 +505,17 @@ def _ll2LatLon3(ll, LatLon, datum, LatLon_kwds):
505
505
 
506
506
 
507
507
  def parseOSGR(strOSGR, Osgr=Osgr, **name_Osgr_kwds):
508
- '''Parse a string representing an OS Grid Reference, consisting
509
- of C{"[GD] easting northing"}.
508
+ '''Parse a string representing an OS Grid Reference, consisting of C{"[GD]
509
+ easting northing"}.
510
510
 
511
- Accepts standard OS Grid References like "SU 387 148", with
512
- or without whitespace separators, from 2- up to 22-digit
513
- references, or all-numeric, comma-separated references in
514
- meters, for example "438700,114800".
511
+ Accepts standard OS Grid References like "SU 387 148", with or without
512
+ whitespace separators, from 2- up to 22-digit references, or all-numeric,
513
+ comma-separated references in meters, for example "438700,114800".
515
514
 
516
515
  @arg strOSGR: An OSGR coordinate (C{str}).
517
- @kwarg Osgr: Optional class to return the OSGR coordinate
518
- (L{Osgr}) or C{None}.
519
- @kwarg name_Osgr_kwds: Optional C{B{name}=NN} (C{str}) and
520
- optional, additional B{C{Osgr}} keyword arguments,
521
- ignored if C{B{Osgr} is None}.
516
+ @kwarg Osgr: Optional class to return the OSGR coordinate (L{Osgr}) or C{None}.
517
+ @kwarg name_Osgr_kwds: Optional C{B{name}=NN} (C{str}) and optionally, additional
518
+ B{C{Osgr}} keyword arguments, ignored if C{B{Osgr} is None}.
522
519
 
523
520
  @return: An (B{C{Osgr}}) instance or if C{B{Osgr} is None}, an
524
521
  L{EasNor2Tuple}C{(easting, northing)}.
pygeodesy/points.py CHANGED
@@ -62,7 +62,7 @@ from pygeodesy.utily import atan2b, degrees90, degrees180, degrees2m, \
62
62
  from math import cos, fabs, fmod as _fmod, radians, sin
63
63
 
64
64
  __all__ = _ALL_LAZY.points
65
- __version__ = '24.09.23'
65
+ __version__ = '24.10.24'
66
66
 
67
67
  _ilat_ = 'ilat'
68
68
  _ilon_ = 'ilon'
@@ -147,7 +147,7 @@ class LatLon_(LatLonBase): # XXX in heights._HeightBase.height
147
147
  @kwarg wrap: If C{True}, wrap or I{normalize} and unroll
148
148
  the B{C{other}} point (C{bool}).
149
149
 
150
- @return: Intermediate point (this C{LatLon}).
150
+ @return: Intermediate point (same C{LatLon} class).
151
151
 
152
152
  @raise TypeError: Incompatible B{C{other}} C{type}.
153
153
  '''