pygeodesy 24.7.7__py2.py3-none-any.whl → 24.7.24__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.7.7.dist-info → PyGeodesy-24.7.24.dist-info}/METADATA +25 -23
- {PyGeodesy-24.7.7.dist-info → PyGeodesy-24.7.24.dist-info}/RECORD +29 -29
- pygeodesy/__init__.py +47 -47
- pygeodesy/auxilats/auxAngle.py +5 -5
- pygeodesy/auxilats/auxDST.py +9 -10
- pygeodesy/auxilats/auxily.py +2 -2
- pygeodesy/cartesianBase.py +5 -6
- pygeodesy/ecef.py +7 -9
- pygeodesy/ellipsoids.py +12 -12
- pygeodesy/fsums.py +12 -6
- pygeodesy/geodesici.py +232 -131
- pygeodesy/geodesicw.py +70 -45
- pygeodesy/geodesicx/gx.py +8 -8
- pygeodesy/geodesicx/gxline.py +5 -5
- pygeodesy/geodsolve.py +12 -3
- pygeodesy/geoids.py +8 -10
- pygeodesy/karney.py +84 -78
- pygeodesy/ktm.py +2 -5
- pygeodesy/latlonBase.py +4 -5
- pygeodesy/lazily.py +5 -4
- pygeodesy/ltp.py +6 -6
- pygeodesy/named.py +3 -3
- pygeodesy/nvectorBase.py +4 -5
- pygeodesy/props.py +75 -17
- pygeodesy/rhumb/solve.py +2 -2
- pygeodesy/solveBase.py +26 -12
- pygeodesy/triaxials.py +4 -5
- {PyGeodesy-24.7.7.dist-info → PyGeodesy-24.7.24.dist-info}/WHEEL +0 -0
- {PyGeodesy-24.7.7.dist-info → PyGeodesy-24.7.24.dist-info}/top_level.txt +0 -0
pygeodesy/geodesicw.py
CHANGED
|
@@ -8,8 +8,8 @@ that package is installed.
|
|
|
8
8
|
The I{wrapped} class methods return a L{GDict} instance offering access to the C{dict} items
|
|
9
9
|
either by C{key} or by C{attribute} name.
|
|
10
10
|
|
|
11
|
-
With env variable C{PYGEODESY_GEOGRAPHICLIB} left undefined or set to C{"2"}, this module
|
|
12
|
-
L{pygeodesy.geodesicx} and L{pygeodesy.karney} will use U{GeographicLib 2.0
|
|
11
|
+
With env variable C{PYGEODESY_GEOGRAPHICLIB} left undefined or set to C{"2"}, this module and modules
|
|
12
|
+
L{pygeodesy.geodesici}, L{pygeodesy.geodesicx} and L{pygeodesy.karney} will use U{GeographicLib 2.0
|
|
13
13
|
<https://GeographicLib.SourceForge.io/C++/doc/>} transcoding, otherwise C{1.52} or older.
|
|
14
14
|
'''
|
|
15
15
|
|
|
@@ -18,17 +18,19 @@ from pygeodesy.constants import EPS, NAN, _EPSqrt as _TOL, _0_5
|
|
|
18
18
|
from pygeodesy.datums import _earth_datum, _WGS84, _EWGS84
|
|
19
19
|
# from pygeodesy.dms import F_D # from .latlonBase
|
|
20
20
|
# from pygeodesy.ellipsoids import _EWGS84 # from .datums
|
|
21
|
-
from pygeodesy.errors import
|
|
21
|
+
from pygeodesy.errors import _AssertionError, GeodesicError, \
|
|
22
|
+
IntersectionError
|
|
22
23
|
from pygeodesy.fsums import Fsum, Fmt, unstr
|
|
23
24
|
from pygeodesy.internals import _dunder_nameof, _under
|
|
24
25
|
from pygeodesy.interns import NN, _DOT_, _SPACE_, _to_, _too_
|
|
25
26
|
from pygeodesy.karney import _atan2d, Caps, Direct9Tuple, GDict, \
|
|
26
|
-
Inverse10Tuple, _kWrapped
|
|
27
|
+
Inverse10Tuple, _kWrapped
|
|
27
28
|
from pygeodesy.latlonBase import LatLonBase as _LLB, F_D, Radius_
|
|
28
29
|
from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS
|
|
29
30
|
from pygeodesy.named import callername, classname, _name1__, _name2__
|
|
30
31
|
from pygeodesy.namedTuples import Destination3Tuple, Distance3Tuple
|
|
31
|
-
from pygeodesy.props import Property, Property_RO, property_RO
|
|
32
|
+
from pygeodesy.props import Property, Property_RO, property_RO, \
|
|
33
|
+
property_ROver
|
|
32
34
|
# from pygeodesy.streprs import Fmt, unstr # from .fsums
|
|
33
35
|
# from pygeodesy.units import Radius_ # from .latlonBase
|
|
34
36
|
from pygeodesy.utily import _unrollon, _Wrap, wrap360, fabs # PYCHOK used!
|
|
@@ -37,7 +39,7 @@ from contextlib import contextmanager
|
|
|
37
39
|
# from math import fabs # from .utily
|
|
38
40
|
|
|
39
41
|
__all__ = _ALL_LAZY.geodesicw
|
|
40
|
-
__version__ = '24.07.
|
|
42
|
+
__version__ = '24.07.12'
|
|
41
43
|
|
|
42
44
|
_plumb_ = 'plumb'
|
|
43
45
|
_TRIPS = 65
|
|
@@ -48,14 +50,24 @@ class _gWrapped(_kWrapped):
|
|
|
48
50
|
<https://PyPI.org/project/geographiclib>} classes.
|
|
49
51
|
'''
|
|
50
52
|
|
|
51
|
-
@
|
|
53
|
+
@property_ROver # MCCABE 24
|
|
52
54
|
def Geodesic(self):
|
|
53
55
|
'''Get the I{wrapped} C{geodesic.Geodesic} class from I{Karney}'s Python
|
|
54
56
|
U{geographiclib<https://GitHub.com/geographiclib/geographiclib-python>},
|
|
55
57
|
provided the latter is installed.
|
|
56
58
|
'''
|
|
57
59
|
_Geodesic = self.geographiclib.Geodesic
|
|
58
|
-
|
|
60
|
+
if not (Caps.LATITUDE == _Geodesic.LATITUDE and
|
|
61
|
+
Caps.LONGITUDE == _Geodesic.LONGITUDE and
|
|
62
|
+
Caps.AZIMUTH == _Geodesic.AZIMUTH and
|
|
63
|
+
Caps.DISTANCE == _Geodesic.DISTANCE and
|
|
64
|
+
Caps.DISTANCE_IN == _Geodesic.DISTANCE_IN and
|
|
65
|
+
Caps.REDUCEDLENGTH == _Geodesic.REDUCEDLENGTH and
|
|
66
|
+
Caps.GEODESICSCALE == _Geodesic.GEODESICSCALE and
|
|
67
|
+
Caps.AREA == _Geodesic.AREA and
|
|
68
|
+
Caps.ALL == _Geodesic.ALL):
|
|
69
|
+
raise _AssertionError(Caps=bin(Caps.ALL),
|
|
70
|
+
Geodesic=bin(_Geodesic.ALL))
|
|
59
71
|
|
|
60
72
|
class Geodesic(_Geodesic):
|
|
61
73
|
'''I{Wrapper} for I{Karney}'s Python U{geodesic.Geodesic
|
|
@@ -220,9 +232,7 @@ class _gWrapped(_kWrapped):
|
|
|
220
232
|
'''
|
|
221
233
|
with _wargs(self, lat1, lon1, lat2, lon2, caps, **name) as args:
|
|
222
234
|
t = _Geodesic.InverseLine(self, *args)
|
|
223
|
-
|
|
224
|
-
p2 = gl.Position(gl.s13, outmask=Caps.AZIMUTH)
|
|
225
|
-
return _llz2line(gl, lat2=lat2, lon2=lon2, azi2=p2.azi2)
|
|
235
|
+
return self._Line13(t, **name)
|
|
226
236
|
|
|
227
237
|
def Line(self, lat1, lon1, azi1, caps=Caps._STD_LINE, **name):
|
|
228
238
|
'''Set up a I{wrapped} C{GeodesicLine} to compute several points
|
|
@@ -247,14 +257,16 @@ class _gWrapped(_kWrapped):
|
|
|
247
257
|
|
|
248
258
|
# Polygon = _Geodesic.Polygon
|
|
249
259
|
|
|
260
|
+
WGS84 = None # _EWGS84.geodesicw recusion
|
|
261
|
+
|
|
250
262
|
# Geodesic.ArcDirect.__doc__ = _Geodesic.ArcDirect.__doc__
|
|
251
263
|
# Geodesic.Direct.__doc__ = _Geodesic.Direct.__doc__
|
|
252
264
|
# Geodesic.Inverse.__doc__ = _Geodesic.Inverse.__doc__
|
|
253
265
|
# Geodesic.InverseLine.__doc__ = _Geodesic.InverseLinr.__doc__
|
|
254
266
|
# Geodesic.Line.__doc__ = _Geodesic.Line.__doc__
|
|
255
|
-
return Geodesic
|
|
267
|
+
return Geodesic # overwrite property_ROver
|
|
256
268
|
|
|
257
|
-
@
|
|
269
|
+
@property_ROver # MCCABE 16
|
|
258
270
|
def GeodesicLine(self):
|
|
259
271
|
'''Get the I{wrapped} C{geodesicline.GeodesicLine} class from I{Karney}'s
|
|
260
272
|
Python U{geographiclib<https://GitHub.com/geographiclib/geographiclib-python>},
|
|
@@ -418,48 +430,61 @@ class _gWrapped(_kWrapped):
|
|
|
418
430
|
|
|
419
431
|
# GeodesicLine.ArcPosition.__doc__ = _GeodesicLine.ArcPosition.__doc__
|
|
420
432
|
# GeodesicLine.Position.__doc__ = _GeodesicLine.Position.__doc__
|
|
421
|
-
return GeodesicLine
|
|
433
|
+
return GeodesicLine # overwrite property_ROver
|
|
422
434
|
|
|
423
|
-
@
|
|
435
|
+
@property_ROver
|
|
424
436
|
def Geodesic_WGS84(self):
|
|
425
437
|
'''Get the I{wrapped} C{Geodesic(WGS84)} singleton, provided the
|
|
426
438
|
U{geographiclib<https://PyPI.org/project/geographiclib>} package
|
|
427
439
|
is installed, otherwise an C{ImportError}.
|
|
428
440
|
'''
|
|
429
|
-
return _EWGS84.
|
|
441
|
+
return _EWGS84.geodesicw # overwrite property_ROver
|
|
430
442
|
|
|
431
443
|
_wrapped = _gWrapped() # PYCHOK singleton, .ellipsoids, .test/base.py
|
|
432
444
|
|
|
433
445
|
|
|
434
|
-
|
|
435
|
-
'''
|
|
436
|
-
|
|
437
|
-
provide the latter is installed, otherwise an C{ImportError}.
|
|
438
|
-
|
|
439
|
-
@arg a_ellipsoid: An ellipsoid (L{Ellipsoid}) or datum (L{Datum})
|
|
440
|
-
or the equatorial radius I{a} of the ellipsoid (C{meter}).
|
|
441
|
-
@arg f: The flattening of the ellipsoid (C{scalar}), required if
|
|
442
|
-
B{C{a_ellipsoid}}) is C{meter}, ignored otherwise.
|
|
443
|
-
@kwarg name: Optional C{B{name}=NN} (C{str}), ignored like B{C{f}}.
|
|
446
|
+
class Geodesic(_gWrapped): # overwritten by 1st instance
|
|
447
|
+
'''I{Wrapper} around I{Karney}'s class U{geographiclib.geodesic.Geodesic
|
|
448
|
+
<https://geographiclib.sourceforge.io/Python/doc/code.html>}.
|
|
444
449
|
'''
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
450
|
+
def __new__(unused, a_ellipsoid=_EWGS84, f=None, **name):
|
|
451
|
+
'''Return a I{wrapped} C{geodesic.Geodesic} instance from I{Karney}'s
|
|
452
|
+
Python U{geographiclib<https://PyPI.org/project/geographiclib>},
|
|
453
|
+
provide the latter is installed, otherwise an C{ImportError}.
|
|
454
|
+
|
|
455
|
+
@arg a_ellipsoid: An ellipsoid (L{Ellipsoid}) or datum (L{Datum})
|
|
456
|
+
or the equatorial radius I{a} of the ellipsoid (C{meter}).
|
|
457
|
+
@arg f: The flattening of the ellipsoid (C{scalar}), required if
|
|
458
|
+
B{C{a_ellipsoid}}) is C{meter}, ignored otherwise.
|
|
459
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
460
|
+
'''
|
|
461
|
+
g = _wrapped.Geodesic(a_ellipsoid, f=f, **name)
|
|
462
|
+
_MODS.geodesicw.Geodesic = g.__class__ # overwrite class
|
|
463
|
+
return g
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
class GeodesicLine(_gWrapped): # overwritten by 1st instance
|
|
467
|
+
'''I{Wrapper} around I{Karney}'s class U{geographiclib.geodesicline.GeodesicLine
|
|
468
|
+
<https://geographiclib.sourceforge.io/Python/doc/code.html>}.
|
|
461
469
|
'''
|
|
462
|
-
|
|
470
|
+
def __new__(unused, geodesic, lat1, lon1, azi1, caps=Caps._STD_LINE, **name):
|
|
471
|
+
'''Return a I{wrapped} C{geodesicline.GeodesicLine} instance from I{Karney}'s
|
|
472
|
+
Python U{geographiclib<https://PyPI.org/project/geographiclib>}, provided
|
|
473
|
+
the latter is installed, otherwise an C{ImportError}.
|
|
474
|
+
|
|
475
|
+
@arg geodesic: A I{wrapped} L{Geodesic} instance.
|
|
476
|
+
@arg lat1: Latitude of the first points (C{degrees}).
|
|
477
|
+
@arg lon1: Longitude of the first points (C{degrees}).
|
|
478
|
+
@arg azi1: Azimuth at the first points (compass C{degrees360}).
|
|
479
|
+
@kwarg caps: Optional, bit-or'ed combination of L{Caps} values specifying
|
|
480
|
+
the capabilities the C{GeodesicLine} instance should possess,
|
|
481
|
+
i.e., which quantities can be returned by methods
|
|
482
|
+
C{GeodesicLine.Position} and C{GeodesicLine.ArcPosition}.
|
|
483
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
484
|
+
'''
|
|
485
|
+
gl = _wrapped.GeodesicLine(geodesic, lat1, lon1, azi1, caps=caps, **name)
|
|
486
|
+
_MODS.geodesicw.GeodesicLine = gl.__class__ # overwrite class
|
|
487
|
+
return gl
|
|
463
488
|
|
|
464
489
|
|
|
465
490
|
def Geodesic_WGS84():
|
|
@@ -471,7 +496,7 @@ def Geodesic_WGS84():
|
|
|
471
496
|
|
|
472
497
|
|
|
473
498
|
class _wargs(object): # see also .formy._idllmn6, .latlonBase._toCartesian3, .vector2d._numpy
|
|
474
|
-
'''(INTERNAL) C{geographiclib}
|
|
499
|
+
'''(INTERNAL) C{geographiclib} arguments and exception handler.
|
|
475
500
|
'''
|
|
476
501
|
@contextmanager # <https://www.Python.org/dev/peps/pep-0343/> Examples
|
|
477
502
|
def __call__(self, inst, *args, **kwds):
|
|
@@ -555,7 +580,7 @@ def _Intersecant2(gl, lat0, lon0, radius, tol=_TOL, form=F_D): # MCCABE in LatL
|
|
|
555
580
|
|
|
556
581
|
def _PlumbTo(gl, lat0, lon0, est=None, tol=_TOL):
|
|
557
582
|
# (INTERNAL) Return the I{perpendicular} intersection of
|
|
558
|
-
# a geodesic from C{(lat0, lon0)}
|
|
583
|
+
# a geodesic line C{gl} and geodesic from C{(lat0, lon0)}.
|
|
559
584
|
pl = _MODS.rhumb.bases._PseudoRhumbLine(gl)
|
|
560
585
|
return pl.PlumbTo(lat0, lon0, exact=gl.geodesic,
|
|
561
586
|
est=est, tol=tol)
|
pygeodesy/geodesicx/gx.py
CHANGED
|
@@ -63,7 +63,7 @@ from pygeodesy.utily import atan2d as _atan2d_reverse, _unrollon, _Wrap, wrap360
|
|
|
63
63
|
from math import atan2, copysign, cos, degrees, fabs, radians, sqrt
|
|
64
64
|
|
|
65
65
|
__all__ = ()
|
|
66
|
-
__version__ = '24.07.
|
|
66
|
+
__version__ = '24.07.11'
|
|
67
67
|
|
|
68
68
|
_MAXIT1 = 20
|
|
69
69
|
_MAXIT2 = 10 + _MAXIT1 + MANT_DIG # MANT_DIG == C++ digits
|
|
@@ -497,7 +497,7 @@ class GeodesicExact(_GeodesicBase):
|
|
|
497
497
|
Cs = Caps
|
|
498
498
|
if self._debug: # PYCHOK no cover
|
|
499
499
|
outmask |= Cs._DEBUG_INVERSE & self._debug
|
|
500
|
-
outmask &= Cs._OUT_MASK # incl.
|
|
500
|
+
outmask &= Cs._OUT_MASK # incl. _SALP_CALPs_ and _DEBUG_
|
|
501
501
|
# compute longitude difference carefully (with _diff182):
|
|
502
502
|
# result is in [-180, +180] but -180 is only for west-going
|
|
503
503
|
# geodesics, +180 is for east-going and meridional geodesics
|
|
@@ -674,7 +674,7 @@ class GeodesicExact(_GeodesicBase):
|
|
|
674
674
|
S12 = -S12
|
|
675
675
|
r.set_(S12=unsigned0(S12))
|
|
676
676
|
|
|
677
|
-
if (outmask & (Cs.AZIMUTH | Cs.
|
|
677
|
+
if (outmask & (Cs.AZIMUTH | Cs._SALP_CALPs_)):
|
|
678
678
|
if swap_:
|
|
679
679
|
salp1, salp2 = salp2, salp1
|
|
680
680
|
calp1, calp2 = calp2, calp1
|
|
@@ -686,7 +686,7 @@ class GeodesicExact(_GeodesicBase):
|
|
|
686
686
|
if (outmask & Cs.AZIMUTH):
|
|
687
687
|
r.set_(azi1=_atan2d(salp1, calp1),
|
|
688
688
|
azi2=_atan2d_reverse(salp2, calp2, reverse=outmask & Cs.REVERSE2))
|
|
689
|
-
if (outmask & Cs.
|
|
689
|
+
if (outmask & Cs._SALP_CALPs_):
|
|
690
690
|
r.set_(salp1=salp1, calp1=calp1,
|
|
691
691
|
salp2=salp2, calp2=calp2)
|
|
692
692
|
|
|
@@ -716,7 +716,7 @@ class GeodesicExact(_GeodesicBase):
|
|
|
716
716
|
@return: L{Inverse10Tuple}C{(a12, s12, salp1, calp1, salp2, calp2,
|
|
717
717
|
m12, M12, M21, S12)}.
|
|
718
718
|
'''
|
|
719
|
-
r = self._GDictInverse(lat1, lon1, lat2, lon2, outmask | Caps.
|
|
719
|
+
r = self._GDictInverse(lat1, lon1, lat2, lon2, outmask | Caps._SALP_CALPs_)
|
|
720
720
|
return r.toInverse10Tuple()
|
|
721
721
|
|
|
722
722
|
def _Inverse(self, ll1, ll2, wrap, **outmask):
|
|
@@ -761,7 +761,7 @@ class GeodesicExact(_GeodesicBase):
|
|
|
761
761
|
# and .HeightIDWkarney._distances
|
|
762
762
|
if wrap:
|
|
763
763
|
_, lat2, lon2 = _Wrap.latlon3(lat1, lat2, lon2, True) # _Geodesic.LONG_UNROLL
|
|
764
|
-
return fabs(self._GDictInverse(lat1, lon1, lat2, lon2, Caps.
|
|
764
|
+
return fabs(self._GDictInverse(lat1, lon1, lat2, lon2, Caps.EMPTY).a12) # a12 always
|
|
765
765
|
|
|
766
766
|
def Inverse3(self, lat1, lon1, lat2, lon2): # PYCHOK outmask
|
|
767
767
|
'''Return the distance in C{meter} and the forward and
|
|
@@ -806,9 +806,9 @@ class GeodesicExact(_GeodesicBase):
|
|
|
806
806
|
Python U{Geodesic.InverseLine<https://GeographicLib.SourceForge.io/Python/doc/code.html>}.
|
|
807
807
|
'''
|
|
808
808
|
Cs = Caps
|
|
809
|
-
r = self._GDictInverse(lat1, lon1, lat2, lon2,
|
|
809
|
+
r = self._GDictInverse(lat1, lon1, lat2, lon2, caps | Cs._SALP_CALPs_)
|
|
810
810
|
return GeodesicLineExact(self, lat1, lon1, None, caps=caps, _s_calp1=(r.salp1, r.calp1),
|
|
811
|
-
|
|
811
|
+
**name)._GenSet(self._debug, **r)
|
|
812
812
|
|
|
813
813
|
def _InverseArea(self, _meridian, salp1, calp1, # PYCHOK 9 args
|
|
814
814
|
salp2, calp2,
|
pygeodesy/geodesicx/gxline.py
CHANGED
|
@@ -47,7 +47,7 @@ from pygeodesy.geodesicx.gxbases import _cosSeries, _GeodesicBase, \
|
|
|
47
47
|
# from pygeodesy.geodesicw import _Intersecant2 # _MODS
|
|
48
48
|
from pygeodesy.lazily import _ALL_DOCS, _ALL_MODS as _MODS
|
|
49
49
|
from pygeodesy.karney import _around, _atan2d, Caps, GDict, _fix90, \
|
|
50
|
-
_K_2_0,
|
|
50
|
+
_K_2_0, _llz2gl, _norm2, _norm180, \
|
|
51
51
|
_sincos2, _sincos2d
|
|
52
52
|
from pygeodesy.named import Property_RO, _update_all
|
|
53
53
|
# from pygeodesy.props import Property_RO, _update_all # from .named
|
|
@@ -56,7 +56,7 @@ from pygeodesy.utily import atan2d as _atan2d_reverse, sincos2
|
|
|
56
56
|
from math import atan2, cos, degrees, fabs, floor, radians, sin
|
|
57
57
|
|
|
58
58
|
__all__ = ()
|
|
59
|
-
__version__ = '24.07.
|
|
59
|
+
__version__ = '24.07.12'
|
|
60
60
|
|
|
61
61
|
_glXs = [] # instances of C{[_]GeodesicLineExact} to be updated
|
|
62
62
|
|
|
@@ -113,7 +113,7 @@ class _GeodesicLineExact(_GeodesicBase):
|
|
|
113
113
|
self._salp1 = salp1
|
|
114
114
|
self._calp1 = calp1
|
|
115
115
|
# allow lat, azimuth and unrolling of lon
|
|
116
|
-
self._caps = caps | Caps.
|
|
116
|
+
self._caps = caps | Caps._AZIMUTH_LATITUDE_LONG_UNROLL
|
|
117
117
|
|
|
118
118
|
sbet1, cbet1 = _sinf1cos2d(_around(lat1), gX.f1)
|
|
119
119
|
self._dn1 = gX._dn(sbet1, cbet1)
|
|
@@ -140,7 +140,7 @@ class _GeodesicLineExact(_GeodesicBase):
|
|
|
140
140
|
# _norm2(schi1?, cchi1) # no need to normalize!
|
|
141
141
|
if not (caps & Caps.LINE_OFF):
|
|
142
142
|
_glXs.append(self)
|
|
143
|
-
# no need to pre-compute other attrs
|
|
143
|
+
# no need to pre-compute other attrs for (caps & Caps.X). All are
|
|
144
144
|
# Property_RO's, computed once and cached/memoized until reset when
|
|
145
145
|
# arc, distance, C4order is changed or Elliptic function is reset.
|
|
146
146
|
|
|
@@ -473,7 +473,7 @@ class _GeodesicLineExact(_GeodesicBase):
|
|
|
473
473
|
self._a13 = a12
|
|
474
474
|
self._caps |= Cs.DISTANCE | Cs.DISTANCE_IN
|
|
475
475
|
# _update_all(self) # new, from GeodesicExact.*Line
|
|
476
|
-
return
|
|
476
|
+
return _llz2gl(self, **llz2)
|
|
477
477
|
|
|
478
478
|
@Property_RO
|
|
479
479
|
def geodesic(self):
|
pygeodesy/geodsolve.py
CHANGED
|
@@ -14,7 +14,7 @@ from pygeodesy.basics import _xinstanceof
|
|
|
14
14
|
# from pygeodesy.geodesicx import GeodesicAreaExact # _MODS
|
|
15
15
|
from pygeodesy.interns import NN, _UNDER_
|
|
16
16
|
from pygeodesy.karney import Caps, GeodesicError, GeodSolve12Tuple, \
|
|
17
|
-
|
|
17
|
+
_sincos2d, _0_0, NAN
|
|
18
18
|
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS, \
|
|
19
19
|
_getenv, _PYGEODESY_GEODSOLVE_
|
|
20
20
|
from pygeodesy.named import _name1__
|
|
@@ -24,7 +24,7 @@ from pygeodesy.solveBase import _SolveGDictBase, _SolveGDictLineBase
|
|
|
24
24
|
from pygeodesy.utily import _unrollon, _Wrap, wrap360
|
|
25
25
|
|
|
26
26
|
__all__ = _ALL_LAZY.geodsolve
|
|
27
|
-
__version__ = '24.07.
|
|
27
|
+
__version__ = '24.07.11'
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
class _GeodesicSolveBase(_SolveGDictBase):
|
|
@@ -182,6 +182,15 @@ class GeodesicSolve(_GeodesicSolveBase):
|
|
|
182
182
|
ll2 = _unrollon(ll1, _Wrap.point(ll2))
|
|
183
183
|
return self.InverseLine(ll1.lat, ll1.lon, ll2.lat, ll2.lon, **caps_name)
|
|
184
184
|
|
|
185
|
+
# def _InverseLine2(self, lat1, lon1, lat2, lon2, **caps_name): # in .geodesici
|
|
186
|
+
# '''(INTERNAL) Helper for L{InverseLine} and L{_InverseLine}.
|
|
187
|
+
# '''
|
|
188
|
+
# r = self.Inverse(lat1, lon1, lat2, lon2)
|
|
189
|
+
# gl = GeodesicLineSolve(self, lat1, lon1, r.azi1, **_name1__(caps_name, _or_nameof=self))
|
|
190
|
+
# gl._a13 = r.a12 # gl.SetArc(r.a12)
|
|
191
|
+
# gl._s13 = r.s12 # gl.SetDistance(r.s12)
|
|
192
|
+
# return gl, r
|
|
193
|
+
|
|
185
194
|
def InverseLine(self, lat1, lon1, lat2, lon2, **caps_name): # PYCHOK no cover
|
|
186
195
|
'''Set up a L{GeodesicLineSolve} to compute several points
|
|
187
196
|
on a single geodesic.
|
|
@@ -207,7 +216,7 @@ class GeodesicSolve(_GeodesicSolveBase):
|
|
|
207
216
|
gl = GeodesicLineSolve(self, lat1, lon1, r.azi1, **_name1__(caps_name, _or_nameof=self))
|
|
208
217
|
gl._a13 = r.a12 # gl.SetArc(r.a12)
|
|
209
218
|
gl._s13 = r.s12 # gl.SetDistance(r.s12)
|
|
210
|
-
return
|
|
219
|
+
return gl
|
|
211
220
|
|
|
212
221
|
|
|
213
222
|
class GeodesicLineSolve(_GeodesicSolveBase, _SolveGDictLineBase):
|
pygeodesy/geoids.py
CHANGED
|
@@ -93,15 +93,14 @@ from pygeodesy.fmath import favg, Fdot, fdot, Fhorner, frange
|
|
|
93
93
|
from pygeodesy.heights import _as_llis2, _ascalar, _height_called, HeightError, \
|
|
94
94
|
_HeightsBase, _ellipsoidal_datum, _Wrap
|
|
95
95
|
# from pygeodesy.internals import _version2 # _MODS
|
|
96
|
-
from pygeodesy.interns import MISSING, NN, _4_, _COLONSPACE_, _COMMASPACE_, \
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
_stdev_, _tbd_, _W_, _width_
|
|
96
|
+
from pygeodesy.interns import MISSING, NN, _4_, _COLONSPACE_, _COMMASPACE_, _cubic_, \
|
|
97
|
+
_E_, _height_, _in_, _kind_, _lat_, _linear_, _lon_, \
|
|
98
|
+
_mean_, _N_, _n_a_, _numpy_, _on_, _outside_, _S_, _s_, \
|
|
99
|
+
_scipy_, _SPACE_, _stdev_, _tbd_, _W_, _width_
|
|
101
100
|
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS, _FOR_DOCS
|
|
102
101
|
from pygeodesy.named import _name__, _Named, _NamedTuple
|
|
103
102
|
# from pygeodesy.namedTuples import LatLon3Tuple # _MODS
|
|
104
|
-
from pygeodesy.props import deprecated_method, Property_RO, property_RO
|
|
103
|
+
from pygeodesy.props import deprecated_method, Property_RO, property_RO, property_ROver
|
|
105
104
|
from pygeodesy.streprs import attrs, Fmt, fstr, pairs
|
|
106
105
|
from pygeodesy.units import Height, Int_, Lat, Lon
|
|
107
106
|
# from pygeodesy.utily import _Wrap # from .heights
|
|
@@ -118,7 +117,7 @@ except ImportError: # Python 3+
|
|
|
118
117
|
from io import BytesIO as _BytesIO # PYCHOK expected
|
|
119
118
|
|
|
120
119
|
__all__ = _ALL_LAZY.geoids
|
|
121
|
-
__version__ = '24.
|
|
120
|
+
__version__ = '24.07.12'
|
|
122
121
|
|
|
123
122
|
_assert_ = 'assert'
|
|
124
123
|
_bHASH_ = b'#'
|
|
@@ -473,12 +472,11 @@ class _GeoidBase(_HeightsBase):
|
|
|
473
472
|
'''(INTERNAL) I{Must be overloaded}.'''
|
|
474
473
|
self._notOverloaded(lat, lon)
|
|
475
474
|
|
|
476
|
-
@
|
|
475
|
+
@property_ROver
|
|
477
476
|
def _LL3T(self):
|
|
478
477
|
'''(INTERNAL) Get L{LatLon3Tuple}, I{once}.
|
|
479
478
|
'''
|
|
480
|
-
|
|
481
|
-
return T
|
|
479
|
+
return _MODS.namedTuples.LatLon3Tuple # overwrite property_ROver
|
|
482
480
|
|
|
483
481
|
def _llh3(self, lat, lon):
|
|
484
482
|
return self._LL3T(lat, lon, self._hGeoid(lat, lon), name=self.name)
|