pygeodesy 24.4.4__py2.py3-none-any.whl → 24.4.18__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-24.4.4.dist-info → PyGeodesy-24.4.18.dist-info}/METADATA +6 -6
- {PyGeodesy-24.4.4.dist-info → PyGeodesy-24.4.18.dist-info}/RECORD +40 -40
- pygeodesy/__init__.py +1 -1
- pygeodesy/albers.py +20 -27
- pygeodesy/auxilats/auxLat.py +3 -3
- pygeodesy/azimuthal.py +9 -8
- pygeodesy/deprecated/__init__.py +1 -1
- pygeodesy/deprecated/classes.py +14 -1
- pygeodesy/ecef.py +4 -4
- pygeodesy/ellipsoidalBase.py +2 -3
- pygeodesy/ellipsoids.py +4 -4
- pygeodesy/elliptic.py +27 -26
- pygeodesy/errors.py +27 -28
- pygeodesy/etm.py +3 -3
- pygeodesy/fmath.py +64 -65
- pygeodesy/frechet.py +6 -6
- pygeodesy/fstats.py +3 -4
- pygeodesy/fsums.py +506 -396
- pygeodesy/geodesicw.py +2 -2
- pygeodesy/geodsolve.py +4 -3
- pygeodesy/geoids.py +4 -4
- pygeodesy/hausdorff.py +5 -5
- pygeodesy/heights.py +6 -6
- pygeodesy/latlonBase.py +6 -6
- pygeodesy/lazily.py +3 -3
- pygeodesy/ltp.py +11 -11
- pygeodesy/ltpTuples.py +3 -4
- pygeodesy/named.py +14 -3
- pygeodesy/nvectorBase.py +5 -5
- pygeodesy/osgr.py +24 -24
- pygeodesy/points.py +3 -3
- pygeodesy/resections.py +16 -24
- pygeodesy/rhumb/bases.py +24 -25
- pygeodesy/sphericalNvector.py +6 -6
- pygeodesy/sphericalTrigonometry.py +3 -4
- pygeodesy/triaxials.py +4 -4
- pygeodesy/utmupsBase.py +6 -6
- pygeodesy/vector2d.py +9 -8
- {PyGeodesy-24.4.4.dist-info → PyGeodesy-24.4.18.dist-info}/WHEEL +0 -0
- {PyGeodesy-24.4.4.dist-info → PyGeodesy-24.4.18.dist-info}/top_level.txt +0 -0
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.
|
|
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=
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
@@ -256,7 +256,7 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
|
|
|
256
256
|
'crosserrors', 'exception_chaining', 'isError', 'limiterrors', 'rangerrors'),
|
|
257
257
|
etm=_i('Etm', 'ETMError', 'ExactTransverseMercator',
|
|
258
258
|
'parseETM5', 'toEtm8'),
|
|
259
|
-
fmath=_i('Fdot', 'Fhorner', 'Fhypot', 'Fpolynomial', 'Fpowers', '
|
|
259
|
+
fmath=_i('Fdot', 'Fhorner', 'Fhypot', 'Fpolynomial', 'Fpowers', 'Fcbrt', 'Froot', 'Fsqrt',
|
|
260
260
|
'bqrt', 'cbrt', 'cbrt2', 'euclid', 'euclid_',
|
|
261
261
|
'facos1', 'fasin1', 'fatan', 'fatan1', 'fatan2', 'favg',
|
|
262
262
|
'fdot', 'fdot3', 'fmean', 'fmean_', 'fhorner', 'fidw', 'fpolynomial',
|
|
@@ -407,7 +407,7 @@ _ALL_DEPRECATED = _NamedEnum_RO(_name='_ALL_DEPRECATED',
|
|
|
407
407
|
deprecated=_i('bases', 'datum', 'nvector', # DEPRECATED modules and ...
|
|
408
408
|
'rhumbaux', 'rhumbBase', 'rhumbsolve', 'rhumbx'), # ... names
|
|
409
409
|
deprecated_bases=_i('LatLonHeightBase', 'points2'),
|
|
410
|
-
deprecated_classes=_i('ClipCS3Tuple', 'EasNorExact4Tuple', 'EcefCartesian',
|
|
410
|
+
deprecated_classes=_i('ClipCS3Tuple', 'EasNorExact4Tuple', 'EcefCartesian', 'Fn_rt',
|
|
411
411
|
'HeightIDW', 'HeightIDW2', 'HeightIDW3', 'Helmert7Tuple',
|
|
412
412
|
'LatLonExact4Tuple', 'NearestOn4Tuple', 'Ned3Tuple',
|
|
413
413
|
'RefFrameError', 'Rhumb7Tuple', 'RhumbOrder2Tuple',
|
|
@@ -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.
|
|
507
|
+
__version__ = '24.04.17'
|
|
508
508
|
|
|
509
509
|
|
|
510
510
|
def _ALL_OTHER(*objs):
|
pygeodesy/ltp.py
CHANGED
|
@@ -22,7 +22,7 @@ from pygeodesy.ecef import _EcefBase, EcefKarney, _llhn4, _xyzn4
|
|
|
22
22
|
from pygeodesy.errors import _NotImplementedError, _TypesError, _ValueError, \
|
|
23
23
|
_xattr, _xkwds, _xkwds_get
|
|
24
24
|
from pygeodesy.fmath import fabs, fdot, Fhorner
|
|
25
|
-
from pygeodesy.fsums import _floor,
|
|
25
|
+
from pygeodesy.fsums import _floor, _Fsumf_, fsumf_, fsum1f_
|
|
26
26
|
from pygeodesy.interns import NN, _0_, _COMMASPACE_, _DOT_, _ecef_, _height_, \
|
|
27
27
|
_invalid_, _lat0_, _lon0_, _ltp_, _M_, _name_, _too_
|
|
28
28
|
# from pygeodesy.lazily import _ALL_LAZY # from vector3d
|
|
@@ -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.
|
|
45
|
+
__version__ = '24.04.14'
|
|
46
46
|
|
|
47
47
|
_height0_ = _height_ + _0_
|
|
48
48
|
_narrow_ = 'narrow'
|
|
@@ -964,15 +964,15 @@ class ChLVa(_ChLV, LocalCartesian):
|
|
|
964
964
|
a, b, h = _ChLV._YXh_2abh3(Y, X, h_)
|
|
965
965
|
ab_d, a2, b2 = ChLV._ab_d, a**2, b**2
|
|
966
966
|
|
|
967
|
-
lat =
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
lon =
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
967
|
+
lat = _Fsumf_(16.9023892, 3.238272 * b,
|
|
968
|
+
-0.270978 * a2,
|
|
969
|
+
-0.002528 * b2,
|
|
970
|
+
-0.0447 * a2 * b,
|
|
971
|
+
-0.014 * b2 * b).fover(ab_d)
|
|
972
|
+
lon = _Fsumf_( 2.6779094, 4.728982 * a,
|
|
973
|
+
0.791484 * a * b,
|
|
974
|
+
0.1306 * a * b2,
|
|
975
|
+
-0.0436 * a * a2).fover(ab_d)
|
|
976
976
|
return self._ChLV9Tuple(False, M, name, Y, X, h_, lat, lon, h)
|
|
977
977
|
|
|
978
978
|
|
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,
|
|
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.
|
|
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
|
-
|
|
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.
|
|
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=
|
|
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:
|
|
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
|
|
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.
|
|
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
|
-
#
|
|
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
|
-
|
|
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
|
-
|
|
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/osgr.py
CHANGED
|
@@ -34,8 +34,8 @@ from pygeodesy.datums import Datums, _ellipsoidal_datum, _WGS84
|
|
|
34
34
|
from pygeodesy.ellipsoidalBase import LatLonEllipsoidalBase as _LLEB
|
|
35
35
|
from pygeodesy.errors import _parseX, _TypeError, _ValueError, \
|
|
36
36
|
_xkwds, _xkwds_get
|
|
37
|
-
from pygeodesy.fmath import Fdot, fpowers
|
|
38
|
-
|
|
37
|
+
from pygeodesy.fmath import Fdot, fpowers
|
|
38
|
+
from pygeodesy.fsums import _Fsumf_
|
|
39
39
|
from pygeodesy.interns import MISSING, NN, _A_, _COLON_, _COMMA_, \
|
|
40
40
|
_COMMASPACE_, _DOT_, _ellipsoidal_, \
|
|
41
41
|
_latlon_, _not_, _SPACE_
|
|
@@ -121,10 +121,10 @@ class _NG(object):
|
|
|
121
121
|
@Property_RO
|
|
122
122
|
def Mabcd(self): # meridional coefficients (a, b, c, d)
|
|
123
123
|
n, n2, n3 = fpowers(self.ellipsoid.n, 3)
|
|
124
|
-
M = (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
M = (_Fsumf_(4, 4 * n, 5 * n2, 5 * n3) / 4,
|
|
125
|
+
_Fsumf_( 24 * n, 24 * n2, 21 * n3) / 8,
|
|
126
|
+
_Fsumf_( 15 * n2, 15 * n3) / 8,
|
|
127
|
+
(35 * n3 / 24))
|
|
128
128
|
return M
|
|
129
129
|
|
|
130
130
|
def Mabcd0(self, a): # meridional arc, scaled
|
|
@@ -327,10 +327,10 @@ class Osgr(_NamedBase):
|
|
|
327
327
|
e0 = self.easting - NG.eas0
|
|
328
328
|
n0 = m = self.northing - NG.nor0
|
|
329
329
|
|
|
330
|
-
_M =
|
|
331
|
-
a0 =
|
|
332
|
-
a =
|
|
333
|
-
_A =
|
|
330
|
+
_M = NG.Mabcd0
|
|
331
|
+
a0 = NG.a0
|
|
332
|
+
a = NG.phi0
|
|
333
|
+
_A = _Fsumf_(a).fsum_
|
|
334
334
|
for self._iteration in range(1, _TRIPS):
|
|
335
335
|
a = _A(m / a0)
|
|
336
336
|
m = n0 - _M(a) # meridional arc
|
|
@@ -354,14 +354,14 @@ class Osgr(_NamedBase):
|
|
|
354
354
|
d2 = d**2
|
|
355
355
|
|
|
356
356
|
a = (d2 * ta * (-1 + # Horner-like
|
|
357
|
-
d2 / 12 * (
|
|
358
|
-
d2 / 30 *
|
|
357
|
+
d2 / 12 * (_Fsumf_( 5, 3 * ta2, -9 * ta2 * n2, n2) -
|
|
358
|
+
d2 / 30 * _Fsumf_(61, 90 * ta2, 45 * ta4)))).fsum_(a)
|
|
359
359
|
|
|
360
|
-
b = (d / ca * (1 - # Horner-like
|
|
361
|
-
d2 / 6 * (
|
|
362
|
-
d2 / 20 * (
|
|
363
|
-
d2 / 42 *
|
|
364
|
-
|
|
360
|
+
b = (d / ca * ( 1 - # Horner-like
|
|
361
|
+
d2 / 6 * (_Fsumf_(v_r, 2 * ta2) -
|
|
362
|
+
d2 / 20 * (_Fsumf_( 5, 28 * ta2, 24 * ta4) +
|
|
363
|
+
d2 / 42 * _Fsumf_(61, 662 * ta2, 1320 * ta4,
|
|
364
|
+
720 * ta2 * ta4))))).fsum_(NG.lam0)
|
|
365
365
|
|
|
366
366
|
r = _LLEB(degrees90(a), degrees180(b), datum=self.datum, name=self.name)
|
|
367
367
|
r._iteration = self._iteration # only ellipsoidal LatLon
|
|
@@ -652,14 +652,14 @@ def toOsgr(latlon, lon=None, kTM=False, datum=_WGS84, Osgr=Osgr, name=NN, # MCC
|
|
|
652
652
|
ta2 = -(ta**2)
|
|
653
653
|
ta4 = ta2**2
|
|
654
654
|
|
|
655
|
-
e = (d * v * (1 + # Horner-like
|
|
656
|
-
d2 / 6 * (
|
|
657
|
-
d2 / 20 *
|
|
658
|
-
|
|
655
|
+
e = (d * v * ( 1 + # Horner-like
|
|
656
|
+
d2 / 6 * (_Fsumf_(v_r, ta2) +
|
|
657
|
+
d2 / 20 * _Fsumf_(5, 18 * ta2, ta4, 14 * n2,
|
|
658
|
+
58 * n2 * ta2)))).fsum_(NG.eas0)
|
|
659
659
|
|
|
660
|
-
n = (d * t * (1 + # Horner-like
|
|
661
|
-
d2 / 12 * (
|
|
662
|
-
d2 / 30 *
|
|
660
|
+
n = (d * t * ( 1 + # Horner-like
|
|
661
|
+
d2 / 12 * (_Fsumf_( 5, ta2, 9 * n2) +
|
|
662
|
+
d2 / 30 * _Fsumf_(61, ta4, 58 * ta2)))).fsum_(m0, NG.nor0)
|
|
663
663
|
|
|
664
664
|
p, kwds = _prec_kwds2(**prec_Osgr_kwds)
|
|
665
665
|
if p is not MISSING:
|
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,
|
|
51
|
-
|
|
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.
|
|
65
|
+
__version__ = '24.04.07'
|
|
66
66
|
|
|
67
67
|
_ilat_ = 'ilat'
|
|
68
68
|
_ilon_ = 'ilon'
|
pygeodesy/resections.py
CHANGED
|
@@ -20,7 +20,7 @@ from pygeodesy.constants import EPS, EPS0, EPS02, INT0, PI, PI2, PI_2, PI_4, \
|
|
|
20
20
|
from pygeodesy.errors import _and, _or, TriangleError, _ValueError, _xcallable, \
|
|
21
21
|
_xkwds, _xkwds_pop2
|
|
22
22
|
from pygeodesy.fmath import favg, Fdot, fidw, fmean, hypot, hypot2_
|
|
23
|
-
from pygeodesy.fsums import
|
|
23
|
+
from pygeodesy.fsums import _Fsumf_, fsumf_, fsum1, fsum1f_
|
|
24
24
|
from pygeodesy.interns import _a_, _A_, _area_, _b_, _B_, _c_, _C_, _coincident_, \
|
|
25
25
|
_colinear_, _d_, _eps_, _invalid_, _negative_, _not_, \
|
|
26
26
|
_rIn_, _SPACE_
|
|
@@ -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.04.
|
|
37
|
+
__version__ = '24.04.14'
|
|
38
38
|
|
|
39
39
|
_concyclic_ = 'concyclic'
|
|
40
40
|
_PA_ = 'PA'
|
|
@@ -57,14 +57,6 @@ class Collins5Tuple(_NamedTuple):
|
|
|
57
57
|
_Units_ = (_Pass, _Pass, Distance, Distance, Distance)
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
def _F1(*xs): # class
|
|
61
|
-
'''(INTERNAL) An L{Fsum}, 1-primed.
|
|
62
|
-
'''
|
|
63
|
-
F = Fsum(_1_0, *xs)
|
|
64
|
-
F += _N_1_0
|
|
65
|
-
return F
|
|
66
|
-
|
|
67
|
-
|
|
68
60
|
class ResectionError(_ValueError):
|
|
69
61
|
'''Error raised for issues in L{pygeodesy.resections}.
|
|
70
62
|
'''
|
|
@@ -376,8 +368,8 @@ def _pierlot3(B1, B2, B3, a12, a23, useZ, cot):
|
|
|
376
368
|
cot31 = cot(fsum1f_(c12 * s23, s12 * c23), # s31
|
|
377
369
|
fsum1f_(s12 * s23, -c12 * c23)) # c31
|
|
378
370
|
|
|
379
|
-
K =
|
|
380
|
-
|
|
371
|
+
K = _Fsumf_(x3_ * x1_, cot31 * (y3_ * x1_),
|
|
372
|
+
y3_ * y1_, -cot31 * (x3_ * y1_))
|
|
381
373
|
if K:
|
|
382
374
|
cot12 = cot(s12, c12)
|
|
383
375
|
cot23 = cot(s23, c23)
|
|
@@ -392,16 +384,16 @@ def _pierlot3(B1, B2, B3, a12, a23, useZ, cot):
|
|
|
392
384
|
# y31 = y3_ + y1_ - cot31 * (x3_ - x1_)
|
|
393
385
|
|
|
394
386
|
# x12 - x23 = x1_ + cot12 * y1_ - x3_ + cot23 * y3_
|
|
395
|
-
X12_23 =
|
|
387
|
+
X12_23 = _Fsumf_(x1_, cot12 * y1_, -x3_, cot23 * y3_)
|
|
396
388
|
# y12 - y23 = y1_ - cot12 * x1_ - y3_ - cot23 * x3_
|
|
397
|
-
Y12_23 =
|
|
389
|
+
Y12_23 = _Fsumf_(y1_, -cot12 * x1_, -y3_, -cot23 * x3_)
|
|
398
390
|
|
|
399
391
|
# x31 - x23 = x3_ + x1_ + cot31 * (y3_ - y1_) - x3_ + cot23 * y3_
|
|
400
392
|
# = x1_ + cot31 * y3_ - cot31 * y1_ + cot23 * y3_
|
|
401
|
-
X31_23 =
|
|
393
|
+
X31_23 = _Fsumf_(x1_, -cot31 * y1_, cot31 * y3_, cot23 * y3_)
|
|
402
394
|
# y31 - y23 = y3_ + y1_ - cot31 * (x3_ - x1_) - y3_ - cot23 * x3_
|
|
403
395
|
# = y1_ - cot31 * x3_ + cot31 * x1_ - cot23 * x3_
|
|
404
|
-
Y31_23 =
|
|
396
|
+
Y31_23 = _Fsumf_(y1_, cot31 * x1_, -cot31 * x3_, -cot23 * x3_)
|
|
405
397
|
|
|
406
398
|
# d = (x12 - x23) * (y23 - y31) + (x31 - x23) * (y12 - y23)
|
|
407
399
|
# = (x31 - x23) * (y12 - y23) - (x12 - x23) * (y31 - y23)
|
|
@@ -495,7 +487,7 @@ def _pierlotx3(a_z_Bs, useZ, cot, Cs):
|
|
|
495
487
|
x1_, y1_, _ = B1.minus(B3).xyz
|
|
496
488
|
x2_, y2_, _ = B2.minus(B3).xyz
|
|
497
489
|
|
|
498
|
-
K =
|
|
490
|
+
K = _Fsumf_(y1_ * x2_, -x1_ * y2_)
|
|
499
491
|
if K:
|
|
500
492
|
cot23 = cot(*sincos2d(a23))
|
|
501
493
|
|
|
@@ -506,15 +498,15 @@ def _pierlotx3(a_z_Bs, useZ, cot, Cs):
|
|
|
506
498
|
# y31 = y1_ - cot23 * x1_
|
|
507
499
|
|
|
508
500
|
# x31 - x23 = x1_ + cot23 * y1_ - x2_ - cot23 * y2_
|
|
509
|
-
X31_23 =
|
|
501
|
+
X31_23 = _Fsumf_(x1_, cot23 * y1_, -x2_, -cot23 * y2_)
|
|
510
502
|
# y31 - y23 = y1_ - cot23 * x1_ - y2_ + cot23 * x2_
|
|
511
|
-
Y31_23 =
|
|
503
|
+
Y31_23 = _Fsumf_(y1_, -cot23 * x1_, -y2_, cot23 * x2_)
|
|
512
504
|
|
|
513
505
|
# d = (x31 - x23) * (x2_ - x1_) + (y31 - y23) * (y2_ - y1_)
|
|
514
506
|
# x = (D * B3.x - K * Y31_23).fover(d)
|
|
515
507
|
# y = (D * B3.y + K * X31_23).fover(d)
|
|
516
|
-
x, y = _pierlotxy2(B3, K, Y31_23, X31_23, (X31_23 *
|
|
517
|
-
Y31_23 *
|
|
508
|
+
x, y = _pierlotxy2(B3, K, Y31_23, X31_23, (X31_23 * _Fsumf_(x2_, -x1_) +
|
|
509
|
+
Y31_23 * _Fsumf_(y2_, -y1_)))
|
|
518
510
|
else:
|
|
519
511
|
x, y, _ = B3.xyz
|
|
520
512
|
return x, y, _zidw(x, y, useZ, B1, B2, B3)
|
|
@@ -974,7 +966,7 @@ def wildberger3(a, b, c, alpha, beta, R3=min):
|
|
|
974
966
|
def _vpa(r3, q2, q3, s2, s3):
|
|
975
967
|
r1 = s2 * q3 / s3
|
|
976
968
|
r = r1 * r3 * _4_0
|
|
977
|
-
n = (r -
|
|
969
|
+
n = (r - _Fsumf_(r1, r3, -q2)**2).fover(s3)
|
|
978
970
|
if n < 0 or r < EPS0:
|
|
979
971
|
raise ValueError(_coincident_)
|
|
980
972
|
return sqrt((n / r) * q3) if n else _0_0
|
|
@@ -994,11 +986,11 @@ def wildberger3(a, b, c, alpha, beta, R3=min):
|
|
|
994
986
|
raise ValueError(_or(_coincident_, _colinear_))
|
|
995
987
|
|
|
996
988
|
q4 = hypot2_(*q) * _2_0 # a**4 + ...
|
|
997
|
-
Qs =
|
|
989
|
+
Qs = _Fsumf_(*q) # == hypot2_(a, b, c)
|
|
998
990
|
d0 = (Qs**2 - q4).fmul(s1 * s2).fover(s3)
|
|
999
991
|
if d0 < 0:
|
|
1000
992
|
raise ValueError(_negative_)
|
|
1001
|
-
s +=
|
|
993
|
+
s += _Fsumf_(*s), # == fsum1(s),
|
|
1002
994
|
C0 = Fdot(s, q1, q2, q3, -Qs * _0_5)
|
|
1003
995
|
r3 = C0.fover(-s3) # C0 /= -s3
|
|
1004
996
|
if d0 > EPS02: # > c0
|