pygeodesy 24.10.24__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 (54) hide show
  1. {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.11.11.dist-info}/METADATA +4 -4
  2. {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.11.11.dist-info}/RECORD +54 -54
  3. {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.11.11.dist-info}/WHEEL +1 -1
  4. pygeodesy/__init__.py +2 -2
  5. pygeodesy/azimuthal.py +51 -61
  6. pygeodesy/basics.py +34 -33
  7. pygeodesy/booleans.py +36 -36
  8. pygeodesy/cartesianBase.py +5 -5
  9. pygeodesy/constants.py +4 -4
  10. pygeodesy/css.py +7 -8
  11. pygeodesy/deprecated/__init__.py +1 -1
  12. pygeodesy/deprecated/classes.py +9 -9
  13. pygeodesy/deprecated/functions.py +6 -6
  14. pygeodesy/ecef.py +11 -14
  15. pygeodesy/ellipsoidalBase.py +105 -120
  16. pygeodesy/ellipsoidalBaseDI.py +114 -118
  17. pygeodesy/ellipsoidalExact.py +35 -37
  18. pygeodesy/ellipsoids.py +3 -3
  19. pygeodesy/errors.py +24 -24
  20. pygeodesy/etm.py +80 -72
  21. pygeodesy/fmath.py +39 -37
  22. pygeodesy/formy.py +3 -2
  23. pygeodesy/fsums.py +51 -40
  24. pygeodesy/geodesicw.py +15 -14
  25. pygeodesy/geodesicx/__init__.py +2 -2
  26. pygeodesy/geodsolve.py +7 -16
  27. pygeodesy/geoids.py +5 -5
  28. pygeodesy/heights.py +2 -2
  29. pygeodesy/internals.py +63 -79
  30. pygeodesy/karney.py +2 -2
  31. pygeodesy/ktm.py +11 -13
  32. pygeodesy/latlonBase.py +6 -6
  33. pygeodesy/lazily.py +5 -5
  34. pygeodesy/lcc.py +4 -4
  35. pygeodesy/ltp.py +10 -10
  36. pygeodesy/ltpTuples.py +74 -75
  37. pygeodesy/mgrs.py +9 -10
  38. pygeodesy/named.py +4 -0
  39. pygeodesy/osgr.py +9 -12
  40. pygeodesy/props.py +2 -2
  41. pygeodesy/resections.py +9 -10
  42. pygeodesy/rhumb/__init__.py +1 -1
  43. pygeodesy/rhumb/solve.py +3 -3
  44. pygeodesy/simplify.py +5 -5
  45. pygeodesy/sphericalNvector.py +80 -123
  46. pygeodesy/sphericalTrigonometry.py +60 -66
  47. pygeodesy/units.py +2 -2
  48. pygeodesy/utm.py +6 -6
  49. pygeodesy/vector2d.py +13 -13
  50. pygeodesy/vector3d.py +19 -21
  51. pygeodesy/vector3dBase.py +18 -15
  52. pygeodesy/webmercator.py +4 -4
  53. pygeodesy/wgrs.py +4 -4
  54. {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.11.11.dist-info}/top_level.txt +0 -0
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.10.13'
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}.
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)}.
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
+
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
 
pygeodesy/named.py CHANGED
@@ -141,6 +141,10 @@ class _Named(object):
141
141
  _classnaming = False # prefixed (C{bool})
142
142
  # _updates = 0 # OBSOLETE Property/property updates
143
143
 
144
+ def __format__(self, fmt): # PYCHOK no cover
145
+ '''Not implemented.'''
146
+ return _NotImplemented(self, fmt)
147
+
144
148
  def __imatmul__(self, other): # PYCHOK no cover
145
149
  '''Not implemented.'''
146
150
  return _NotImplemented(self, other) # PYCHOK Python 3.5+
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/props.py CHANGED
@@ -26,7 +26,7 @@ from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, \
26
26
  from functools import wraps as _wraps
27
27
 
28
28
  __all__ = _ALL_LAZY.props
29
- __version__ = '24.10.19'
29
+ __version__ = '24.11.06'
30
30
 
31
31
  _class_ = 'class'
32
32
  _DNL_ = _NL_ * 2 # PYCHOK used!
@@ -369,7 +369,7 @@ class _property_RO___(_PropertyBase):
369
369
  '''
370
370
  _PropertyBase.__init__(self, method, self._fget, self._fset_error, doc=doc)
371
371
 
372
- def _fdel(self, unused): # PYCHOK no cover
372
+ def _fdel(self, *unused): # PYCHOK no cover
373
373
  '''Silently ignored, always.
