pygeodesy 24.5.6__py2.py3-none-any.whl → 24.5.15__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.5.6.dist-info → PyGeodesy-24.5.15.dist-info}/METADATA +4 -4
- {PyGeodesy-24.5.6.dist-info → PyGeodesy-24.5.15.dist-info}/RECORD +51 -50
- pygeodesy/__init__.py +18 -14
- pygeodesy/__main__.py +9 -10
- pygeodesy/albers.py +2 -2
- pygeodesy/auxilats/__main__.py +7 -10
- pygeodesy/auxilats/auxLat.py +2 -1
- pygeodesy/basics.py +161 -165
- pygeodesy/booleans.py +4 -4
- pygeodesy/constants.py +8 -6
- pygeodesy/datums.py +9 -8
- pygeodesy/ecef.py +5 -4
- pygeodesy/elevations.py +2 -2
- pygeodesy/ellipsoidalBaseDI.py +7 -5
- pygeodesy/elliptic.py +10 -7
- pygeodesy/errors.py +6 -6
- pygeodesy/etm.py +3 -2
- pygeodesy/fmath.py +14 -13
- pygeodesy/fstats.py +281 -219
- pygeodesy/fsums.py +133 -104
- pygeodesy/geodesicw.py +14 -14
- pygeodesy/geodesicx/__main__.py +4 -4
- pygeodesy/geodesicx/gxarea.py +4 -4
- pygeodesy/geodsolve.py +3 -2
- pygeodesy/geoids.py +6 -6
- pygeodesy/heights.py +4 -4
- pygeodesy/internals.py +571 -0
- pygeodesy/interns.py +5 -202
- pygeodesy/iters.py +3 -2
- pygeodesy/karney.py +4 -4
- pygeodesy/ktm.py +7 -7
- pygeodesy/lazily.py +139 -217
- pygeodesy/mgrs.py +3 -2
- pygeodesy/named.py +13 -10
- pygeodesy/nvectorBase.py +4 -3
- pygeodesy/osgr.py +14 -12
- pygeodesy/points.py +5 -5
- pygeodesy/props.py +7 -7
- pygeodesy/rhumb/bases.py +3 -2
- pygeodesy/rhumb/solve.py +2 -2
- pygeodesy/solveBase.py +3 -2
- pygeodesy/streprs.py +5 -4
- pygeodesy/trf.py +4 -4
- pygeodesy/units.py +15 -17
- pygeodesy/ups.py +7 -6
- pygeodesy/utily.py +4 -4
- pygeodesy/utm.py +5 -4
- pygeodesy/utmupsBase.py +4 -3
- pygeodesy/vector3dBase.py +2 -1
- {PyGeodesy-24.5.6.dist-info → PyGeodesy-24.5.15.dist-info}/WHEEL +0 -0
- {PyGeodesy-24.5.6.dist-info → PyGeodesy-24.5.15.dist-info}/top_level.txt +0 -0
pygeodesy/datums.py
CHANGED
|
@@ -67,7 +67,7 @@ datum, q.v. U{"A Guide to Coordinate Systems in Great Britain", Section 6
|
|
|
67
67
|
# make sure int/int division yields float quotient, see .basics
|
|
68
68
|
from __future__ import division as _; del _ # PYCHOK semicolon
|
|
69
69
|
|
|
70
|
-
from pygeodesy.basics import islistuple, map2, neg,
|
|
70
|
+
from pygeodesy.basics import islistuple, map2, neg, _xinstanceof, _zip
|
|
71
71
|
from pygeodesy.constants import R_M, _float as _F, _0_0, _1_0, _2_0, _8_0, _3600_0
|
|
72
72
|
# from pygeodesy.ellipsoidalBase import CartesianEllipsoidalBase as _CEB, \
|
|
73
73
|
# LatLonEllipsoidalBase as _LLEB # MODS
|
|
@@ -76,12 +76,13 @@ from pygeodesy.ellipsoids import a_f2Tuple, Ellipsoid, Ellipsoid2, Ellipsoids, _
|
|
|
76
76
|
from pygeodesy.errors import _IsnotError, _TypeError, _xattr, _xellipsoidall, _xkwds, \
|
|
77
77
|
_xkwds_pop2
|
|
78
78
|
from pygeodesy.fmath import fdot, fmean, Fmt, _operator
|
|
79
|
+
from pygeodesy.internals import _passarg, _under
|
|
79
80
|
from pygeodesy.interns import NN, _a_, _Airy1830_, _AiryModified_, _BAR_, _Bessel1841_, \
|
|
80
|
-
_Clarke1866_, _Clarke1880IGN_, _COMMASPACE_, _DOT_, \
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
_Clarke1866_, _Clarke1880IGN_, _COMMASPACE_, _DOT_, _earth_, \
|
|
82
|
+
_ellipsoid_, _ellipsoidal_, _GRS80_, _Intl1924_, _MINUS_, \
|
|
83
|
+
_Krassovski1940_, _Krassowsky1940_, _NAD27_, _NAD83_, _s_, \
|
|
84
|
+
_PLUS_, _Sphere_, _spherical_, _transform_, _UNDER_, \
|
|
85
|
+
_WGS72_, _WGS84_
|
|
85
86
|
from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS
|
|
86
87
|
from pygeodesy.named import _NamedEnum, _NamedEnumItem, _lazyNamedEnumItem as _lazy
|
|
87
88
|
# from pygeodesy.namedTuples import Vector3Tuple # from .ellipsoids
|
|
@@ -93,7 +94,7 @@ from pygeodesy.units import _isRadius, Radius_, radians
|
|
|
93
94
|
# import operator as _operator # from .fmath
|
|
94
95
|
|
|
95
96
|
__all__ = _ALL_LAZY.datums
|
|
96
|
-
__version__ = '24.
|
|
97
|
+
__version__ = '24.05.14'
|
|
97
98
|
|
|
98
99
|
_a_ellipsoid_ = _UNDER_(_a_, _ellipsoid_)
|
|
99
100
|
_BD72_ = 'BD72'
|
|
@@ -722,7 +723,7 @@ assert _WGS84.ellipsoid is _EWGS84
|
|
|
722
723
|
if __name__ == '__main__':
|
|
723
724
|
|
|
724
725
|
from pygeodesy.interns import _COMMA_, _NL_, _NLATvar_
|
|
725
|
-
from pygeodesy
|
|
726
|
+
from pygeodesy import printf
|
|
726
727
|
|
|
727
728
|
# __doc__ of this file, force all into registery
|
|
728
729
|
for r in (Datums, Transforms):
|
pygeodesy/ecef.py
CHANGED
|
@@ -86,7 +86,7 @@ from pygeodesy.utily import atan1, atan1d, atan2d, degrees90, degrees180, \
|
|
|
86
86
|
from math import atan2, cos, degrees, fabs, radians, sqrt
|
|
87
87
|
|
|
88
88
|
__all__ = _ALL_LAZY.ecef
|
|
89
|
-
__version__ = '24.05.
|
|
89
|
+
__version__ = '24.05.10'
|
|
90
90
|
|
|
91
91
|
_Ecef_ = 'Ecef'
|
|
92
92
|
_prolate_ = 'prolate'
|
|
@@ -646,7 +646,7 @@ class EcefSudano(_EcefBase):
|
|
|
646
646
|
|
|
647
647
|
_a = fabs
|
|
648
648
|
lat = atan1d(z, R * E.e21)
|
|
649
|
-
sa, ca = sincos2d(
|
|
649
|
+
sa, ca = sincos2d(_a(lat))
|
|
650
650
|
# Sudano's Eq (A-6) and (A-7) refactored/reduced,
|
|
651
651
|
# replacing Rn from Eq (A-4) with n = E.a / ca:
|
|
652
652
|
# N = ca**2 * ((z + E.e2 * n * sa) * ca - R * sa)
|
|
@@ -656,17 +656,18 @@ class EcefSudano(_EcefBase):
|
|
|
656
656
|
# = ca**2 * (E.e2 * E.a / E.e2s2(sa) - R / ca**2)
|
|
657
657
|
# N / D = (z * ca + (E.e2 * E.a - R) * sa) /
|
|
658
658
|
# (E.e2 * E.a / E.e2s2(sa) - R / ca**2)
|
|
659
|
+
_E = EPS_2
|
|
659
660
|
tol = self.tolerance
|
|
660
661
|
_S2 = Fsum(sa).fsum2f_
|
|
661
662
|
_rt = sqrt
|
|
662
663
|
for i in range(1, _TRIPS):
|
|
663
664
|
ca2 = _1_0 - sa**2
|
|
664
|
-
if ca2 <
|
|
665
|
+
if ca2 < _E: # PYCHOK no cover
|
|
665
666
|
ca = _0_0
|
|
666
667
|
break
|
|
667
668
|
ca = _rt(ca2)
|
|
668
669
|
r = e / E.e2s2(sa) - R / ca2
|
|
669
|
-
if _a(r) <
|
|
670
|
+
if _a(r) < _E:
|
|
670
671
|
break
|
|
671
672
|
lat = None
|
|
672
673
|
sa, r = _S2(-z * ca / r, -d * sa / r)
|
pygeodesy/elevations.py
CHANGED
|
@@ -34,7 +34,7 @@ from pygeodesy.units import Lat, Lon, Meter, Scalar, Str
|
|
|
34
34
|
# from math import fabs # from .karney
|
|
35
35
|
|
|
36
36
|
__all__ = _ALL_LAZY.elevations
|
|
37
|
-
__version__ = '
|
|
37
|
+
__version__ = '24.05.13'
|
|
38
38
|
|
|
39
39
|
try:
|
|
40
40
|
from urllib2 import urlopen # quote, urlcleanup
|
|
@@ -245,7 +245,7 @@ def geoidHeight2(lat, lon, model=0, timeout=2.0):
|
|
|
245
245
|
|
|
246
246
|
if __name__ == '__main__':
|
|
247
247
|
|
|
248
|
-
from pygeodesy
|
|
248
|
+
from pygeodesy import printf
|
|
249
249
|
# <https://WikiPedia.org/wiki/Mount_Diablo>
|
|
250
250
|
for f in (elevation2, # (1173.79, '3DEP 1/3 arc-second')
|
|
251
251
|
geoidHeight2): # (-31.699, u'GEOID12B')
|
pygeodesy/ellipsoidalBaseDI.py
CHANGED
|
@@ -17,10 +17,12 @@ from pygeodesy.errors import _AssertionError, IntersectionError, _IsnotError, \
|
|
|
17
17
|
from pygeodesy.fmath import favg, fmean_
|
|
18
18
|
from pygeodesy.fsums import Fmt, fsumf_
|
|
19
19
|
from pygeodesy.formy import _isequalTo, opposing, _radical2
|
|
20
|
-
from pygeodesy.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
# from pygeodesy.internals import _dunder_nameof # from .lazily
|
|
21
|
+
from pygeodesy.interns import _antipodal_, _concentric_, _ellipsoidal_, \
|
|
22
|
+
_exceed_PI_radians_, _low_, _near_, \
|
|
23
|
+
_SPACE_, _too_
|
|
24
|
+
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS, \
|
|
25
|
+
_dunder_nameof
|
|
24
26
|
from pygeodesy.namedTuples import Bearing2Tuple, Destination2Tuple, \
|
|
25
27
|
Intersection3Tuple, NearestOn2Tuple, \
|
|
26
28
|
NearestOn8Tuple, _LL4Tuple
|
|
@@ -34,7 +36,7 @@ from pygeodesy.utily import m2km, unroll180, _unrollon, _unrollon3, \
|
|
|
34
36
|
from math import degrees, radians
|
|
35
37
|
|
|
36
38
|
__all__ = _ALL_LAZY.ellipsoidalBaseDI
|
|
37
|
-
__version__ = '24.
|
|
39
|
+
__version__ = '24.05.13'
|
|
38
40
|
|
|
39
41
|
_polar__ = 'polar?'
|
|
40
42
|
_B2END = _1_5 # _intersect3 bearing to pseudo-end point factor
|
pygeodesy/elliptic.py
CHANGED
|
@@ -82,11 +82,12 @@ from pygeodesy.constants import EPS, INF, NAN, PI, PI_2, PI_4, \
|
|
|
82
82
|
_360_0, _over
|
|
83
83
|
# from pygeodesy.errors import _ValueError # from .fmath
|
|
84
84
|
from pygeodesy.fmath import fdot, hypot1, zqrt, _ValueError
|
|
85
|
-
from pygeodesy.fsums import Fsum, _sum
|
|
86
|
-
from pygeodesy.
|
|
87
|
-
|
|
85
|
+
from pygeodesy.fsums import Fsum, _sum
|
|
86
|
+
# from pygeodesy.internals import _dunder_nameof # from .lazily
|
|
87
|
+
from pygeodesy.interns import NN, _delta_, _DOT_, _f_, _invalid_, \
|
|
88
|
+
_invokation_, _negative_, _SPACE_
|
|
88
89
|
from pygeodesy.karney import _K_2_0, _norm180, _signBit, _sincos2
|
|
89
|
-
|
|
90
|
+
from pygeodesy.lazily import _ALL_LAZY, _dunder_nameof
|
|
90
91
|
from pygeodesy.named import _Named, _NamedTuple, Fmt, unstr
|
|
91
92
|
from pygeodesy.props import _allPropertiesOf_n, Property_RO, _update_all
|
|
92
93
|
# from pygeodesy.streprs import Fmt, unstr # from .named
|
|
@@ -97,7 +98,7 @@ from math import asinh, atan, atan2, ceil, cosh, fabs, floor, \
|
|
|
97
98
|
radians, sin, sqrt, tanh
|
|
98
99
|
|
|
99
100
|
__all__ = _ALL_LAZY.elliptic
|
|
100
|
-
__version__ = '24.
|
|
101
|
+
__version__ = '24.05.13'
|
|
101
102
|
|
|
102
103
|
_TolRD = zqrt(EPS * 0.002)
|
|
103
104
|
_TolRF = zqrt(EPS * 0.030)
|
|
@@ -402,10 +403,12 @@ class Elliptic(_Named):
|
|
|
402
403
|
Phi = Fsum(phi)
|
|
403
404
|
# first order correction
|
|
404
405
|
phi = Phi.fsum_(self.eps * sin(phi * _2_0) / _N_2_0)
|
|
406
|
+
self._iteration = 0
|
|
405
407
|
# For kp2 close to zero use asin(r / cE) or J. P. Boyd,
|
|
406
408
|
# Applied Math. and Computation 218, 7005-7013 (2012)
|
|
407
409
|
# <https://DOI.org/10.1016/j.amc.2011.12.021>
|
|
408
|
-
_Phi2
|
|
410
|
+
_Phi2 = Phi.fsum2f_ # aggregate
|
|
411
|
+
_abs = fabs
|
|
409
412
|
for i in range(1, _TRIPS): # GEOGRAPHICLIB_PANIC
|
|
410
413
|
sn, cn, dn = self._sncndn3(phi)
|
|
411
414
|
if dn:
|
|
@@ -413,7 +416,7 @@ class Elliptic(_Named):
|
|
|
413
416
|
phi, d = _Phi2((r - sn) / dn)
|
|
414
417
|
else: # PYCHOK no cover
|
|
415
418
|
d = _0_0 # XXX continue?
|
|
416
|
-
if
|
|
419
|
+
if _abs(d) < _TolJAC: # 3-4 trips
|
|
417
420
|
_iterations(self, i)
|
|
418
421
|
break
|
|
419
422
|
else: # PYCHOK no cover
|
pygeodesy/errors.py
CHANGED
|
@@ -14,18 +14,18 @@ C{PYGEODESY_EXCEPTION_CHAINING=std} or to any non-empty string.
|
|
|
14
14
|
# from pygeodesy.basics import isint, isodd, issubclassof, itemsorted, _xinstanceof, _zip # _MODS
|
|
15
15
|
# from pygeodesy.ellipsoidalBase import CartesianEllipsoidalBase, LatLonEllipsoidalBase # _MODS
|
|
16
16
|
# from pygeodesy import errors # _MODS, _MODS.getattr
|
|
17
|
-
from pygeodesy.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
_specified_, _UNDER_, _vs_, _with_
|
|
21
|
-
from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _getenv, _PYTHON_X_DEV
|
|
17
|
+
# from pygeodesy.internals import _tailof # from .lazily
|
|
18
|
+
from pygeodesy.interns import MISSING, NN, _a_, _an_, _and_, _clip_, _COLON_, _COLONSPACE_, \
|
|
19
|
+
_COMMASPACE_, _datum_, _ellipsoidal_, _incompatible_, _invalid_, \
|
|
20
|
+
_len_, _not_, _or_, _SPACE_, _specified_, _UNDER_, _vs_, _with_
|
|
21
|
+
from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _getenv, _PYTHON_X_DEV, _tailof
|
|
22
22
|
# from pygeodesy.streprs import Fmt, unstr # _MODS
|
|
23
23
|
# from pygeodesy.vector3dBase import Vector3dBase # _MODS
|
|
24
24
|
|
|
25
25
|
from copy import copy as _copy
|
|
26
26
|
|
|
27
27
|
__all__ = _ALL_LAZY.errors # _ALL_DOCS('_InvalidError', '_IsnotError') _under
|
|
28
|
-
__version__ = '24.05.
|
|
28
|
+
__version__ = '24.05.15'
|
|
29
29
|
|
|
30
30
|
_box_ = 'box'
|
|
31
31
|
_limiterrors = True # in .formy
|
pygeodesy/etm.py
CHANGED
|
@@ -74,7 +74,7 @@ from pygeodesy.elliptic import _ALL_LAZY, Elliptic
|
|
|
74
74
|
from pygeodesy.fmath import cbrt, hypot, hypot1, hypot2
|
|
75
75
|
from pygeodesy.fsums import Fsum, fsum1f_
|
|
76
76
|
from pygeodesy.interns import NN, _COMMASPACE_, _DASH_, _near_, _SPACE_, \
|
|
77
|
-
_spherical_
|
|
77
|
+
_spherical_
|
|
78
78
|
from pygeodesy.karney import _copyBit, _diff182, _fix90, _norm2, _norm180, \
|
|
79
79
|
_tand, _unsigned2
|
|
80
80
|
# from pygeodesy.lazily import _ALL_LAZY # from .elliptic
|
|
@@ -92,7 +92,7 @@ from pygeodesy.utm import _cmlon, _LLEB, _parseUTM5, _toBand, _toXtm8, \
|
|
|
92
92
|
from math import asinh, atan2, degrees, radians, sinh, sqrt
|
|
93
93
|
|
|
94
94
|
__all__ = _ALL_LAZY.etm
|
|
95
|
-
__version__ = '24.
|
|
95
|
+
__version__ = '24.05.13'
|
|
96
96
|
|
|
97
97
|
_OVERFLOW = _1_EPS**2 # about 2e+31
|
|
98
98
|
_TAYTOL = pow(EPS, 0.6)
|
|
@@ -1109,6 +1109,7 @@ def toEtm8(latlon, lon=None, datum=None, Etm=Etm, falsed=True,
|
|
|
1109
1109
|
|
|
1110
1110
|
if __name__ == '__main__': # MCCABE 13
|
|
1111
1111
|
|
|
1112
|
+
from pygeodesy.internals import _usage
|
|
1112
1113
|
from pygeodesy import fstr, KTransverseMercator, printf
|
|
1113
1114
|
from sys import argv, exit as _exit
|
|
1114
1115
|
|
pygeodesy/fmath.py
CHANGED
|
@@ -7,7 +7,7 @@ u'''Utilities using precision floating point summation.
|
|
|
7
7
|
from __future__ import division as _; del _ # PYCHOK semicolon
|
|
8
8
|
|
|
9
9
|
from pygeodesy.basics import _copysign, copysign0, isbool, isint, isscalar, \
|
|
10
|
-
len2, map1
|
|
10
|
+
len2, map1, _xiterable
|
|
11
11
|
from pygeodesy.constants import EPS0, EPS02, EPS1, NAN, PI, PI_2, PI_4, \
|
|
12
12
|
_0_0, _0_125, _1_6th, _0_25, _1_3rd, _0_5, _1_0, \
|
|
13
13
|
_N_1_0, _1_5, _copysign_0_0, _isfinite, remainder
|
|
@@ -24,7 +24,7 @@ from math import fabs, sqrt # pow
|
|
|
24
24
|
import operator as _operator # in .datums, .trf, .utm
|
|
25
25
|
|
|
26
26
|
__all__ = _ALL_LAZY.fmath
|
|
27
|
-
__version__ = '24.05.
|
|
27
|
+
__version__ = '24.05.10'
|
|
28
28
|
|
|
29
29
|
# sqrt(2) <https://WikiPedia.org/wiki/Square_root_of_2>
|
|
30
30
|
_0_4142 = 0.41421356237309504880 # ... sqrt(2) - 1
|
|
@@ -521,17 +521,18 @@ def fidw(xs, ds, beta=2):
|
|
|
521
521
|
_F = Fsum
|
|
522
522
|
W = _F()
|
|
523
523
|
X = _F()
|
|
524
|
-
for i, d in enumerate(ds):
|
|
524
|
+
for i, d in enumerate(_xiterable(ds)):
|
|
525
525
|
x = xs[i]
|
|
526
|
-
|
|
527
|
-
|
|
526
|
+
D = _F(d)
|
|
527
|
+
if D < EPS0:
|
|
528
|
+
if D < 0:
|
|
528
529
|
raise ValueError(_negative_)
|
|
529
530
|
x = float(x)
|
|
530
531
|
i = n
|
|
531
532
|
break
|
|
532
|
-
D
|
|
533
|
-
|
|
534
|
-
|
|
533
|
+
if D.fpow(b):
|
|
534
|
+
W += D
|
|
535
|
+
X += D.fmul(x)
|
|
535
536
|
else:
|
|
536
537
|
x = X.fover(W, raiser=False)
|
|
537
538
|
i += 1 # len(xs) >= len(ds)
|
|
@@ -539,7 +540,7 @@ def fidw(xs, ds, beta=2):
|
|
|
539
540
|
i += 1 # len(xs) < i < len(ds)
|
|
540
541
|
except Exception as X:
|
|
541
542
|
_I = Fmt.INDEX
|
|
542
|
-
raise _xError(X, _I(
|
|
543
|
+
raise _xError(X, _I(xs=i), x, _I(ds=i), d)
|
|
543
544
|
else: # b == 0
|
|
544
545
|
x = fsum(xs) / n # fmean(xs)
|
|
545
546
|
i = n
|
|
@@ -630,12 +631,12 @@ except ImportError:
|
|
|
630
631
|
def fprod(xs, start=1):
|
|
631
632
|
'''Iterable product, like C{math.prod} or C{numpy.prod}.
|
|
632
633
|
|
|
633
|
-
@arg xs:
|
|
634
|
-
|
|
635
|
-
@kwarg start: Initial
|
|
634
|
+
@arg xs: Iterable of values to be multiplied (each
|
|
635
|
+
C{scalar} or an L{Fsum}).
|
|
636
|
+
@kwarg start: Initial value, also the value returned
|
|
636
637
|
for an empty B{C{xs}} (C{scalar}).
|
|
637
638
|
|
|
638
|
-
@return: The product (C{float}).
|
|
639
|
+
@return: The product (C{float} or an L{Fsum}).
|
|
639
640
|
|
|
640
641
|
@see: U{NumPy.prod<https://docs.SciPy.org/doc/
|
|
641
642
|
numpy/reference/generated/numpy.prod.html>}.
|