pygeodesy 24.11.11__py2.py3-none-any.whl → 25.1.5__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 (118) hide show
  1. {PyGeodesy-24.11.11.dist-info → PyGeodesy-25.1.5.dist-info}/METADATA +34 -35
  2. PyGeodesy-25.1.5.dist-info/RECORD +118 -0
  3. {PyGeodesy-24.11.11.dist-info → PyGeodesy-25.1.5.dist-info}/WHEEL +1 -1
  4. pygeodesy/__init__.py +19 -19
  5. pygeodesy/__main__.py +1 -1
  6. pygeodesy/albers.py +5 -5
  7. pygeodesy/auxilats/_CX_4.py +1 -1
  8. pygeodesy/auxilats/_CX_6.py +1 -1
  9. pygeodesy/auxilats/_CX_8.py +1 -1
  10. pygeodesy/auxilats/_CX_Rs.py +1 -1
  11. pygeodesy/auxilats/__init__.py +1 -1
  12. pygeodesy/auxilats/__main__.py +1 -1
  13. pygeodesy/auxilats/auxAngle.py +5 -5
  14. pygeodesy/auxilats/auxDLat.py +6 -6
  15. pygeodesy/auxilats/auxDST.py +2 -2
  16. pygeodesy/auxilats/auxLat.py +5 -5
  17. pygeodesy/auxilats/auxily.py +2 -2
  18. pygeodesy/azimuthal.py +5 -5
  19. pygeodesy/basics.py +60 -8
  20. pygeodesy/booleans.py +1 -1
  21. pygeodesy/cartesianBase.py +22 -61
  22. pygeodesy/clipy.py +1 -1
  23. pygeodesy/constants.py +5 -5
  24. pygeodesy/css.py +1 -1
  25. pygeodesy/datums.py +1 -1
  26. pygeodesy/deprecated/__init__.py +2 -2
  27. pygeodesy/deprecated/bases.py +1 -1
  28. pygeodesy/deprecated/classes.py +86 -2
  29. pygeodesy/deprecated/consterns.py +1 -1
  30. pygeodesy/deprecated/datum.py +5 -5
  31. pygeodesy/deprecated/functions.py +42 -8
  32. pygeodesy/deprecated/nvector.py +1 -1
  33. pygeodesy/deprecated/rhumbBase.py +1 -1
  34. pygeodesy/deprecated/rhumbaux.py +1 -1
  35. pygeodesy/deprecated/rhumbsolve.py +1 -1
  36. pygeodesy/deprecated/rhumbx.py +1 -1
  37. pygeodesy/dms.py +1 -1
  38. pygeodesy/ecef.py +53 -56
  39. pygeodesy/elevations.py +1 -1
  40. pygeodesy/ellipsoidalBase.py +3 -3
  41. pygeodesy/ellipsoidalBaseDI.py +1 -1
  42. pygeodesy/ellipsoidalExact.py +1 -1
  43. pygeodesy/ellipsoidalGeodSolve.py +1 -1
  44. pygeodesy/ellipsoidalKarney.py +1 -1
  45. pygeodesy/ellipsoidalNvector.py +1 -1
  46. pygeodesy/ellipsoidalVincenty.py +6 -5
  47. pygeodesy/ellipsoids.py +4 -5
  48. pygeodesy/elliptic.py +6 -6
  49. pygeodesy/epsg.py +1 -1
  50. pygeodesy/errors.py +1 -1
  51. pygeodesy/etm.py +5 -5
  52. pygeodesy/fmath.py +18 -17
  53. pygeodesy/formy.py +409 -555
  54. pygeodesy/frechet.py +29 -86
  55. pygeodesy/fstats.py +1 -1
  56. pygeodesy/fsums.py +32 -33
  57. pygeodesy/gars.py +1 -1
  58. pygeodesy/geodesici.py +7 -7
  59. pygeodesy/geodesicw.py +1 -1
  60. pygeodesy/geodesicx/_C4_24.py +2 -2
  61. pygeodesy/geodesicx/_C4_27.py +2 -2
  62. pygeodesy/geodesicx/_C4_30.py +2 -2
  63. pygeodesy/geodesicx/__init__.py +2 -2
  64. pygeodesy/geodesicx/__main__.py +4 -5
  65. pygeodesy/geodesicx/gx.py +6 -5
  66. pygeodesy/geodesicx/gxarea.py +2 -2
  67. pygeodesy/geodesicx/gxbases.py +2 -2
  68. pygeodesy/geodesicx/gxline.py +16 -12
  69. pygeodesy/geodsolve.py +1 -1
  70. pygeodesy/geohash.py +1 -1
  71. pygeodesy/geoids.py +277 -203
  72. pygeodesy/hausdorff.py +23 -81
  73. pygeodesy/heights.py +115 -150
  74. pygeodesy/internals.py +1 -1
  75. pygeodesy/interns.py +2 -3
  76. pygeodesy/iters.py +1 -1
  77. pygeodesy/karney.py +3 -3
  78. pygeodesy/ktm.py +16 -15
  79. pygeodesy/latlonBase.py +323 -409
  80. pygeodesy/lazily.py +53 -44
  81. pygeodesy/lcc.py +1 -1
  82. pygeodesy/ltp.py +46 -50
  83. pygeodesy/ltpTuples.py +147 -130
  84. pygeodesy/mgrs.py +1 -1
  85. pygeodesy/named.py +149 -3
  86. pygeodesy/namedTuples.py +58 -7
  87. pygeodesy/nvectorBase.py +122 -105
  88. pygeodesy/osgr.py +1 -1
  89. pygeodesy/points.py +1 -1
  90. pygeodesy/props.py +1 -1
  91. pygeodesy/resections.py +18 -17
  92. pygeodesy/rhumb/__init__.py +1 -1
  93. pygeodesy/rhumb/aux_.py +2 -2
  94. pygeodesy/rhumb/bases.py +2 -2
  95. pygeodesy/rhumb/ekx.py +4 -4
  96. pygeodesy/rhumb/solve.py +1 -1
  97. pygeodesy/simplify.py +289 -401
  98. pygeodesy/solveBase.py +1 -1
  99. pygeodesy/sphericalBase.py +1 -1
  100. pygeodesy/sphericalNvector.py +5 -5
  101. pygeodesy/sphericalTrigonometry.py +7 -6
  102. pygeodesy/streprs.py +10 -5
  103. pygeodesy/trf.py +1 -1
  104. pygeodesy/triaxials.py +23 -16
  105. pygeodesy/units.py +16 -16
  106. pygeodesy/unitsBase.py +1 -1
  107. pygeodesy/ups.py +4 -4
  108. pygeodesy/utily.py +341 -211
  109. pygeodesy/utm.py +5 -5
  110. pygeodesy/utmups.py +1 -1
  111. pygeodesy/utmupsBase.py +1 -1
  112. pygeodesy/vector2d.py +5 -5
  113. pygeodesy/vector3d.py +14 -3
  114. pygeodesy/vector3dBase.py +5 -5
  115. pygeodesy/webmercator.py +1 -1
  116. pygeodesy/wgrs.py +1 -1
  117. PyGeodesy-24.11.11.dist-info/RECORD +0 -118
  118. {PyGeodesy-24.11.11.dist-info → PyGeodesy-25.1.5.dist-info}/top_level.txt +0 -0