374
374
  '''
375
375
  pass
pygeodesy/resections.py CHANGED
@@ -34,7 +34,7 @@ from pygeodesy.vector3d import _otherV3d, Vector3d
34
34
  from math import cos, atan2, degrees, fabs, radians, sin, sqrt
35
35
 
36
36
  __all__ = _ALL_LAZY.resections
37
- __version__ = '24.09.23'
37
+ __version__ = '24.11.04'
38
38
 
39
39
  _concyclic_ = 'concyclic'
40
40
  _PA_ = 'PA'
@@ -200,11 +200,11 @@ def cassini(pointA, pointB, pointC, alpha, beta, useZ=False, **Clas_and_kwds):
200
200
  alpha=alpha, beta=beta, cause=x)
201
201
 
202
202
 
203
- def _Clas(where, point, Clas_and_kwds, *args):
203
+ def _Clas(which, point, Clas_and_kwds, *args):
204
204
  '''(INTERNAL) Return a C{B{Clas}=point.classof} survey point.
205
205
  '''
206
206
  Clas, kwds = _xkwds_pop2(Clas_and_kwds, Clas=point.classof)
207
- return Clas(*args, **_xkwds(kwds, name=where.__name__))
207
+ return Clas(*args, **_xkwds(kwds, name=which.__name__))
208
208
 
209
209
 
210
210
  def collins5(pointA, pointB, pointC, alpha, beta, useZ=False, **Clas_and_kwds):
@@ -252,8 +252,8 @@ def collins5(pointA, pointB, pointC, alpha, beta, useZ=False, **Clas_and_kwds):
252
252
 
253
253
  def _xyz(d, r, A, B, C, useZ):
254
254
  s, c = sincos2(r)
255
- x = A.x + d * s
256
- y = A.y + d * c
255
+ x = d * s + A.x # fma(d, s, A.x)
256
+ y = d * c + A.y # fma(d, c, A.y)
257
257
  z = _zidw(x, y, useZ, A, B, C)
258
258
  return x, y, z
259
259
 
@@ -282,11 +282,10 @@ def collins5(pointA, pointB, pointC, alpha, beta, useZ=False, **Clas_and_kwds):
282
282
  d = b * sin(zb - zh) / sra # A.minus(P).length
283
283
  r = zh - ra # zb - PI + (PI - ra - (zb - zh))
284
284
  P = _xyz(d, r, A, B, C, useZ)
285
- P = _Clas(collins5, pointA, Clas_and_kwds, *P)
286
285
 
286
+ P = _Clas(collins5, pointA, Clas_and_kwds, *P)
287
287
  H = _Clas(collins5, pointA, Clas_and_kwds, *H)
288
288
  a = B.minus(C).length
289
-
290
289
  return Collins5Tuple(P, H, a, b, c, name=collins5.__name__)
291
290
 
292
291
  except (TypeError, ValueError) as x:
@@ -312,7 +311,7 @@ def pierlot(point1, point2, point3, alpha12, alpha23, useZ=False, eps=EPS,
312
311
  B{C{alpha3 - alpha2}}(C{degrees}).
313
312
  @kwarg useZ: If C{True}, interpolate the survey point's Z component,
314
313
  otherwise use C{z=INT0} (C{bool}).
315
- @kwarg eps: Tolerance for C{cot} (pseudo-)singularities (C{float}).
314
+ @kwarg eps: Tolerance for C{cot}angent (pseudo-)singularities (C{float}).
316
315
  @kwarg Clas_and_kwds: Optional class C{B{Clas}=B{point1}.classof} to
317
316
  return the survey point with optionally other B{C{Clas}}
318
317
  keyword arguments to instantiate the survey point.
@@ -427,8 +426,8 @@ def pierlotx(point1, point2, point3, alpha1, alpha2, alpha3, useZ=False,
427
426
  return the survey point with optionally other B{C{Clas}}
428
427
  keyword arguments to instantiate the survey point.
429
428
 
430
- @return: The survey (or robot) point, an instance of B{C{Clas}} or B{C{point1}}'s
431
- (sub-)class.
429
+ @return: The survey (or robot) point, an instance of B{C{Clas}} or
430
+ B{C{point1}}'s (sub-)class.
432
431
 
433
432
  @raise ResectionError: Near-coincident, -colinear or -concyclic points or
434
433
  invalid B{C{alpha1}}, B{C{alpha2}} or B{C{alpha3}}.
@@ -9,7 +9,7 @@ u'''Package of lazily imported C{rhumb} modules L{rhumb.aux_}, L{rhumb.ekx} and
9
9
  from pygeodesy.lazily import _ALL_LAZY, _ALL_OTHER, _lazy_import_as, _unLazy0
