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/geodesicw.py CHANGED
@@ -37,7 +37,7 @@ from contextlib import contextmanager
37
37
  # from math import fabs # from .utily
38
38
 
39
39
  __all__ = _ALL_LAZY.geodesicw
40
- __version__ = '24.03.22'
40
+ __version__ = '24.04.07'
41
41
 
42
42
  _plumb_ = 'plumb'
43
43
  _TRIPS = 65
@@ -479,7 +479,7 @@ class _wargs(object): # see also .formy._idllmn6, .latlonBase._toCartesian3, .v
479
479
  try:
480
480
  yield args
481
481
  except Exception as x:
482
- n = _DOT_(classname(inst), callername(up=3, underOK=True))
482
+ n = _DOT_(classname(inst), callername(up=2, underOK=True))
483
483
  raise GeodesicError(unstr(n, *args, **kwds), cause=x)
484
484
 
485
485
  _wargs = _wargs() # PYCHOK singleton
pygeodesy/geodsolve.py CHANGED
@@ -11,6 +11,7 @@ of the C{GeodSolve} executable.
11
11
 
12
12
  from pygeodesy.basics import _xinstanceof
13
13
  # from pygeodesy.errors import _xkwds # from .karney
14
+ # from pygeodesy.geodesicx import GeodesicAreaExact # _MODS
14
15
  from pygeodesy.interns import NN, _a12_, _azi1_, _azi2_, \
15
16
  _lat1_, _lat2_, _lon1_, _lon2_, _m12_, \
16
17
  _M12_, _M21_, _s12_, _S12_, _UNDER_
@@ -25,7 +26,7 @@ from pygeodesy.solveBase import _SolveBase, _SolveLineBase
25
26
  from pygeodesy.utily import _unrollon, _Wrap, wrap360
26
27
 
27
28
  __all__ = _ALL_LAZY.geodsolve
28
- __version__ = '24.02.21'
29
+ __version__ = '24.04.07'
29
30
 
30
31
 
31
32
  class GeodSolve12Tuple(_GTuple):
@@ -301,11 +302,11 @@ class GeodesicLineSolve(_GeodesicSolveBase, _SolveLineBase):
301
302
 
302
303
  def Intersecant2(self, lat0, lon0, radius, **kwds): # PYCHOK no cover
303
304
  '''B{Not implemented}, throws a C{NotImplementedError} always.'''
304
- _MODS.named.notImplemented(self, lat0, lon0, radius, **kwds)
305
+ self._notImplemented(lat0, lon0, radius, **kwds)
305
306
 
306
307
  def PlumbTo(self, lat0, lon0, **kwds): # PYCHOK no cover
307
308
  '''B{Not implemented}, throws a C{NotImplementedError} always.'''
308
- _MODS.named.notImplemented(self, lat0, lon0, **kwds)
309
+ self._notImplemented(lat0, lon0, **kwds)
309
310
 
310
311
  def Position(self, s12, outmask=_UNUSED_): # PYCHOK unused
