pygeodesy 24.5.24__py2.py3-none-any.whl → 24.6.9__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.24.dist-info → PyGeodesy-24.6.9.dist-info}/METADATA +6 -5
- PyGeodesy-24.6.9.dist-info/RECORD +116 -0
- pygeodesy/__init__.py +4 -4
- pygeodesy/auxilats/__init__.py +1 -1
- pygeodesy/auxilats/__main__.py +2 -2
- pygeodesy/auxilats/auxAngle.py +4 -4
- pygeodesy/basics.py +39 -5
- pygeodesy/booleans.py +54 -67
- pygeodesy/cartesianBase.py +138 -147
- pygeodesy/constants.py +3 -3
- pygeodesy/deprecated/functions.py +9 -3
- pygeodesy/ecef.py +67 -72
- pygeodesy/ellipsoidalBase.py +18 -56
- pygeodesy/ellipsoidalGeodSolve.py +2 -2
- pygeodesy/ellipsoidalKarney.py +3 -3
- pygeodesy/ellipsoidalNvector.py +7 -7
- pygeodesy/ellipsoids.py +6 -5
- pygeodesy/errors.py +20 -10
- pygeodesy/etm.py +16 -21
- pygeodesy/fmath.py +9 -20
- pygeodesy/formy.py +60 -74
- pygeodesy/frechet.py +13 -14
- pygeodesy/fsums.py +60 -26
- pygeodesy/geodesicx/__init__.py +1 -1
- pygeodesy/geodesicx/__main__.py +2 -2
- pygeodesy/geodesicx/gx.py +3 -5
- pygeodesy/geodsolve.py +24 -26
- pygeodesy/geohash.py +27 -40
- pygeodesy/geoids.py +1 -1
- pygeodesy/hausdorff.py +17 -18
- pygeodesy/heights.py +17 -30
- pygeodesy/internals.py +15 -14
- pygeodesy/interns.py +3 -9
- pygeodesy/iters.py +2 -2
- pygeodesy/karney.py +8 -7
- pygeodesy/latlonBase.py +189 -176
- pygeodesy/lazily.py +92 -56
- pygeodesy/lcc.py +2 -2
- pygeodesy/ltp.py +93 -55
- pygeodesy/ltpTuples.py +304 -240
- pygeodesy/mgrs.py +51 -24
- pygeodesy/named.py +159 -136
- pygeodesy/namedTuples.py +43 -14
- pygeodesy/nvectorBase.py +20 -23
- pygeodesy/osgr.py +40 -48
- pygeodesy/points.py +11 -11
- pygeodesy/props.py +29 -16
- pygeodesy/rhumb/aux_.py +13 -15
- pygeodesy/rhumb/bases.py +12 -5
- pygeodesy/rhumb/ekx.py +24 -18
- pygeodesy/rhumb/solve.py +20 -70
- pygeodesy/simplify.py +16 -16
- pygeodesy/solveBase.py +35 -32
- pygeodesy/sphericalBase.py +33 -31
- pygeodesy/sphericalTrigonometry.py +17 -17
- pygeodesy/streprs.py +6 -4
- pygeodesy/trf.py +11 -9
- pygeodesy/triaxials.py +71 -50
- pygeodesy/units.py +40 -65
- pygeodesy/unitsBase.py +2 -2
- pygeodesy/ups.py +66 -70
- pygeodesy/utily.py +7 -6
- pygeodesy/utm.py +152 -156
- pygeodesy/utmups.py +38 -38
- pygeodesy/utmupsBase.py +102 -106
- pygeodesy/vector3d.py +34 -36
- pygeodesy/vector3dBase.py +12 -9
- pygeodesy/webmercator.py +43 -51
- PyGeodesy-24.5.24.dist-info/RECORD +0 -116
- {PyGeodesy-24.5.24.dist-info → PyGeodesy-24.6.9.dist-info}/WHEEL +0 -0
- {PyGeodesy-24.5.24.dist-info → PyGeodesy-24.6.9.dist-info}/top_level.txt +0 -0
pygeodesy/ecef.py
CHANGED
|
@@ -58,7 +58,7 @@ plane} as opposed to I{geocentric} (ECEF) ones.
|
|
|
58
58
|
'''
|
|
59
59
|
|
|
60
60
|
from pygeodesy.basics import copysign0, isscalar, issubclassof, neg, map1, \
|
|
61
|
-
_xinstanceof, _xsubclassof
|
|
61
|
+
_xinstanceof, _xsubclassof # _args_kwds_names
|
|
62
62
|
from pygeodesy.constants import EPS, EPS0, EPS02, EPS1, EPS2, EPS_2, INT0, PI, PI_2, \
|
|
63
63
|
_0_0, _0_0001, _0_01, _0_5, _1_0, _1_0_1T, _N_1_0, \
|
|
64
64
|
_2_0, _N_2_0, _3_0, _4_0, _6_0, _60_0, _90_0, _N_90_0, \
|
|
@@ -73,7 +73,7 @@ from pygeodesy.interns import NN, _a_, _C_, _datum_, _ellipsoid_, _f_, _height_,
|
|
|
73
73
|
_lat_, _lon_, _M_, _name_, _singular_, _SPACE_, \
|
|
74
74
|
_x_, _xyz_, _y_, _z_
|
|
75
75
|
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
|
|
76
|
-
from pygeodesy.named import _name__, _NamedBase, _NamedTuple, _Pass, _xnamed
|
|
76
|
+
from pygeodesy.named import _name__, _name1__, _NamedBase, _NamedTuple, _Pass, _xnamed
|
|
77
77
|
from pygeodesy.namedTuples import LatLon2Tuple, LatLon3Tuple, \
|
|
78
78
|
PhiLam2Tuple, Vector3Tuple, Vector4Tuple
|
|
79
79
|
from pygeodesy.props import deprecated_method, Property_RO, property_RO, property_doc_
|
|
@@ -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.
|
|
89
|
+
__version__ = '24.06.09'
|
|
90
90
|
|
|
91
91
|
_Ecef_ = 'Ecef'
|
|
92
92
|
_prolate_ = 'prolate'
|
|
@@ -133,13 +133,13 @@ class _EcefBase(_NamedBase):
|
|
|
133
133
|
elif _isRadius(E) and isscalar(f):
|
|
134
134
|
E = a_f2Tuple(E, f)
|
|
135
135
|
else:
|
|
136
|
-
raise ValueError # _invalid_
|
|
136
|
+
raise ValueError() # _invalid_
|
|
137
137
|
|
|
138
138
|
if E not in (_EWGS84, _WGS84):
|
|
139
139
|
d = _ellipsoidal_datum(E, **name)
|
|
140
140
|
E = d.ellipsoid
|
|
141
141
|
if E.a < EPS or E.f > EPS1:
|
|
142
|
-
raise ValueError # _invalid_
|
|
142
|
+
raise ValueError() # _invalid_
|
|
143
143
|
self._datum = d
|
|
144
144
|
self._E = E
|
|
145
145
|
|
|
@@ -209,7 +209,7 @@ class _EcefBase(_NamedBase):
|
|
|
209
209
|
m = self._Matrix(sa, ca, sb, cb) if M else None
|
|
210
210
|
return Ecef9Tuple(x * cb, x * sb, z, lat, lon, h,
|
|
211
211
|
0, m, self.datum,
|
|
212
|
-
name=
|
|
212
|
+
name=self._name__(name))
|
|
213
213
|
|
|
214
214
|
def forward(self, latlonh, lon=None, height=0, M=False, **name):
|
|
215
215
|
'''Convert from geodetic C{(lat, lon, height)} to geocentric C{(x, y, z)}.
|
|
@@ -299,14 +299,14 @@ class _EcefBase(_NamedBase):
|
|
|
299
299
|
'''
|
|
300
300
|
return self._xnamed(EcefMatrix(sa, ca, sb, cb))
|
|
301
301
|
|
|
302
|
-
def _polon(self, y, x, R, **
|
|
302
|
+
def _polon(self, y, x, R, **lon00_name):
|
|
303
303
|
'''(INTERNAL) Handle I{"polar"} longitude.
|
|
304
304
|
'''
|
|
305
|
-
return atan2d(y, x) if R else _xkwds_get(
|
|
305
|
+
return atan2d(y, x) if R else _xkwds_get(lon00_name, lon00=self.lon00)
|
|
306
306
|
|
|
307
|
-
def reverse(self, xyz, y=None, z=None, M=False, **
|
|
307
|
+
def reverse(self, xyz, y=None, z=None, M=False, **lon00_name): # PYCHOK no cover
|
|
308
308
|
'''I{Must be overloaded}.'''
|
|
309
|
-
self._notOverloaded(xyz, y=y, z=z, M=M, **
|
|
309
|
+
self._notOverloaded(xyz, y=y, z=z, M=M, **lon00_name)
|
|
310
310
|
|
|
311
311
|
def toStr(self, prec=9, **unused): # PYCHOK signature
|
|
312
312
|
'''Return this C{Ecef*} as a string.
|
|
@@ -324,7 +324,7 @@ class EcefFarrell21(_EcefBase):
|
|
|
324
324
|
books?id=fW4foWASY6wC>}, page 29.
|
|
325
325
|
'''
|
|
326
326
|
|
|
327
|
-
def reverse(self, xyz, y=None, z=None, M=None, **
|
|
327
|
+
def reverse(self, xyz, y=None, z=None, M=None, **lon00_name): # PYCHOK unused M
|
|
328
328
|
'''Convert from geocentric C{(x, y, z)} to geodetic C{(lat, lon, height)} using
|
|
329
329
|
I{Farrell}'s U{Table 2.1<https://Books.Google.com/books?id=fW4foWASY6wC>},
|
|
330
330
|
page 29.
|
|
@@ -334,10 +334,9 @@ class EcefFarrell21(_EcefBase):
|
|
|
334
334
|
@kwarg y: ECEF C{y} coordinate for C{scalar} B{C{xyz}} and B{C{z}} (C{meter}).
|
|
335
335
|
@kwarg z: ECEF C{z} coordinate for C{scalar} B{C{xyz}} and B{C{y}} (C{meter}).
|
|
336
336
|
@kwarg M: I{Ignored}, rotation matrix C{M} not available.
|
|
337
|
-
@kwarg
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
C{B{x}=0} and C{B{y}=0}.
|
|
337
|
+
@kwarg lon00_name: Optional C{B{name}=NN} (C{str}) and optional keyword argument
|
|
338
|
+
C{B{lon00}=INT0} (C{degrees}), an arbitrary I{"polar"} longitude
|
|
339
|
+
returned if C{B{x}=0} and C{B{y}=0}, see property C{lon00}.
|
|
341
340
|
|
|
342
341
|
@return: An L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with
|
|
343
342
|
geodetic coordinates C{(lat, lon, height)} for the given geocentric
|
|
@@ -350,7 +349,7 @@ class EcefFarrell21(_EcefBase):
|
|
|
350
349
|
|
|
351
350
|
@see: L{EcefFarrell22} and L{EcefVeness}.
|
|
352
351
|
'''
|
|
353
|
-
x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **
|
|
352
|
+
x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **lon00_name)
|
|
354
353
|
|
|
355
354
|
E = self.ellipsoid
|
|
356
355
|
a = E.a
|
|
@@ -382,7 +381,7 @@ class EcefFarrell21(_EcefBase):
|
|
|
382
381
|
|
|
383
382
|
h = hypot(r, z) * (_1_0 - v)
|
|
384
383
|
lat = atan1d((e2_ * v + _1_0) * z, p)
|
|
385
|
-
lon = self._polon(y, x, p, **
|
|
384
|
+
lon = self._polon(y, x, p, **lon00_name)
|
|
386
385
|
# note, phi and lam are swapped on page 29
|
|
387
386
|
|
|
388
387
|
except (ValueError, ZeroDivisionError) as e:
|
|
@@ -390,7 +389,7 @@ class EcefFarrell21(_EcefBase):
|
|
|
390
389
|
|
|
391
390
|
return Ecef9Tuple(x, y, z, lat, lon, h,
|
|
392
391
|
1, None, self.datum,
|
|
393
|
-
name=
|
|
392
|
+
name=self._name__(name))
|
|
394
393
|
|
|
395
394
|
|
|
396
395
|
class EcefFarrell22(_EcefBase):
|
|
@@ -399,7 +398,7 @@ class EcefFarrell22(_EcefBase):
|
|
|
399
398
|
books?id=fW4foWASY6wC>}, page 30.
|
|
400
399
|
'''
|
|
401
400
|
|
|
402
|
-
def reverse(self, xyz, y=None, z=None, M=None, **
|
|
401
|
+
def reverse(self, xyz, y=None, z=None, M=None, **lon00_name): # PYCHOK unused M
|
|
403
402
|
'''Convert from geocentric C{(x, y, z)} to geodetic C{(lat, lon, height)} using
|
|
404
403
|
I{Farrell}'s U{Table 2.2<https://Books.Google.com/books?id=fW4foWASY6wC>},
|
|
405
404
|
page 30.
|
|
@@ -409,10 +408,9 @@ class EcefFarrell22(_EcefBase):
|
|
|
409
408
|
@kwarg y: ECEF C{y} coordinate for C{scalar} B{C{xyz}} and B{C{z}} (C{meter}).
|
|
410
409
|
@kwarg z: ECEF C{z} coordinate for C{scalar} B{C{xyz}} and B{C{y}} (C{meter}).
|
|
411
410
|
@kwarg M: I{Ignored}, rotation matrix C{M} not available.
|
|
412
|
-
@kwarg
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
C{B{x}=0} and C{B{y}=0}.
|
|
411
|
+
@kwarg lon00_name: Optional C{B{name}=NN} (C{str}) and optional keyword argument
|
|
412
|
+
C{B{lon00}=INT0} (C{degrees}), an arbitrary I{"polar"} longitude
|
|
413
|
+
returned if C{B{x}=0} and C{B{y}=0}, see property C{lon00}.
|
|
416
414
|
|
|
417
415
|
@return: An L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with
|
|
418
416
|
geodetic coordinates C{(lat, lon, height)} for the given geocentric
|
|
@@ -425,7 +423,7 @@ class EcefFarrell22(_EcefBase):
|
|
|
425
423
|
|
|
426
424
|
@see: L{EcefFarrell21} and L{EcefVeness}.
|
|
427
425
|
'''
|
|
428
|
-
x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **
|
|
426
|
+
x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **lon00_name)
|
|
429
427
|
|
|
430
428
|
E = self.ellipsoid
|
|
431
429
|
a = E.a
|
|
@@ -433,7 +431,7 @@ class EcefFarrell22(_EcefBase):
|
|
|
433
431
|
|
|
434
432
|
try: # see EcefVeness.reverse
|
|
435
433
|
p = hypot(x, y)
|
|
436
|
-
lon = self._polon(y, x, p, **
|
|
434
|
+
lon = self._polon(y, x, p, **lon00_name)
|
|
437
435
|
|
|
438
436
|
s, c = sincos2(atan2(z * a, p * b)) # == _norm3
|
|
439
437
|
lat = atan1d(z + s**3 * b * E.e22,
|
|
@@ -451,7 +449,7 @@ class EcefFarrell22(_EcefBase):
|
|
|
451
449
|
|
|
452
450
|
return Ecef9Tuple(x, y, z, lat, lon, h,
|
|
453
451
|
1, None, self.datum,
|
|
454
|
-
name=
|
|
452
|
+
name=self._name__(name))
|
|
455
453
|
|
|
456
454
|
|
|
457
455
|
class EcefKarney(_EcefBase):
|
|
@@ -473,7 +471,7 @@ class EcefKarney(_EcefBase):
|
|
|
473
471
|
'''
|
|
474
472
|
return self.equatoradius / EPS_2 # self.equatoradius * _2_EPS, 12M lighyears
|
|
475
473
|
|
|
476
|
-
def reverse(self, xyz, y=None, z=None, M=False, **
|
|
474
|
+
def reverse(self, xyz, y=None, z=None, M=False, **lon00_name):
|
|
477
475
|
'''Convert from geocentric C{(x, y, z)} to geodetic C{(lat, lon, height)}.
|
|
478
476
|
|
|
479
477
|
@arg xyz: A geocentric (C{Cartesian}, L{Ecef9Tuple}) or C{scalar} ECEF C{x}
|
|
@@ -481,10 +479,9 @@ class EcefKarney(_EcefBase):
|
|
|
481
479
|
@kwarg y: ECEF C{y} coordinate for C{scalar} B{C{xyz}} and B{C{z}} (C{meter}).
|
|
482
480
|
@kwarg z: ECEF C{z} coordinate for C{scalar} B{C{xyz}} and B{C{y}} (C{meter}).
|
|
483
481
|
@kwarg M: Optionally, return the rotation L{EcefMatrix} (C{bool}).
|
|
484
|
-
@kwarg
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
C{B{x}=0} and C{B{y}=0}.
|
|
482
|
+
@kwarg lon00_name: Optional C{B{name}=NN} (C{str}) and optional keyword argument
|
|
483
|
+
C{B{lon00}=INT0} (C{degrees}), an arbitrary I{"polar"} longitude
|
|
484
|
+
returned if C{B{x}=0} and C{B{y}=0}, see property C{lon00}.
|
|
488
485
|
|
|
489
486
|
@return: An L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with
|
|
490
487
|
geodetic coordinates C{(lat, lon, height)} for the given geocentric
|
|
@@ -508,7 +505,7 @@ class EcefKarney(_EcefBase):
|
|
|
508
505
|
h = hypot(y, x) # EPS0, EPS_2
|
|
509
506
|
return (y / h, x / h, h) if h > 0 else (_0_0, _1_0, h)
|
|
510
507
|
|
|
511
|
-
x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **
|
|
508
|
+
x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **lon00_name)
|
|
512
509
|
|
|
513
510
|
E = self.ellipsoid
|
|
514
511
|
f = E.f
|
|
@@ -603,11 +600,10 @@ class EcefKarney(_EcefBase):
|
|
|
603
600
|
C = 4
|
|
604
601
|
|
|
605
602
|
# lon00 <https://GitHub.com/mrJean1/PyGeodesy/issues/77>
|
|
606
|
-
lon = self._polon(sb, cb, R, **
|
|
603
|
+
lon = self._polon(sb, cb, R, **lon00_name)
|
|
607
604
|
m = self._Matrix(sa, ca, sb, cb) if M else None
|
|
608
605
|
return Ecef9Tuple(x, y, z, atan1d(sa, ca), lon, h,
|
|
609
|
-
C, m, self.datum,
|
|
610
|
-
name=name or self.name)
|
|
606
|
+
C, m, self.datum, name=self._name__(name))
|
|
611
607
|
|
|
612
608
|
|
|
613
609
|
class EcefSudano(_EcefBase):
|
|
@@ -616,7 +612,7 @@ class EcefSudano(_EcefBase):
|
|
|
616
612
|
'''
|
|
617
613
|
_tol = EPS2
|
|
618
614
|
|
|
619
|
-
def reverse(self, xyz, y=None, z=None, M=None, **
|
|
615
|
+
def reverse(self, xyz, y=None, z=None, M=None, **lon00_name): # PYCHOK unused M
|
|
620
616
|
'''Convert from geocentric C{(x, y, z)} to geodetic C{(lat, lon, height)} using
|
|
621
617
|
I{Sudano}'s U{iterative method<https://www.ResearchGate.net/publication/3709199>}.
|
|
622
618
|
|
|
@@ -625,10 +621,9 @@ class EcefSudano(_EcefBase):
|
|
|
625
621
|
@kwarg y: ECEF C{y} coordinate for C{scalar} B{C{xyz}} and B{C{z}} (C{meter}).
|
|
626
622
|
@kwarg z: ECEF C{z} coordinate for C{scalar} B{C{xyz}} and B{C{y}} (C{meter}).
|
|
627
623
|
@kwarg M: I{Ignored}, rotation matrix C{M} not available.
|
|
628
|
-
@kwarg
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
C{B{x}=0} and C{B{y}=0}.
|
|
624
|
+
@kwarg lon00_name: Optional C{B{name}=NN} (C{str}) and optional keyword argument
|
|
625
|
+
C{B{lon00}=INT0} (C{degrees}), an arbitrary I{"polar"} longitude
|
|
626
|
+
returned if C{B{x}=0} and C{B{y}=0}, see property C{lon00}.
|
|
632
627
|
|
|
633
628
|
@return: An L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with geodetic
|
|
634
629
|
coordinates C{(lat, lon, height)} for the given geocentric ones C{(x, y, z)},
|
|
@@ -637,7 +632,7 @@ class EcefSudano(_EcefBase):
|
|
|
637
632
|
@raise EcefError: Invalid B{C{xyz}} or C{scalar} C{x} or B{C{y}} and/or B{C{z}}
|
|
638
633
|
not C{scalar} for C{scalar} B{C{xyz}} or no convergence.
|
|
639
634
|
'''
|
|
640
|
-
x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **
|
|
635
|
+
x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **lon00_name)
|
|
641
636
|
|
|
642
637
|
E = self.ellipsoid
|
|
643
638
|
e = E.e2 * E.a
|
|
@@ -679,14 +674,14 @@ class EcefSudano(_EcefBase):
|
|
|
679
674
|
|
|
680
675
|
if lat is None:
|
|
681
676
|
lat = copysign0(atan1d(_a(sa), ca), z)
|
|
682
|
-
lon = self._polon(y, x, R, **
|
|
677
|
+
lon = self._polon(y, x, R, **lon00_name)
|
|
683
678
|
|
|
684
679
|
h = fsumf_(R * ca, _a(z * sa), -E.a * E.e2s(sa)) # use Veness'
|
|
685
680
|
# because Sudano's Eq (7) doesn't produce the correct height
|
|
686
681
|
# h = (fabs(z) + R - E.a * cos(a + E.e21) * sa / ca) / (ca + sa)
|
|
687
682
|
return Ecef9Tuple(x, y, z, lat, lon, h,
|
|
688
683
|
i, None, self.datum, # C=i, M=None
|
|
689
|
-
iteration=i, name=
|
|
684
|
+
iteration=i, name=self._name__(name))
|
|
690
685
|
|
|
691
686
|
@property_doc_(''' the convergence tolerance (C{float}).''')
|
|
692
687
|
def tolerance(self):
|
|
@@ -713,7 +708,7 @@ class EcefVeness(_EcefBase):
|
|
|
713
708
|
between 3D Cartesian and ellipsoidal latitude, longitude and height coordinates}.
|
|
714
709
|
'''
|
|
715
710
|
|
|
716
|
-
def reverse(self, xyz, y=None, z=None, M=None, **
|
|
711
|
+
def reverse(self, xyz, y=None, z=None, M=None, **lon00_name): # PYCHOK unused M
|
|
717
712
|
'''Conversion from geocentric C{(x, y, z)} to geodetic C{(lat, lon, height)}
|
|
718
713
|
transcoded from I{Chris Veness}' U{JavaScript<https://www.Movable-Type.co.UK/
|
|
719
714
|
scripts/geodesy/docs/latlon-ellipsoidal.js.html>}.
|
|
@@ -727,10 +722,9 @@ class EcefVeness(_EcefBase):
|
|
|
727
722
|
@kwarg y: ECEF C{y} coordinate for C{scalar} B{C{xyz}} and B{C{z}} (C{meter}).
|
|
728
723
|
@kwarg z: ECEF C{z} coordinate for C{scalar} B{C{xyz}} and B{C{y}} (C{meter}).
|
|
729
724
|
@kwarg M: I{Ignored}, rotation matrix C{M} not available.
|
|
730
|
-
@kwarg
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
C{B{x}=0} and C{B{y}=0}.
|
|
725
|
+
@kwarg lon00_name: Optional C{B{name}=NN} (C{str}) and optional keyword argument
|
|
726
|
+
C{B{lon00}=INT0} (C{degrees}), an arbitrary I{"polar"} longitude
|
|
727
|
+
returned if C{B{x}=0} and C{B{y}=0}, see property C{lon00}.
|
|
734
728
|
|
|
735
729
|
@return: An L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with
|
|
736
730
|
geodetic coordinates C{(lat, lon, height)} for the given geocentric
|
|
@@ -748,7 +742,7 @@ class EcefVeness(_EcefBase):
|
|
|
748
742
|
system to latitude longitude and altitude}<https://www.ResearchGate.net/
|
|
749
743
|
publication/3709199>}.
|
|
750
744
|
'''
|
|
751
|
-
x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **
|
|
745
|
+
x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **lon00_name)
|
|
752
746
|
|
|
753
747
|
E = self.ellipsoid
|
|
754
748
|
a = E.a
|
|
@@ -779,10 +773,10 @@ class EcefVeness(_EcefBase):
|
|
|
779
773
|
else: # polar lat, lon arbitrarily lon00
|
|
780
774
|
C, lat, h = 3, (_N_90_0 if z < 0 else _90_0), (fabs(z) - E.b)
|
|
781
775
|
|
|
782
|
-
lon = self._polon(y, x, p, **
|
|
776
|
+
lon = self._polon(y, x, p, **lon00_name)
|
|
783
777
|
return Ecef9Tuple(x, y, z, lat, lon, h,
|
|
784
778
|
C, None, self.datum, # M=None
|
|
785
|
-
name=
|
|
779
|
+
name=self._name__(name))
|
|
786
780
|
|
|
787
781
|
|
|
788
782
|
class EcefYou(_EcefBase):
|
|
@@ -796,8 +790,8 @@ class EcefYou(_EcefBase):
|
|
|
796
790
|
pages 1-18 and U{PyMap3D <https://PyPI.org/project/pymap3d>}.
|
|
797
791
|
'''
|
|
798
792
|
|
|
799
|
-
def __init__(self, a_ellipsoid=_EWGS84, f=None, **
|
|
800
|
-
_EcefBase.__init__(self, a_ellipsoid, f=f, **
|
|
793
|
+
def __init__(self, a_ellipsoid=_EWGS84, f=None, **lon00_name): # PYCHOK signature
|
|
794
|
+
_EcefBase.__init__(self, a_ellipsoid, f=f, **lon00_name) # inherited documentation
|
|
801
795
|
self._ee2 = EcefYou._ee2(self.ellipsoid)
|
|
802
796
|
|
|
803
797
|
@staticmethod
|
|
@@ -807,7 +801,7 @@ class EcefYou(_EcefBase):
|
|
|
807
801
|
raise EcefError(ellipsoid=E, txt=_prolate_)
|
|
808
802
|
return sqrt0(e2), e2
|
|
809
803
|
|
|
810
|
-
def reverse(self, xyz, y=None, z=None, M=None, **
|
|
804
|
+
def reverse(self, xyz, y=None, z=None, M=None, **lon00_name): # PYCHOK unused M
|
|
811
805
|
'''Convert geocentric C{(x, y, z)} to geodetic C{(lat, lon, height)}
|
|
812
806
|
using I{Rey-Jer You}'s transformation.
|
|
813
807
|
|
|
@@ -816,10 +810,9 @@ class EcefYou(_EcefBase):
|
|
|
816
810
|
@kwarg y: ECEF C{y} coordinate for C{scalar} B{C{xyz}} and B{C{z}} (C{meter}).
|
|
817
811
|
@kwarg z: ECEF C{z} coordinate for C{scalar} B{C{xyz}} and B{C{y}} (C{meter}).
|
|
818
812
|
@kwarg M: I{Ignored}, rotation matrix C{M} not available.
|
|
819
|
-
@kwarg
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
C{B{x}=0} and C{B{y}=0}.
|
|
813
|
+
@kwarg lon00_name: Optional C{B{name}=NN} (C{str}) and optional keyword argument
|
|
814
|
+
C{B{lon00}=INT0} (C{degrees}), an arbitrary I{"polar"} longitude
|
|
815
|
+
returned if C{B{x}=0} and C{B{y}=0}, see property C{lon00}.
|
|
823
816
|
|
|
824
817
|
@return: An L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with
|
|
825
818
|
geodetic coordinates C{(lat, lon, height)} for the given geocentric
|
|
@@ -830,7 +823,7 @@ class EcefYou(_EcefBase):
|
|
|
830
823
|
B{C{z}} not C{scalar} for C{scalar} B{C{xyz}} or the
|
|
831
824
|
ellipsoid is I{prolate}.
|
|
832
825
|
'''
|
|
833
|
-
x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **
|
|
826
|
+
x, y, z, name = _xyzn4(xyz, y, z, self._Geocentrics, **lon00_name)
|
|
834
827
|
|
|
835
828
|
E = self.ellipsoid
|
|
836
829
|
e, e2 = self._ee2
|
|
@@ -855,14 +848,14 @@ class EcefYou(_EcefBase):
|
|
|
855
848
|
sB, cB = _copysign_1_0(z), _0_0
|
|
856
849
|
|
|
857
850
|
lat = atan1d(E.a * sB, E.b * cB) # atan(E.a_b * tan(B))
|
|
858
|
-
lon = self._polon(y, x, q, **
|
|
851
|
+
lon = self._polon(y, x, q, **lon00_name)
|
|
859
852
|
|
|
860
853
|
h = hypot(z - E.b * sB, q - E.a * cB)
|
|
861
854
|
if hypot2_(x, y, z * E.a_b) < E.a2:
|
|
862
855
|
h = neg(h) # inside ellipsoid
|
|
863
856
|
return Ecef9Tuple(x, y, z, lat, lon, h,
|
|
864
857
|
1, None, self.datum, # C=1, M=None
|
|
865
|
-
name=
|
|
858
|
+
name=self._name__(name))
|
|
866
859
|
|
|
867
860
|
|
|
868
861
|
class EcefMatrix(_NamedTuple):
|
|
@@ -899,7 +892,7 @@ class EcefMatrix(_NamedTuple):
|
|
|
899
892
|
t += _more # ... from .multiply
|
|
900
893
|
|
|
901
894
|
elif max(map(fabs, t)) > _1_0:
|
|
902
|
-
raise EcefError(unstr(EcefMatrix
|
|
895
|
+
raise EcefError(unstr(EcefMatrix, *t))
|
|
903
896
|
|
|
904
897
|
else: # build matrix from the following quaternion operations
|
|
905
898
|
# qrot(lam, [0,0,1]) * qrot(phi, [0,-1,0]) * [1,1,1,1]/2
|
|
@@ -1160,22 +1153,24 @@ class Ecef9Tuple(_NamedTuple):
|
|
|
1160
1153
|
r = self.xyz
|
|
1161
1154
|
else:
|
|
1162
1155
|
_xsubclassof(self._CartesianBase, Cartesian=Cartesian)
|
|
1163
|
-
r = Cartesian(self, **
|
|
1156
|
+
r = Cartesian(self, **_name1__(Cartesian_kwds, _or_nameof=self))
|
|
1164
1157
|
return r
|
|
1165
1158
|
|
|
1166
|
-
def toDatum(self, datum2):
|
|
1159
|
+
def toDatum(self, datum2, **name):
|
|
1167
1160
|
'''Convert this C{Ecef9Tuple} to an other datum.
|
|
1168
1161
|
|
|
1169
1162
|
@arg datum2: Datum to convert I{to} (L{Datum}).
|
|
1163
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
1170
1164
|
|
|
1171
1165
|
@return: The converted 9-Tuple (C{Ecef9Tuple}).
|
|
1172
1166
|
|
|
1173
1167
|
@raise TypeError: The B{C{datum2}} is not a L{Datum}.
|
|
1174
1168
|
'''
|
|
1169
|
+
n = _name__(name, _or_nameof=self)
|
|
1175
1170
|
if self.datum in (None, datum2): # PYCHOK _Names_
|
|
1176
|
-
r = self.copy()
|
|
1171
|
+
r = self.copy(name=n)
|
|
1177
1172
|
else:
|
|
1178
|
-
c = self._CartesianBase(self, datum=self.datum, name=
|
|
1173
|
+
c = self._CartesianBase(self, datum=self.datum, name=n) # PYCHOK _Names_
|
|
1179
1174
|
# c.toLatLon converts datum, x, y, z, lat, lon, etc.
|
|
1180
1175
|
# and returns another Ecef9Tuple iff LatLon is None
|
|
1181
1176
|
r = c.toLatLon(datum=datum2, LatLon=None)
|
|
@@ -1197,8 +1192,9 @@ class Ecef9Tuple(_NamedTuple):
|
|
|
1197
1192
|
@raise TypeError: Invalid B{C{LatLon}} or B{C{LatLon_kwds}}.
|
|
1198
1193
|
'''
|
|
1199
1194
|
lat, lon, D = self.lat, self.lon, self.datum # PYCHOK Ecef9Tuple
|
|
1200
|
-
kwds =
|
|
1201
|
-
|
|
1195
|
+
kwds = _name1__(LatLon_kwds, _or_nameof=self)
|
|
1196
|
+
kwds = _xkwds(kwds, height=self.height, datum=D) # PYCHOK Ecef9Tuple
|
|
1197
|
+
d = kwds.get(_datum_, LatLon)
|
|
1202
1198
|
if LatLon is None:
|
|
1203
1199
|
r = LatLon3Tuple(lat, lon, kwds[_height_], name=kwds[_name_])
|
|
1204
1200
|
if d is not None:
|
|
@@ -1242,7 +1238,7 @@ class Ecef9Tuple(_NamedTuple):
|
|
|
1242
1238
|
@see: Propertes C{xyz} and C{xyzh}
|
|
1243
1239
|
'''
|
|
1244
1240
|
return self.xyz if Vector is None else Vector(
|
|
1245
|
-
*self.xyz, **
|
|
1241
|
+
*self.xyz, **_name1__(Vector_kwds, _or_nameof=self)) # PYCHOK Ecef9Tuple
|
|
1246
1242
|
|
|
1247
1243
|
# def _T_x_M(self, T):
|
|
1248
1244
|
# '''(INTERNAL) Update M{self.M = T.multiply(self.M)}.
|
|
@@ -1281,7 +1277,6 @@ def _llhn4(latlonh, lon, height, suffix=NN, Error=EcefError, **name): # in .ltp
|
|
|
1281
1277
|
n = _name__(name, _or_nameof=latlonh) # == latlonh._name__(name)
|
|
1282
1278
|
except AttributeError:
|
|
1283
1279
|
lat, h, n = latlonh, height, _name__(**name)
|
|
1284
|
-
|
|
1285
1280
|
try:
|
|
1286
1281
|
return Lat(lat), Lon(lon), Height(h), n
|
|
1287
1282
|
except (TypeError, ValueError) as x:
|
|
@@ -1313,11 +1308,11 @@ def _xyzn4(xyz, y, z, Types, Error=EcefError, lon00=0, # PYCHOK unused
|
|
|
1313
1308
|
raise _TypesError(_xyz_y_z_names[0], xyz, *Types)
|
|
1314
1309
|
except AttributeError:
|
|
1315
1310
|
t = map1(float, xyz, y, z) + (n,)
|
|
1316
|
-
return t
|
|
1317
1311
|
except (TypeError, ValueError) as x:
|
|
1318
1312
|
d = dict(zip(_xyz_y_z_names, (xyz, y, z)))
|
|
1319
1313
|
raise Error(cause=x, **d)
|
|
1320
|
-
|
|
1314
|
+
return t
|
|
1315
|
+
# assert _xyz_y_z == _args_kwds_names(_xyzn4)[:3]
|
|
1321
1316
|
|
|
1322
1317
|
|
|
1323
1318
|
_Ecefs = (EcefKarney, EcefSudano, EcefVeness, EcefYou,
|
pygeodesy/ellipsoidalBase.py
CHANGED
|
@@ -24,9 +24,8 @@ from pygeodesy.errors import _incompatible, _IsnotError, RangeError, _TypeError,
|
|
|
24
24
|
# from pygeodesy.fmath import favg # _MODS
|
|
25
25
|
from pygeodesy.interns import NN, _COMMA_, _ellipsoidal_
|
|
26
26
|
from pygeodesy.latlonBase import LatLonBase, _trilaterate5, fabs, _Wrap
|
|
27
|
-
|
|
27
|
+
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
|
|
28
28
|
# from pygeodesy.lcc import toLcc # _MODS
|
|
29
|
-
from pygeodesy.named import _name1__, _ALL_DOCS, _ALL_LAZY, _MODS
|
|
30
29
|
# from pygeodesy.namedTuples import Vector3Tuple # _MODS
|
|
31
30
|
from pygeodesy.props import deprecated_method, deprecated_property_RO, \
|
|
32
31
|
Property_RO, property_doc_, property_RO, _update_all
|
|
@@ -37,7 +36,7 @@ from pygeodesy.units import Epoch, _isDegrees, Radius_, _1mm as _TOL_M
|
|
|
37
36
|
# from math import fabs # from .latlonBase
|
|
38
37
|
|
|
39
38
|
__all__ = _ALL_LAZY.ellipsoidalBase
|
|
40
|
-
__version__ = '24.
|
|
39
|
+
__version__ = '24.06.06'
|
|
41
40
|
|
|
42
41
|
|
|
43
42
|
class CartesianEllipsoidalBase(CartesianBase):
|
|
@@ -291,13 +290,6 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
291
290
|
'''DEPRECATED, use method L{toRefFrame}.'''
|
|
292
291
|
return self.toRefFrame(reframe2)
|
|
293
292
|
|
|
294
|
-
@Property_RO
|
|
295
|
-
def _css(self):
|
|
296
|
-
'''(INTERNAL) Get this C{LatLon} point as a Cassini-Soldner location (L{Css}).
|
|
297
|
-
'''
|
|
298
|
-
css = _MODS.css
|
|
299
|
-
return css.toCss(self, height=self.height, Css=css.Css, name=self.name)
|
|
300
|
-
|
|
301
293
|
@property_doc_(''' this points's datum (L{Datum}).''')
|
|
302
294
|
def datum(self):
|
|
303
295
|
'''Get this point's datum (L{Datum}).
|
|
@@ -644,13 +636,6 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
644
636
|
'''
|
|
645
637
|
return self._iteration
|
|
646
638
|
|
|
647
|
-
@Property_RO
|
|
648
|
-
def _lcc(self):
|
|
649
|
-
'''(INTERNAL) Get this C{LatLon} point as a Lambert location (L{Lcc}).
|
|
650
|
-
'''
|
|
651
|
-
lcc = _MODS.lcc
|
|
652
|
-
return lcc.toLcc(self, height=self.height, Lcc=lcc.Lcc, name=self.name)
|
|
653
|
-
|
|
654
639
|
def midpointTo(self, other, height=None, fraction=_0_5, wrap=False):
|
|
655
640
|
'''Find the midpoint on a geodesic between this and an other point.
|
|
656
641
|
|
|
@@ -722,40 +707,24 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
722
707
|
height=height, wrap=wrap, tol=tol)
|
|
723
708
|
return t.closest
|
|
724
709
|
|
|
725
|
-
@Property_RO
|
|
726
|
-
def _osgr(self):
|
|
727
|
-
'''(INTERNAL) Get this C{LatLon} point as an OSGR coordinate (L{Osgr}),
|
|
728
|
-
based on the OS recommendation.
|
|
729
|
-
'''
|
|
730
|
-
return _MODS.osgr.toOsgr(self, kTM=False, name=self.name) # datum=self.datum
|
|
731
|
-
|
|
732
|
-
@Property_RO
|
|
733
|
-
def _osgrTM(self):
|
|
734
|
-
'''(INTERNAL) Get this C{LatLon} point as an OSGR coordinate (L{Osgr})
|
|
735
|
-
based on I{Karney}'s Krüger implementation.
|
|
736
|
-
'''
|
|
737
|
-
return _MODS.osgr.toOsgr(self, kTM=True, name=self.name) # datum=self.datum
|
|
738
|
-
|
|
739
710
|
def parse(self, strllh, height=0, datum=None, epoch=None, reframe=None,
|
|
740
711
|
sep=_COMMA_, wrap=False, **name):
|
|
741
712
|
'''Parse a string consisting of C{"lat, lon[, height]"},
|
|
742
713
|
representing a similar, ellipsoidal C{LatLon} point.
|
|
743
714
|
|
|
744
|
-
@arg strllh: Lat, lon and optional height (C{str}),
|
|
745
|
-
|
|
746
|
-
@kwarg height: Optional, default height (C{meter} or
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
this reframe I{without conversion}.
|
|
715
|
+
@arg strllh: Lat, lon and optional height (C{str}), see function
|
|
716
|
+
L{pygeodesy.parse3llh}.
|
|
717
|
+
@kwarg height: Optional, default height (C{meter} or C{None}).
|
|
718
|
+
@kwarg datum: Optional datum (L{Datum}), overriding this datum
|
|
719
|
+
I{without conversion}.
|
|
720
|
+
@kwarg epoch: Optional datum (L{Epoch}), overriding this epoch
|
|
721
|
+
I{without conversion}.
|
|
722
|
+
@kwarg reframe: Optional datum (L{RefFrame}), overriding this
|
|
723
|
+
reframe I{without conversion}.
|
|
754
724
|
@kwarg sep: Optional separator (C{str}).
|
|
755
|
-
@kwarg wrap: If C{True}, wrap or I{normalize} the lat-
|
|
756
|
-
|
|
757
|
-
@kwarg name: Optional C{B{name}=NN} (C{str}), overriding
|
|
758
|
-
this name.
|
|
725
|
+
@kwarg wrap: If C{True}, wrap or I{normalize} the lat- and
|
|
726
|
+
longitude (C{bool}).
|
|
727
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}), overriding this name.
|
|
759
728
|
|
|
760
729
|
@return: The similar point (ellipsoidal C{LatLon}).
|
|
761
730
|
|
|
@@ -834,8 +803,7 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
834
803
|
|
|
835
804
|
@see: Function L{pygeodesy.toCss}.
|
|
836
805
|
'''
|
|
837
|
-
return
|
|
838
|
-
self, **_name1__(toCss_kwds, _or_nameof=self))
|
|
806
|
+
return _MODS.css.toCss(self, **self._name1__(toCss_kwds))
|
|
839
807
|
|
|
840
808
|
def toDatum(self, datum2, height=None, **name):
|
|
841
809
|
'''Convert this point to an other datum.
|
|
@@ -871,8 +839,7 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
871
839
|
|
|
872
840
|
@see: Function L{pygeodesy.toEtm8}.
|
|
873
841
|
'''
|
|
874
|
-
return self.
|
|
875
|
-
self, **_name1__(toEtm8_kwds, _or_nameof=self))
|
|
842
|
+
return _MODS.etm.toEtm8(self, **self._name1__(toEtm8_kwds)) if toEtm8_kwds else self._etm
|
|
876
843
|
|
|
877
844
|
def toLcc(self, **toLcc_kwds):
|
|
878
845
|
'''Convert this C{LatLon} point to a Lambert location.
|
|
@@ -883,8 +850,7 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
883
850
|
|
|
884
851
|
@see: Function L{pygeodesy.toLcc}.
|
|
885
852
|
'''
|
|
886
|
-
return
|
|
887
|
-
self, **_name1__(toLcc_kwds, _or_nameof=self))
|
|
853
|
+
return _MODS.lcc.toLcc(self, **self._name1__(toLcc_kwds))
|
|
888
854
|
|
|
889
855
|
def toMgrs(self, center=False, pole=NN):
|
|
890
856
|
'''Convert this C{LatLon} point to an MGRS coordinate.
|
|
@@ -913,11 +879,7 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
913
879
|
|
|
914
880
|
@see: Function L{pygeodesy.toOsgr}.
|
|
915
881
|
'''
|
|
916
|
-
|
|
917
|
-
r = _MODS.osgr.toOsgr(self, kTM=kTM, **_xkwds(toOsgr_kwds, name=self.name))
|
|
918
|
-
else:
|
|
919
|
-
r = self._osgrTM if kTM else self._osgr
|
|
920
|
-
return r
|
|
882
|
+
return _MODS.osgr.toOsgr(self, kTM=kTM, **self._name1__(toOsgr_kwds))
|
|
921
883
|
|
|
922
884
|
def toRefFrame(self, reframe2, reframe=None, epoch=None, epoch2=None, height=None, **name):
|
|
923
885
|
'''Convert this point to an other reference frame and epoch.
|
|
@@ -24,7 +24,7 @@ from pygeodesy.points import _areaError, ispolar # PYCHOK exported
|
|
|
24
24
|
# from math import fabs # from .karney
|
|
25
25
|
|
|
26
26
|
__all__ = _ALL_LAZY.ellipsoidalGeodSolve
|
|
27
|
-
__version__ = '24.
|
|
27
|
+
__version__ = '24.05.25'
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
class Cartesian(CartesianEllipsoidalBase):
|
|
@@ -76,7 +76,7 @@ class LatLon(LatLonEllipsoidalBaseDI):
|
|
|
76
76
|
@kwarg Cartesian_datum_kwds: Optional L{Cartesian}, B{C{datum}}
|
|
77
77
|
and other keyword arguments, ignored if C{B{Cartesian} is None}.
|
|
78
78
|
Use C{B{Cartesian}=...} to override this L{Cartesian} class
|
|
79
|
-
or set C{B{Cartesian}
|
|
79
|
+
or set C{B{Cartesian}=None}.
|
|
80
80
|
|
|
81
81
|
@return: The cartesian (ECEF) coordinates (L{Cartesian}) or if
|
|
82
82
|
B{C{Cartesian}} is C{None}, an L{Ecef9Tuple}C{(x, y, z,
|
pygeodesy/ellipsoidalKarney.py
CHANGED
|
@@ -43,7 +43,7 @@ from pygeodesy.props import deprecated_method, Property_RO
|
|
|
43
43
|
# from math import fabs # from .karney
|
|
44
44
|
|
|
45
45
|
__all__ = _ALL_LAZY.ellipsoidalKarney
|
|
46
|
-
__version__ = '24.
|
|
46
|
+
__version__ = '24.05.25'
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
class Cartesian(CartesianEllipsoidalBase):
|
|
@@ -105,8 +105,8 @@ class LatLon(LatLonEllipsoidalBaseDI):
|
|
|
105
105
|
|
|
106
106
|
@kwarg Cartesian_datum_kwds: Optional L{Cartesian}, B{C{datum}}
|
|
107
107
|
and other keyword arguments, ignored if C{B{Cartesian} is None}.
|
|
108
|
-
Use C{B{Cartesian}=...} to override this L{Cartesian} class
|
|
109
|
-
|
|
108
|
+
Use C{B{Cartesian}=...} to override this L{Cartesian} class or
|
|
109
|
+
set C{B{Cartesian}=None}.
|
|
110
110
|
|
|
111
111
|
@return: The cartesian (ECEF) coordinates (L{Cartesian}) or if
|
|
112
112
|
B{C{Cartesian}} is C{None}, an L{Ecef9Tuple}C{(x, y, z,
|
pygeodesy/ellipsoidalNvector.py
CHANGED
|
@@ -25,7 +25,7 @@ from __future__ import division as _; del _ # PYCHOK semicolon
|
|
|
25
25
|
|
|
26
26
|
from pygeodesy.basics import issubclassof, map2, _xinstanceof
|
|
27
27
|
from pygeodesy.datums import _earth_ellipsoid, _ellipsoidal_datum, _WGS84
|
|
28
|
-
# from pygeodesy.dms import toDMS # _MODS
|
|
28
|
+
# from pygeodesy.dms import F_D, toDMS # _MODS
|
|
29
29
|
from pygeodesy.ellipsoidalBase import CartesianEllipsoidalBase, \
|
|
30
30
|
_nearestOn, LatLonEllipsoidalBase, \
|
|
31
31
|
_TOL_M, _Wrap
|
|
@@ -37,8 +37,8 @@ from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _ALL_OTHER
|
|
|
37
37
|
from pygeodesy.ltpTuples import Aer as _Aer, Ned as _Ned, Ned4Tuple, \
|
|
38
38
|
sincos2d_, _xnamed
|
|
39
39
|
# from pygeodesy.named import _xnamed # from .ltpTuples
|
|
40
|
-
from pygeodesy.nvectorBase import
|
|
41
|
-
|
|
40
|
+
from pygeodesy.nvectorBase import LatLonNvectorBase, NorthPole, NvectorBase, \
|
|
41
|
+
sumOf as _sumOf, fabs, fdot
|
|
42
42
|
from pygeodesy.props import deprecated_class, deprecated_function, \
|
|
43
43
|
deprecated_method, Property_RO, property_RO
|
|
44
44
|
from pygeodesy.streprs import Fmt, fstr, _xzipairs
|
|
@@ -48,7 +48,7 @@ from pygeodesy.units import Bearing, Distance, Height, Scalar
|
|
|
48
48
|
# from math import fabs # from .nvectorBase
|
|
49
49
|
|
|
50
50
|
__all__ = _ALL_LAZY.ellipsoidalNvector
|
|
51
|
-
__version__ = '24.
|
|
51
|
+
__version__ = '24.06.08'
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
class Ned(_Ned):
|
|
@@ -70,10 +70,10 @@ class Ned(_Ned):
|
|
|
70
70
|
with length or slantrange C{L}, bearing or azimuth C{B}
|
|
71
71
|
and elevation C{E}.
|
|
72
72
|
'''
|
|
73
|
-
|
|
73
|
+
m = _MODS.dms
|
|
74
74
|
t = (fstr(self.slantrange, prec=prec),
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
m.toDMS(self.azimuth, form=m.F_D, prec=prec, ddd=0),
|
|
76
|
+
m.toDMS(self.elevation, form=m.F_D, prec=prec, ddd=0))
|
|
77
77
|
return _xzipairs('LBE', t, sep=sep, fmt=fmt)
|
|
78
78
|
|
|
79
79
|
|