pygeodesy 25.5.28__py2.py3-none-any.whl → 25.8.25__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/__init__.py +10 -10
- pygeodesy/cartesianBase.py +21 -20
- pygeodesy/ecef.py +324 -260
- pygeodesy/ellipsoidalBase.py +52 -58
- pygeodesy/ellipsoids.py +30 -14
- pygeodesy/elliptic.py +246 -225
- pygeodesy/fmath.py +6 -4
- pygeodesy/fsums.py +40 -18
- pygeodesy/geodesici.py +3 -3
- pygeodesy/geodesicx/__init__.py +1 -1
- pygeodesy/geodesicx/__main__.py +2 -2
- pygeodesy/geodesicx/gx.py +3 -2
- pygeodesy/geodesicx/gxarea.py +4 -5
- pygeodesy/geodesicx/gxbases.py +3 -2
- pygeodesy/internals.py +3 -3
- pygeodesy/ktm.py +3 -3
- pygeodesy/latlonBase.py +4 -4
- pygeodesy/lazily.py +3 -3
- pygeodesy/nvectorBase.py +4 -4
- pygeodesy/sphericalTrigonometry.py +5 -5
- pygeodesy/vector3dBase.py +5 -3
- {pygeodesy-25.5.28.dist-info → pygeodesy-25.8.25.dist-info}/METADATA +12 -12
- {pygeodesy-25.5.28.dist-info → pygeodesy-25.8.25.dist-info}/RECORD +25 -25
- {pygeodesy-25.5.28.dist-info → pygeodesy-25.8.25.dist-info}/WHEEL +0 -0
- {pygeodesy-25.5.28.dist-info → pygeodesy-25.8.25.dist-info}/top_level.txt +0 -0
pygeodesy/fmath.py
CHANGED
|
@@ -7,8 +7,8 @@ C{fused-multiply-add}, polynomials, roots, etc.
|
|
|
7
7
|
# make sure int/int division yields float quotient, see .basics
|
|
8
8
|
from __future__ import division as _; del _ # noqa: E702 ;
|
|
9
9
|
|
|
10
|
-
from pygeodesy.basics import _copysign, copysign0, isbool, isint,
|
|
11
|
-
len2, map1, _xiterable, typename
|
|
10
|
+
from pygeodesy.basics import _copysign, copysign0, isbool, isint, isodd, \
|
|
11
|
+
isscalar, len2, map1, _xiterable, typename
|
|
12
12
|
from pygeodesy.constants import EPS0, EPS02, EPS1, NAN, PI, PI_2, PI_4, \
|
|
13
13
|
_0_0, _0_125, _1_6th, _0_25, _1_3rd, _0_5, _1_0, \
|
|
14
14
|
_1_5, _copysign_0_0, isfinite, remainder
|
|
@@ -25,7 +25,7 @@ from math import fabs, sqrt # pow
|
|
|
25
25
|
import operator as _operator # in .datums, .trf, .utm
|
|
26
26
|
|
|
27
27
|
__all__ = _ALL_LAZY.fmath
|
|
28
|
-
__version__ = '25.
|
|
28
|
+
__version__ = '25.06.03'
|
|
29
29
|
|
|
30
30
|
# sqrt(2) - 1 <https://WikiPedia.org/wiki/Square_root_of_2>
|
|
31
31
|
_0_4142 = 0.41421356237309504880 # ~ 3_730_904_090_310_553 / 9_007_199_254_740_992
|
|
@@ -66,7 +66,7 @@ class Fdot(Fsum):
|
|
|
66
66
|
self._facc_dot(n, a, b, **kwds)
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
class Fdot_(Fdot):
|
|
69
|
+
class Fdot_(Fdot): # in .elliptic
|
|
70
70
|
'''Precision dot product.
|
|
71
71
|
'''
|
|
72
72
|
def __init__(self, *xys, **start_name_f2product_nonfinites_RESIDUAL):
|
|
@@ -78,6 +78,8 @@ class Fdot_(Fdot):
|
|
|
78
78
|
|
|
79
79
|
@see: Class L{Fdot<Fdot.__init__>} for further details.
|
|
80
80
|
'''
|
|
81
|
+
if isodd(len(xys)):
|
|
82
|
+
raise LenError(Fdot_, xys=len(xys))
|
|
81
83
|
Fdot.__init__(self, xys[0::2], *xys[1::2], **start_name_f2product_nonfinites_RESIDUAL)
|
|
82
84
|
|
|
83
85
|
|
pygeodesy/fsums.py
CHANGED
|
@@ -39,15 +39,13 @@ results may differ from Python's C{math.fsum} results.
|
|
|
39
39
|
# make sure int/int division yields float quotient, see .basics
|
|
40
40
|
from __future__ import division as _; del _ # noqa: E702 ;
|
|
41
41
|
|
|
42
|
-
from pygeodesy.basics import _gcd, isbool, iscomplex, isint, isscalar, \
|
|
42
|
+
from pygeodesy.basics import _gcd, isbool, iscomplex, isint, isodd, isscalar, \
|
|
43
43
|
_signOf, itemsorted, signOf, _xiterable
|
|
44
|
-
from pygeodesy.constants import INF, INT0, MANT_DIG, NEG0, NINF, _0_0, \
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
_xkwds_get, _xkwds_get1, _xkwds_not, \
|
|
50
|
-
_xkwds_pop, _xsError
|
|
44
|
+
from pygeodesy.constants import INF, INT0, MANT_DIG, NEG0, NINF, _0_0, _1_0, \
|
|
45
|
+
_N_1_0, _isfinite, _pos_self, Float, Int
|
|
46
|
+
from pygeodesy.errors import _AssertionError, _OverflowError, LenError, _TypeError, \
|
|
47
|
+
_ValueError, _xError, _xError2, _xkwds, _xkwds_get, \
|
|
48
|
+
_xkwds_get1, _xkwds_not, _xkwds_pop, _xsError
|
|
51
49
|
from pygeodesy.internals import _enquote, _envPYGEODESY, _passarg, typename # _sizeof
|
|
52
50
|
from pygeodesy.interns import NN, _arg_, _COMMASPACE_, _DMAIN_, _DOT_, _from_, \
|
|
53
51
|
_not_finite_, _SPACE_, _std_, _UNDER_
|
|
@@ -64,7 +62,7 @@ from math import fabs, isinf, isnan, \
|
|
|
64
62
|
ceil as _ceil, floor as _floor # PYCHOK used! .ltp
|
|
65
63
|
|
|
66
64
|
__all__ = _ALL_LAZY.fsums
|
|
67
|
-
__version__ = '25.
|
|
65
|
+
__version__ = '25.06.03'
|
|
68
66
|
|
|
69
67
|
from pygeodesy.interns import (
|
|
70
68
|
_PLUS_ as _add_op_, # in .auxilats.auxAngle
|
|
@@ -121,7 +119,9 @@ try: # MCCABE 26
|
|
|
121
119
|
f = x * y
|
|
122
120
|
yield f
|
|
123
121
|
if _isfinite(f):
|
|
124
|
-
|
|
122
|
+
f = _fma(x, y, -f)
|
|
123
|
+
if f:
|
|
124
|
+
yield f
|
|
125
125
|
for z in zs:
|
|
126
126
|
yield z
|
|
127
127
|
|
|
@@ -162,7 +162,7 @@ except ImportError: # PYCHOK DSPACE! Python 3.12-
|
|
|
162
162
|
def _fmaX(r, *a_b_c): # PYCHOK no cover
|
|
163
163
|
# handle non-finite fma result as Python 3.13+ C-function U{math_fma_impl
|
|
164
164
|
# <https://GitHub.com/python/cpython/blob/main/Modules/mathmodule.c#L2305>}:
|
|
165
|
-
# raise a ValueError for a NAN result from non-NAN C{a_b_c}s otherwise an
|
|
165
|
+
# raise a ValueError for a NAN result from non-NAN C{a_b_c}s, otherwise an
|
|
166
166
|
# OverflowError for a non-finite, non-NAN result from all finite C{a_b_c}s.
|
|
167
167
|
if isnan(r):
|
|
168
168
|
def _x(x):
|
|
@@ -560,7 +560,6 @@ class Fsum(_Named): # sync __methods__ with .vector3dBase.Vector3dBase, .fstats
|
|
|
560
560
|
self._fset(other, op=_fset_op_, **up)
|
|
561
561
|
return self
|
|
562
562
|
|
|
563
|
-
|
|
564
563
|
def __ceil__(self): # PYCHOK not special in Python 2-
|
|
565
564
|
'''Return this instance' C{math.ceil} as C{int} or C{float}.
|
|
566
565
|
|
|
@@ -1137,7 +1136,7 @@ class Fsum(_Named): # sync __methods__ with .vector3dBase.Vector3dBase, .fstats
|
|
|
1137
1136
|
return E(u, txt=t, cause=X)
|
|
1138
1137
|
|
|
1139
1138
|
def _facc(self, xs, up=True, **_X_x_origin):
|
|
1140
|
-
'''(INTERNAL) Accumulate more C{scalar}s
|
|
1139
|
+
'''(INTERNAL) Accumulate more C{scalar}s, L{Fsum}s pr L{Fsum2Tuple}s.
|
|
1141
1140
|
'''
|
|
1142
1141
|
if xs:
|
|
1143
1142
|
kwds = self._isfine
|
|
@@ -1472,6 +1471,29 @@ class Fsum(_Named): # sync __methods__ with .vector3dBase.Vector3dBase, .fstats
|
|
|
1472
1471
|
f = self._nonfiniteX(X, op, f, **nonfinites)
|
|
1473
1472
|
return self._fset(f)
|
|
1474
1473
|
|
|
1474
|
+
def fma_(self, *xys, **nonfinites):
|
|
1475
|
+
'''Fused-multiply-accumulate C{for i in range(0, len(xys), B{2}):
|
|
1476
|
+
self = }L{fma<pygeodesy.fmath.fma>}C{(xys[i], xys[i+1], self)}.
|
|
1477
|
+
|
|
1478
|
+
@arg xys: Pairwise multiplicand, multiplier (each C{scalar},
|
|
1479
|
+
an L{Fsum} or L{Fsum2Tuple}), all positional.
|
|
1480
|
+
@kwarg nonfinites: Use C{B{nonfinites}=True} or C{False}, to
|
|
1481
|
+
override L{nonfinites<Fsum.nonfinites>} and
|
|
1482
|
+
L{nonfiniterrors} default (C{bool}).
|
|
1483
|
+
|
|
1484
|
+
@note: Equivalent to L{fdot_<pygeodesy.fmath.fdot_>}C{(*xys,
|
|
1485
|
+
start=self)}.
|
|
1486
|
+
'''
|
|
1487
|
+
if xys:
|
|
1488
|
+
n = len(xys)
|
|
1489
|
+
if n < 2 or isodd(n):
|
|
1490
|
+
raise LenError(self.fma_, xys=n)
|
|
1491
|
+
f, _fmath_fma = self, _MODS.fmath.fma
|
|
1492
|
+
for x, y in zip(xys[0::2], xys[1::2]):
|
|
1493
|
+
f = _fmath_fma(x, y, f, **nonfinites)
|
|
1494
|
+
self._fset(f)
|
|
1495
|
+
return self
|
|
1496
|
+
|
|
1475
1497
|
fmul = __imul__
|
|
1476
1498
|
|
|
1477
1499
|
def _fmul(self, other, op):
|
|
@@ -1581,8 +1603,8 @@ class Fsum(_Named): # sync __methods__ with .vector3dBase.Vector3dBase, .fstats
|
|
|
1581
1603
|
L{Fsum}, overriding the L{f2product} default.
|
|
1582
1604
|
|
|
1583
1605
|
@arg two: If omitted, leave the override unchanged, if C{True},
|
|
1584
|
-
turn I{TwoProduct} on, if C{False} off, if C{None}
|
|
1585
|
-
remove
|
|
1606
|
+
turn I{TwoProduct} on, if C{False} off, or if C{None}
|
|
1607
|
+
remove the override (C{bool} or C{None}).
|
|
1586
1608
|
|
|
1587
1609
|
@return: The previous setting (C{bool} or C{None} if not set).
|
|
1588
1610
|
|
|
@@ -2682,11 +2704,11 @@ try:
|
|
|
2682
2704
|
del _fsum # nope, remove _fsum ...
|
|
2683
2705
|
raise ImportError() # ... use _fsum below
|
|
2684
2706
|
|
|
2685
|
-
_sum = _fsum
|
|
2707
|
+
_sum = _fsum
|
|
2686
2708
|
except ImportError:
|
|
2687
|
-
_sum = sum
|
|
2709
|
+
_sum = sum
|
|
2688
2710
|
|
|
2689
|
-
def _fsum(xs):
|
|
2711
|
+
def _fsum(xs): # in .elliptic
|
|
2690
2712
|
'''(INTERNAL) Precision summation, Python 2.5-.
|
|
2691
2713
|
'''
|
|
2692
2714
|
F = Fsum(name=_fsum.name, f2product=False, nonfinites=True)
|
pygeodesy/geodesici.py
CHANGED
|
@@ -29,8 +29,8 @@ from pygeodesy.basics import _copy, _enumereverse, map1, \
|
|
|
29
29
|
_xinstanceof, _xor, typename
|
|
30
30
|
from pygeodesy.constants import EPS, INF, INT0, PI, PI2, PI_4, \
|
|
31
31
|
_0_0, _0_5, _1_0, _1_5, _2_0, _3_0, \
|
|
32
|
-
_45_0, _64_0, _90_0, isfinite
|
|
33
|
-
|
|
32
|
+
_45_0, _64_0, _90_0, isfinite
|
|
33
|
+
from pygeodesy.constants import _EPSjam # PYCHOK used!
|
|
34
34
|
from pygeodesy.ellipsoids import _EWGS84, Fmt, unstr
|
|
35
35
|
from pygeodesy.errors import GeodesicError, IntersectionError, _an, \
|
|
36
36
|
_xgeodesics, _xkwds_get, _xkwds_kwds, \
|
|
@@ -57,7 +57,7 @@ from pygeodesy.utily import atan2, sincos2, fabs, radians
|
|
|
57
57
|
# from math import ceil as _ceil, fabs, radians # .fsums, .utily
|
|
58
58
|
|
|
59
59
|
__all__ = _ALL_LAZY.geodesici
|
|
60
|
-
__version__ = '25.
|
|
60
|
+
__version__ = '25.06.02'
|
|
61
61
|
|
|
62
62
|
_0t = 0, # int
|
|
63
63
|
_1_1t = -1, +1
|
pygeodesy/geodesicx/__init__.py
CHANGED
pygeodesy/geodesicx/__main__.py
CHANGED
|
@@ -5,7 +5,7 @@ u'''Print L{geodesicx} version, etc. using C{python -m pygeodesy.geodesicx}.
|
|
|
5
5
|
'''
|
|
6
6
|
|
|
7
7
|
__all__ = ()
|
|
8
|
-
__version__ = '25.
|
|
8
|
+
__version__ = '25.06.01'
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
def _main(**C4order): # PYCHOK no cover
|
|
@@ -47,7 +47,7 @@ from sys import argv # .internals._isPyChOK
|
|
|
47
47
|
_main(C4order=int(argv[1])) if len(argv) == 2 and argv[1].isdigit() else _main()
|
|
48
48
|
|
|
49
49
|
# % python3.13 -m pygeodesy.geodesicx
|
|
50
|
-
# pygeodesy.geodesicx 25.
|
|
50
|
+
# pygeodesy.geodesicx 25.06.01: C4order=30, C4n=5425, C4u=5107, C4u_n=94.1%, C4x=465, C4t=tuple, C4z=166008, geographiclib 2.0 (pygeodesy 25.5.28 Python 3.13.3 64bit arm64 macOS 15.5)
|
|
51
51
|
|
|
52
52
|
# % python3.13 -m pygeodesy.geodesicx 30
|
|
53
53
|
# pygeodesy.geodesicx 24.09.06: C4order=30, C4n=5425, C4u=5107, C4u_n=94.1%, C4x=465, C4t=tuple, C4z=166008 (pygeodesy 24.9.6 Python 3.13.0rc1 64bit arm64 macOS 14.6.1)
|
pygeodesy/geodesicx/gx.py
CHANGED
|
@@ -65,7 +65,7 @@ from pygeodesy.utily import atan2, atan2d as _atan2d_reverse, _unrollon, \
|
|
|
65
65
|
from math import copysign, cos, degrees, fabs, radians, sqrt
|
|
66
66
|
|
|
67
67
|
__all__ = ()
|
|
68
|
-
__version__ = '25.
|
|
68
|
+
__version__ = '25.06.01'
|
|
69
69
|
|
|
70
70
|
_MAXIT1 = 20
|
|
71
71
|
_MAXIT2 = 10 + _MAXIT1 + MANT_DIG # MANT_DIG == C++ digits
|
|
@@ -1227,7 +1227,8 @@ class GeodesicExact(_GeodesicBase):
|
|
|
1227
1227
|
tripb = fsum1f_(calp1a, -calp1, _abs(salp1a - salp1)) < TOLb or \
|
|
1228
1228
|
fsum1f_(calp1b, -calp1, _abs(salp1b - salp1)) < TOLb
|
|
1229
1229
|
else:
|
|
1230
|
-
|
|
1230
|
+
v = Fmt.no_convergence(v, TOLv)
|
|
1231
|
+
raise GeodesicError(v, txt=repr(self)) # self.toRepr()
|
|
1231
1232
|
|
|
1232
1233
|
p.set_(iter=i, trip=tripb) # like .geodsolve._GDictInvoke: iter NOT iteration!
|
|
1233
1234
|
return sig12, salp1, calp1, salp2, calp2, domg12
|
pygeodesy/geodesicx/gxarea.py
CHANGED
|
@@ -31,7 +31,7 @@ from pygeodesy.props import Property, Property_RO, property_RO
|
|
|
31
31
|
from math import fmod as _fmod
|
|
32
32
|
|
|
33
33
|
__all__ = ()
|
|
34
|
-
__version__ = '25.
|
|
34
|
+
__version__ = '25.06.04'
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
class GeodesicAreaExact(_NamedBase):
|
|
@@ -172,7 +172,7 @@ class GeodesicAreaExact(_NamedBase):
|
|
|
172
172
|
r, n = None, self.num
|
|
173
173
|
if n < 2:
|
|
174
174
|
p = _0_0
|
|
175
|
-
a =
|
|
175
|
+
a = NAN if n > 0 and self.polyline else p
|
|
176
176
|
elif self._Area:
|
|
177
177
|
r = self._Inverse(self.lat1, self.lon1, self.lat0, self.lon0)
|
|
178
178
|
a = self._reduced(r.S12, r.xing, n, reverse=reverse, sign=sign, polar=polar)
|
|
@@ -319,9 +319,8 @@ class GeodesicAreaExact(_NamedBase):
|
|
|
319
319
|
@kwarg reverse_sign_polar: Optional C{B{reverse}=False}, C{B{sign}=True} and
|
|
320
320
|
C{B{polar}=False} keyword arguments, see method L{Compute}.
|
|
321
321
|
|
|
322
|
-
@return: L{Area3Tuple}C{(number, perimeter, area)}
|
|
323
|
-
|
|
324
|
-
@raise GeodesicError: No points.
|
|
322
|
+
@return: L{Area3Tuple}C{(number, perimeter, area)}, with C{perimeter} and
|
|
323
|
+
C{area} both C{NAN} for insuffcient C{number} of points.
|
|
325
324
|
'''
|
|
326
325
|
r, n = None, self.num + 1
|
|
327
326
|
if n < 2: # raise GeodesicError(num=self.num)
|
pygeodesy/geodesicx/gxbases.py
CHANGED
|
@@ -20,7 +20,7 @@ from pygeodesy.karney import _CapsBase, GeodesicError, _2cos2x, \
|
|
|
20
20
|
from math import fabs, ldexp as _ldexp
|
|
21
21
|
|
|
22
22
|
__all__ = ()
|
|
23
|
-
__version__ = '25.
|
|
23
|
+
__version__ = '25.06.01'
|
|
24
24
|
|
|
25
25
|
# valid C{nC4}s and C{C4order}s, see _xnC4 below
|
|
26
26
|
_nC4s = {24: 2900, 27: 4032, 30: 5425}
|
|
@@ -162,7 +162,8 @@ def _xnC4(**name_nC4):
|
|
|
162
162
|
'''
|
|
163
163
|
n, nC4 = _xkwds_item2(name_nC4)
|
|
164
164
|
if nC4 not in _nC4s or not isinstance(nC4, int):
|
|
165
|
-
|
|
165
|
+
t = map(str, _nC4s)
|
|
166
|
+
raise GeodesicError(n, nC4, txt_not_=_or(*t))
|
|
166
167
|
return _nC4s[nC4]
|
|
167
168
|
|
|
168
169
|
|
pygeodesy/internals.py
CHANGED
|
@@ -76,7 +76,7 @@ class _MODS_Base(object):
|
|
|
76
76
|
return b
|
|
77
77
|
|
|
78
78
|
@_Property_RO
|
|
79
|
-
def bits_machine2(self):
|
|
79
|
+
def bits_machine2(self): # in test/bases.py
|
|
80
80
|
'''Get platform 2-list C{[bits, machine]}, I{once}.
|
|
81
81
|
'''
|
|
82
82
|
import platform as p
|
|
@@ -686,7 +686,7 @@ def _versions(sep=_SPACE_):
|
|
|
686
686
|
|
|
687
687
|
|
|
688
688
|
__all__ = tuple(map(typename, (machine, print_, printf, typename)))
|
|
689
|
-
__version__ = '25.
|
|
689
|
+
__version__ = '25.08.18'
|
|
690
690
|
|
|
691
691
|
if __name__ == _DMAIN_:
|
|
692
692
|
|
|
@@ -699,7 +699,7 @@ if __name__ == _DMAIN_:
|
|
|
699
699
|
_main()
|
|
700
700
|
|
|
701
701
|
# % python3 -m pygeodesy.internals
|
|
702
|
-
# pygeodesy 25.
|
|
702
|
+
# pygeodesy 25.8.18 Python 3.13.5 64bit arm64 macOS 15.6 _isfrozen False isLazy 1
|
|
703
703
|
|
|
704
704
|
# **) MIT License
|
|
705
705
|
#
|
pygeodesy/ktm.py
CHANGED
|
@@ -62,11 +62,11 @@ from pygeodesy.props import property_doc_, Property, Property_RO, \
|
|
|
62
62
|
from pygeodesy.units import Degrees, Scalar_, _1mm as _TOL_10 # PYCHOK used!
|
|
63
63
|
from pygeodesy.utily import atan1d, atan2, _loneg, sincos2, sincos2d_
|
|
64
64
|
|
|
65
|
-
from cmath import polar
|
|
65
|
+
from cmath import polar as _polar
|
|
66
66
|
from math import asinh, cos, cosh, degrees, fabs, sin, sinh, sqrt, tanh
|
|
67
67
|
|
|
68
68
|
__all__ = _ALL_LAZY.ktm
|
|
69
|
-
__version__ = '25.
|
|
69
|
+
__version__ = '25.08.18'
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
class KTMError(_ValueError):
|
|
@@ -476,7 +476,7 @@ def _Cyxgk4(E, xi_, eta_, C):
|
|
|
476
476
|
|
|
477
477
|
# Gauss-Schreiber to Gauss-Krueger TM
|
|
478
478
|
# C{cmath.polar} handles INF, NAN, etc.
|
|
479
|
-
k, g =
|
|
479
|
+
k, g = _polar(c)
|
|
480
480
|
g = degrees(g)
|
|
481
481
|
else: # E.isSpherical
|
|
482
482
|
g, k = _0_0, _1_0
|
pygeodesy/latlonBase.py
CHANGED
|
@@ -33,7 +33,7 @@ from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
|
|
|
33
33
|
from pygeodesy.named import _name2__, _NamedBase, Fmt
|
|
34
34
|
from pygeodesy.namedTuples import Bounds2Tuple, LatLon2Tuple, PhiLam2Tuple, \
|
|
35
35
|
Trilaterate5Tuple, Vector3Tuple
|
|
36
|
-
# from pygeodesy.nvectorBase import
|
|
36
|
+
# from pygeodesy.nvectorBase import _N_Vector # _MODS
|
|
37
37
|
from pygeodesy.props import deprecated_method, Property, Property_RO, \
|
|
38
38
|
property_RO, _update_all
|
|
39
39
|
# from pygeodesy.streprs import Fmt, hstr # from .named, _MODS
|
|
@@ -48,7 +48,7 @@ from contextlib import contextmanager
|
|
|
48
48
|
from math import asin, cos, degrees, fabs, radians
|
|
49
49
|
|
|
50
50
|
__all__ = _ALL_LAZY.latlonBase
|
|
51
|
-
__version__ = '25.
|
|
51
|
+
__version__ = '25.08.18'
|
|
52
52
|
|
|
53
53
|
_formy = _MODS.into(formy=__name__)
|
|
54
54
|
|
|
@@ -971,9 +971,9 @@ class LatLonBase(_NamedBase, _EcefLocal):
|
|
|
971
971
|
|
|
972
972
|
@property_RO
|
|
973
973
|
def _N_vector(self):
|
|
974
|
-
'''(INTERNAL) Get the C{Nvector} (C{nvectorBase.
|
|
974
|
+
'''(INTERNAL) Get the C{Nvector} (C{nvectorBase._N_Vector})
|
|
975
975
|
'''
|
|
976
|
-
_N = _MODS.nvectorBase.
|
|
976
|
+
_N = _MODS.nvectorBase._N_Vector
|
|
977
977
|
return _N(*self._n_xyz3, h=self.height, name=self.name)
|
|
978
978
|
|
|
979
979
|
@Property_RO
|
pygeodesy/lazily.py
CHANGED
|
@@ -214,8 +214,8 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
|
|
|
214
214
|
'bearingDMS', 'clipDegrees', 'clipRadians', 'compassDMS', 'compassPoint',
|
|
215
215
|
'degDMS', 'latDMS', 'latlonDMS', 'latlonDMS_', 'lonDMS', 'normDMS',
|
|
216
216
|
'parseDDDMMSS', 'parseDMS', 'parseDMS2', 'parse3llh', 'parseRad', 'precision', 'toDMS'),
|
|
217
|
-
ecef=_a('
|
|
218
|
-
'
|
|
217
|
+
ecef=_a('EcefFarrell21', 'EcefFarrell22', 'EcefKarney', 'EcefSudano', 'EcefUPC', 'EcefVeness', 'EcefYou',
|
|
218
|
+
'EcefError', 'EcefMatrix', 'Ecef9Tuple'),
|
|
219
219
|
ecefLocals=_a(), # module only
|
|
220
220
|
elevations=_a('Elevation2Tuple', 'GeoidHeight2Tuple',
|
|
221
221
|
'elevation2', 'geoidHeight2'),
|
|
@@ -510,7 +510,7 @@ class _ALL_MODS(_internals._MODS_Base):
|
|
|
510
510
|
_internals._MODS = _ALL_MODS = _ALL_MODS() # PYCHOK singleton
|
|
511
511
|
|
|
512
512
|
__all__ = _ALL_LAZY.lazily
|
|
513
|
-
__version__ = '25.
|
|
513
|
+
__version__ = '25.08.22'
|
|
514
514
|
|
|
515
515
|
|
|
516
516
|
def _ALL_OTHER(*objs):
|
pygeodesy/nvectorBase.py
CHANGED
|
@@ -38,7 +38,7 @@ from pygeodesy.vector3d import Vector3d, _xyzhdlln4
|
|
|
38
38
|
from math import degrees, fabs, sqrt
|
|
39
39
|
|
|
40
40
|
__all__ = _ALL_LAZY.nvectorBase
|
|
41
|
-
__version__ = '25.
|
|
41
|
+
__version__ = '25.08.18'
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
class NvectorBase(Vector3d): # XXX kept private
|
|
@@ -355,7 +355,7 @@ class NvectorBase(Vector3d): # XXX kept private
|
|
|
355
355
|
return self.xyz.to4Tuple(self.h)
|
|
356
356
|
|
|
357
357
|
|
|
358
|
-
class
|
|
358
|
+
class _N_Vector(NvectorBase):
|
|
359
359
|
'''(INTERNAL) Minimal, low-overhead C{n-vector}.
|
|
360
360
|
'''
|
|
361
361
|
def __init__(self, x, y, z, h=0, **name):
|
|
@@ -366,8 +366,8 @@ class _N_vector_(NvectorBase):
|
|
|
366
366
|
self.name = name
|
|
367
367
|
|
|
368
368
|
|
|
369
|
-
NorthPole =
|
|
370
|
-
SouthPole =
|
|
369
|
+
NorthPole = _N_Vector(0, 0, +1, name='NorthPole') # North pole
|
|
370
|
+
SouthPole = _N_Vector(0, 0, -1, name='SouthPole') # South pole
|
|
371
371
|
|
|
372
372
|
|
|
373
373
|
class LatLonNvectorBase(LatLonBase):
|
|
@@ -36,7 +36,7 @@ from pygeodesy.interns import _1_, _2_, _coincident_, _composite_, _colinear_, \
|
|
|
36
36
|
_point_, _SPACE_, _too_
|
|
37
37
|
from pygeodesy.latlonBase import _trilaterate5
|
|
38
38
|
from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _ALL_OTHER
|
|
39
|
-
# from pygeodesy.nvectorBase import NvectorBase,
|
|
39
|
+
# from pygeodesy.nvectorBase import _N_Vector, NvectorBase, sumOf # _MODS
|
|
40
40
|
from pygeodesy.namedTuples import LatLon2Tuple, LatLon3Tuple, NearestOn3Tuple, \
|
|
41
41
|
Triangle7Tuple, Triangle8Tuple
|
|
42
42
|
from pygeodesy.points import ispolar, nearestOn5 as _nearestOn5, \
|
|
@@ -57,7 +57,7 @@ from pygeodesy.vector3d import sumOf, Vector3d
|
|
|
57
57
|
from math import asin, cos, degrees, fabs, radians, sin
|
|
58
58
|
|
|
59
59
|
__all__ = _ALL_LAZY.sphericalTrigonometry
|
|
60
|
-
__version__ = '25.
|
|
60
|
+
__version__ = '25.08.18'
|
|
61
61
|
|
|
62
62
|
_PI_EPS4 = PI - EPS4
|
|
63
63
|
if _PI_EPS4 >= PI:
|
|
@@ -968,10 +968,10 @@ def _intersect(start1, end1, start2, end2, height=None, wrap=False, # in.ellips
|
|
|
968
968
|
a, b = antipode_(a, b) # PYCHOK PhiLam2Tuple
|
|
969
969
|
|
|
970
970
|
else: # end point(s) or bearing(s)
|
|
971
|
-
|
|
971
|
+
_N = _MODS.nvectorBase._N_Vector
|
|
972
972
|
|
|
973
|
-
x1, d1 = _int3d2(s1, end1, wrap, _1_,
|
|
974
|
-
x2, d2 = _int3d2(s2, end2, wrap, _2_,
|
|
973
|
+
x1, d1 = _int3d2(s1, end1, wrap, _1_, _N, hs)
|
|
974
|
+
x2, d2 = _int3d2(s2, end2, wrap, _2_, _N, hs)
|
|
975
975
|
x = x1.cross(x2)
|
|
976
976
|
if x.length < EPS: # [nearly] colinear or parallel lines
|
|
977
977
|
raise IntersectionError(_colinear_)
|
pygeodesy/vector3dBase.py
CHANGED
|
@@ -19,6 +19,7 @@ from pygeodesy.interns import _coincident_, _colinear_, _COMMASPACE_, _xyz_
|
|
|
19
19
|
from pygeodesy.lazily import _ALL_LAZY, _ALL_DOCS, _ALL_MODS as _MODS
|
|
20
20
|
from pygeodesy.named import _NamedBase, _NotImplemented, _xother3
|
|
21
21
|
# from pygeodesy.namedTuples import Vector3Tuple # _MODS
|
|
22
|
+
# from pygeodesy.nvectorBase import _N_Vector # _MODS
|
|
22
23
|
from pygeodesy.props import deprecated_method, Property, Property_RO, \
|
|
23
24
|
property_doc_, property_RO, _update_all
|
|
24
25
|
from pygeodesy.streprs import Fmt, strs, unstr
|
|
@@ -28,7 +29,7 @@ from pygeodesy.utily import atan2, sincos2, fabs
|
|
|
28
29
|
from math import ceil as _ceil, floor as _floor, trunc as _trunc
|
|
29
30
|
|
|
30
31
|
__all__ = _ALL_LAZY.vector3dBase
|
|
31
|
-
__version__ = '
|
|
32
|
+
__version__ = '25.08.18'
|
|
32
33
|
|
|
33
34
|
|
|
34
35
|
class Vector3dBase(_NamedBase): # sync __methods__ with .fsums.Fsum
|
|
@@ -760,9 +761,10 @@ class Vector3dBase(_NamedBase): # sync __methods__ with .fsums.Fsum
|
|
|
760
761
|
|
|
761
762
|
@Property_RO
|
|
762
763
|
def _N_vector(self):
|
|
763
|
-
'''(INTERNAL) Get the (C{nvectorBase.
|
|
764
|
+
'''(INTERNAL) Get the (C{nvectorBase._N_Vector})
|
|
764
765
|
'''
|
|
765
|
-
|
|
766
|
+
_N = _MODS.nvectorBase._N_Vector
|
|
767
|
+
return _N(*self.xyz3, name=self.name)
|
|
766
768
|
|
|
767
769
|
def _other_cmp(self, other):
|
|
768
770
|
'''(INTERNAL) Return the value for comparison.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pygeodesy
|
|
3
|
-
Version: 25.
|
|
3
|
+
Version: 25.8.25
|
|
4
4
|
Summary: Pure Python geodesy tools
|
|
5
5
|
Home-page: https://GitHub.com/mrJean1/PyGeodesy
|
|
6
6
|
Author: Jean M. Brouwers
|
|
@@ -8,7 +8,7 @@ Author-email: mrJean1@Gmail.com
|
|
|
8
8
|
Maintainer: Jean M. Brouwers
|
|
9
9
|
Maintainer-email: mrJean1@Gmail.com
|
|
10
10
|
License: MIT
|
|
11
|
-
Keywords: AER Albers altitude Andoyer annulus antipode area attitude Authalic auxiliary azimuth azimuthal azimuth-elevation-range bearing bank Barsky Barth beta bi-quadratic boolean cached Cagnoli cartesian Cassini Cassini-Soldner chord circle-intersections circumcenter circumcircle circumradius clip Cohen Cohen-Sutherland Collins composite conformal conic constants contact-triangle Cook Correia cosines-law coverage curvature cylindrical datum deprecation deficit development discrete distance Douglas earth east-north-up eccentricity ECEF elevation ellipsoid ellipsoidal-latitude-beta ellipsoidal-longitude-omega elliptic ENU EPSG equal-area equidistant equirectangular ETM ETRF Euclidean even-odd-rule ExactTM excess Farrell Farrell-Barth Ferrari-solution Field-Of-View flattening fma fmath footpoint footprint Forster Forster-Hormann-Popa Forsythe FOV fractional Frechet Fréchet frustum Fsum fused-multiply-add GARS geocentric GeoConvert GeodesicExact geodesy geodetic GeodSolve GeodTest geographiclib Geohash geoid geoidHeight GeoidHeights georef Girard gnomonic gons grades gradians Greiner Greiner-Hormann Hartzell Hausdorff Haversine heading hectare height Heikkinen Heron Hodgman horizon Hormann Hubeny IDW incenter incirle infix_@_operator inradius intermediate interpolate intersect intersection intersection3d intersections IntersectTool Inverse-Distance-Weighting Isometric ITRF Jacobi Jacobi-Conformal Jarque-Bera Jekel Karney Krueger Krüger kurtosis Lambert latitude law-of-cosines least-squares Lesh L_Huilier LHuilier Liang Liang-Barsky linearize Line-Of-Sight LocalCartesian local-tangent-plane local-x-y-z longitude LOS loxodrome lstsq LTP lune LV03 LV95 mean memoize memoized Mercator Meeus MGRS nearest NED Niemeyer non-finite normalize Norrdine north-east-down numpy n-vector Nvector oblate omega orthographic orthometric-height OSGB OSGR overlap parallel parallel-of-latitude Parametric path-intersection perimeter Peucker Pierlot pitch plumb Point-Of-View polar Popa POV precision-cubic-root precision-hypotenuse precision-powers precision-running-summation precision-square-root precision-summation prolate Pseudo-Mercator pygeodesy PyInstaller PyPy quartic radical radii radius Ramer Ramer-Douglas-Peucker Rectifying Reduced resect resection Rey-Jer Reumann Reumann-Witkam rhumb RhumbSolve running-linear-regression running-statistics running-stats running-summation scipy secant semi-perimeter sexagecimal simplify skewness Snellius Snellius-Pothenot Snyder Soddy Soddy-circles Soldner sphere sphere-intersections spherical-deficit spherical-excess spherical-triangle squared-quartic standard-deviation stereographic Sudano surface-area Sutherland Sutherland-Hodgman tangent-circles Terrestrial-Reference-Frame Thomas Tienstra tilt TMcoords TMExact toise transverse TransverseMercatorExact TRF triangle triangulate triaxial triaxial-ellipsoid trigonometry trilaterate trilaterate-2d trilaterate-3d TwoProduct TwoSum umbilic-point unit unroll UPS UTM UTM/UPS variance velocities Veness Vermeille viewing-frustum Vincenty Visvalingam Visvalingam-Whyatt volume volumetric Web-Mercator Welford WGRS WGS Whyatt Wildberger Witkam winding-number XYZ yaw You zenzi-cubic zenzi-quartic
|
|
11
|
+
Keywords: AER Albers altitude Andoyer annulus antipode area attitude Authalic auxiliary azimuth azimuthal azimuth-elevation-range bearing bank Barsky Barth beta bi-quadratic boolean cached Cagnoli cartesian Cassini Cassini-Soldner chord circle-intersections circumcenter circumcircle circumradius clip Cohen Cohen-Sutherland Collins composite conformal conic constants contact-triangle Cook Correia cosines-law coverage curvature cylindrical datum deprecation deficit development discrete distance Douglas earth east-north-up eccentricity ECEF elevation ellipsoid ellipsoidal-latitude-beta ellipsoidal-longitude-omega elliptic ENU EPSG equal-area equidistant equirectangular ETM ETRF Euclidean even-odd-rule ExactTM excess Farrell Farrell-Barth Ferrari-solution Field-Of-View flattening fma fmath footpoint footprint Forster Forster-Hormann-Popa Forsythe FOV fractional Frechet Fréchet frustum Fsum fused-multiply-add GARS geocentric GeoConvert GeodesicExact geodesy geodetic GeodSolve GeodTest geographiclib Geohash geoid geoidHeight GeoidHeights georef Girard gnomonic gons grades gradians Greiner Greiner-Hormann Hartzell Hausdorff Haversine heading hectare height Heikkinen Heron Hodgman horizon Hormann Hubeny IDW incenter incirle infix_@_operator inradius intermediate interpolate intersect intersection intersection3d intersections IntersectTool Inverse-Distance-Weighting Isometric ITRF Jacobi Jacobi-Conformal Jarque-Bera Jekel Karney Krueger Krüger kurtosis Lambert latitude law-of-cosines least-squares Lesh L_Huilier LHuilier Liang Liang-Barsky linearize Line-Of-Sight LocalCartesian local-tangent-plane local-x-y-z longitude LOS loxodrome lstsq LTP lune LV03 LV95 mean memoize memoized Mercator Meeus MGRS nearest NED Niemeyer non-finite normalize Norrdine north-east-down numpy n-vector Nvector oblate omega orthographic orthometric-height OSGB OSGR overlap parallel parallel-of-latitude Parametric path-intersection perimeter Peucker Pierlot pitch plumb Point-Of-View polar Popa POV precision-cubic-root precision-hypotenuse precision-powers precision-running-summation precision-square-root precision-summation prolate Pseudo-Mercator pygeodesy PyInstaller PyPy quartic radical radii radius Ramer Ramer-Douglas-Peucker Rectifying Reduced resect resection Rey-Jer Reumann Reumann-Witkam rho-theta-phi rhumb RhumbSolve running-linear-regression running-statistics running-stats running-summation scipy secant semi-perimeter sexagecimal simplify skewness Snellius Snellius-Pothenot Snyder Soddy Soddy-circles Soldner sphere sphere-intersections spherical-deficit spherical-excess spherical-polar spherical-triangle squared-quartic standard-deviation stereographic Sudano surface-area Sutherland Sutherland-Hodgman tangent-circles Terrestrial-Reference-Frame Thomas Tienstra tilt TMcoords TMExact toise transverse TransverseMercatorExact TRF triangle triangulate triaxial triaxial-ellipsoid trigonometry trilaterate trilaterate-2d trilaterate-3d TwoProduct TwoSum umbilic-point unit unroll UPS UTM UTM/UPS variance velocities Veness Vermeille viewing-frustum Vincenty Visvalingam Visvalingam-Whyatt volume volumetric Web-Mercator Welford WGRS WGS Whyatt Wildberger Witkam winding-number XYZ yaw You zenzi-cubic zenzi-quartic
|
|
12
12
|
Classifier: Development Status :: 5 - Production/Stable
|
|
13
13
|
Classifier: Environment :: Console
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
@@ -119,37 +119,37 @@ test results (on macOS only) and the complete documentation_ generated by Epydoc
|
|
|
119
119
|
Tests
|
|
120
120
|
=====
|
|
121
121
|
|
|
122
|
-
The tests ran with Python 3.13.
|
|
122
|
+
The tests ran with Python 3.13.5 (with geographiclib_ 2.0), 3.12.7 (with geographiclib_ 2.0, numpy_ 2.1.0,
|
|
123
123
|
scipy_ 1.14.1, GeodSolve_ 2.5, IntersectTool_ 2.5 and RhumbSolve_ 2.5), 3.11.5 (with geographiclib_ 2.0,
|
|
124
124
|
numpy_ 1.24.2 and scipy_ 1.10.1), Python 3.10.8 (with geographiclib_ 2.0, numpy_ 1.23.3, scipy_ 1.9.1,
|
|
125
125
|
GeoConvert_ 2.5, GeodSolve_ 2.5), Python 3.9.6 and Python 2.7.18 (with geographiclib_ 1.50, numpy_ 1.16.6,
|
|
126
|
-
scipy_ 1.2.2, GeoConvert_ 2.5, GeodSolve_ 2.5, IntersectTool_ 2.5 and RhumbSolve_ 2.5), all on macOS 15.
|
|
126
|
+
scipy_ 1.2.2, GeoConvert_ 2.5, GeodSolve_ 2.5, IntersectTool_ 2.5 and RhumbSolve_ 2.5), all on macOS 15.6.1
|
|
127
127
|
Sequoia in 64-bit.
|
|
128
128
|
|
|
129
129
|
All tests ran with and without ``lazy import`` for Python 3 and with command line option ``-W default``
|
|
130
130
|
and env variable ``PYGEODESY_WARNINGS=on`` for all Python versions. The results of those tests are
|
|
131
131
|
included in the distribution files.
|
|
132
132
|
|
|
133
|
-
Python 3.13.
|
|
133
|
+
Python 3.13.5, 3.12.7, 3.11.5 and 3.10.8 run on Apple M4 Si (``arm64``), *natively*. Python 2.7.18 runs
|
|
134
134
|
on Intel (``x86_64``) or Intel *emulation* (\"``arm64_x86_64``\", see function `pygeodesy.machine`_).
|
|
135
135
|
|
|
136
|
-
Test coverage has been measured with coverage_ 7.6.1 using Python 3.13.
|
|
136
|
+
Test coverage has been measured with coverage_ 7.6.1 using Python 3.13.5, 3.12.7, 3.11.5 and 3.10.8. The
|
|
137
137
|
complete coverage report in HTML and a PDF summary are included in the distribution files.
|
|
138
138
|
|
|
139
|
-
The tests also ran with Python 3.13.
|
|
139
|
+
The tests also ran with Python 3.13.5 (and geographiclib_ 2.0) on `Debian 12`_ in 64-bit only and with
|
|
140
140
|
Python 3.12.8 (and geographiclib_ 2.0) on `Windows 2019Server`_ in 64-bit only and with Python 2.7.18
|
|
141
141
|
(and with geographiclib_ 1.52) on `Windows 10`_ in 64- and 32-bit.
|
|
142
142
|
|
|
143
143
|
A single-File and single-Directory application with ``pygeodesy`` has been bundled using PyInstaller_ 3.4
|
|
144
144
|
and 64-bit Python 3.7.4 and 3.7.3 on macOS 10.13.6 High Sierra.
|
|
145
145
|
|
|
146
|
-
Previously, the tests were run with Python 3.13.0-
|
|
146
|
+
Previously, the tests were run with Python 3.13.0-4, 3.12.0-6, 3.11.2-4, 3.10.1-7, 3.9.1, 3.8.7, 3.7.1, 2.7.15,
|
|
147
147
|
PyPy_ 7.3.12 (Python 3.10.12), 7.3.1 (Python 3.6.9) and PyPy_ 7.1.1 (Python 2.7.13) (and geographiclib_ 1.52,
|
|
148
148
|
numpy_ 1.16.3, 1.16.4, 1.16.6, 1.19.0, 1.19.4, 1.19.5 or 1.22.4 and scipy_ 1.2.1, 1.4.1, 1.5.2 or 1.8.1) on
|
|
149
149
|
Ubuntu 16.04, with Python 3.10.0-1, 3.9.0-5, 3.8.0-6, 3.7.2-6, 3.7.0, 3.6.2-5, 3.5.3, 2.7.13-17, 2.7.10
|
|
150
150
|
and 2.6.9 (and numpy_ 1.19.0, 1.16.5, 1.16.2, 1.15.2, 1.14.0, 1.13.1, 1.8.0rc1 or 1.6.2 and scipy_ 1.5.0),
|
|
151
151
|
PyPy_ 7.3.0 (Python 2.7.13 and 3.6.9), PyPy_ 6.0.0 (Python 2.7.13 and 3.5.3) and `Intel-Python`_ 3.5.3 (and
|
|
152
|
-
numpy_ 1.11.3) on macOS 15.0-
|
|
152
|
+
numpy_ 1.11.3) on macOS 15.0-5 Sequoia, 14.0-6.1 Sonoma, 13.0-5.2 Ventura, 12.1-6 Monterey, 11.0-5.2-6.1 Big
|
|
153
153
|
Sur (aka 10.16), 10.15.3, 10.15.5-7 Catalina, 10.14 Mojave, 10.13.6 High Sierra and 10.12 Sierra, MacOS X
|
|
154
154
|
10.11 El Capitan and/or MacOS X 10.10 Yosemite, with Pythonista_ 3.2 (with geographiclib 1.50 or 1.49 and
|
|
155
155
|
numpy 1.8.0) on iOS 14.4.2, 11.4.1, 12.0-3 on iPad4, iPhone6, iPhone10 and/or iPhone12, with Pythonista_ 3.1
|
|
@@ -159,12 +159,12 @@ Server 2012R2, Windows 10 Pro and 32-bit Python 2.6.6 on Windows XP SP3.
|
|
|
159
159
|
Notes
|
|
160
160
|
=====
|
|
161
161
|
|
|
162
|
-
All Python source code has been statically checked_ with Ruff_ using Python 3.13.
|
|
163
|
-
PyCodeStyle_ (formerly Pep8) and McCabe_ using Python 2.7.18, both in 64-bit on macOS 15.
|
|
162
|
+
All Python source code has been statically checked_ with Ruff_ using Python 3.13.5 and with PyChecker_, PyFlakes_,
|
|
163
|
+
PyCodeStyle_ (formerly Pep8) and McCabe_ using Python 2.7.18, both in 64-bit on macOS 15.6.1 Sequoia only.
|
|
164
164
|
|
|
165
165
|
For a summary of all *Karney*-based functionality in ``pygeodesy``, see module karney_.
|
|
166
166
|
|
|
167
|
-
*Last updated:
|
|
167
|
+
*Last updated: Aug 25, 2025.*
|
|
168
168
|
|
|
169
169
|
License
|
|
170
170
|
=======
|