311
312
  '''Find the position on the line given B{C{s12}}.
pygeodesy/geoids.py CHANGED
@@ -99,7 +99,7 @@ from pygeodesy.interns import MISSING, NN, _4_, _COLONSPACE_, _COMMASPACE_, \
99
99
  _scipy_, _SPACE_, _stdev_, _supported_, _tbd_, \
100
100
  _W_, _width_, _version2
101
101
  from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS, _FOR_DOCS
102
- from pygeodesy.named import _Named, _NamedTuple, notOverloaded
102
+ from pygeodesy.named import _Named, _NamedTuple
103
103
  # from pygeodesy.namedTuples import LatLon3Tuple # _MODS
104
104
  from pygeodesy.props import deprecated_method, Property_RO, property_RO
105
105
  from pygeodesy.streprs import attrs, Fmt, fstr, pairs
@@ -118,7 +118,7 @@ except ImportError: # Python 3+
118
118
  from io import BytesIO as _BytesIO # PYCHOK expected
119
119
 
120
120
  __all__ = _ALL_LAZY.geoids
121
- __version__ = '24.03.22'
121
+ __version__ = '24.04.07'
122
122
 
123
123
  _assert_ = 'assert'
124
124
  _bHASH_ = b'#'
@@ -385,7 +385,7 @@ class _GeoidBase(_HeightsBase):
385
385
 
386
386
  def _g2ll2(self, lat, lon): # PYCHOK no cover
387
387
  '''(INTERNAL) I{Must be overloaded}.'''
388
- notOverloaded(self, lat, lon)
388
+ self._notOverloaded(lat, lon)
389
389
 
390
390
  def _gyx2g2(self, y, x):
391
391
  # convert grid (y, x) indices to grid (lat, lon)
@@ -473,7 +473,7 @@ class _GeoidBase(_HeightsBase):
473
473
 
474
474
  def _ll2g2(self, lat, lon): # PYCHOK no cover
475
475
  '''(INTERNAL) I{Must be overloaded}.'''
476
- notOverloaded(self, lat, lon)
476
+ self._notOverloaded(lat, lon)
477
477
 
478
478
  @property_RO
479
479
  def _LL3T(self):
pygeodesy/hausdorff.py CHANGED
@@ -74,7 +74,7 @@ import pygeodesy.formy as _formy
74
74
  from pygeodesy.interns import NN, _i_, _j_, _units_
75
75
  # from pygeodesy.iters import points2 # from .points
76
76
  from pygeodesy.lazily import _ALL_LAZY, _FOR_DOCS
77
- from pygeodesy.named import _Named, _NamedTuple, notOverloaded, _Pass
77
+ from pygeodesy.named import _Named, _NamedTuple, _Pass
78
78
  # from pygeodesy.namedTuples import PhiLam2Tuple # from .points
79
79
  from pygeodesy.points import _distanceTo, points2 as _points2, PhiLam2Tuple, radians
80
80
  from pygeodesy.props import Property_RO, property_doc_, property_RO
@@ -86,7 +86,7 @@ from pygeodesy.unitsBase import _Str_degrees, _Str_degrees2, _Str_meter, _Str_NN
86
86
  from random import Random
87
87
 
88
88
  __all__ = _ALL_LAZY.hausdorff
89
- __version__ = '24.03.24'
89
+ __version__ = '24.04.07'
90
90
 
91
91
 
92
92
  class HausdorffError(PointsError):
@@ -273,7 +273,7 @@ class HausdorffDegrees(Hausdorff):
273
273
 
274
274
  def distance(self, point1, point2): # PYCHOK no cover
275
275
  '''I{Must be overloaded}.'''
276
- notOverloaded(self, point1, point2)
276
+ self._notOverloaded(point1, point2)
277
277
 
278
278
 
279
279
  class HausdorffRadians(Hausdorff):
@@ -290,7 +290,7 @@ class HausdorffRadians(Hausdorff):
290
290
  def distance(self, point1, point2): # PYCHOK no cover
291
291
  '''Return the distance in C{radians} between B{C{point1}} and B{C{point2}}.
292
292
  I{Must be overloaded}.'''
293
- notOverloaded(self, point1, point2)
293
+ self._notOverloaded(point1, point2)
294
294
 
295
295
  def point(self, point):
296
296
  '''Return B{C{point}} as L{PhiLam2Tuple} to maintain
@@ -334,7 +334,7 @@ class _HausdorffMeterRadians(Hausdorff):
334
334
 
335
335
  def _func_(self, *args, **kwds): # PYCHOK no cover
336
336
  '''(INTERNAL) I{Must be overloaded}.'''
337
- notOverloaded(self, *args, **kwds)
337
+ self._notOverloaded(*args, **kwds)
338
338
 
339
339
 
340
340
  class HausdorffCosineAndoyerLambert(_HausdorffMeterRadians):
pygeodesy/heights.py CHANGED
@@ -81,7 +81,7 @@ from pygeodesy.interns import NN, _COMMASPACE_, _cubic_, _insufficient_, _knots_
81
81
  _linear_, _NOTEQUAL_, _PLUS_, _scipy_, _SPACE_, \
82
82
  _STAR_, _version2
83
83
  from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS, _FOR_DOCS
84
- from pygeodesy.named import _Named, notOverloaded
84
+ from pygeodesy.named import _Named
85
85
  from pygeodesy.points import _distanceTo, LatLon_, Fmt, radians, _Wrap
86
86
  from pygeodesy.props import Property_RO, property_RO
87
87
  # from pygeodesy.streprs import Fmt # from .points
@@ -91,7 +91,7 @@ from pygeodesy.units import _isDegrees, Float_, Int_
91
91
  # from math import radians # from .points
92
92
 
93
93
  __all__ = _ALL_LAZY.heights
94
- __version__ = '24.03.14'
94
+ __version__ = '24.04.07'
95
95
 
96
96
  _error_ = 'error'
97
97
  _llis_ = 'llis'
@@ -245,7 +245,7 @@ class _HeightsBase(_HeightBase): # in .geoids
245
245
 
246
246
  @raise SciPyWarning: A C{scipy} warning as exception.
247
247
  '''
248
- notOverloaded(self, callername='__call__', *llis, **wrap)
248
+ self._notOverloaded(callername='__call__', *llis, **wrap)
249
249
 
250
250
  def _as_xyllis4(self, llis, **wrap):
251
251
  # convert lli C{LatLon}s to tuples or C{NumPy} arrays of
@@ -258,7 +258,7 @@ class _HeightsBase(_HeightBase): # in .geoids
258
258
 
259
259
  def _ev(self, *args): # PYCHOK no cover
260
260
  '''(INTERNAL) I{Must be overloaded}.'''
261
- notOverloaded(self, *args)
261
+ self._notOverloaded(*args)
262
262
 
263
263
  def _eval(self, llis, **wrap): # XXX single arg, not *args
264
264
  _as, xis, yis, _ = self._as_xyllis4(llis, **wrap)
@@ -286,7 +286,7 @@ class _HeightsBase(_HeightBase): # in .geoids
286
286
 
287
287
  @raise SciPyWarning: A C{scipy} warning as exception.
288
288
  '''
