pygeodesy 24.4.2__py2.py3-none-any.whl → 24.4.12__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.
pygeodesy/utily.py CHANGED
@@ -10,12 +10,14 @@ U{Vector-based geodesy<https://www.Movable-Type.co.UK/scripts/latlong-vectors.ht
10
10
  # make sure int/int division yields float quotient, see .basics
11
11
  from __future__ import division as _; del _ # PYCHOK semicolon
12
12
 
13
- from pygeodesy.basics import _copysign, isinstanceof, isint, isstr, neg, _passargs
14
- from pygeodesy.constants import EPS, EPS0, INF, NAN, NEG0, PI, PI2, PI_2, R_M, \
15
- _float as _F, _isfinite, isnan, isnear0, _over, \
16
- _umod_360, _umod_PI2, _M_KM, _M_NM, _M_SM, _0_0, \
17
- _1__90, _0_5, _1_0, _N_1_0, _2__PI, _10_0, _90_0, \
18
- _N_90_0, _180_0, _N_180_0, _360_0, _400_0
13
+ from pygeodesy.basics import _copysign, isinstanceof, isint, isstr, neg, \
14
+ _passargs
15
+ from pygeodesy.constants import EPS, EPS0, INF, NAN, PI, PI2, PI_2, R_M, \
16
+ _M_KM, _M_NM, _M_SM, _0_0, _1__90, _0_5, _1_0, \
17
+ _N_1_0, _2__PI, _10_0, _90_0, _N_90_0, _180_0, \
18
+ _N_180_0, _360_0, _400_0, _copysign_0_0, \
19
+ _float as _F, _isfinite, isnan, isnear0, \
20
+ _over, _umod_360, _umod_PI2
19
21
  from pygeodesy.errors import _ValueError, _xkwds, _xkwds_get, _ALL_LAZY, _MODS
20
22
  from pygeodesy.interns import _edge_, _radians_, _semi_circular_, _SPACE_
21
23
  # from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS # from .errors
@@ -25,7 +27,7 @@ from pygeodesy.units import Degrees, Degrees_, Feet, Float, Lam, Lam_, \
25
27
  from math import acos, asin, atan2, cos, degrees, fabs, radians, sin, tan # pow
26
28
 
27
29
  __all__ = _ALL_LAZY.utily
28
- __version__ = '24.01.12'
30
+ __version__ = '24.04.04'
29
31
 
30
32
  # read constant name "_M_Unit" as "meter per Unit"
31
33
  _M_CHAIN = _F( 20.1168) # yard2m(1) * 22
@@ -683,7 +685,7 @@ def _sin0cos2(q, r, sign):
683
685
  # else: # r == 0, testUtility failures
684
686
  # t = _0_0, _1_0, _0_0, _N_1_0, _0_0
685
687
  # q &= 3
686
- s = t[q] or (NEG0 if sign < 0 else _0_0)
688
+ s = t[q] or _copysign_0_0(sign)
687
689
  c = t[q + 1] or _0_0
688
690
  return s, c
689
691
 
@@ -691,8 +693,7 @@ def _sin0cos2(q, r, sign):
691
693
  def SinCos2(x):
692
694
  '''Get C{sin} and C{cos} of I{typed} angle.
693
695
 
694
- @arg x: Angle (L{Degrees}, L{Degrees_}, L{Radians}, L{Radians_}
695
- or scalar C{radians}).
696
+ @arg x: Angle (L{Degrees}, L{Radians} or scalar C{radians}).
696
697
 
697
698
  @return: 2-Tuple (C{sin(B{x})}, C{cos(B{x})}).
698
699
  '''
pygeodesy/utmupsBase.py CHANGED
@@ -17,7 +17,7 @@ from pygeodesy.interns import NN, _A_, _B_, _COMMA_, _Error_, \
17
17
  _gamma_, _n_a_, _not_, _N_, _NS_, _PLUS_, \
18
18
  _scale_, _SPACE_, _Y_, _Z_, _under
19
19
  from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
20
- from pygeodesy.named import _NamedBase, nameof, notOverloaded, _xnamed
20
+ from pygeodesy.named import _NamedBase, nameof, _xnamed
21
21
  from pygeodesy.namedTuples import EasNor2Tuple, LatLonDatum5Tuple
22
22
  from pygeodesy.props import deprecated_method, property_doc_, _update_all, \
23
23
  deprecated_property_RO, Property_RO, property_RO
@@ -26,7 +26,7 @@ from pygeodesy.units import Band, Easting, Northing, Scalar, Zone
26
26
  from pygeodesy.utily import _Wrap, wrap360
27
27
 
28
28
  __all__ = _ALL_LAZY.utmupsBase
29
- __version__ = '23.11.29'
29
+ __version__ = '24.04.07'
30
30
 
31
31
  _UPS_BANDS = _A_, _B_, _Y_, _Z_ # UPS polar bands SE, SW, NE, NW
32
32
  # _UTM_BANDS = _MODS.utm._Bands
@@ -170,7 +170,7 @@ class UtmUpsBase(_NamedBase):
170
170
  '''
171
171
  E = self._Error
172
172
  if not E: # PYCHOK no cover
173
- notOverloaded(self, callername=_under(_Error_))
173
+ self._notOverloaded(callername=_under(_Error_))
174
174
 
175
175
  self._easting = Easting(easting, Error=E)
176
176
  self._northing = Northing(northing, Error=E)
@@ -203,7 +203,7 @@ class UtmUpsBase(_NamedBase):
203
203
  if band:
204
204
  _xinstanceof(str, band=band)
205
205
  # if not self._Bands: # PYCHOK no cover
206
- # notOverloaded(self, callername=_under('Bands'))
206
+ # self._notOverloaded(callername=_under('Bands'))
207
207
  if band not in self._Bands:
208
208
  t = _or(*sorted(set(map(repr, self._Bands))))
209
209
  raise self._Error(band=band, txt=_not_(t))
@@ -276,7 +276,7 @@ class UtmUpsBase(_NamedBase):
276
276
  @Property_RO
277
277
  def falsed2(self): # PYCHOK no cover
278
278
  '''I{Must be overloaded}.'''
279
- notOverloaded(self)
279
+ self._notOverloaded(self)
280
280
 
281
281
  @Property_RO
282
282
  def gamma(self):
@@ -374,7 +374,7 @@ class UtmUpsBase(_NamedBase):
374
374
 
375
375
  def _toLLEB(self, **kwds): # PYCHOK no cover
376
376
  '''(INTERNAL) I{Must be overloaded}.'''
377
- notOverloaded(self, **kwds)
377
+ self._notOverloaded(**kwds)
378
378
 
379
379
  def toMgrs(self, center=False):
380
380
  '''Convert this UTM/UPS coordinate to an MGRS grid reference.