pygeodesy 25.7.25__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 +5 -5
- pygeodesy/cartesianBase.py +21 -20
- pygeodesy/ecef.py +324 -260
- pygeodesy/ellipsoids.py +30 -14
- 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.7.25.dist-info → pygeodesy-25.8.25.dist-info}/METADATA +7 -7
- {pygeodesy-25.7.25.dist-info → pygeodesy-25.8.25.dist-info}/RECORD +15 -15
- {pygeodesy-25.7.25.dist-info → pygeodesy-25.8.25.dist-info}/WHEEL +0 -0
- {pygeodesy-25.7.25.dist-info → pygeodesy-25.8.25.dist-info}/top_level.txt +0 -0
pygeodesy/__init__.py
CHANGED
|
@@ -143,14 +143,14 @@ U{GeoConvert<https://GeographicLib.SourceForge.io/C++/doc/utilities.html>} 2.5,
|
|
|
143
143
|
U{GeodSolve<https://GeographicLib.SourceForge.io/C++/doc/utilities.html>} 2.5,
|
|
144
144
|
U{IntersectTool<https://GeographicLib.SourceForge.io/C++/doc/utilities.html>} 2.5 and
|
|
145
145
|
U{RhumbSolve<https://GeographicLib.SourceForge.io/C++/doc/utilities.html>} 2.5), all in 64-bit on
|
|
146
|
-
macOS 15.
|
|
146
|
+
macOS 15.6.1 Sequoia.
|
|
147
147
|
|
|
148
148
|
All tests ran with and without C{lazy import} for Python 3 and with command line option C{-W default} and
|
|
149
149
|
env variable C{PYGEODESY_WARNINGS=on} for all Python versions. The results of those tests are included in
|
|
150
150
|
the distribution files.
|
|
151
151
|
|
|
152
152
|
Test coverage has been measured with U{coverage<https://PyPI.org/project/coverage>} 7.6.1 using Python
|
|
153
|
-
3.13.
|
|
153
|
+
3.13.5, 3.12.7, 3.11.5 and 3.10.8. The complete coverage report in HTML and a PDF summary are included in
|
|
154
154
|
the distribution files.
|
|
155
155
|
|
|
156
156
|
Python 3.13.5, 3.12.7, 3.11.5 and 3.10.8 run on Apple M4 Si (C{arm64}), I{natively}. Python 2.7.18 runs
|
|
@@ -175,7 +175,7 @@ U{PyPy<https://PyPy.org>} 7.3.12 (Python 3.10.12), 7.3.1 (Python 3.6.9) and U{Py
|
|
|
175
175
|
1.16.5, 1.16.2, 1.15.2, 1.14.0, 1.13.1, 1.8.0rc1 or 1.6.2 and U{scipy<https://PyPI.org/project/scipy>} 1.5.0), U{PyPy
|
|
176
176
|
<https://PyPy.org>} 7.3.0 (Python 2.7.13 and 3.6.9), U{PyPy<https://PyPy.org>} 6.0.0 (Python 2.7.13 and 3.5.3)
|
|
177
177
|
and U{Intel-Python<https://software.Intel.com/en-us/distribution-for-python>} 3.5.3 (and U{numpy
|
|
178
|
-
<https://PyPI.org/project/numpy>} 1.11.3) on macOS 15.0-
|
|
178
|
+
<https://PyPI.org/project/numpy>} 1.11.3) on macOS 15.0-5 Sequoia, 14.0-6.1 Sonoma, 13.0-5.2 Ventura, 12.1-6 Monterey,
|
|
179
179
|
11.0-5.2-6.1 Big Sur (aka 10.16), 10.15.3, 10.15.5-7 Catalina, 10.14 Mojave, 10.13.6 High Sierra and 10.12 Sierra,
|
|
180
180
|
MacOS X 10.11 El Capitan and/or MacOS X 10.10 Yosemite, with U{Pythonista<https://OMZ-Software.com/pythonista>}3.2
|
|
181
181
|
(with geographiclib 1.50 or 1.49 and numpy 1.8.0) on iOS 14.4.2, 11.4.1, 12.0-3 on iPad4, iPhone6, iPhone10 and/or
|
|
@@ -190,7 +190,7 @@ All Python source code has been statically U{checked<https://GitHub.com/ActiveSt
|
|
|
190
190
|
546532_PyChecker_postprocessor>} with U{Ruff<https://GitHub.com/astral-sh/ruff>} using Python 3.13.5 and with
|
|
191
191
|
U{PyChecker<https://PyPI.org/project/pychecker>}, U{PyFlakes<https://PyPI.org/project/pyflakes>}, U{PyCodeStyle
|
|
192
192
|
<https://PyPI.org/project/pycodestyle>} (formerly Pep8) and U{McCabe<https://PyPI.org/project/mccabe>} using Python
|
|
193
|
-
2.7.18, both in 64-bit on macOS 15.
|
|
193
|
+
2.7.18, both in 64-bit on macOS 15.6.1 Sequoia.
|
|
194
194
|
|
|
195
195
|
For a summary of all I{Karney}-based functionality in C{pygeodesy}, see module U{karney
|
|
196
196
|
<https://mrJean1.GitHub.io/PyGeodesy/docs/pygeodesy.karney-module.html>}.
|
|
@@ -604,7 +604,7 @@ else:
|
|
|
604
604
|
|
|
605
605
|
from pygeodesy.internals import _version2, _DOT_ # noqa: E402
|
|
606
606
|
# from pygeodesy.interns import _DOT_ # from .internals
|
|
607
|
-
__version__ = '25.
|
|
607
|
+
__version__ = '25.08.25'
|
|
608
608
|
# see setup.py for similar logic
|
|
609
609
|
version = _DOT_(*_version2(__version__, n=3))
|
|
610
610
|
|
pygeodesy/cartesianBase.py
CHANGED
|
@@ -27,11 +27,11 @@ from pygeodesy.interns import _COMMASPACE_, _datum_, _no_, _phi_
|
|
|
27
27
|
from pygeodesy.interns import _ellipsoidal_, _spherical_ # PYCHOK used!
|
|
28
28
|
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
|
|
29
29
|
from pygeodesy.named import _name2__, _Pass
|
|
30
|
-
from pygeodesy.namedTuples import LatLon4Tuple, _NamedTupleTo
|
|
30
|
+
from pygeodesy.namedTuples import LatLon4Tuple, _NamedTupleTo, Vector3Tuple, \
|
|
31
31
|
Vector4Tuple
|
|
32
|
-
# from pygeodesy.nvectorBase import
|
|
33
|
-
from pygeodesy.props import deprecated_method, Property, Property_RO,
|
|
34
|
-
property_RO, _update_all
|
|
32
|
+
# from pygeodesy.nvectorBase import _N_Vector # _MODS
|
|
33
|
+
from pygeodesy.props import deprecated_method, Property, Property_RO, \
|
|
34
|
+
property_doc_, property_RO, _update_all
|
|
35
35
|
# from pygeodesy import resections as _resections # _MODS.into
|
|
36
36
|
# from pygeodesy.streprs import Fmt # from .fsums
|
|
37
37
|
# from pygeodesy.triaxials import Triaxial_ # _MODS
|
|
@@ -39,12 +39,11 @@ from pygeodesy.units import Degrees, Height, _heigHt, _isMeter, Meter, Radians
|
|
|
39
39
|
from pygeodesy.utily import acos1, atan2, sincos2d, sincos2_, degrees, radians
|
|
40
40
|
from pygeodesy.vector3d import Vector3d, _xyzhdlln4
|
|
41
41
|
# from pygeodesy.vector3dBase import _xyz3 # _MODS
|
|
42
|
-
# from pygeodesy import ltp # _MODS
|
|
43
42
|
|
|
44
43
|
# from math import degrees, fabs, radians, sqrt # from .fmath, .utily
|
|
45
44
|
|
|
46
45
|
__all__ = _ALL_LAZY.cartesianBase
|
|
47
|
-
__version__ = '25.
|
|
46
|
+
__version__ = '25.08.24'
|
|
48
47
|
|
|
49
48
|
_r_ = 'r'
|
|
50
49
|
_resections = _MODS.into(resections=__name__)
|
|
@@ -172,12 +171,13 @@ class CartesianBase(Vector3d, _EcefLocal):
|
|
|
172
171
|
@raise TypeError: The B{C{datum}} is not a L{Datum}.
|
|
173
172
|
'''
|
|
174
173
|
d = _spherical_datum(datum, name=self.name)
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
D = self._datum
|
|
175
|
+
if D: # is not None
|
|
176
|
+
if d.isEllipsoidal and not D.isEllipsoidal:
|
|
177
177
|
raise _IsnotError(_ellipsoidal_, datum=datum)
|
|
178
|
-
elif d.isSpherical and not
|
|
178
|
+
elif d.isSpherical and not D.isSpherical:
|
|
179
179
|
raise _IsnotError(_spherical_, datum=datum)
|
|
180
|
-
if
|
|
180
|
+
if D != d: # or (D and D.name != d.name)
|
|
181
181
|
_update_all(self)
|
|
182
182
|
self._datum = d
|
|
183
183
|
|
|
@@ -302,8 +302,6 @@ class CartesianBase(Vector3d, _EcefLocal):
|
|
|
302
302
|
@note: Include keyword argument C{B{datum}=None} if class B{C{Cartesian}}
|
|
303
303
|
does not accept a B{C{datum}} keyword agument.
|
|
304
304
|
|
|
305
|
-
@raise TriaxialError: No convergence in triaxial root finding.
|
|
306
|
-
|
|
307
305
|
@raise TypeError: Invalid or undefined B{C{earth}} or C{datum}.
|
|
308
306
|
'''
|
|
309
307
|
n = typename(self.height3)
|
|
@@ -410,13 +408,12 @@ class CartesianBase(Vector3d, _EcefLocal):
|
|
|
410
408
|
|
|
411
409
|
@Property_RO
|
|
412
410
|
def _N_vector(self):
|
|
413
|
-
'''(INTERNAL) Get the (C{nvectorBase.
|
|
411
|
+
'''(INTERNAL) Get the (C{nvectorBase._N_Vector}).
|
|
414
412
|
'''
|
|
415
|
-
_N = _MODS.nvectorBase.
|
|
416
|
-
|
|
417
|
-
return _N(x, y, z, h=h, name=self.name)
|
|
413
|
+
_N = _MODS.nvectorBase._N_Vector
|
|
414
|
+
return self._n_xyzh4(self.datum, Vector=_N)
|
|
418
415
|
|
|
419
|
-
def _n_xyzh4(self, datum):
|
|
416
|
+
def _n_xyzh4(self, datum, Vector=Vector4Tuple):
|
|
420
417
|
'''(INTERNAL) Get the n-vector components as L{Vector4Tuple}.
|
|
421
418
|
'''
|
|
422
419
|
def _ErrorEPS0(x):
|
|
@@ -434,7 +431,11 @@ class CartesianBase(Vector3d, _EcefLocal):
|
|
|
434
431
|
p = hypot2(x, y) * E.a2_
|
|
435
432
|
q = z**2 * E.e21 * E.a2_
|
|
436
433
|
r = fsumf_(p, q, -E.e4) / _6_0
|
|
434
|
+
if isnear0(r):
|
|
435
|
+
raise _ErrorEPS0(r)
|
|
437
436
|
s = (p * q * E.e4) / (_4_0 * r**3)
|
|
437
|
+
if s < 0:
|
|
438
|
+
raise _ErrorEPS0(s)
|
|
438
439
|
t = cbrt(fsumf_(_1_0, s, sqrt(s * (_2_0 + s))))
|
|
439
440
|
if isnear0(t):
|
|
440
441
|
raise _ErrorEPS0(t)
|
|
@@ -458,7 +459,7 @@ class CartesianBase(Vector3d, _EcefLocal):
|
|
|
458
459
|
raise _ErrorEPS0(t)
|
|
459
460
|
h = fsumf_(k, E.e2, _N_1_0) / k * t
|
|
460
461
|
s = e / t # == e * tmp
|
|
461
|
-
return
|
|
462
|
+
return Vector(x * s, y * s, z / t, h, name=self.name)
|
|
462
463
|
|
|
463
464
|
@Property_RO
|
|
464
465
|
def philam(self):
|
|
@@ -980,8 +981,8 @@ def xyz2rtp_(x_xyz, y=0, z=0, **name):
|
|
|
980
981
|
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
981
982
|
|
|
982
983
|
@return: L{RadiusThetaPhi3Tuple}C{(r, theta, phi)} with radial distance C{r} (C{meter},
|
|
983
|
-
same units as C{x}, C{y} and C{z}), inclination C{theta} (
|
|
984
|
-
positive z-axis) and azimuthal angle C{phi}, both in L{Radians}.
|
|
984
|
+
same units as C{x}, C{y} and C{z}), inclination C{theta} (polar angle with
|
|
985
|
+
respect to the positive z-axis) and azimuthal angle C{phi}, both in L{Radians}.
|
|
985
986
|
|
|
986
987
|
@see: U{Physics convention<https://WikiPedia.org/wiki/Spherical_coordinate_system>}
|
|
987
988
|
(ISO 80000-2:2019), class L{RadiusThetaPhi3Tuple} and function L{xyz2rtp}.
|