289
- notOverloaded(self, lats, lons, **wrap)
289
+ self._notOverloaded(lats, lons, **wrap)
290
290
 
291
291
  def _np_sp2(self, throwarnings=False):
292
292
  '''(INTERNAL) Import C{numpy} and C{scipy}, once.
@@ -687,7 +687,7 @@ class _HeightIDW(_HeightBase):
687
687
  '''
688
688
  _f, kwds = self._func, self._kwds
689
689
  if not callable(_f): # PYCHOK no cover
690
- notOverloaded(self, distance_function=_f)
690
+ self._notOverloaded(distance_function=_f)
691
691
  try:
692
692
  for i, k in enumerate(self._knots):
693
693
  yield _f(y, x, k.lat, k.lon, **kwds)
pygeodesy/latlonBase.py CHANGED
@@ -35,7 +35,7 @@ from pygeodesy.interns import NN, _COMMASPACE_, _concentric_, _height_, \
35
35
  # from pygeodesy.karney import Caps # _MODS
36
36
  from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
37
37
  # from pygeodesy.ltp import Ltp, _xLtp # _MODS
38
- from pygeodesy.named import _NamedBase, notImplemented, notOverloaded, Fmt
38
+ from pygeodesy.named import _NamedBase, Fmt
39
39
  from pygeodesy.namedTuples import Bounds2Tuple, LatLon2Tuple, PhiLam2Tuple, \
40
40
  Trilaterate5Tuple
41
41
  # from pygeodesy.nvectorBase import _N_vector_ # _MODS
@@ -53,7 +53,7 @@ from contextlib import contextmanager
53
53
  from math import asin, cos, degrees, fabs, radians
54
54
 
55
55
  __all__ = _ALL_LAZY.latlonBase
56
- __version__ = '24.03.15'
56
+ __version__ = '24.04.07'
57
57
 
58
58
 
59
59
  class LatLonBase(_NamedBase):
@@ -418,7 +418,7 @@ class LatLonBase(_NamedBase):
418
418
  @property_RO
419
419
  def datum(self): # PYCHOK no cover
420
420
  '''I{Must be overloaded}.'''
421
- notOverloaded(self)
421
+ self._notOverloaded()
422
422
 
423
423
  def destinationXyz(self, delta, LatLon=None, **LatLon_kwds):
424
424
  '''Calculate the destination using a I{local} delta from this point.
@@ -735,7 +735,7 @@ class LatLonBase(_NamedBase):
735
735
 
736
736
  def intersecant2(self, *args, **kwds): # PYCHOK no cover
737
737
  '''B{Not implemented}, throws a C{NotImplementedError} always.'''
738
- notImplemented(self, *args, **kwds)
738
+ self._notImplemented(*args, **kwds)
739
739
 
740
740
  def _intersecend2(self, p, q, wrap, height, g_or_r, P, Q, unused): # in .LatLonEllipsoidalBaseDI.intersecant2
741
741
  '''(INTERNAL) Interpolate 2 heights along a geodesic or rhumb
@@ -1021,7 +1021,7 @@ class LatLonBase(_NamedBase):
1021
1021
 
1022
1022
  def nearestTo(self, *args, **kwds): # PYCHOK no cover
1023
1023
  '''B{Not implemented}, throws a C{NotImplementedError} always.'''
1024
- notImplemented(self, *args, **kwds)
1024
+ self._notImplemented(*args, **kwds)
1025
1025
 
1026
1026
  def normal(self):
1027
1027
  '''Normalize this point I{in-place} to C{abs(lat) <= 90} and
@@ -1424,7 +1424,7 @@ class LatLonBase(_NamedBase):
1424
1424
 
1425
1425
  def toDatum(self, datum2, height=None, name=NN):
1426
1426
  '''I{Must be overloaded}.'''
1427
- notOverloaded(self, datum2, height=height, name=name)
1427
+ self._notOverloaded(datum2, height=height, name=name)
1428
1428
 
1429
1429
  def toEcef(self, height=None, M=False):
1430
1430
  '''Convert this point to I{geocentric} coordinates, also known as
pygeodesy/lazily.py CHANGED
@@ -504,7 +504,7 @@ class _ALL_MODS(object):
504
504
  _ALL_MODS = _ALL_MODS() # PYCHOK singleton
505
505
 
506
506
  __all__ = _ALL_LAZY.lazily
507
- __version__ = '24.03.29'
507
+ __version__ = '24.04.07'
508
508
 