pygeodesy/solveBase.py CHANGED
@@ -505,7 +505,7 @@ __all__ += _ALL_DOCS(_SolveBase, _SolveCapsBase, _SolveGDictBase, _SolveGDictLin
505
505
 
506
506
  # **) MIT License
507
507
  #
508
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
508
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
509
509
  #
510
510
  # Permission is hereby granted, free of charge, to any person obtaining a
511
511
  # copy of this software and associated documentation files (the "Software"),
@@ -701,7 +701,7 @@ __all__ += _ALL_DOCS(CartesianSphericalBase, LatLonSphericalBase)
701
701
 
702
702
  # **) MIT License
703
703
  #
704
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
704
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
705
705
  #
706
706
  # Permission is hereby granted, free of charge, to any person obtaining a
707
707
  # copy of this software and associated documentation files (the "Software"),
@@ -55,13 +55,13 @@ from pygeodesy.sphericalBase import _m2radians, CartesianSphericalBase, \
55
55
  _intersecant2, LatLonSphericalBase, \
56
56
  _radians2m, Datums
57
57
  from pygeodesy.units import Bearing, Bearing_, _isDegrees, Radius, Scalar
58
- from pygeodesy.utily import atan2, degrees360, fabs, sincos2, sincos2_, \
59
- sincos2d, _unrollon, _Wrap
58
+ from pygeodesy.utily import atan2, degrees360, sincos2, sincos2_, sincos2d, \
59
+ _unrollon, _Wrap, fabs
60
60
 
61
- # from math import atan2, fabs # from utily
61
+ # from math import fabs # from utily
62
62
 
63
63
  __all__ = _ALL_LAZY.sphericalNvector
64
- __version__ = '24.11.07'
64
+ __version__ = '24.11.24'
65
65
 
66
66
  _lines_ = 'lines'
67
67
 
@@ -1201,7 +1201,7 @@ __all__ += _ALL_OTHER(Cartesian, LatLon, Nvector, # classes
1201
1201
 
1202
1202
  # **) MIT License
1203
1203
  #
1204
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
1204
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
1205
1205
  #
1206
1206
  # Permission is hereby granted, free of charge, to any person obtaining a
1207
1207
  # copy of this software and associated documentation files (the "Software"),
@@ -46,15 +46,16 @@ from pygeodesy.sphericalBase import _m2radians, CartesianSphericalBase, \
46
46
  # from pygeodesy.streprs import Fmt as _Fmt # from .points XXX shadowed
47
47
  from pygeodesy.units import Bearing_, Height, _isDegrees, _isRadius, Lamd, \
48
48
  Phid, Radius_, Scalar
49
- from pygeodesy.utily import acos1, asin1, atan1d, atan2d, degrees90, degrees180, \
50
- degrees2m, m2radians, radiansPI2, sincos2_, tan_2, \
51
- unrollPI, _unrollon, _unrollon3, _Wrap, wrap180, wrapPI
49
+ from pygeodesy.utily import acos1, asin1, atan1d, atan2, atan2d, degrees90, \
50
+ degrees180, degrees2m, m2radians, radiansPI2, \
51
+ sincos2_, tan_2, unrollPI, _unrollon, _unrollon3, \
52
+ wrap180, wrapPI, _Wrap
52
53
  from pygeodesy.vector3d import sumOf, Vector3d
53
54
 
54
- from math import asin, atan2, cos, degrees, fabs, radians, sin
55
+ from math import asin, cos, degrees, fabs, radians, sin
55
56
 
56
57
  __all__ = _ALL_LAZY.sphericalTrigonometry
57
- __version__ = '24.11.07'
58
+ __version__ = '24.11.24'
58
59
 
59
60
  _PI_EPS4 = PI - EPS4
60
61
  if _PI_EPS4 >= PI:
@@ -1409,7 +1410,7 @@ __all__ += _ALL_OTHER(Cartesian, LatLon, # classes
1409
1410
 
1410
1411
  # **) MIT License
1411
1412
  #
1412
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
1413
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
1413
1414
  #
1414
1415
  # Permission is hereby granted, free of charge, to any person obtaining a
1415
1416
  # copy of this software and associated documentation files (the "Software"),
pygeodesy/streprs.py CHANGED
@@ -14,19 +14,20 @@ from pygeodesy.interns import NN, _0_, _0to9_, MISSING, _BAR_, _COMMASPACE_, \
14
14
  _DOT_, _E_, _ELLIPSIS_, _EQUAL_, _H_, _LR_PAIRS, \
15
15
  _N_, _name_, _not_scalar_, _PERCENT_, _SPACE_, \
16
16
  _STAR_, _UNDER_
17
- from pygeodesy.interns import _convergence_, _distant_, _e_, _eps_, _exceeds_, \
18
- _EQUALSPACED_, _f_, _F_, _g_, _limit_, _no_, \
19
- _tolerance_ # PYCHOK used!
17
+ from pygeodesy.interns import _convergence_, _distant_, _e_, _exceeds_, \
18
+ _EQUALSPACED_, _f_, _F_, _g_, _limit_, \
19
+ _no_, _tolerance_ # PYCHOK used!
20
20
  from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS
21
21
 
22
22
  from math import fabs, log10 as _log10
23
23
 
24
24
  __all__ = _ALL_LAZY.streprs
25
- __version__ = '24.10.14'
25
+ __version__ = '24.11.26'
26
26
 
27
27
  _at_ = 'at' # PYCHOK used!
28
28
  _EN_PREC = 6 # max MGRS/OSGR precision, 1 micrometer
29
29
  _EN_WIDE = 5 # number of MGRS/OSGR units, log10(_100km)
30
+ _eps_ = 'eps' # PYCHOK used!
30
31
  _OKd_ = '._-' # acceptable name characters
31
32
  _PAREN_g = '(%g)' # PYCHOK used!
32
33
  _RESIDUAL_ = 'RESIDUAL' # PYCHOK used!
@@ -191,6 +192,9 @@ _Gg = (Fmt.G, Fmt.g)
191
192
  _FfEeGg = (Fmt.F, Fmt.f, Fmt.E, Fmt.e) + _Gg # float formats
192
193
  _Fspec_ = NN('[%[<flags>][<width>]', _DOTSTAR_, ']', _BAR_.join(_FfEeGg)) # in testStreprs
193
194
 
195
+ del _convergence_, _distant_, _e_, _eps_, _exceeds_, _EQUALSPACED_,\
196
+ _f_, _F_, _g_, _limit_, _PAREN_g, _RESIDUAL_
197
+
194
198
 
195
199
  def anstr(name, OKd=_OKd_, sub=_UNDER_):
196
200
  '''Make a valid name of alphanumeric and OKd characters.
@@ -598,9 +602,10 @@ def _xzipairs(names, values, sep=_COMMASPACE_, fmt=NN, pair_fmt=Fmt.COLON):
598
602
  raise _ValueError(names=names, values=values, cause=x)
599
603
  return (fmt % (t,)) if fmt else t # enc
600
604
 
605
+
601
606
  # **) MIT License
602
607
  #
603
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
608
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
604
609
  #
605
610
  # Permission is hereby granted, free of charge, to any person obtaining a
606
611
  # copy of this software and associated documentation files (the "Software"),
pygeodesy/trf.py CHANGED
@@ -1784,7 +1784,7 @@ if __name__ == '__main__':
1784
1784
 
1785
1785
  # **) MIT License
1786
1786
  #
1787
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
1787
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
1788
1788
  #
1789
1789
  # Permission is hereby granted, free of charge, to any person obtaining a
1790
1790
  # copy of this software and associated documentation files (the "Software"),
pygeodesy/triaxials.py CHANGED
@@ -7,7 +7,7 @@ I{Charles Karney}'s C++ class U{JacobiConformal<https://GeographicLib.SourceForg
7
7
  classGeographicLib_1_1JacobiConformal.html#details>} to pure Python and miscellaneous classes
8
8
  L{BetaOmega2Tuple}, L{BetaOmega3Tuple}, L{Jacobi2Tuple} and L{TriaxialError}.
9
9
 
10
- Copyright (C) U{Charles Karney<mailto:Karney@Alum.MIT.edu>} (2008-2023). For more information,
10
+ Copyright (C) U{Charles Karney<mailto:Karney@Alum.MIT.edu>} (2008-2024). For more information,
11
11
  see the U{GeographicLib<https://GeographicLib.SourceForge.io>} documentation.
12
12
 
13
13
  @see: U{Geodesics on a triaxial ellipsoid<https://WikiPedia.org/wiki/Geodesics_on_an_ellipsoid#
@@ -53,13 +53,13 @@ from pygeodesy.props import Property_RO, property_ROver
53
53
  # from pygeodesy.streprs import Fmt # from .datums
54
54
  from pygeodesy.units import Degrees, Float, Height_, Meter, Meter2, Meter3, \
55
55
  Radians, Radius, Scalar_
56
- from pygeodesy.utily import asin1, atan2d, km2m, m2km, SinCos2, sincos2d_
56
+ from pygeodesy.utily import asin1, atan2, atan2d, km2m, m2km, SinCos2, sincos2d_
57
57
  from pygeodesy.vector3d import _otherV3d, Vector3d, _ALL_LAZY, _MODS
58
58
 
59
- from math import atan2, fabs, sqrt
59
+ from math import fabs, sqrt
60
60
 
61
61
  __all__ = _ALL_LAZY.triaxials
62
- __version__ = '24.10.15'
62
+ __version__ = '24.11.24'
63
63
 
64
64
  _not_ordered_ = _not_('ordered')
65
65
  _omega_ = 'omega'
@@ -213,7 +213,7 @@ class Triaxial_(_NamedEnumItem):
213
213
  C{meter}) or an other L{Triaxial} or L{Triaxial_} instance.
214
214
  @kwarg b: Middle, C{Y} semi-axis (C{meter}, same units as B{C{a}}), required
215
215
  if C{B{a_triaxial} is scalar}, ignored otherwise.
216
- @kwarg c: Small, C{Z} semi-axis (C{meter}, B{C{b}}).
216
+ @kwarg c: Small, C{Z} semi-axis (C{meter}, like B{C{b}}).
217
217
  @kwarg name: Optional C{B{name}=NN} (C{str}).
218
218
 
219
219
  @raise TriaxialError: Invalid semi-axis or -axes.
@@ -396,8 +396,10 @@ class Triaxial_(_NamedEnumItem):
396
396
  @raise TriaxialError: Non-cartesian B{C{xyz}}, invalid B{C{eps}}, no convergence in
397
397
  root finding or validation failed.
398
398
 
399
- @see: Methods L{Triaxial.normal3d} and L{Ellipsoid.height4} and I{Eberly}'s U{Distance from a
400
- Point to ...<https://www.GeometricTools.com/Documentation/DistancePointEllipseEllipsoid.pdf>}.
399
+ @see: Methods L{Triaxial.normal3d} and L{Ellipsoid.height4}, I{Eberly}'s U{Distance from a Point to ...
400
+ <https://www.GeometricTools.com/Documentation/DistancePointEllipseEllipsoid.pdf>} and I{Bektas}'
401
+ U{Shortest Distance from a Point to Triaxial Ellipsoid<https://www.ResearchGate.net/publication/
402
+ 272149005_SHORTEST_DISTANCE_FROM_A_POINT_TO_TRIAXIAL_ELLIPSOID>}.
401
403
  '''
402
404
  v, r = _otherV3d_(x_xyz, y, z), self.isSpherical
403
405
 
@@ -420,7 +422,7 @@ class Triaxial_(_NamedEnumItem):
420
422
  raise TriaxialError(x=x, y=y, z=z, cause=e)
421
423
  if h > 0 and self.sideOf(v, eps=EPS0) < 0:
422
424
  h = -h # inside
423
- n = _name__(name, name__=self.height4)
425
+ n = _name__(name, name__=self.height4) # _DUNDER_nameof
424
426
  return Vector4Tuple(x, y, z, h, iteration=i, name=n)
425
427
 
426
428
  @Property_RO
@@ -863,7 +865,8 @@ class Triaxial(Triaxial_):
863
865
  return BetaOmega3Tuple(Radians(beta=a), Radians(omega=b), h, **name)
864
866
 
865
867
  def reverseCartesian(self, x_xyz, y=None, z=None, h=0, normal=True, eps=_EPS2e4, **name):
866
- '''"Unproject" a cartesian on to a cartesion I{off} this triaxial's surface.
868
+ '''Unproject" a cartesian I{on} this triaxial's surface to a cartesion I{off}
869
+ this triaxial's surface.
867
870
 
868
871
  @arg x_xyz: X component (C{scalar}) or a cartesian (C{Cartesian},
869
872
  L{Ecef9Tuple}, L{Vector3d}, L{Vector3Tuple} or L{Vector4Tuple}).
@@ -871,7 +874,7 @@ class Triaxial(Triaxial_):
871
874
  ignored otherwise.
872
875
  @kwarg z: Z component (C{scalar}), like B{C{y}}.
873
876
  @arg h: Height above or below this triaxial's surface (C{meter}, same units
874
- as the axes).
877
+ as this triaxial's axes).
875
878
  @kwarg normal: If C{True}, the height is C{normal} to the surface, otherwise
876
879
  C{radially} to the center of this triaxial (C{bool}).
877
880
  @kwarg eps: Tolerance for on-surface test (C{scalar}), see method L{Triaxial.sideOf}.
@@ -941,7 +944,7 @@ class JacobiConformal(Triaxial):
941
944
  by C{sqrt(B{a}**2 - B{c}**2) / (2 * B{b})} so that the customary results are
942
945
  returned in the case of an ellipsoid of revolution.
943
946
 
944
- Copyright (C) U{Charles Karney<mailto:Karney@Alum.MIT.edu>} (2014-2023) and
947
+ Copyright (C) U{Charles Karney<mailto:Karney@Alum.MIT.edu>} (2014-2024) and
945
948
  licensed under the MIT/X11 License.
946
949
 
947
950
  @note: This constructor can I{not be used to specify a sphere}, see alternate
@@ -1278,8 +1281,8 @@ def hartzell4(pov, los=False, tri_biax=_WGS84, **name):
1278
1281
  v, h, i = _hartzell3(pov, los, T)
1279
1282
  except Exception as x:
1280
1283
  raise TriaxialError(pov=pov, los=los, tri_biax=tri_biax, cause=x)
1281
- return Vector4Tuple(v.x, v.y, v.z, h, iteration=i, # _DUNDER_nameof
1282
- name=_name__(name, name__=hartzell4))
1284
+ n = _name__(name, name__=hartzell4) # _DUNDER_nameof
1285
+ return Vector4Tuple(v.x, v.y, v.z, h, iteration=i, name=n)
1283
1286
 
1284
1287
 
1285
1288
  def _hypot2_1(x, y, z=0):
@@ -1319,8 +1322,8 @@ def _plumbTo3(px, py, E, eps=EPS): # in .ellipsoids.Ellipsoid.height4
1319
1322
  b2 = b - a * E.a_b
1320
1323
  tx = ty = _SQRT2_2
1321
1324
  for i in range(16): # max 5
1322
- ex = a2 * tx**3
1323
- ey = b2 * ty**3
1325
+ ex = tx**3 * a2
1326
+ ey = ty**3 * b2
1324
1327
 
1325
1328
  qx = px - ex
1326
1329
  qy = py - ey
@@ -1529,13 +1532,17 @@ if __name__ == '__main__':
1529
1532
  from pygeodesy import printf
1530
1533
  from pygeodesy.interns import _COMMA_, _NL_, _NLATvar_
1531
1534
 
1535
+ t = Triaxial_(6378388.0, 6378318.0, 6356911.9461)
1536
+ t = t.height4(3909863.9271, 3909778.123, 3170932.5016)
1537
+ printf('# Bektas: %r', t)
1538
+
1532
1539
  # __doc__ of this file, force all into registery
1533
1540
  t = [NN] + Triaxials.toRepr(all=True, asorted=True).split(_NL_)
1534
1541
  printf(_NLATvar_.join(i.strip(_COMMA_) for i in t))
1535
1542
 
1536
1543
  # **) MIT License
1537
1544
  #
1538
- # Copyright (C) 2022-2024 -- mrJean1 at Gmail -- All Rights Reserved.
1545
+ # Copyright (C) 2022-2025 -- mrJean1 at Gmail -- All Rights Reserved.
1539
1546
  #
1540
1547
  # Permission is hereby granted, free of charge, to any person obtaining a
1541
1548
  # copy of this software and associated documentation files (the "Software"),
pygeodesy/units.py CHANGED
@@ -27,7 +27,7 @@ from pygeodesy.unitsBase import Float, Int, _NamedUnit, Radius, Str, Fmt, fstr
27
27
  from math import degrees, isnan, radians
28
28
 
29
29
  __all__ = _ALL_LAZY.units
30
- __version__ = '24.11.06'
30
+ __version__ = '24.11.14'
31
31
 
32
32
 
33
33
  class Float_(Float):
@@ -798,36 +798,36 @@ class Zone(Int):
798
798
  return Int_.__new__(cls, arg=arg, name=name, **Error_name_arg)
799
799
 
800
800
 
801
- _ScalarU = Float, Float_, Scalar, Scalar_
802
- _Degrees = (Azimuth, Bearing, Bearing_, Degrees, Degrees_) + _ScalarU
803
- _Meters = (Distance, Distance_, Meter, Meter_) + _ScalarU
804
- _Radians = (Radians, Radians_) + _ScalarU # PYCHOK unused
801
+ _Degrees = (Azimuth, Bearing, Bearing_, Degrees, Degrees_)
802
+ _Meters = (Distance, Distance_, Meter, Meter_)
803
+ _Radians = (Radians, Radians_) # PYCHOK unused
805
804
  _Radii = _Meters + (Radius, Radius_)
805
+ _ScalarU = Float, Float_, Scalar, Scalar_
806
806
 
807
807
 
808
- def _isDegrees(obj):
808
+ def _isDegrees(obj, iscalar=True):
809
809
  # Check for valid degrees types.
810
- return isinstance(obj, _Degrees) or _isScalar(obj)
810
+ return isinstance(obj, _Degrees) or (iscalar and _isScalar(obj))
811
811
 
812
812
 
813
- def _isHeight(obj):
813
+ def _isHeight(obj, iscalar=True):
814
814
  # Check for valid height types.
815
- return isinstance(obj, _Meters) or _isScalar(obj)
815
+ return isinstance(obj, _Meters) or (iscalar and _isScalar(obj))
816
816
 
817
817
 
818
- def _isMeter(obj):
818
+ def _isMeter(obj, iscalar=True):
819
819
  # Check for valid meter types.
820
- return isinstance(obj, _Meters) or _isScalar(obj)
820
+ return isinstance(obj, _Meters) or (iscalar and _isScalar(obj))
821
821
 
822
822
 
823
- def _isRadius(obj):
823
+ def _isRadius(obj, iscalar=True):
824
824
  # Check for valid earth radius types.
825
- return isinstance(obj, _Radii) or _isScalar(obj)
825
+ return isinstance(obj, _Radii) or (iscalar and _isScalar(obj))
826
826
 
827
827
 
828
- def _isScalar(obj):
828
+ def _isScalar(obj, iscalar=True):
829
829
  # Check for pure scalar types.
830
- return isscalar(obj) and not isinstance(obj, _NamedUnit)
830
+ return isinstance(obj, _ScalarU) or (iscalar and isscalar(obj) and not isinstance(obj, _NamedUnit))
831
831
 
832
832
 
833
833
  def _toUnit(Unit, arg, name=NN, **Error):
@@ -872,7 +872,7 @@ __all__ += _ALL_DOCS(_NamedUnit)
872
872
 
873
873
  # **) MIT License
874
874
  #
875
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
875
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
876
876
  #
877
877
  # Permission is hereby granted, free of charge, to any person obtaining a
878
878
  # copy of this software and associated documentation files (the "Software"),
pygeodesy/unitsBase.py CHANGED
@@ -349,7 +349,7 @@ __all__ += _ALL_DOCS(_NamedUnit)
349
349
 
350
350
  # **) MIT License
351
351
  #
352
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
352
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
353
353
  #
354
354
  # Permission is hereby granted, free of charge, to any person obtaining a
355
355
  # copy of this software and associated documentation files (the "Software"),
pygeodesy/ups.py CHANGED
@@ -40,16 +40,16 @@ from pygeodesy.props import deprecated_method, property_doc_, \
40
40
  Property_RO, _update_all
41
41
  # from pygeodesy.streprs import Fmt # from .utmupsBase
42
42
  from pygeodesy.units import Float, Float_, Meter, Lat
43
- from pygeodesy.utily import atan1d, degrees180, sincos2d
43
+ from pygeodesy.utily import atan1d, atan2, degrees180, sincos2d
44
44
  from pygeodesy.utmupsBase import Fmt, _LLEB, _hemi, _parseUTMUPS5, _to4lldn, \
45
45
  _to3zBhp, _to3zll, _UPS_BANDS as _Bands, \
46
46
  _UPS_LAT_MAX, _UPS_LAT_MIN, _UPS_ZONE, \
47
47
  _UPS_ZONE_STR, UtmUpsBase
48
48
 
49
- from math import atan2, fabs, radians, tan
49
+ from math import fabs, radians, tan # as _tan
50
50
 
51
51
  __all__ = _ALL_LAZY.ups
52
- __version__ = '24.10.14'
52
+ __version__ = '24.11.26'
53
53
 
54
54
  _BZ_UPS = _getPYGEODESY('UPS_POLES', _std_) == _std_
55
55
  _Falsing = Meter(2000e3) # false easting and northing (C{meter})
@@ -509,7 +509,7 @@ def upsZoneBand5(lat, lon, strict=True, **name):
509
509
 
510
510
  # **) MIT License
511
511
  #
512
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
512
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
513
513
  #
514
514
  # Permission is hereby granted, free of charge, to any person obtaining a
515
515
  # copy of this software and associated documentation files (the "Software"),