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/rhumb/bases.py
CHANGED
|
@@ -52,7 +52,7 @@ from pygeodesy.vector3d import _intersect3d3, Vector3d # in .Intersection below
|
|
|
52
52
|
from math import cos, fabs
|
|
53
53
|
|
|
54
54
|
__all__ = ()
|
|
55
|
-
__version__ = '24.05.
|
|
55
|
+
__version__ = '24.05.29'
|
|
56
56
|
|
|
57
57
|
_anti_ = _Dash('anti')
|
|
58
58
|
_rls = [] # instances of C{RbumbLine...} to be updated
|
|
@@ -95,10 +95,17 @@ class RhumbBase(_CapsBase):
|
|
|
95
95
|
_f_max = _0_01
|
|
96
96
|
_mTM = 6 # see .TMorder
|
|
97
97
|
|
|
98
|
-
def __init__(self, a_earth, f, exact,
|
|
98
|
+
def __init__(self, a_earth, f, exact, TMorder_name):
|
|
99
99
|
'''New C{RhumbAux} or C{Rhumb}.
|
|
100
100
|
'''
|
|
101
|
-
|
|
101
|
+
if TMorder_name:
|
|
102
|
+
M = self._mTM
|
|
103
|
+
m, name = _xkwds_pop2(TMorder_name, TMorder=M)
|
|
104
|
+
if m != M:
|
|
105
|
+
self.TMorder = m
|
|
106
|
+
else:
|
|
107
|
+
name = {}
|
|
108
|
+
_earth_datum(self, a_earth, f=f, **name)
|
|
102
109
|
if not exact:
|
|
103
110
|
self.exact = False
|
|
104
111
|
if name:
|
|
@@ -425,13 +432,13 @@ class RhumbBase(_CapsBase):
|
|
|
425
432
|
|
|
426
433
|
@Property
|
|
427
434
|
def TMorder(self):
|
|
428
|
-
'''Get the
|
|
435
|
+
'''Get the L{KTransverseMercator} order (C{int}, 4, 5, 6, 7 or 8).
|
|
429
436
|
'''
|
|
430
437
|
return self._mTM
|
|
431
438
|
|
|
432
439
|
@TMorder.setter # PYCHOK setter!
|
|
433
440
|
def TMorder(self, order):
|
|
434
|
-
'''Set the
|
|
441
|
+
'''Set the L{KTransverseMercator} order (C{int}, 4, 5, 6, 7 or 8).
|
|
435
442
|
|
|
436
443
|
@note: Setting C{TMorder} turns property C{exact} off, but only
|
|
437
444
|
for L{Rhumb} instances.
|
pygeodesy/rhumb/ekx.py
CHANGED
|
@@ -25,24 +25,25 @@ from __future__ import division as _; del _ # PYCHOK semicolon
|
|
|
25
25
|
from pygeodesy.basics import copysign0, neg
|
|
26
26
|
from pygeodesy.constants import PI_2, _0_0s, _0_0, _0_5, _1_0, \
|
|
27
27
|
_2_0, _4_0, _720_0, _over, _1_over
|
|
28
|
-
from pygeodesy.datums import _WGS84
|
|
28
|
+
# from pygeodesy.datums import _WGS84 # from .rhumb.bases
|
|
29
29
|
# from pygeodesy.deprecated import RhumbOrder2Tuple # _MODS
|
|
30
|
-
from pygeodesy.errors import RhumbError, _Xorder
|
|
30
|
+
from pygeodesy.errors import RhumbError, _xkwds_pop2, _Xorder
|
|
31
31
|
from pygeodesy.fmath import hypot, hypot1
|
|
32
32
|
# from pygeodesy.fsums import fsum1f_ # _MODS
|
|
33
|
-
# from pygeodesy.
|
|
34
|
-
from pygeodesy.karney import Caps, NN
|
|
33
|
+
# from pygeodesy.karney import Caps # from .rhumb.bases
|
|
35
34
|
from pygeodesy.ktm import KTransverseMercator, _Xs, \
|
|
36
35
|
_AlpCoeffs, _BetCoeffs # PYCHOK used!
|
|
37
36
|
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
|
|
38
|
-
from pygeodesy.props import deprecated_method, Property, Property_RO,
|
|
39
|
-
|
|
37
|
+
from pygeodesy.props import deprecated_method, Property, Property_RO, \
|
|
38
|
+
property_RO
|
|
39
|
+
from pygeodesy.rhumb.bases import RhumbBase, RhumbLineBase, \
|
|
40
|
+
Caps, _update_all_rls, _WGS84
|
|
40
41
|
from pygeodesy.utily import atan1, sincos2_
|
|
41
42
|
|
|
42
43
|
from math import asinh, atan, cos, cosh, radians, sin, sinh, sqrt, tan
|
|
43
44
|
|
|
44
45
|
__all__ = _ALL_LAZY.rhumb_ekx
|
|
45
|
-
__version__ = '
|
|
46
|
+
__version__ = '24.05.30'
|
|
46
47
|
|
|
47
48
|
|
|
48
49
|
class Rhumb(RhumbBase):
|
|
@@ -54,7 +55,7 @@ class Rhumb(RhumbBase):
|
|
|
54
55
|
'''
|
|
55
56
|
_mRA = 6 # see .RAorder
|
|
56
57
|
|
|
57
|
-
def __init__(self, a_earth=_WGS84, f=None, exact=True,
|
|
58
|
+
def __init__(self, a_earth=_WGS84, f=None, exact=True, **RA_TMorder_name):
|
|
58
59
|
'''New C{Rhumb}.
|
|
59
60
|
|
|
60
61
|
@kwarg a_earth: This rhumb's earth model (L{Datum}, L{Ellipsoid},
|
|
@@ -67,15 +68,20 @@ class Rhumb(RhumbBase):
|
|
|
67
68
|
series expansion (C{bool} or C{None}), see also properties
|
|
68
69
|
C{exact} and C{TMorder}.
|
|
69
70
|
@kwarg name: Optional name (C{str}).
|
|
70
|
-
@kwarg
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
@kwarg RA_TMorder_name: Optional C{B{name}=NN} (C{str}) and optional keyword
|
|
72
|
+
arguments B{C{RAorder}=6} and B{C{TMorder}=6} to set the respective
|
|
73
|
+
C{order}, see properties C{RAorder} and C{TMorder}.
|
|
73
74
|
|
|
74
|
-
@raise RhumbError: Invalid B{C{a_earth}}, B{C{f}} or B{C{
|
|
75
|
+
@raise RhumbError: Invalid B{C{a_earth}}, B{C{f}}, B{C{RAorder}} or B{C{TMorder}}.
|
|
75
76
|
'''
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
if RA_TMorder_name:
|
|
78
|
+
M = self._mRA
|
|
79
|
+
m, kwds = _xkwds_pop2(RA_TMorder_name, RAorder=M)
|
|
80
|
+
if m != M:
|
|
81
|
+
self.RAorder = m
|
|
82
|
+
else:
|
|
83
|
+
kwds = {}
|
|
84
|
+
RhumbBase.__init__(self, a_earth, f, exact, kwds)
|
|
79
85
|
|
|
80
86
|
@Property_RO
|
|
81
87
|
def _A2(self): # Conformal2RectifyingCoeffs
|
|
@@ -184,7 +190,7 @@ class Rhumb(RhumbBase):
|
|
|
184
190
|
return self.ellipsoid._Lpr # degrees(._Lpd)
|
|
185
191
|
|
|
186
192
|
@deprecated_method
|
|
187
|
-
def orders(self, RAorder=
|
|
193
|
+
def orders(self, RAorder=6, TMorder=6): # PYCHOK no cover
|
|
188
194
|
'''DEPRECATED, use properties C{RAorder} and/or C{TMorder}.
|
|
189
195
|
|
|
190
196
|
Get and set the I{RAorder} and/or I{TMorder}.
|
|
@@ -198,9 +204,9 @@ class Rhumb(RhumbBase):
|
|
|
198
204
|
with the previous C{RAorder} and C{TMorder} setting.
|
|
199
205
|
'''
|
|
200
206
|
t = _MODS.deprecated.classes.RhumbOrder2Tuple(self.RAorder, self.TMorder)
|
|
201
|
-
if RAorder
|
|
207
|
+
if RAorder != t.RAorder: # PYCHOK attr
|
|
202
208
|
self.RAorder = RAorder
|
|
203
|
-
if TMorder
|
|
209
|
+
if TMorder != t.TMorder: # PYCHOK attr
|
|
204
210
|
self.TMorder = TMorder
|
|
205
211
|
return t
|
|
206
212
|
|
pygeodesy/rhumb/solve.py
CHANGED
|
@@ -21,7 +21,7 @@ from pygeodesy.solveBase import _SolveBase, _SolveLineBase
|
|
|
21
21
|
from pygeodesy.utily import _unrollon, _Wrap, wrap360
|
|
22
22
|
|
|
23
23
|
__all__ = _ALL_LAZY.rhumb_solve
|
|
24
|
-
__version__ = '24.04
|
|
24
|
+
__version__ = '24.06.04'
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
class _RhumbSolveBase(_SolveBase):
|
|
@@ -37,9 +37,9 @@ class _RhumbSolveBase(_SolveBase):
|
|
|
37
37
|
def _cmdBasic(self):
|
|
38
38
|
'''(INTERNAL) Get the basic C{RhumbSolve} cmd (C{tuple}).
|
|
39
39
|
'''
|
|
40
|
-
return (self.RhumbSolve,) + self._e_option
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
return (self.RhumbSolve,) + (self._e_option +
|
|
41
|
+
self._p_option +
|
|
42
|
+
self._s_option)
|
|
43
43
|
|
|
44
44
|
@Property
|
|
45
45
|
def RhumbSolve(self):
|
|
@@ -90,13 +90,13 @@ class RhumbSolve(_RhumbSolveBase):
|
|
|
90
90
|
@note: This C{rhumb} is intended I{for testing purposes only}, it invokes the C{RhumbSolve}
|
|
91
91
|
executable for I{every} method call.
|
|
92
92
|
'''
|
|
93
|
-
# def Area(self, polyline=False, name
|
|
93
|
+
# def Area(self, polyline=False, **name):
|
|
94
94
|
# '''Set up a L{RhumbArea} to compute area and
|
|
95
95
|
# perimeter of a polygon.
|
|
96
96
|
#
|
|
97
97
|
# @kwarg polyline: If C{True} perimeter only, otherwise
|
|
98
98
|
# area and perimeter (C{bool}).
|
|
99
|
-
# @kwarg name: Optional name (C{str}).
|
|
99
|
+
# @kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
100
100
|
#
|
|
101
101
|
# @return: A L{RhumbArea} instance.
|
|
102
102
|
#
|
|
@@ -104,7 +104,7 @@ class RhumbSolve(_RhumbSolveBase):
|
|
|
104
104
|
# to the returned L{RhumbAreaExact} instance.
|
|
105
105
|
# '''
|
|
106
106
|
# rA = _MODS.rhumbs.rhumb*.RhumbArea(self, polyline=polyline,
|
|
107
|
-
#
|
|
107
|
+
# name=self._name__(name))
|
|
108
108
|
# if self.verbose or self.debug: # PYCHOK no cover
|
|
109
109
|
# rA.verbose = True
|
|
110
110
|
# return rA
|
|
@@ -140,7 +140,7 @@ class RhumbSolve(_RhumbSolveBase):
|
|
|
140
140
|
'''
|
|
141
141
|
return self.DirectLine(ll1.lat, ll1.lon, azi12, **name_caps)
|
|
142
142
|
|
|
143
|
-
def DirectLine(self, lat1, lon1, azi1, caps=Caps.STANDARD, name
|
|
143
|
+
def DirectLine(self, lat1, lon1, azi1, caps=Caps.STANDARD, **name):
|
|
144
144
|
'''Set up a L{RhumbLineSolve} in terms of the I{direct} rhumb
|
|
145
145
|
problem to compute several points on a single rhumb line.
|
|
146
146
|
|
|
@@ -150,6 +150,7 @@ class RhumbSolve(_RhumbSolveBase):
|
|
|
150
150
|
@kwarg caps: Bit-or'ed combination of L{Caps} values specifying
|
|
151
151
|
the capabilities the L{RhumbLineSolve} instance
|
|
152
152
|
should possess, always C{Caps.ALL}.
|
|
153
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
153
154
|
|
|
154
155
|
@return: A L{RhumbLineSolve} instance.
|
|
155
156
|
|
|
@@ -161,7 +162,7 @@ class RhumbSolve(_RhumbSolveBase):
|
|
|
161
162
|
<https://GeographicLib.SourceForge.io/C++/doc/classGeographicLib_1_1RhumbExact.html>}
|
|
162
163
|
and Python U{Rhumb.Line<https://GeographicLib.SourceForge.io/Python/doc/code.html>}.
|
|
163
164
|
'''
|
|
164
|
-
return RhumbLineSolve(self, lat1, lon1, azi1, caps=caps, name=
|
|
165
|
+
return RhumbLineSolve(self, lat1, lon1, azi1, caps=caps, name=self._name__(name))
|
|
165
166
|
|
|
166
167
|
def _GDictDirect(self, lat, lon, azi1, arcmode, s12_a12, *unused, **floats): # PYCHOK signature
|
|
167
168
|
'''(INTERNAL) Get C{_GenDirect}-like result as an 8-item C{GDict}.
|
|
@@ -206,7 +207,7 @@ class RhumbSolve(_RhumbSolveBase):
|
|
|
206
207
|
ll2 = _unrollon(ll1, _Wrap.point(ll2))
|
|
207
208
|
return self.InverseLine(ll1.lat, ll1.lon, ll2.lat, ll2.lon, **name_caps)
|
|
208
209
|
|
|
209
|
-
def InverseLine(self, lat1, lon1, lat2, lon2, caps=Caps.STANDARD, name
|
|
210
|
+
def InverseLine(self, lat1, lon1, lat2, lon2, caps=Caps.STANDARD, **name):
|
|
210
211
|
'''Define a L{RhumbLineSolve} in terms of the I{inverse}
|
|
211
212
|
rhumb problem.
|
|
212
213
|
|
|
@@ -215,6 +216,7 @@ class RhumbSolve(_RhumbSolveBase):
|
|
|
215
216
|
@arg lat2: Latitude of the second point (C{degrees90}).
|
|
216
217
|
@arg lon2: Longitude of the second point (C{degrees180}).
|
|
217
218
|
@kwarg caps: Optional C{caps}, see L{RhumbLine} C{B{caps}}.
|
|
219
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
218
220
|
|
|
219
221
|
@return: A L{RhumbLineSolve} instance and invoke its method
|
|
220
222
|
L{RhumbLine.Position} to compute each point.
|
|
@@ -224,7 +226,7 @@ class RhumbSolve(_RhumbSolveBase):
|
|
|
224
226
|
'''
|
|
225
227
|
r = self.Inverse(lat1, lon1, lat2, lon2) # outmask=Caps.AZIMUTH
|
|
226
228
|
return RhumbLineSolve(self, lat1, lon1, r.azi12, caps=caps,
|
|
227
|
-
|
|
229
|
+
name=self._name__(name))
|
|
228
230
|
|
|
229
231
|
Line = DirectLine
|
|
230
232
|
|
|
@@ -239,7 +241,7 @@ class RhumbLineSolve(_RhumbSolveBase, _SolveLineBase):
|
|
|
239
241
|
@note: This C{rhumb line} is intended I{for testing purposes only}, it invokes the C{RhumbSolve}
|
|
240
242
|
executable for I{every} method call.
|
|
241
243
|
'''
|
|
242
|
-
def __init__(self, rhumb, lat1, lon1, azi12, caps=Caps.STANDARD, name
|
|
244
|
+
def __init__(self, rhumb, lat1, lon1, azi12, caps=Caps.STANDARD, **name):
|
|
243
245
|
'''New L{RhumbLineSolve} instance, allowing points to be found along
|
|
244
246
|
a rhumb starting at C{(B{lat1}, B{lon1})} with azimuth B{C{azi12}}.
|
|
245
247
|
|
|
@@ -252,6 +254,7 @@ class RhumbLineSolve(_RhumbSolveBase, _SolveLineBase):
|
|
|
252
254
|
possess, always C{Caps.ALL}. Use C{Caps.LINE_OFF}
|
|
253
255
|
if updates to the B{C{rhumb}} should I{not} be
|
|
254
256
|
reflected in this L{RhumbLineSolve} instance.
|
|
257
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
255
258
|
|
|
256
259
|
@kwarg name: Optional name (C{str}).
|
|
257
260
|
|
|
@@ -264,7 +267,7 @@ class RhumbLineSolve(_RhumbSolveBase, _SolveLineBase):
|
|
|
264
267
|
_xinstanceof(RhumbSolve, rhumb=rhumb)
|
|
265
268
|
if (caps & Caps.LINE_OFF): # copy to avoid updates
|
|
266
269
|
rhumb = rhumb.copy(deep=False, name=NN(_UNDER_, rhumb.name))
|
|
267
|
-
_SolveLineBase.__init__(self, rhumb, lat1, lon1, caps,
|
|
270
|
+
_SolveLineBase.__init__(self, rhumb, lat1, lon1, caps, azi12=azi12, **name)
|
|
268
271
|
try:
|
|
269
272
|
self.RhumbSolve = rhumb.RhumbSolve # rhumb or copy of rhumb
|
|
270
273
|
except RhumbError:
|
|
@@ -420,59 +423,6 @@ if __name__ == '__main__':
|
|
|
420
423
|
# p = rlS.ArcPosition(49.475527)
|
|
421
424
|
# printf('ArcPosition: %s %r', p == r, p)
|
|
422
425
|
|
|
423
|
-
# % python3 -m pygeodesy.rhumb.solve
|
|
424
|
-
|
|
425
|
-
# version: /opt/local/bin/RhumbSolve: GeographicLib version 1.51
|
|
426
|
-
#
|
|
427
|
-
# Direct: GDict(S12=44095641862956.148438, azi12=51, lat1=40.6, lat2=71.6889, lon1=-73.8, lon2=0.25552, s12=5500000.0)
|
|
428
|
-
# Direct3: Destination3Tuple(lat=71.6889, lon=0.25552, final=51.0)
|
|
429
|
-
#
|
|
430
|
-
# Inverse: GDict(S12=37395209100030.367188, a12=51.929543, azi12=77.76839, lat1=40.6, lat2=51.6, lon1=-73.8, lon2=-0.5, s12=5771083.383328)
|
|
431
|
-
# Inverse1: 51.92954250756195
|
|
432
|
-
# Inverse3: Distance3Tuple(distance=5771083.383328, initial=77.76839, final=77.76839)
|
|
433
|
-
#
|
|
434
|
-
# Inverse: GDict(S12=-63760642939072.492188, a12=115.02062, azi12=-92.388888, lat1=40.6, lat2=35.8, lon1=-73.8, lon2=140.3, s12=12782581.067684)
|
|
435
|
-
# Inverse1: 115.02061966879258
|
|
436
|
-
# Inverse3: Distance3Tuple(distance=12782581.067684, initial=267.611112, final=267.611112)
|
|
437
|
-
#
|
|
438
|
-
# Position: True GDict(S12=44095641862956.148438, azi12=51, lat1=40.6, lat2=71.6889, lon1=-73.8, lon2=0.25552, s12=5500000.0)
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
# % python3 -m pygeodesy.rhumb.solve --verbose
|
|
442
|
-
|
|
443
|
-
# RhumbSolve 'Test' 1: /opt/local/bin/RhumbSolve --version (invoke)
|
|
444
|
-
# RhumbSolve 'Test' 1: /opt/local/bin/RhumbSolve: GeographicLib version 1.51 (0)
|
|
445
|
-
# version: /opt/local/bin/RhumbSolve: GeographicLib version 1.51
|
|
446
|
-
# RhumbSolve 'Test' 2: /opt/local/bin/RhumbSolve -p 10 \ 40.600000000000001 -73.799999999999997 51.0 5500000.0 (Direct)
|
|
447
|
-
# RhumbSolve 'Test' 2: lat2=71.688899882813047, lon2=0.255519824423445, S12=44095641862956.148 (0)
|
|
448
|
-
|
|
449
|
-
# Direct: GDict(S12=44095641862956.148438, azi12=51, lat1=40.6, lat2=71.6889, lon1=-73.8, lon2=0.25552, s12=5500000.0)
|
|
450
|
-
# RhumbSolve 'Test' 3: /opt/local/bin/RhumbSolve -p 10 \ 40.600000000000001 -73.799999999999997 51.0 5500000.0 (Direct3)
|
|
451
|
-
# RhumbSolve 'Test' 3: lat2=71.688899882813047, lon2=0.255519824423445, S12=44095641862956.148 (0)
|
|
452
|
-
# Direct3: Destination3Tuple(lat=71.6889, lon=0.25552, final=51.0)
|
|
453
|
-
# RhumbSolve 'Test' 4: /opt/local/bin/RhumbSolve -p 10 -i \ 40.600000000000001 -73.799999999999997 51.600000000000001 -0.5 (Inverse)
|
|
454
|
-
# RhumbSolve 'Test' 4: azi12=77.768389710255661, s12=5771083.3833280317, S12=37395209100030.367 (0)
|
|
455
|
-
|
|
456
|
-
# Inverse: GDict(S12=37395209100030.367188, a12=51.929543, azi12=77.76839, lat1=40.6, lat2=51.6, lon1=-73.8, lon2=-0.5, s12=5771083.383328)
|
|
457
|
-
# RhumbSolve 'Test' 5: /opt/local/bin/RhumbSolve -p 10 -i \ 40.600000000000001 -73.799999999999997 51.600000000000001 -0.5 (Inverse1)
|
|
458
|
-
# RhumbSolve 'Test' 5: azi12=77.768389710255661, s12=5771083.3833280317, S12=37395209100030.367 (0)
|
|
459
|
-
# Inverse1: 51.92954250756195
|
|
460
|
-
# RhumbSolve 'Test' 6: /opt/local/bin/RhumbSolve -p 10 -i \ 40.600000000000001 -73.799999999999997 51.600000000000001 -0.5 (Inverse3)
|
|
461
|
-
# RhumbSolve 'Test' 6: azi12=77.768389710255661, s12=5771083.3833280317, S12=37395209100030.367 (0)
|
|
462
|
-
# Inverse3: Distance3Tuple(distance=5771083.383328, initial=77.76839, final=77.76839)
|
|
463
|
-
# RhumbSolve 'Test' 7: /opt/local/bin/RhumbSolve -p 10 -i \ 40.600000000000001 -73.799999999999997 35.799999999999997 140.300000000000011 (Inverse)
|
|
464
|
-
# RhumbSolve 'Test' 7: azi12=-92.388887981699639, s12=12782581.0676841792, S12=-63760642939072.492 (0)
|
|
465
|
-
|
|
466
|
-
# Inverse: GDict(S12=-63760642939072.492188, a12=115.02062, azi12=-92.388888, lat1=40.6, lat2=35.8, lon1=-73.8, lon2=140.3, s12=12782581.067684)
|
|
467
|
-
# RhumbSolve 'Test' 8: /opt/local/bin/RhumbSolve -p 10 -i \ 40.600000000000001 -73.799999999999997 35.799999999999997 140.300000000000011 (Inverse1)
|
|
468
|
-
# RhumbSolve 'Test' 8: azi12=-92.388887981699639, s12=12782581.0676841792, S12=-63760642939072.492 (0)
|
|
469
|
-
# Inverse1: 115.02061966879258
|
|
470
|
-
# RhumbSolve 'Test' 9: /opt/local/bin/RhumbSolve -p 10 -i \ 40.600000000000001 -73.799999999999997 35.799999999999997 140.300000000000011 (Inverse3)
|
|
471
|
-
# RhumbSolve 'Test' 9: azi12=-92.388887981699639, s12=12782581.0676841792, S12=-63760642939072.492 (0)
|
|
472
|
-
# Inverse3: Distance3Tuple(distance=12782581.067684, initial=267.611112, final=267.611112)
|
|
473
|
-
|
|
474
|
-
# Position: True GDict(S12=44095641862956.148438, azi12=51, lat1=40.6, lat2=71.6889, lon1=-73.8, lon2=0.25552, s12=5500000.0)
|
|
475
|
-
|
|
476
426
|
|
|
477
427
|
# % python3 -m pygeodesy.rhumb.solve
|
|
478
428
|
|
|
@@ -482,11 +432,11 @@ if __name__ == '__main__':
|
|
|
482
432
|
# Direct3: Destination3Tuple(lat=71.6889, lon=0.25552, final=51.0)
|
|
483
433
|
|
|
484
434
|
# Inverse: GDict(a12=51.929543, azi12=77.76839, lat1=40.6, lat2=51.6, lon1=-73.8, lon2=-0.5, s12=5771083.383328, S12=37395209100030.390625)
|
|
485
|
-
# Inverse1: 51.
|
|
435
|
+
# Inverse1: 51.929542507561905
|
|
486
436
|
# Inverse3: Distance3Tuple(distance=5771083.383328, initial=77.76839, final=77.76839)
|
|
487
437
|
|
|
488
438
|
# Inverse: GDict(a12=115.02062, azi12=-92.388888, lat1=40.6, lat2=35.8, lon1=-73.8, lon2=140.3, s12=12782581.067684, S12=-63760642939072.5)
|
|
489
|
-
# Inverse1: 115.
|
|
439
|
+
# Inverse1: 115.02061966879248
|
|
490
440
|
# Inverse3: Distance3Tuple(distance=12782581.067684, initial=267.611112, final=267.611112)
|
|
491
441
|
|
|
492
442
|
# Position: True GDict(azi12=51, lat1=40.6, lat2=71.6889, lon1=-73.8, lon2=0.25552, s12=5500000.0, S12=44095641862956.109375)
|
|
@@ -510,7 +460,7 @@ if __name__ == '__main__':
|
|
|
510
460
|
# Inverse: GDict(a12=51.929543, azi12=77.76839, lat1=40.6, lat2=51.6, lon1=-73.8, lon2=-0.5, s12=5771083.383328, S12=37395209100030.390625)
|
|
511
461
|
# RhumbSolve 'Test' 5: /opt/local/bin/RhumbSolve -p 10 -i \ 40.600000000000001 -73.799999999999997 51.600000000000001 -0.5 (Inverse1)
|
|
512
462
|
# RhumbSolve 'Test' 5: azi12=77.768389710255661, s12=5771083.383328028, S12=37395209100030.391 (0)
|
|
513
|
-
# Inverse1: 51.
|
|
463
|
+
# Inverse1: 51.929542507561905
|
|
514
464
|
# RhumbSolve 'Test' 6: /opt/local/bin/RhumbSolve -p 10 -i \ 40.600000000000001 -73.799999999999997 51.600000000000001 -0.5 (Inverse3)
|
|
515
465
|
# RhumbSolve 'Test' 6: azi12=77.768389710255661, s12=5771083.383328028, S12=37395209100030.391 (0)
|
|
516
466
|
# Inverse3: Distance3Tuple(distance=5771083.383328, initial=77.76839, final=77.76839)
|
|
@@ -520,7 +470,7 @@ if __name__ == '__main__':
|
|
|
520
470
|
# Inverse: GDict(a12=115.02062, azi12=-92.388888, lat1=40.6, lat2=35.8, lon1=-73.8, lon2=140.3, s12=12782581.067684, S12=-63760642939072.5)
|
|
521
471
|
# RhumbSolve 'Test' 8: /opt/local/bin/RhumbSolve -p 10 -i \ 40.600000000000001 -73.799999999999997 35.799999999999997 140.300000000000011 (Inverse1)
|
|
522
472
|
# RhumbSolve 'Test' 8: azi12=-92.388887981699654, s12=12782581.0676841699, S12=-63760642939072.5 (0)
|
|
523
|
-
# Inverse1: 115.
|
|
473
|
+
# Inverse1: 115.02061966879248
|
|
524
474
|
# RhumbSolve 'Test' 9: /opt/local/bin/RhumbSolve -p 10 -i \ 40.600000000000001 -73.799999999999997 35.799999999999997 140.300000000000011 (Inverse3)
|
|
525
475
|
# RhumbSolve 'Test' 9: azi12=-92.388887981699654, s12=12782581.0676841699, S12=-63760642939072.5 (0)
|
|
526
476
|
# Inverse3: Distance3Tuple(distance=12782581.067684, initial=267.611112, final=267.611112)
|
pygeodesy/simplify.py
CHANGED
|
@@ -43,7 +43,7 @@ list of simplified point I{indices} instead of the simplified points.
|
|
|
43
43
|
The first and last index are always the first and last original index.
|
|
44
44
|
|
|
45
45
|
Finally, any additional keyword arguments B{C{options}} to all functions
|
|
46
|
-
are passed thru to function L{pygeodesy.
|
|
46
|
+
are passed thru to function L{pygeodesy.equirectangular4} to specify the
|
|
47
47
|
distance approximation.
|
|
48
48
|
|
|
49
49
|
To process C{NumPy} arrays containing rows of lat-, longitude and
|
|
@@ -77,7 +77,7 @@ from __future__ import division as _; del _ # PYCHOK semicolon
|
|
|
77
77
|
from pygeodesy.constants import EPS, R_M, _1_0
|
|
78
78
|
from pygeodesy.errors import _AttributeError, _ValueError
|
|
79
79
|
from pygeodesy.fmath import len2, sqrt0
|
|
80
|
-
from pygeodesy.formy import
|
|
80
|
+
from pygeodesy.formy import equirectangular4
|
|
81
81
|
from pygeodesy.interns import _small_, _too_
|
|
82
82
|
from pygeodesy.iters import isNumpy2, isTuple2
|
|
83
83
|
# from pygeodesy.lazily import _ALL_LAZY # from .units
|
|
@@ -86,7 +86,7 @@ from pygeodesy.units import _ALL_LAZY, _1mm, Radius_
|
|
|
86
86
|
from math import degrees, fabs, radians
|
|
87
87
|
|
|
88
88
|
__all__ = _ALL_LAZY.simplify
|
|
89
|
-
__version__ = '
|
|
89
|
+
__version__ = '24.05.25'
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
# try:
|
|
@@ -240,7 +240,7 @@ class _Sy(object):
|
|
|
240
240
|
and the (longitudinal) unrollment.
|
|
241
241
|
'''
|
|
242
242
|
p1, p2= self.pts[i], self.pts[j]
|
|
243
|
-
return
|
|
243
|
+
return equirectangular4(p1.lat, p1.lon,
|
|
244
244
|
p2.lat, p2.lon, **self.options)
|
|
245
245
|
|
|
246
246
|
def h2t(self, i1, i0, i2):
|
|
@@ -386,12 +386,12 @@ def simplify1(points, distance=_1mm, radius=R_M, indices=False, **options):
|
|
|
386
386
|
@kwarg indices: If C{True} return the simplified point indices
|
|
387
387
|
instead of the simplified points (C{bool}).
|
|
388
388
|
@kwarg options: Optional keyword arguments passed thru to
|
|
389
|
-
function L{pygeodesy.
|
|
389
|
+
function L{pygeodesy.equirectangular4}.
|
|
390
390
|
|
|
391
391
|
@return: Simplified points (C{LatLon}[]).
|
|
392
392
|
|
|
393
393
|
@raise LimitError: Lat- and/or longitudinal delta exceeds the B{C{limit}},
|
|
394
|
-
see function L{pygeodesy.
|
|
394
|
+
see function L{pygeodesy.equirectangular4}.
|
|
395
395
|
|
|
396
396
|
@raise ValueError: Tolerance B{C{distance}} or B{C{radius}} too small.
|
|
397
397
|
'''
|
|
@@ -431,12 +431,12 @@ def simplifyRDP(points, distance=_1mm, radius=R_M, shortest=False,
|
|
|
431
431
|
@kwarg indices: If C{True} return the simplified point indices
|
|
432
432
|
instead of the simplified points (C{bool}).
|
|
433
433
|
@kwarg options: Optional keyword arguments passed thru to
|
|
434
|
-
function L{pygeodesy.
|
|
434
|
+
function L{pygeodesy.equirectangular4}.
|
|
435
435
|
|
|
436
436
|
@return: Simplified points (C{LatLon}[]).
|
|
437
437
|
|
|
438
438
|
@raise LimitError: Lat- and/or longitudinal delta exceeds the B{C{limit}},
|
|
439
|
-
see function L{pygeodesy.
|
|
439
|
+
see function L{pygeodesy.equirectangular4}.
|
|
440
440
|
|
|
441
441
|
@raise ValueError: Tolerance B{C{distance}} or B{C{radius}} too small.
|
|
442
442
|
'''
|
|
@@ -465,12 +465,12 @@ def simplifyRDPm(points, distance=_1mm, radius=R_M, shortest=False,
|
|
|
465
465
|
@kwarg indices: If C{True} return the simplified point indices
|
|
466
466
|
instead of the simplified points (C{bool}).
|
|
467
467
|
@kwarg options: Optional keyword arguments passed thru to
|
|
468
|
-
function L{pygeodesy.
|
|
468
|
+
function L{pygeodesy.equirectangular4}.
|
|
469
469
|
|
|
470
470
|
@return: Simplified points (C{LatLon}[]).
|
|
471
471
|
|
|
472
472
|
@raise LimitError: Lat- and/or longitudinal delta exceeds the B{C{limit}},
|
|
473
|
-
see function L{pygeodesy.
|
|
473
|
+
see function L{pygeodesy.equirectangular4}.
|
|
474
474
|
|
|
475
475
|
@raise ValueError: Tolerance B{C{distance}} or B{C{radius}} too small.
|
|
476
476
|
'''
|
|
@@ -496,12 +496,12 @@ def simplifyRW(points, pipe=_1mm, radius=R_M, shortest=False,
|
|
|
496
496
|
@kwarg indices: If C{True} return the simplified point indices
|
|
497
497
|
instead of the simplified points (C{bool}).
|
|
498
498
|
@kwarg options: Optional keyword arguments passed thru to
|
|
499
|
-
function L{pygeodesy.
|
|
499
|
+
function L{pygeodesy.equirectangular4}.
|
|
500
500
|
|
|
501
501
|
@return: Simplified points (C{LatLon}[]).
|
|
502
502
|
|
|
503
503
|
@raise LimitError: Lat- and/or longitudinal delta exceeds the B{C{limit}},
|
|
504
|
-
see function L{pygeodesy.
|
|
504
|
+
see function L{pygeodesy.equirectangular4}.
|
|
505
505
|
|
|
506
506
|
@raise ValueError: Tolerance B{C{pipe}} or B{C{radius}} too small.
|
|
507
507
|
'''
|
|
@@ -547,7 +547,7 @@ def simplifyVW(points, area=_1mm, radius=R_M, attr=None,
|
|
|
547
547
|
@kwarg indices: If C{True} return the simplified point indices
|
|
548
548
|
instead of the simplified points (C{bool}).
|
|
549
549
|
@kwarg options: Optional keyword arguments passed thru to
|
|
550
|
-
function L{pygeodesy.
|
|
550
|
+
function L{pygeodesy.equirectangular4}.
|
|
551
551
|
|
|
552
552
|
@return: Simplified points (C{LatLon}[]).
|
|
553
553
|
|
|
@@ -555,7 +555,7 @@ def simplifyVW(points, area=_1mm, radius=R_M, attr=None,
|
|
|
555
555
|
B{C{points}}.
|
|
556
556
|
|
|
557
557
|
@raise LimitError: Lat- and/or longitudinal delta exceeds the B{C{limit}},
|
|
558
|
-
see function L{pygeodesy.
|
|
558
|
+
see function L{pygeodesy.equirectangular4}.
|
|
559
559
|
|
|
560
560
|
@raise ValueError: Tolerance B{C{area}} or B{C{radius}} too small.
|
|
561
561
|
'''
|
|
@@ -603,7 +603,7 @@ def simplifyVWm(points, area=_1mm, radius=R_M, attr=None,
|
|
|
603
603
|
@kwarg indices: If C{True} return the simplified point indices
|
|
604
604
|
instead of the simplified points (C{bool}).
|
|
605
605
|
@kwarg options: Optional keyword arguments passed thru to
|
|
606
|
-
function L{pygeodesy.
|
|
606
|
+
function L{pygeodesy.equirectangular4}.
|
|
607
607
|
|
|
608
608
|
@return: Simplified points (C{LatLon}[]).
|
|
609
609
|
|
|
@@ -611,7 +611,7 @@ def simplifyVWm(points, area=_1mm, radius=R_M, attr=None,
|
|
|
611
611
|
B{C{points}}.
|
|
612
612
|
|
|
613
613
|
@raise LimitError: Lat- and/or longitudinal delta exceeds the B{C{limit}},
|
|
614
|
-
see function L{pygeodesy.
|
|
614
|
+
see function L{pygeodesy.equirectangular4}.
|
|
615
615
|
|
|
616
616
|
@raise ValueError: Tolerance B{C{area}} or B{C{radius}} too small.
|
|
617
617
|
'''
|
pygeodesy/solveBase.py
CHANGED
|
@@ -8,13 +8,13 @@ from pygeodesy.basics import map2, ub2str, _zip
|
|
|
8
8
|
from pygeodesy.constants import DIG
|
|
9
9
|
from pygeodesy.datums import _earth_datum, _WGS84, _EWGS84
|
|
10
10
|
# from pygeodesy.ellipsoids import _EWGS84 # from .datums
|
|
11
|
-
from pygeodesy.errors import _AssertionError,
|
|
11
|
+
from pygeodesy.errors import _AssertionError, _xkwds_get1, _xkwds_item2
|
|
12
12
|
from pygeodesy.internals import _enquote, printf
|
|
13
13
|
from pygeodesy.interns import NN, _0_, _BACKSLASH_, _COMMASPACE_, \
|
|
14
14
|
_EQUAL_, _Error_, _SPACE_, _UNUSED_
|
|
15
15
|
from pygeodesy.karney import Caps, _CapsBase, GDict
|
|
16
|
-
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY,
|
|
17
|
-
from pygeodesy.named import callername, notOverloaded
|
|
16
|
+
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _sys_version_info2
|
|
17
|
+
from pygeodesy.named import callername, _name2__, notOverloaded
|
|
18
18
|
from pygeodesy.props import Property, Property_RO, property_RO, _update_all
|
|
19
19
|
from pygeodesy.streprs import Fmt, fstr, fstrzs, pairs, strs
|
|
20
20
|
from pygeodesy.units import Precision_
|
|
@@ -23,34 +23,37 @@ from pygeodesy.utily import unroll180, wrap360 # PYCHOK shared
|
|
|
23
23
|
from subprocess import PIPE as _PIPE, Popen as _Popen, STDOUT as _STDOUT
|
|
24
24
|
|
|
25
25
|
__all__ = _ALL_LAZY.solveBase
|
|
26
|
-
__version__ = '24.05
|
|
26
|
+
__version__ = '24.06.05'
|
|
27
27
|
|
|
28
|
-
_ERROR_
|
|
29
|
-
|
|
28
|
+
_ERROR_ = 'ERROR'
|
|
29
|
+
_Popen_kwds = dict(creationflags=0,
|
|
30
|
+
# executable=sys.executable, shell=True,
|
|
31
|
+
stdin=_PIPE, stdout=_PIPE, stderr=_STDOUT)
|
|
32
|
+
if _sys_version_info2 > (3, 6):
|
|
33
|
+
_Popen_kwds.update(text=True)
|
|
34
|
+
del _PIPE, _STDOUT, _sys_version_info2 # _ALL_LAZY
|
|
30
35
|
|
|
31
36
|
|
|
32
37
|
def _cmd_stdin_(cmd, stdin): # PYCHOK no cover
|
|
33
38
|
'''(INTERNAL) Cmd line, stdin and caller as sC{str}.
|
|
34
39
|
'''
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
if stdin is not None:
|
|
41
|
+
cmd += _BACKSLASH_, str(stdin)
|
|
42
|
+
cmd += Fmt.PAREN(callername(up=3)),
|
|
43
|
+
return _SPACE_.join(cmd)
|
|
38
44
|
|
|
39
45
|
|
|
40
|
-
def _popen2(cmd, stdin=None): # in .mgrs,
|
|
46
|
+
def _popen2(cmd, stdin=None): # in .mgrs, test.bases, .testMgrs
|
|
41
47
|
'''(INTERNAL) Invoke C{B{cmd} tuple} and return C{exitcode}
|
|
42
48
|
and all output to C{stdout/-err}.
|
|
43
49
|
'''
|
|
44
|
-
p = _Popen(cmd,
|
|
45
|
-
|
|
46
|
-
stdin=_PIPE, stdout=_PIPE, stderr=_STDOUT,
|
|
47
|
-
**_text_True) # PYCHOK kwArgs
|
|
48
|
-
r = p.communicate(stdin)[0]
|
|
50
|
+
p = _Popen(cmd, **_Popen_kwds) # PYCHOK kwArgs
|
|
51
|
+
r = p.communicate(stdin)[0]
|
|
49
52
|
return p.returncode, ub2str(r).strip()
|
|
50
53
|
|
|
51
54
|
|
|
52
|
-
class
|
|
53
|
-
'''(NTERNAL) Base class for C{
|
|
55
|
+
class _SolveCapsBase(_CapsBase):
|
|
56
|
+
'''(NTERNAL) Base class for C{_SolveBase} and C{_LineSolveBase}.
|
|
54
57
|
'''
|
|
55
58
|
_Error = None
|
|
56
59
|
_Exact = True
|
|
@@ -131,8 +134,8 @@ class _SolveLineSolveBase(_CapsBase):
|
|
|
131
134
|
|
|
132
135
|
@note: The C{Solve} return code is in property L{status}.
|
|
133
136
|
'''
|
|
134
|
-
c = (self._Solve_path,) + map2(str, options)
|
|
135
|
-
i =
|
|
137
|
+
c = (self._Solve_path,) + map2(str, options) # map2(_enquote, options)
|
|
138
|
+
i = _xkwds_get1(stdin, stdin=None)
|
|
136
139
|
r = self._invoke(c, stdin=i)
|
|
137
140
|
s = self.status
|
|
138
141
|
if s:
|
|
@@ -270,12 +273,12 @@ class _SolveLineSolveBase(_CapsBase):
|
|
|
270
273
|
return self.invoke('--version')
|
|
271
274
|
|
|
272
275
|
|
|
273
|
-
class _SolveBase(
|
|
276
|
+
class _SolveBase(_SolveCapsBase):
|
|
274
277
|
'''(NTERNAL) Base class for C{_GeodesicSolveBase} and C{_RhumbSolveBase}.
|
|
275
278
|
'''
|
|
276
279
|
_datum = _WGS84
|
|
277
280
|
|
|
278
|
-
def __init__(self, a_ellipsoid=_EWGS84, f=None, path=NN, name
|
|
281
|
+
def __init__(self, a_ellipsoid=_EWGS84, f=None, path=NN, **name):
|
|
279
282
|
'''New C{Solve} instance.
|
|
280
283
|
|
|
281
284
|
@arg a_ellipsoid: An ellipsoid (L{Ellipsoid}) or datum (L{Datum}) or
|
|
@@ -285,11 +288,11 @@ class _SolveBase(_SolveLineSolveBase):
|
|
|
285
288
|
is specified as C{scalar}.
|
|
286
289
|
@kwarg path: Optionally, the (fully qualified) path to the C{GeodSolve}
|
|
287
290
|
or C{RhumbSolve} executable (C{filename}).
|
|
288
|
-
@kwarg name: Optional name (C{str}).
|
|
291
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
289
292
|
|
|
290
293
|
@raise TypeError: Invalid B{C{a_ellipsoid}} or B{C{f}}.
|
|
291
294
|
'''
|
|
292
|
-
_earth_datum(self, a_ellipsoid, f=f, name
|
|
295
|
+
_earth_datum(self, a_ellipsoid, f=f, **name)
|
|
293
296
|
if name:
|
|
294
297
|
self.name = name
|
|
295
298
|
if path:
|
|
@@ -352,7 +355,7 @@ class _SolveBase(_SolveLineSolveBase):
|
|
|
352
355
|
'''
|
|
353
356
|
if arcmode:
|
|
354
357
|
raise self._Error(arcmode=arcmode, txt=str(NotImplemented))
|
|
355
|
-
floats =
|
|
358
|
+
floats = _xkwds_get1(floats, floats=True)
|
|
356
359
|
return self._GDictInvoke(self._cmdDirect, floats, self._Names_Direct,
|
|
357
360
|
lat, lon, azi, s12_a12)
|
|
358
361
|
|
|
@@ -360,7 +363,7 @@ class _SolveBase(_SolveLineSolveBase):
|
|
|
360
363
|
'''(INTERNAL) Get C{_GenInverse}-like result as C{GDict}, but
|
|
361
364
|
I{without} C{_SALPs_CALPs_}.
|
|
362
365
|
'''
|
|
363
|
-
floats =
|
|
366
|
+
floats = _xkwds_get1(floats, floats=True)
|
|
364
367
|
return self._GDictInvoke(self._cmdInverse, floats, self._Names_Inverse,
|
|
365
368
|
lat1, lon1, lat2, lon2)
|
|
366
369
|
|
|
@@ -387,23 +390,23 @@ class _SolveBase(_SolveLineSolveBase):
|
|
|
387
390
|
return sep.join(pairs(d, prec=prec))
|
|
388
391
|
|
|
389
392
|
|
|
390
|
-
class _SolveLineBase(
|
|
393
|
+
class _SolveLineBase(_SolveCapsBase):
|
|
391
394
|
'''(NTERNAL) Base class for C{GeodesicLineSolve} and C{RhumbLineSolve}.
|
|
392
395
|
'''
|
|
393
396
|
# _caps = 0
|
|
394
397
|
# _lla1 = {}
|
|
395
398
|
_solve = None # L{GeodesicSolve} or L{RhumbSolve} instance
|
|
396
399
|
|
|
397
|
-
def __init__(self, solve, lat1, lon1, caps,
|
|
400
|
+
def __init__(self, solve, lat1, lon1, caps, **azi_name):
|
|
401
|
+
name, azi = _name2__(azi_name, _or_nameof=solve)
|
|
402
|
+
if name:
|
|
403
|
+
self.name = name
|
|
404
|
+
|
|
398
405
|
self._caps = caps | Caps._LINE
|
|
399
406
|
self._debug = solve._debug & Caps._DEBUG_ALL
|
|
400
407
|
self._lla1 = GDict(lat1=lat1, lon1=lon1, **azi)
|
|
401
408
|
self._solve = solve
|
|
402
409
|
|
|
403
|
-
n = name or solve.name
|
|
404
|
-
if n:
|
|
405
|
-
self.name = n
|
|
406
|
-
|
|
407
410
|
@Property_RO
|
|
408
411
|
def _cmdDistance(self):
|
|
409
412
|
'''(INTERNAL) Get the C{GeodSolve} I{-L} cmd (C{tuple}).
|
|
@@ -448,7 +451,7 @@ class _SolveLineBase(_SolveLineSolveBase):
|
|
|
448
451
|
return sep.join(pairs(d, prec=prec))
|
|
449
452
|
|
|
450
453
|
|
|
451
|
-
__all__ += _ALL_DOCS(_SolveBase, _SolveLineBase,
|
|
454
|
+
__all__ += _ALL_DOCS(_SolveBase, _SolveLineBase, _SolveCapsBase)
|
|
452
455
|
|
|
453
456
|
# **) MIT License
|
|
454
457
|
#
|