509
509
 
510
510
  def _ALL_OTHER(*objs):
pygeodesy/ltp.py CHANGED
@@ -42,7 +42,7 @@ from pygeodesy.vector3d import _ALL_LAZY, Vector3d
42
42
  # from math import fabs, floor as _floor # from .fmath, .fsums
43
43
 
44
44
  __all__ = _ALL_LAZY.ltp
45
- __version__ = '24.02.16'
45
+ __version__ = '24.04.07'
46
46
 
47
47
  _height0_ = _height_ + _0_
48
48
  _narrow_ = 'narrow'
pygeodesy/ltpTuples.py CHANGED
@@ -22,8 +22,7 @@ from pygeodesy.interns import NN, _4_, _azimuth_, _center_, _COMMASPACE_, \
22
22
  _lat_, _lon_, _ltp_, _M_, _north_, _not_, _up_, \
23
23
  _X_, _x_, _xyz_, _Y_, _y_, _z_
24
24
  from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
25
- from pygeodesy.named import _NamedBase, _NamedTuple, notOverloaded, \
26
- _Pass, _xnamed
25
+ from pygeodesy.named import _NamedBase, _NamedTuple, _Pass, _xnamed
27
26
  from pygeodesy.namedTuples import LatLon2Tuple, PhiLam2Tuple, Vector3Tuple
28
27
  from pygeodesy.props import deprecated_method, deprecated_Property_RO, \
29
28
  Property_RO, property_RO
@@ -36,7 +35,7 @@ from pygeodesy.vector3d import Vector3d
36
35
  from math import cos, radians
37
36
 
38
37
  __all__ = _ALL_LAZY.ltpTuples
39
- __version__ = '24.03.15'
38
+ __version__ = '24.04.07'
40
39
 
41
40
  _aer_ = 'aer'
42
41
  _alt_ = 'alt'
@@ -183,7 +182,7 @@ class _NamedAerNed(_NamedBase):
183
182
  @property_RO
184
183
  def xyz4(self): # PYCHOK no cover
185
184
  '''I{Must be overloaded}.'''
186
- notOverloaded(self)
185
+ self._notOverloaded()
187
186
 
188
187
  @Property_RO
189
188
  def xyzLocal(self):
pygeodesy/named.py CHANGED
@@ -32,7 +32,7 @@ from pygeodesy.props import _allPropertiesOf_n, deprecated_method, _hasProperty,
32
32
  from pygeodesy.streprs import attrs, Fmt, lrstrip, pairs, reprs, unstr
33
33
 
34
34
  __all__ = _ALL_LAZY.named
35
- __version__ = '24.03.22'
35
+ __version__ = '24.04.07'
36
36
 
37
37
  _COMMANL_ = _COMMA_ + _NL_
38
38
  _COMMASPACEDOT_ = _COMMASPACE_ + _DOT_
@@ -45,6 +45,7 @@ _Names_ = '_Names_'
45
45
  _registered_ = 'registered' # PYCHOK used!
46
46
  _std_NotImplemented = _getenv('PYGEODESY_NOTIMPLEMENTED', NN).lower() == _std_
47
47
  _Units_ = '_Units_'
48
+ _UP = 2
48
49
 
49
50
 
50
51
  def _xjoined_(prefix, name):
@@ -377,6 +378,16 @@ class _Named(object):
377
378
  '''
378
379
  return _xjoined_(_DOT_(self.__module__, self.__class__.__name__), self.name)
379
380
 
381
+ def _notImplemented(self, *args, **kwds):
382
+ '''(INTERNAL) See function L{notImplemented}.
383
+ '''
384
+ notImplemented(self, *args, **_xkwds(kwds, up=_UP + 1))
385
+
386
+ def _notOverloaded(self, *args, **kwds):
387
+ '''(INTERNAL) See function L{notOverloaded}.
388
+ '''
389
+ notOverloaded(self, *args, **_xkwds(kwds, up=_UP + 1))
390
+
380
391
  def rename(self, name):
381
392
  '''Change the name.
382
393
 
@@ -1148,7 +1159,7 @@ def callername(up=1, dflt=NN, source=False, underOK=False):
1148
1159
  return dflt
1149
1160
 
1150
1161
 
1151
- def _callername2(args, callername=NN, source=False, underOK=False, up=2, **kwds):
1162
+ def _callername2(args, callername=NN, source=False, underOK=False, up=_UP, **kwds):
1152
1163
  '''(INTERNAL) Extract C{callername}, C{source}, C{underOK} and C{up} from C{kwds}.
1153
1164
  '''