10
10
 
11
11
  __all__ = _ALL_LAZY.rhumb
12
- __version__ = '24.09.02'
12
+ __version__ = '24.11.07'
13
13
 
14
14
  if _unLazy0: # or _isfrozen
15
15
  from pygeodesy.rhumb.aux_ import RhumbAux, RhumbLineAux
pygeodesy/rhumb/solve.py CHANGED
@@ -20,7 +20,7 @@ from pygeodesy.solveBase import _SolveGDictBase, _SolveGDictLineBase
20
20
  from pygeodesy.utily import _unrollon, _Wrap, wrap360
21
21
 
22
22
  __all__ = _ALL_LAZY.rhumb_solve
23
- __version__ = '24.10.12'
23
+ __version__ = '24.11.07'
24
24
 
25
25
 
26
26
  class _RhumbSolveBase(_SolveGDictBase):
@@ -183,7 +183,7 @@ class RhumbSolve(_RhumbSolveBase):
183
183
  def _Inverse(self, ll1, ll2, wrap, **unused):
184
184
  '''(INTERNAL) Short-cut version, see .latlonBase.
185
185
  '''
186
- if wrap:
186
+ if wrap: # PYCHOK no cover
187
187
  ll2 = _unrollon(ll1, _Wrap.point(ll2))
188
188
  return self._GDictInverse(ll1.lat, ll1.lon, ll2.lat, ll2.lon)
189
189
 
@@ -201,7 +201,7 @@ class RhumbSolve(_RhumbSolveBase):
201
201
  def _InverseLine(self, ll1, ll2, wrap, **name_caps):
202
202
  '''(INTERNAL) Short-cut version, see .latlonBase.
203
203
  '''
204
- if wrap:
204
+ if wrap: # PYCHOK no cover
205
205
  ll2 = _unrollon(ll1, _Wrap.point(ll2))
206
206
  return self.InverseLine(ll1.lat, ll1.lon, ll2.lat, ll2.lon, **name_caps)
207
207
 
pygeodesy/simplify.py CHANGED
@@ -76,7 +76,7 @@ from __future__ import division as _; del _ # PYCHOK semicolon
76
76
  # from pygeodesy.basics import len2 # from .fmath
77
77
  from pygeodesy.constants import EPS, R_M, _1_0
78
78
  from pygeodesy.errors import _AttributeError, _ValueError
79
- from pygeodesy.fmath import len2, sqrt0
79
+ from pygeodesy.fmath import fdot_, len2, sqrt0
80
80
  from pygeodesy.formy import equirectangular4
81
81
  from pygeodesy.interns import _small_, _too_
82
82
  from pygeodesy.iters import isNumpy2, isTuple2
@@ -86,7 +86,7 @@ from pygeodesy.units import _ALL_LAZY, _1mm, Radius_
86
86
  from math import degrees, fabs, radians
87
87
 
88
88
  __all__ = _ALL_LAZY.simplify
89
- __version__ = '24.08.13'
89
+ __version__ = '24.11.07'
90
90
 
91
91
 
92
92
  # try:
@@ -222,11 +222,11 @@ class _Sy(object):
222
222
  # distance points[i] to -[s]
223
223
  d2, y01, x01, _ = _d2yxu4(s, i)
224
224
  if d2 > eps:
225
- w = y01 * y21 + x01 * x21
225
+ w = fdot_(y01, y21, x01, x21)
226
226
  if w > 0:
227
227
  if w < d21:
228
228
  # perpendicular distance squared
229
- d2 = (y01 * x21 - x01 * y21)**2 / d21
229
+ d2 = fdot_(y01, x21, -x01, y21)**2 / d21
230
230
  else: # distance points[i] to -[e]
231
231
  d2, _, _, _ = _d2yxu4(e, i)
232
232
  if d2 > t2:
@@ -252,7 +252,7 @@ class _Sy(object):
252
252
  if d21 > self.eps:
253
253
  d01, y01, x01, _ = self.d2yxu4(i1, i0)
254
254
  if d01 > self.eps:
255
- h2 = fabs(y01 * x21 - x01 * y21)
255
+ h2 = fabs(fdot_(y01, x21, -x01, y21))
256
256
  # triangle height h = h2 / sqrt(d21) and
257
257
  # the area = h * sqrt(d21) / 2 == h2 / 2
258
258
  return h2 # double triangle area