pygeodesy 24.6.9__py2.py3-none-any.whl → 24.7.7__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.6.9.dist-info → PyGeodesy-24.7.7.dist-info}/METADATA +2 -2
- PyGeodesy-24.7.7.dist-info/RECORD +117 -0
- pygeodesy/__init__.py +39 -32
- pygeodesy/__main__.py +6 -1
- pygeodesy/albers.py +2 -2
- pygeodesy/auxilats/__init__.py +1 -1
- pygeodesy/auxilats/auxAngle.py +40 -39
- pygeodesy/auxilats/auxDLat.py +3 -2
- pygeodesy/auxilats/auxLat.py +16 -18
- pygeodesy/auxilats/auxily.py +1 -1
- pygeodesy/azimuthal.py +10 -10
- pygeodesy/basics.py +16 -4
- pygeodesy/booleans.py +4 -4
- pygeodesy/cartesianBase.py +11 -14
- pygeodesy/css.py +14 -18
- pygeodesy/datums.py +6 -6
- pygeodesy/deprecated/__init__.py +1 -1
- pygeodesy/deprecated/classes.py +25 -4
- pygeodesy/deprecated/datum.py +3 -3
- pygeodesy/deprecated/functions.py +6 -8
- pygeodesy/dms.py +23 -27
- pygeodesy/ecef.py +4 -4
- pygeodesy/elevations.py +4 -4
- pygeodesy/ellipsoidalBase.py +23 -28
- pygeodesy/ellipsoidalBaseDI.py +19 -23
- pygeodesy/ellipsoidalExact.py +3 -3
- pygeodesy/ellipsoidalGeodSolve.py +15 -23
- pygeodesy/ellipsoidalKarney.py +37 -60
- pygeodesy/ellipsoidalNvector.py +38 -44
- pygeodesy/ellipsoidalVincenty.py +11 -14
- pygeodesy/ellipsoids.py +107 -101
- pygeodesy/errors.py +109 -48
- pygeodesy/etm.py +32 -44
- pygeodesy/formy.py +55 -58
- pygeodesy/frechet.py +18 -20
- pygeodesy/fsums.py +3 -3
- pygeodesy/gars.py +3 -4
- pygeodesy/geodesici.py +1696 -0
- pygeodesy/geodesicw.py +15 -15
- pygeodesy/geodesicx/__init__.py +4 -4
- pygeodesy/geodesicx/gx.py +34 -55
- pygeodesy/geodesicx/gxbases.py +20 -8
- pygeodesy/geodesicx/gxline.py +93 -88
- pygeodesy/geodsolve.py +108 -59
- pygeodesy/geohash.py +26 -34
- pygeodesy/geoids.py +28 -37
- pygeodesy/hausdorff.py +17 -18
- pygeodesy/heights.py +2 -2
- pygeodesy/internals.py +46 -13
- pygeodesy/interns.py +2 -2
- pygeodesy/karney.py +78 -15
- pygeodesy/ktm.py +13 -16
- pygeodesy/latlonBase.py +17 -19
- pygeodesy/lazily.py +28 -25
- pygeodesy/lcc.py +28 -31
- pygeodesy/ltp.py +7 -8
- pygeodesy/ltpTuples.py +71 -73
- pygeodesy/mgrs.py +8 -9
- pygeodesy/named.py +19 -10
- pygeodesy/nvectorBase.py +9 -10
- pygeodesy/osgr.py +9 -9
- pygeodesy/points.py +6 -6
- pygeodesy/rhumb/__init__.py +1 -1
- pygeodesy/rhumb/aux_.py +5 -5
- pygeodesy/rhumb/bases.py +30 -31
- pygeodesy/rhumb/ekx.py +3 -4
- pygeodesy/rhumb/solve.py +21 -22
- pygeodesy/solveBase.py +177 -123
- pygeodesy/sphericalBase.py +10 -11
- pygeodesy/sphericalNvector.py +13 -13
- pygeodesy/sphericalTrigonometry.py +86 -97
- pygeodesy/streprs.py +4 -34
- pygeodesy/triaxials.py +48 -43
- pygeodesy/units.py +208 -275
- pygeodesy/unitsBase.py +115 -107
- pygeodesy/ups.py +26 -31
- pygeodesy/utily.py +8 -8
- pygeodesy/utm.py +35 -40
- pygeodesy/utmups.py +43 -46
- pygeodesy/utmupsBase.py +8 -9
- pygeodesy/vector3d.py +26 -27
- pygeodesy/vector3dBase.py +6 -7
- pygeodesy/webmercator.py +19 -21
- pygeodesy/wgrs.py +18 -20
- PyGeodesy-24.6.9.dist-info/RECORD +0 -116
- {PyGeodesy-24.6.9.dist-info → PyGeodesy-24.7.7.dist-info}/WHEEL +0 -0
- {PyGeodesy-24.6.9.dist-info → PyGeodesy-24.7.7.dist-info}/top_level.txt +0 -0
pygeodesy/triaxials.py
CHANGED
|
@@ -59,7 +59,7 @@ from pygeodesy.vector3d import _otherV3d, Vector3d, _ALL_LAZY, _MODS
|
|
|
59
59
|
from math import atan2, fabs, sqrt
|
|
60
60
|
|
|
61
61
|
__all__ = _ALL_LAZY.triaxials
|
|
62
|
-
__version__ = '24.06.
|
|
62
|
+
__version__ = '24.06.24'
|
|
63
63
|
|
|
64
64
|
_not_ordered_ = _not_('ordered')
|
|
65
65
|
_omega_ = 'omega'
|
|
@@ -213,8 +213,7 @@ class Triaxial_(_NamedEnumItem):
|
|
|
213
213
|
C{meter}) or an other L{Triaxial} or L{Triaxial_} instance.
|
|
214
214
|
@kwarg b: Middle, C{Y} semi-axis (C{meter}, same units as B{C{a}}), required
|
|
215
215
|
if C{B{a_triaxial} is scalar}, ignored otherwise.
|
|
216
|
-
@kwarg c: Small, C{Z} semi-axis (C{meter},
|
|
217
|
-
if C{B{a_triaxial} is scalar}, ignored otherwise.
|
|
216
|
+
@kwarg c: Small, C{Z} semi-axis (C{meter}, B{C{b}}).
|
|
218
217
|
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
219
218
|
|
|
220
219
|
@raise TriaxialError: Invalid semi-axis or -axes.
|
|
@@ -381,13 +380,14 @@ class Triaxial_(_NamedEnumItem):
|
|
|
381
380
|
|
|
382
381
|
@arg x_xyz: X component (C{scalar}) or a cartesian (C{Cartesian}, L{Ecef9Tuple},
|
|
383
382
|
L{Vector3d}, L{Vector3Tuple} or L{Vector4Tuple}).
|
|
384
|
-
@kwarg y: Y component (C{scalar}), required if B{C{x_xyz}} if C{scalar}
|
|
385
|
-
|
|
383
|
+
@kwarg y: Y component (C{scalar}), required if B{C{x_xyz}} if C{scalar}, ignored
|
|
384
|
+
otherwise.
|
|
385
|
+
@kwarg z: Z component (C{scalar}), like B{C{y}}.
|
|
386
386
|
@kwarg normal: If C{True} the projection is the I{normal, plumb} to the surface of,
|
|
387
387
|
otherwise the C{radial} line to the center of this triaxial (C{bool}).
|
|
388
388
|
@kwarg eps: Tolerance for root finding and validation (C{scalar}), use a negative
|
|
389
389
|
value to skip validation.
|
|
390
|
-
@kwarg name: Optional
|
|
390
|
+
@kwarg name: Optional C{B{name}="heigh4"} (C{str}).
|
|
391
391
|
|
|
392
392
|
@return: L{Vector4Tuple}C{(x, y, z, h)} with the cartesian coordinates C{x}, C{y}
|
|
393
393
|
and C{z} of the projection on or the intersection with and with the height
|
|
@@ -412,7 +412,7 @@ class Triaxial_(_NamedEnumItem):
|
|
|
412
412
|
x, y, z = v.xyz
|
|
413
413
|
try:
|
|
414
414
|
if normal: # plumb to surface
|
|
415
|
-
x, y, z, h, i =
|
|
415
|
+
x, y, z, h, i = _plumbTo5(x, y, z, self, eps=eps)
|
|
416
416
|
else: # radial to center
|
|
417
417
|
x, y, z = self._radialTo3(z, hypot(x, y), y, x)
|
|
418
418
|
h = v.minus_(x, y, z).length
|
|
@@ -420,8 +420,8 @@ class Triaxial_(_NamedEnumItem):
|
|
|
420
420
|
raise TriaxialError(x=x, y=y, z=z, cause=e)
|
|
421
421
|
if h > 0 and self.sideOf(v, eps=EPS0) < 0:
|
|
422
422
|
h = -h # below the surface
|
|
423
|
-
|
|
424
|
-
|
|
423
|
+
n = _name__(name, name__=self.height4)
|
|
424
|
+
return Vector4Tuple(x, y, z, h, iteration=i, name=n)
|
|
425
425
|
|
|
426
426
|
@Property_RO
|
|
427
427
|
def isOrdered(self):
|
|
@@ -451,8 +451,9 @@ class Triaxial_(_NamedEnumItem):
|
|
|
451
451
|
|
|
452
452
|
@arg x_xyz: X component (C{scalar}) or a cartesian (C{Cartesian},
|
|
453
453
|
L{Ecef9Tuple}, L{Vector3d}, L{Vector3Tuple} or L{Vector4Tuple}).
|
|
454
|
-
@kwarg y: Y component (C{scalar}), required if B{C{x_xyz}} if C{scalar}
|
|
455
|
-
|
|
454
|
+
@kwarg y: Y component (C{scalar}), required if B{C{x_xyz}} if C{scalar}, ignored
|
|
455
|
+
otherwise.
|
|
456
|
+
@kwarg z: Z component (C{scalar}), like B{C{y}}.
|
|
456
457
|
@kwarg length: Optional length and in-/outward direction (C{scalar}).
|
|
457
458
|
|
|
458
459
|
@return: A C{Vector3d(x_, y_, z_)} normalized to B{C{length}}, pointing
|
|
@@ -499,7 +500,7 @@ class Triaxial_(_NamedEnumItem):
|
|
|
499
500
|
|
|
500
501
|
@Property_RO
|
|
501
502
|
def _ordered4(self):
|
|
502
|
-
'''(INTERNAL) Helper for C{_hartzell3} and C{
|
|
503
|
+
'''(INTERNAL) Helper for C{_hartzell3} and C{_plumbTo5}.
|
|
503
504
|
'''
|
|
504
505
|
def _order2(reverse, a, b, c):
|
|
505
506
|
'''(INTERNAL) Un-Order C{a}, C{b} and C{c}.
|
|
@@ -558,8 +559,9 @@ class Triaxial_(_NamedEnumItem):
|
|
|
558
559
|
|
|
559
560
|
@arg x_xyz: X component (C{scalar}) or a cartesian (C{Cartesian},
|
|
560
561
|
L{Ecef9Tuple}, L{Vector3d}, L{Vector3Tuple} or L{Vector4Tuple}).
|
|
561
|
-
@kwarg y: Y component (C{scalar}), required if B{C{x_xyz}} if C{scalar}
|
|
562
|
-
|
|
562
|
+
@kwarg y: Y component (C{scalar}), required if B{C{x_xyz}} if C{scalar},
|
|
563
|
+
ignored otherwise.
|
|
564
|
+
@kwarg z: Z component (C{scalar}), like B{C{y}}.
|
|
563
565
|
@kwarg eps: Near-surface tolerance (C{scalar}, distance I{squared}).
|
|
564
566
|
|
|
565
567
|
@return: C{INT0} if C{(B{x}, B{y}, B{z})} is near this triaxial's surface
|
|
@@ -593,7 +595,7 @@ class Triaxial_(_NamedEnumItem):
|
|
|
593
595
|
raise TriaxialError(a=a, b=b, c=c, txt=t)
|
|
594
596
|
return Ellipsoid(a, b=b, name=self._name__(name))
|
|
595
597
|
|
|
596
|
-
def toStr(self, prec=9, name
|
|
598
|
+
def toStr(self, prec=9, **name): # PYCHOK signature
|
|
597
599
|
'''Return this C{Triaxial} as a string.
|
|
598
600
|
|
|
599
601
|
@kwarg prec: Precision, number of decimal digits (0..9).
|
|
@@ -611,7 +613,7 @@ class Triaxial_(_NamedEnumItem):
|
|
|
611
613
|
if isinstance(self, J):
|
|
612
614
|
t += J.xyQ2,
|
|
613
615
|
t += T.volume, T.area
|
|
614
|
-
return self._instr(
|
|
616
|
+
return self._instr(area_p=self.area_p(), prec=prec, props=t, **name)
|
|
615
617
|
|
|
616
618
|
@Property_RO
|
|
617
619
|
def volume(self):
|
|
@@ -635,14 +637,13 @@ class Triaxial(Triaxial_):
|
|
|
635
637
|
or an other L{Triaxial} or L{Triaxial_} instance.
|
|
636
638
|
@kwarg b: Middle semi-axis (C{meter}, same units as B{C{a}}), required
|
|
637
639
|
if C{B{a_triaxial} is scalar}, ignored otherwise.
|
|
638
|
-
@kwarg c: Smallest semi-axis (C{meter},
|
|
639
|
-
if C{B{a_triaxial} is scalar}, ignored otherwise.
|
|
640
|
+
@kwarg c: Smallest semi-axis (C{meter}, like B{C{b}}).
|
|
640
641
|
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
641
642
|
|
|
642
643
|
@note: The semi-axes must be ordered as C{B{a} >= B{b} >= B{c} > 0} and
|
|
643
644
|
must be ellipsoidal, C{B{a} > B{c}}.
|
|
644
645
|
|
|
645
|
-
@raise TriaxialError: Semi-axes
|
|
646
|
+
@raise TriaxialError: Semi-axes unordered, spherical or invalid.
|
|
646
647
|
'''
|
|
647
648
|
Triaxial_.__init__(self, a_triaxial, b=b, c=c, **name)
|
|
648
649
|
|
|
@@ -740,8 +741,9 @@ class Triaxial(Triaxial_):
|
|
|
740
741
|
|
|
741
742
|
@arg x_xyz: X component (C{scalar}) or a cartesian (C{Cartesian},
|
|
742
743
|
L{Ecef9Tuple}, L{Vector3d}, L{Vector3Tuple} or L{Vector4Tuple}).
|
|
743
|
-
@kwarg y: Y component (C{scalar}), required if B{C{x_xyz}} if C{scalar}
|
|
744
|
-
|
|
744
|
+
@kwarg y: Y component (C{scalar}), required if B{C{x_xyz}} if C{scalar},
|
|
745
|
+
ignored otherwise.
|
|
746
|
+
@kwarg z: Z component (C{scalar}), like B{C{y}}.
|
|
745
747
|
@kwarg normal_eps_name: Optional keyword arguments C{B{normal}=True},
|
|
746
748
|
C{B{eps}=EPS} and overriding C{B{name}="height4"} (C{str}),
|
|
747
749
|
see method L{Triaxial.height4}.
|
|
@@ -845,8 +847,9 @@ class Triaxial(Triaxial_):
|
|
|
845
847
|
|
|
846
848
|
@arg x_xyz: X component (C{scalar}) or a cartesian (C{Cartesian},
|
|
847
849
|
L{Ecef9Tuple}, L{Vector3d}, L{Vector3Tuple} or L{Vector4Tuple}).
|
|
848
|
-
@kwarg y: Y component (C{scalar}), required if B{C{x_xyz}} if C{scalar}
|
|
849
|
-
|
|
850
|
+
@kwarg y: Y component (C{scalar}), required if B{C{x_xyz}} if C{scalar},
|
|
851
|
+
ignored otherwise.
|
|
852
|
+
@kwarg z: Z component (C{scalar}), like B{C{y}}.
|
|
850
853
|
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
851
854
|
|
|
852
855
|
@return: A L{BetaOmega3Tuple}C{(beta, omega, height)} with C{beta} and
|
|
@@ -866,8 +869,9 @@ class Triaxial(Triaxial_):
|
|
|
866
869
|
|
|
867
870
|
@arg x_xyz: X component (C{scalar}) or a cartesian (C{Cartesian},
|
|
868
871
|
L{Ecef9Tuple}, L{Vector3d}, L{Vector3Tuple} or L{Vector4Tuple}).
|
|
869
|
-
@kwarg y: Y component (C{scalar}), required if B{C{x_xyz}} if C{scalar}
|
|
870
|
-
|
|
872
|
+
@kwarg y: Y component (C{scalar}), required if B{C{x_xyz}} if C{scalar},
|
|
873
|
+
ignored otherwise.
|
|
874
|
+
@kwarg z: Z component (C{scalar}), like B{C{y}}.
|
|
871
875
|
@arg h: Height above or below this triaxial's surface (C{meter}, same units
|
|
872
876
|
as the axes).
|
|
873
877
|
@kwarg normal: If C{True} the height is C{normal} to the surface, otherwise
|
|
@@ -899,8 +903,9 @@ class Triaxial(Triaxial_):
|
|
|
899
903
|
|
|
900
904
|
@arg x_xyz: X component (C{scalar}) or a cartesian (C{Cartesian},
|
|
901
905
|
L{Ecef9Tuple}, L{Vector3d}, L{Vector3Tuple} or L{Vector4Tuple}).
|
|
902
|
-
@kwarg y: Y component (C{scalar}), required if B{C{x_xyz}} if C{scalar}
|
|
903
|
-
|
|
906
|
+
@kwarg y: Y component (C{scalar}), required if B{C{x_xyz}} if C{scalar},
|
|
907
|
+
ignored otherwise.
|
|
908
|
+
@kwarg z: Z component (C{scalar}), like B{C{y}}.
|
|
904
909
|
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
905
910
|
|
|
906
911
|
@return: A L{LatLon3Tuple}C{(lat, lon, height)} with C{lat} and C{lon}
|
|
@@ -1192,7 +1197,7 @@ def _hartzell3(pov, los, Tun): # in .Ellipsoid.hartzell4, .formy.hartzell
|
|
|
1192
1197
|
|
|
1193
1198
|
p3 = _otherV3d(pov=pov.toCartesian() if isLatLon(pov) else pov)
|
|
1194
1199
|
if los is True: # normal
|
|
1195
|
-
a, b, c, d, i =
|
|
1200
|
+
a, b, c, d, i = _plumbTo5(p3.x, p3.y, p3.z, Tun)
|
|
1196
1201
|
return type(p3)(a, b, c), d, i
|
|
1197
1202
|
|
|
1198
1203
|
u3 = p3.negate() if los is False or los is None else _toUvwV3d(los, pov)
|
|
@@ -1286,15 +1291,22 @@ def _hypot21(x, y, z=0):
|
|
|
1286
1291
|
return fsumf_(_1_0, x**2, y**2, (z**2 if z else _0_0), _N_2_0)
|
|
1287
1292
|
|
|
1288
1293
|
|
|
1289
|
-
def
|
|
1294
|
+
def _otherV3d_(x_xyz, y, z, **name):
|
|
1295
|
+
'''(INTERNAL) Get a Vector3d from C{x_xyz}, C{y} and C{z}.
|
|
1296
|
+
'''
|
|
1297
|
+
return Vector3d(x_xyz, y, z, **name) if isscalar(x_xyz) else \
|
|
1298
|
+
_otherV3d(x_xyz=x_xyz, **name)
|
|
1299
|
+
|
|
1300
|
+
|
|
1301
|
+
def _plumbTo4(x, y, a, b, eps=EPS):
|
|
1290
1302
|
'''(INTERNAL) Nearest point on and distance to a 2-D ellipse, I{unordered}.
|
|
1291
1303
|
|
|
1292
|
-
@see: Function C{pygeodesy.ellipsoids.
|
|
1304
|
+
@see: Function C{pygeodesy.ellipsoids._plumbTo3} and I{Eberly}'s U{Distance
|
|
1293
1305
|
from a Point to ... an Ellipse ...<https://www.GeometricTools.com/
|
|
1294
1306
|
Documentation/DistancePointEllipseEllipsoid.pdf>}.
|
|
1295
1307
|
'''
|
|
1296
1308
|
if b > a:
|
|
1297
|
-
b, a, d, i =
|
|
1309
|
+
b, a, d, i = _plumbTo4(y, x, b, a, eps=eps)
|
|
1298
1310
|
return a, b, d, i
|
|
1299
1311
|
|
|
1300
1312
|
if not (b > 0 and isfinite(a)):
|
|
@@ -1339,7 +1351,7 @@ def _normalTo4(x, y, a, b, eps=EPS):
|
|
|
1339
1351
|
return a, b, d, i
|
|
1340
1352
|
|
|
1341
1353
|
|
|
1342
|
-
def
|
|
1354
|
+
def _plumbTo5(x, y, z, Tun, eps=EPS): # MCCABE 19 in .testTriaxials
|
|
1343
1355
|
'''(INTERNAL) Nearest point on and distance to an I{un-/ordered} triaxial.
|
|
1344
1356
|
|
|
1345
1357
|
@see: I{Eberly}'s U{Distance from a Point to ... an Ellipsoid ...<https://
|
|
@@ -1348,7 +1360,7 @@ def _normalTo5(x, y, z, Tun, eps=EPS): # MCCABE 19
|
|
|
1348
1360
|
a, b, c, T = Tun._ordered4
|
|
1349
1361
|
if Tun is not T: # T is ordered, Tun isn't
|
|
1350
1362
|
t = T._order3(x, y, z) + (T,)
|
|
1351
|
-
a, b, c, d, i =
|
|
1363
|
+
a, b, c, d, i = _plumbTo5(*t, eps=eps)
|
|
1352
1364
|
return T._order3(a, b, c, reverse=True) + (d, i)
|
|
1353
1365
|
|
|
1354
1366
|
if not (c > 0 and isfinite(a)):
|
|
@@ -1379,10 +1391,10 @@ def _normalTo5(x, y, z, Tun, eps=EPS): # MCCABE 19
|
|
|
1379
1391
|
d = hypot_(x - a, y - b, z - c)
|
|
1380
1392
|
else: # x == 0
|
|
1381
1393
|
a = x # 0
|
|
1382
|
-
b, c, d, i =
|
|
1394
|
+
b, c, d, i = _plumbTo4(y, z, b, c, eps=eps)
|
|
1383
1395
|
elif x: # y == 0
|
|
1384
1396
|
b = y # 0
|
|
1385
|
-
a, c, d, i =
|
|
1397
|
+
a, c, d, i = _plumbTo4(x, z, a, c, eps=eps)
|
|
1386
1398
|
else: # x == y == 0
|
|
1387
1399
|
if z < 0:
|
|
1388
1400
|
c = -c
|
|
@@ -1407,7 +1419,7 @@ def _normalTo5(x, y, z, Tun, eps=EPS): # MCCABE 19
|
|
|
1407
1419
|
t = False
|
|
1408
1420
|
if t:
|
|
1409
1421
|
c = z # signed-0
|
|
1410
|
-
a, b, d, i =
|
|
1422
|
+
a, b, d, i = _plumbTo4(x, y, a, b, eps=eps)
|
|
1411
1423
|
|
|
1412
1424
|
if val > 0: # validate
|
|
1413
1425
|
e = T.sideOf(a, b, c, eps=val)
|
|
@@ -1426,13 +1438,6 @@ def _normalTo5(x, y, z, Tun, eps=EPS): # MCCABE 19
|
|
|
1426
1438
|
return a, b, c, d, i
|
|
1427
1439
|
|
|
1428
1440
|
|
|
1429
|
-
def _otherV3d_(x_xyz, y, z, **name):
|
|
1430
|
-
'''(INTERNAL) Get a Vector3d from C{x_xyz}, C{y} and C{z}.
|
|
1431
|
-
'''
|
|
1432
|
-
return Vector3d(x_xyz, y, z, **name) if isscalar(x_xyz) else \
|
|
1433
|
-
_otherV3d(x_xyz=x_xyz)
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
1441
|
def _rootXd(r, s, u, v, w, g, eps):
|
|
1437
1442
|
'''(INTERNAL) Robust 2d- or 3d-root finder: 2d- if C{s == v == 0} else 3d-root.
|
|
1438
1443
|
|