1154
1165
  n = callername or _MODS.named.callername(up=up + 1, source=source,
@@ -1265,7 +1276,7 @@ def notImplemented(inst, *args, **kwds): # PYCHOK no cover
1265
1276
  '''Raise a C{NotImplementedError} for a missing instance method or
1266
1277
  property or for a missing caller feature.
1267
1278
 
1268
- @arg inst: Instance (C{any}) or C{None} for caller.
1279
+ @arg inst: Caller instance (C{any}) or C{None} for function.
1269
1280
  @arg args: Method or property positional arguments (any C{type}s).
1270
1281
  @arg kwds: Method or property keyword arguments (any C{type}s),
1271
1282
  except C{B{callername}=NN}, C{B{underOK}=False} and
pygeodesy/nvectorBase.py CHANGED
@@ -25,7 +25,7 @@ from pygeodesy.interns import NN, _1_, _2_, _3_, _bearing_, _coincident_, \
25
25
  _pole_, _SPACE_, _SouthPole_, _under
26
26
  from pygeodesy.latlonBase import LatLonBase, _ALL_DOCS, _ALL_LAZY, _MODS
27
27
  # from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS # from .latlonBase
28
- from pygeodesy.named import notImplemented, _xother3
28
+ from pygeodesy.named import _xother3
29
29
  from pygeodesy.namedTuples import Trilaterate5Tuple, Vector3Tuple, \
30
30
  Vector4Tuple, map1
31
31
  from pygeodesy.props import deprecated_method, Property_RO, property_doc_, \
@@ -38,7 +38,7 @@ from pygeodesy.vector3d import Vector3d, _xyzhdn3
38
38
  from math import fabs, sqrt
39
39
 
40
40
  __all__ = _ALL_LAZY.nvectorBase
41
- __version__ = '24.02.18'
41
+ __version__ = '24.04.07'
42
42
 
43
43
 
44
44
  class NvectorBase(Vector3d): # XXX kept private
@@ -413,11 +413,11 @@ class LatLonNvectorBase(LatLonBase):
413
413
 
414
414
  # def distanceTo(self, other, **kwds): # PYCHOK no cover
415
415
  # '''I{Must be overloaded}.'''
416
- # _MODS.named.notOverloaded(self, other, **kwds)
416
+ # self._notOverloaded(other, **kwds)
417
417
 
418
418
  def intersections2(self, radius1, other, radius2, **kwds): # PYCHOK expected
419
419
  '''B{Not implemented}, throws a C{NotImplementedError} always.'''
420
- notImplemented(self, radius1, other, radius2, **kwds)
420
+ self._notImplemented(radius1, other, radius2, **kwds)
421
421
 
422
422
  def others(self, *other, **name_other_up):
423
423
  '''Refined class comparison.
@@ -528,7 +528,7 @@ class LatLonNvectorBase(LatLonBase):
528
528
  @see: Method L{trilaterate} for other and more details.
529
529
  '''
530
530
  if area:
531
- notImplemented(self, area=area)
531
+ self._notImplemented(area=area)
532
532
 
533
533
  t = _trilaterate(self, distance1, self.others(point2=point2), distance2,
534
534
  self.others(point3=point3), distance3,
pygeodesy/points.py CHANGED
@@ -47,8 +47,8 @@ from pygeodesy.iters import LatLon2PsxyIter, PointsIter, points2
47
47
  from pygeodesy.latlonBase import LatLonBase, _latlonheight3, \
48
48
  _ALL_DOCS, _ALL_LAZY, _MODS
49
49
  # from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
50
- from pygeodesy.named import classname, nameof, notImplemented, notOverloaded, \
51
- _NamedTuple
50
+ from pygeodesy.named import classname, _NamedTuple, nameof, \
51
+ notImplemented, notOverloaded
52
52
  from pygeodesy.namedTuples import Bounds2Tuple, Bounds4Tuple, LatLon2Tuple, \
53
53
  NearestOn3Tuple, NearestOn5Tuple, \
54
54
  Point3Tuple, Vector3Tuple, \
@@ -62,7 +62,7 @@ from pygeodesy.utily import atan2b, degrees90, degrees180, degrees2m, \
62
62
  from math import cos, fabs, fmod, radians, sin
63
63
 
64
64
  __all__ = _ALL_LAZY.points
65
- __version__ = '24.03.12'
65
+ __version__ = '24.04.07'
66
66
 
67
67
  _ilat_ = 'ilat'
68
68
  _ilon_ = 'ilon'
pygeodesy/resections.py CHANGED
@@ -13,9 +13,10 @@ L{triAngle}, L{triAngle5}, L{triSide}, L{triSide2} and L{triSide4}.
13
13
  from __future__ import division as _; del _ # PYCHOK semicolon
14
14
 
15
15
  from pygeodesy.basics import map1, map2, _zip, _ALL_LAZY
16
- from pygeodesy.constants import EPS, EPS0, EPS02, INT0, NEG0, PI, PI2, PI_2, PI_4, \
17
- _0_0, _0_5, _1_0, _N_1_0, _2_0, _N_2_0, _4_0, _16_0, \
18
- _180_0, _360_0, isnear0, _over, _umod_360
16
+ from pygeodesy.constants import EPS, EPS0, EPS02, INT0, PI, PI2, PI_2, PI_4, \
17
+ _0_0, _0_5, _1_0, _N_1_0, _2_0, _N_2_0, _4_0, \
18
+ _16_0, _180_0, _360_0, _copysign_0_0, isnear0, \
19
+ _over, _umod_360
19
20
  from pygeodesy.errors import _and, _or, TriangleError, _ValueError, _xcallable, \
20
21
  _xkwds, _xkwds_pop2
21
22
  from pygeodesy.fmath import favg, Fdot, fidw, fmean, hypot, hypot2_
@@ -33,7 +34,7 @@ from pygeodesy.vector3d import _otherV3d, Vector3d
33
34
  from math import cos, atan2, degrees, fabs, radians, sin, sqrt
34
35
 
35
36
  __all__ = _ALL_LAZY.resections
36
- __version__ = '24.03.26'
37
+ __version__ = '24.04.04'
37
38
 
38
39
  _concyclic_ = 'concyclic'
39
40
  _PA_ = 'PA'
@@ -457,7 +458,7 @@ def pierlotx(point1, point2, point3, alpha1, alpha2, alpha3, useZ=False,
457
458
 
458
459
  def _cot(s, c): # I{exact} cotangent
459
460
  try:
460
- return (c / s) if c else (NEG0 if s < 0 else _0_0)
461
+ return (c / s) if c else _copysign_0_0(s)
461
462
  except ZeroDivisionError:
462
463
  raise ValueError(_or(_coincident_, _colinear_))
463
464
 
pygeodesy/rhumb/bases.py CHANGED
@@ -39,7 +39,6 @@ from pygeodesy.karney import _atan2d, Caps, _CapsBase, _diff182, _fix90, \
39
39
  _norm180, GDict
40
40
  # from pygeodesy.ktm import KTransverseMercator, _AlpCoeffs # _MODS
41
41
  from pygeodesy.lazily import _ALL_DOCS, _ALL_MODS as _MODS
42
- # from pygeodesy.named import notOverloaded # _MODS
43
42
  from pygeodesy.namedTuples import Distance2Tuple, LatLon2Tuple
44
43
  from pygeodesy.props import deprecated_method, Property, Property_RO, \
45
44
  property_RO, _update_all
@@ -52,7 +51,7 @@ from pygeodesy.vector3d import _intersect3d3, Vector3d # in .Intersection below
52
51
  from math import cos, fabs
53
52
 
54
53
  __all__ = ()
55
- __version__ = '24.03.16'
54
+ __version__ = '24.04.07'
56
55
 
57
56
  _anti_ = _Dash('anti')
58
57
  _rls = [] # instances of C{RbumbLine...} to be updated
@@ -367,7 +366,7 @@ class RhumbBase(_CapsBase):
367
366
 
368
367
  def _Inverse4(self, lon12, r, outmask): # PYCHOK no cover
369
368
  '''(INTERNAL) I{Must be overloaded}.'''
370
- _MODS.named.notOverloaded(self, lon12, r, Caps.toStr(outmask))
369
+ self._notOverloaded(lon12, r, Caps.toStr(outmask)) # underOK=True
371
370
 
372
371
  def Inverse8(self, lat1, lon1, azi12, s12, outmask=Caps.AZIMUTH_DISTANCE_AREA):
373
372
  '''Like method L{Rhumb.Inverse} but returning a L{Rhumb8Tuple} with area C{S12}.
@@ -417,11 +416,11 @@ class RhumbBase(_CapsBase):
417
416
  @property_RO
418
417
  def _RhumbLine(self): # PYCHOK no cover
419
418
  '''(INTERNAL) I{Must be overloaded}.'''
420
- _MODS.named.notOverloaded(self, underOK=True)
419
+ self._notOverloaded(underOK=True)
421
420
 
422
421
  def _S12d(self, s1, s2, lon): # PYCHOK no cover
423
422
  '''(INTERNAL) I{Must be overloaded}.'''
424
- _MODS.named.notOverloaded(self, s1, s2, lon)
423
+ self._notOverloaded(s1, s2, lon) # underOK=True
425
424
 
426
425
  @Property
427
426
  def TMorder(self):
@@ -787,11 +786,11 @@ class RhumbLineBase(_CapsBase):
787
786
  @property_RO
788
787
  def _mu1(self): # PYCHOK no cover
789
788
  '''(INTERNAL) I{Must be overloaded}.'''
790
- _MODS.named.notOverloaded(self, underOK=True)
789
+ self._notOverloaded(underOK=True)
791
790
 
792
791
  def _mu2lat(self, mu2): # PYCHOK no cover
793
792
  '''(INTERNAL) I{Must be overloaded}.'''
794
- _MODS.named.notOverloaded(self, mu2, underOK=True)
793
+ self._notOverloaded(mu2) # underOK=True
795
794
 
796
795
  @deprecated_method
797
796
  def nearestOn4(self, lat0, lon0, **exact_eps_est_tol): # PYCHOK no cover
@@ -808,27 +807,27 @@ class RhumbLineBase(_CapsBase):
808
807
  return self.PlumbTo(lat0, lon0, **exact_eps_est_tol)
809
808
 
810
809
  def PlumbTo(self, lat0, lon0, exact=None, eps=EPS, est=None, tol=_TOL):
811
- '''Compute the I{perpendicular} intersection of this rumb line with a geodesic
812
- from the given point, in part transcoded from I{Karney}'s C++ U{rhumb-intercept
813
- <https://SourceForge.net/p/geographiclib/discussion/1026620/thread/2ddc295e/>}.
814
-
815
- @arg lat0: Latitude of the point (C{degrees}).
816
- @arg lon0: Longitude of the point (C{degrees}).
817
- @kwarg exact: If C{None}, use a rhumb line perpendicular to this rhumb
818
- line, otherwise use an I{exact} C{Geodesic...} from the
819
- given point perpendicular to this rhumb line (C{bool} or
820
- C{Geodesic...}), see method L{Ellipsoid.geodesic_}.
810
+ '''Compute the I{perpendicular} intersection of this rhumb line with a geodesic
811
+ from the given point (transcoded from I{Karney}'s C++ U{rhumb-intercept
812
+ <https://SourceForge.net/p/geographiclib/discussion/1026620/thread/2ddc295e/>}).
813
+
814
+ @arg lat0: Latitude of the point on the geodesic (C{degrees}).
815
+ @arg lon0: Longitude of the point on the geodesic (C{degrees}).
816
+ @kwarg exact: If C{None}, use a rhumb line perpendicular to this rhumb line,
817
+ otherwise use an I{exact} C{Geodesic...} from the given point
818
+ perpendicular to this rhumb line (C{bool} or C{Geodesic...}),
819
+ see method L{Ellipsoid.geodesic_}.
821
820
  @kwarg eps: Optional tolerance for L{pygeodesy.intersection3d3} (C{EPS}),
822
821
  used only if C{B{exact} is None}.
823
- @kwarg est: Optional, initial estimate for the distance C{s12} of the
824
- intersection I{along} this rhumb line (C{meter}), used only
825
- if C{B{exact} is not None}.
822
+ @kwarg est: Optionally, an initial estimate for the distance C{s12} of the
823
+ intersection I{along} this rhumb line (C{meter}), used only if
824
+ C{B{exact} is not None}.
826
825
  @kwarg tol: Longitudinal convergence tolerance (C{degrees}) or distance
827
826
  tolerance (C(meter)) when C{B{exact} is None}, respectively
828
827
  C{not None}.
829
828
 
830
829
  @return: The intersection point on this rhumb line, a L{GDict} from method
831
- L{Intersection} if B{C{exact}=None}. If B{C{exact}} is not C{None},
830
+ L{Intersection} if B{C{exact}=None}. If C{B{exact} is not None},
832
831
  a L{Position}-like L{GDict} of 13 items C{azi12, a12, s12, lat2,
833
832
  lat1, lat0, lon2, lon1, lon0, azi0, a02, s02, at} with distance
834
833
  C{a02} in C{degrees} and C{s02} in C{meter} between the given point
@@ -876,7 +875,7 @@ class RhumbLineBase(_CapsBase):
876
875
  _d2 = _diff182
877
876
  _ErT = E.rocPrimeVertical # aka rocTransverse
878
877
  _ovr = _over
879
- _S12 = Fsum(s12).fsum2_
878
+ _S12 = Fsum(s12).fsum2f_
880
879
  _scd = sincos2d_
881
880
  for i in range(1, _TRIPS): # 9+, suffix 1 == C++ 2, 2 == C++ 3
882
881
  P = self.Position(s12) # outmask=Cs.LATITUDE_LONGITUDE
@@ -886,7 +885,7 @@ class RhumbLineBase(_CapsBase):
886
885
  c2 *= _ErT(r.lat2)
887
886
  s *= _ovr(s2 * self._salp, c2) - _ovr(s * r.M21, r.m12)
888
887
  s12, t = _S12(c / s) # XXX _ovr?
889
- if _abs(t) < tol: # or fabs(c) < EPS
888
+ if _abs(t) < tol: # or _abs(c) < EPS
890
889
  break
891
890
  P.set_(azi0=r.azi1, a02=r.a12, s02=r.s12, # azi2=r.azi2,
892
891
  lat0=lat0, lon0=lon0, iteration=i, at=r.azi2 - self.azi12,
@@ -967,7 +966,7 @@ class RhumbLineBase(_CapsBase):
967
966
 
968
967
  def _Position4(self, a12, mu2, s12, mu12): # PYCHOK no cover
969
968
  '''(INTERNAL) I{Must be overloaded}.'''
970
- _MODS.named.notOverloaded(self, a12, s12, mu2, mu12)
969
+ self._notOverloaded(a12, s12, mu2, mu12) # underOK=True
971
970
 
972
971
  @Property_RO
973
972
  def rhumb(self):
@@ -1085,7 +1084,7 @@ if __name__ == '__main__':
1085
1084
  r = rh.Inverse8(40.6, -73.8, 35.8, 140.3) # JFK to Tokyo Narita
1086
1085
  _ref('# JFK-NRT azi12=%.12f, s12=%.3f S12=%.1f', (r.azi12, r.s12, r.S12), NRT)
1087
1086
 
1088
- # % python3 -m pygeodesy.rhumb.bases
1087
+ # % python3.10 -m pygeodesy3.rhumb.Bases
1089
1088
 
1090
1089
  # Position.lon2 11.61455846901637 vs 11.61455846901637, diff 3.05885e-16
1091
1090
  # Position.lon2 7.58982302826842 vs 7.58982302826842, diff 2.34045e-16
@@ -43,12 +43,12 @@ from pygeodesy.fmath import fmean, fsum
43
43
  from pygeodesy.interns import _composite_, _end_, _Nv00_, _other_, \
44
44
  _point_, _pole_
45
45
  from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _ALL_OTHER
46
- # from pygeodesy.named import notImplemented # from .nvectorBase
46
+ # from pygeodesy.named import notImplemented # from .points
47
47
  # from pygeodesy.namedTuples import NearestOn3Tuple # from .points
48
- from pygeodesy.nvectorBase import LatLonNvectorBase, NorthPole, \
49
- notImplemented, NvectorBase, _nsumOf, \
50
- _triangulate, _trilaterate
51
- from pygeodesy.points import NearestOn3Tuple, ispolar # PYCHOK exported
48
+ from pygeodesy.nvectorBase import LatLonNvectorBase, NorthPole, _nsumOf, \
49
+ NvectorBase, _triangulate, _trilaterate
50
+ from pygeodesy.points import NearestOn3Tuple, notImplemented, \
51
+ ispolar # PYCHOK exported
52
52
  from pygeodesy.props import deprecated_function, deprecated_method, \
53
53
  property_RO
54
54
  from pygeodesy.sphericalBase import _m2radians, CartesianSphericalBase, \
@@ -61,7 +61,7 @@ from pygeodesy.utily import atan2, degrees360, fabs, sincos2, sincos2_, \
61
61
  # from math import atan2, fabs # from utily
62
62
 
63
63
  __all__ = _ALL_LAZY.sphericalNvector
64
- __version__ = '23.12.18'
64
+ __version__ = '24.04.07'
65
65
 
66
66
  _lines_ = 'lines'
67
67
 
@@ -34,12 +34,11 @@ from pygeodesy.interns import _1_, _2_, _coincident_, _composite_, _colinear_, \
34
34
  _line_, _near_, _not_, _null_, _parallel_, _point_, \
35
35
  _SPACE_, _too_
36
36
  from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _ALL_OTHER
37
- # from pygeodesy.named import notImplemented # from .points
38
37
  # from pygeodesy.nvectorBase import NvectorBase, sumOf # _MODE
39
38
  from pygeodesy.namedTuples import LatLon2Tuple, LatLon3Tuple, NearestOn3Tuple, \
40
39
  Triangle7Tuple, Triangle8Tuple
41
40
  from pygeodesy.points import ispolar, nearestOn5 as _nearestOn5, \
42
- Fmt as _Fmt, notImplemented # XXX shadowed
41
+ Fmt as _Fmt # XXX shadowed
43
42
  from pygeodesy.props import deprecated_function, deprecated_method
44
43
  from pygeodesy.sphericalBase import _m2radians, CartesianSphericalBase, \
45
44
  _intersecant2, LatLonSphericalBase, \
@@ -55,7 +54,7 @@ from pygeodesy.vector3d import sumOf, Vector3d
55
54
  from math import asin, atan2, cos, degrees, fabs, radians, sin
56
55
 
57
56
  __all__ = _ALL_LAZY.sphericalTrigonometry
58
- __version__ = '24.02.18'
57
+ __version__ = '24.04.07'
59
58
 
60
59
  _PI_EPS4 = PI - EPS4
61
60
  if _PI_EPS4 >= PI:
@@ -567,7 +566,7 @@ class LatLon(LatLonSphericalBase):
567
566
  # remove kwarg B{C{within}} if present
568
567
  w, kwds = _xkwds_pop2(wrap_adjust_limit, within=True)
569
568
  if not w:
570
- notImplemented(self, within=w)
569
+ self._notImplemented(within=w)
571
570
 
572
571
  # # UNTESTED - handle C{B{within}=False} and C{B{within}=True}
573
572
  # wrap = _xkwds_get(options, wrap=False)