pygeodesy 24.5.15__py2.py3-none-any.whl → 24.6.1__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.15.dist-info → PyGeodesy-24.6.1.dist-info}/METADATA +6 -5
- PyGeodesy-24.6.1.dist-info/RECORD +116 -0
- pygeodesy/__init__.py +4 -4
- pygeodesy/albers.py +41 -41
- pygeodesy/auxilats/__init__.py +1 -1
- pygeodesy/auxilats/__main__.py +2 -2
- pygeodesy/auxilats/auxAngle.py +32 -31
- pygeodesy/auxilats/auxLat.py +80 -51
- pygeodesy/azimuthal.py +123 -124
- pygeodesy/basics.py +46 -10
- pygeodesy/booleans.py +13 -14
- pygeodesy/cartesianBase.py +25 -23
- pygeodesy/clipy.py +3 -3
- pygeodesy/constants.py +3 -3
- pygeodesy/css.py +50 -42
- pygeodesy/datums.py +42 -41
- pygeodesy/deprecated/functions.py +9 -3
- pygeodesy/dms.py +6 -6
- pygeodesy/ecef.py +41 -41
- pygeodesy/ellipsoidalBase.py +41 -41
- pygeodesy/ellipsoidalBaseDI.py +3 -4
- pygeodesy/ellipsoidalGeodSolve.py +2 -2
- pygeodesy/ellipsoidalKarney.py +3 -3
- pygeodesy/ellipsoidalNvector.py +11 -12
- pygeodesy/ellipsoids.py +45 -38
- pygeodesy/elliptic.py +3 -4
- pygeodesy/epsg.py +4 -3
- pygeodesy/errors.py +52 -20
- pygeodesy/etm.py +68 -65
- pygeodesy/fmath.py +44 -49
- pygeodesy/formy.py +129 -115
- pygeodesy/frechet.py +118 -103
- pygeodesy/fstats.py +21 -14
- pygeodesy/fsums.py +124 -80
- pygeodesy/gars.py +10 -9
- pygeodesy/geodesicw.py +19 -17
- pygeodesy/geodesicx/__init__.py +1 -1
- pygeodesy/geodesicx/__main__.py +2 -2
- pygeodesy/geodesicx/gx.py +39 -33
- pygeodesy/geodesicx/gxarea.py +12 -9
- pygeodesy/geodesicx/gxbases.py +3 -4
- pygeodesy/geodesicx/gxline.py +6 -8
- pygeodesy/geodsolve.py +29 -28
- pygeodesy/geohash.py +60 -57
- pygeodesy/geoids.py +34 -32
- pygeodesy/hausdorff.py +114 -101
- pygeodesy/heights.py +137 -130
- pygeodesy/internals.py +16 -11
- pygeodesy/interns.py +3 -6
- pygeodesy/iters.py +19 -17
- pygeodesy/karney.py +21 -17
- pygeodesy/ktm.py +25 -18
- pygeodesy/latlonBase.py +12 -11
- pygeodesy/lazily.py +6 -6
- pygeodesy/lcc.py +24 -25
- pygeodesy/ltp.py +143 -113
- pygeodesy/ltpTuples.py +207 -150
- pygeodesy/mgrs.py +26 -26
- pygeodesy/named.py +172 -90
- pygeodesy/namedTuples.py +33 -25
- pygeodesy/nvectorBase.py +8 -8
- pygeodesy/osgr.py +40 -48
- pygeodesy/points.py +18 -18
- pygeodesy/props.py +29 -16
- pygeodesy/rhumb/__init__.py +1 -1
- pygeodesy/rhumb/aux_.py +13 -15
- pygeodesy/rhumb/bases.py +12 -5
- pygeodesy/rhumb/ekx.py +24 -18
- pygeodesy/rhumb/solve.py +13 -10
- pygeodesy/simplify.py +16 -16
- pygeodesy/solveBase.py +18 -18
- pygeodesy/sphericalBase.py +17 -21
- pygeodesy/sphericalTrigonometry.py +21 -21
- pygeodesy/streprs.py +5 -5
- pygeodesy/trf.py +13 -11
- pygeodesy/triaxials.py +68 -64
- pygeodesy/units.py +35 -35
- pygeodesy/unitsBase.py +24 -11
- pygeodesy/ups.py +66 -70
- pygeodesy/utily.py +3 -3
- pygeodesy/utm.py +183 -187
- pygeodesy/utmups.py +38 -38
- pygeodesy/utmupsBase.py +104 -106
- pygeodesy/vector2d.py +6 -7
- pygeodesy/vector3d.py +16 -17
- pygeodesy/vector3dBase.py +4 -5
- pygeodesy/webmercator.py +43 -51
- PyGeodesy-24.5.15.dist-info/RECORD +0 -116
- {PyGeodesy-24.5.15.dist-info → PyGeodesy-24.6.1.dist-info}/WHEEL +0 -0
- {PyGeodesy-24.5.15.dist-info → PyGeodesy-24.6.1.dist-info}/top_level.txt +0 -0
pygeodesy/ellipsoidalBase.py
CHANGED
|
@@ -24,8 +24,9 @@ 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
|
-
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
|
|
27
|
+
# from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS # from .named
|
|
28
28
|
# from pygeodesy.lcc import toLcc # _MODS
|
|
29
|
+
from pygeodesy.named import _name1__, _ALL_DOCS, _ALL_LAZY, _MODS
|
|
29
30
|
# from pygeodesy.namedTuples import Vector3Tuple # _MODS
|
|
30
31
|
from pygeodesy.props import deprecated_method, deprecated_property_RO, \
|
|
31
32
|
Property_RO, property_doc_, property_RO, _update_all
|
|
@@ -36,7 +37,7 @@ from pygeodesy.units import Epoch, _isDegrees, Radius_, _1mm as _TOL_M
|
|
|
36
37
|
# from math import fabs # from .latlonBase
|
|
37
38
|
|
|
38
39
|
__all__ = _ALL_LAZY.ellipsoidalBase
|
|
39
|
-
__version__ = '24.
|
|
40
|
+
__version__ = '24.05.31'
|
|
40
41
|
|
|
41
42
|
|
|
42
43
|
class CartesianEllipsoidalBase(CartesianBase):
|
|
@@ -46,8 +47,8 @@ class CartesianEllipsoidalBase(CartesianBase):
|
|
|
46
47
|
_epoch = None # overriding .reframe.epoch (C{float})
|
|
47
48
|
_reframe = None # reference frame (L{RefFrame})
|
|
48
49
|
|
|
49
|
-
def __init__(self, x_xyz, y=None, z=None,
|
|
50
|
-
|
|
50
|
+
def __init__(self, x_xyz, y=None, z=None, reframe=None, epoch=None,
|
|
51
|
+
**datum_ll_name):
|
|
51
52
|
'''New ellispoidal C{Cartesian...}.
|
|
52
53
|
|
|
53
54
|
@kwarg reframe: Optional reference frame (L{RefFrame}).
|
|
@@ -61,9 +62,9 @@ class CartesianEllipsoidalBase(CartesianBase):
|
|
|
61
62
|
not a L{Datum}, B{C{reframe}} is not a L{RefFrame} or
|
|
62
63
|
B{C{epoch}} is not C{scalar} non-zero.
|
|
63
64
|
|
|
64
|
-
@see:
|
|
65
|
+
@see: Class L{CartesianBase<CartesianBase.__init__>} for more details.
|
|
65
66
|
'''
|
|
66
|
-
CartesianBase.__init__(self, x_xyz, y=y, z=z,
|
|
67
|
+
CartesianBase.__init__(self, x_xyz, y=y, z=z, **datum_ll_name)
|
|
67
68
|
if reframe:
|
|
68
69
|
self.reframe = reframe
|
|
69
70
|
self.epoch = epoch
|
|
@@ -171,7 +172,7 @@ class CartesianEllipsoidalBase(CartesianBase):
|
|
|
171
172
|
kwds = _xkwds(kwds, reframe=self.reframe, epoch=self.epoch)
|
|
172
173
|
return CartesianBase.toLatLon(self, datum=datum, height=height, **kwds)
|
|
173
174
|
|
|
174
|
-
def toRefFrame(self, reframe2, reframe=None, epoch=None, epoch2=None, name
|
|
175
|
+
def toRefFrame(self, reframe2, reframe=None, epoch=None, epoch2=None, **name):
|
|
175
176
|
'''Convert this point to an other reference frame and epoch.
|
|
176
177
|
|
|
177
178
|
@arg reframe2: Reference frame to convert I{to} (L{RefFrame}).
|
|
@@ -181,7 +182,7 @@ class CartesianEllipsoidalBase(CartesianBase):
|
|
|
181
182
|
this point's C{epoch or B{reframe}.epoch}.
|
|
182
183
|
@kwarg epoch2: Optional epoch to observe for the converted point (L{Epoch},
|
|
183
184
|
C{scalar} or C{str}), otherwise B{C{epoch}}.
|
|
184
|
-
@kwarg name: Optional name (C{str}), C{B{reframe2}.name}
|
|
185
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}), overriding C{B{reframe2}.name}.
|
|
185
186
|
|
|
186
187
|
@return: The converted point (ellipsoidal C{Cartesian}) or if conversion
|
|
187
188
|
C{isunity}, this point or a copy of this point if the B{C{name}}
|
|
@@ -194,7 +195,7 @@ class CartesianEllipsoidalBase(CartesianBase):
|
|
|
194
195
|
@raise TypeError: B{C{reframe2}} or B{C{reframe}} not a L{RefFrame}.
|
|
195
196
|
'''
|
|
196
197
|
return _MODS.trf._toRefFrame(self, reframe2, reframe=reframe, epoch=epoch,
|
|
197
|
-
|
|
198
|
+
epoch2=epoch2, **name)
|
|
198
199
|
|
|
199
200
|
@deprecated_method
|
|
200
201
|
def toTransforms_(self, *transforms, **datum): # PYCHOK no cover
|
|
@@ -217,8 +218,8 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
217
218
|
_scale = None # UTM/UPS scale factor (C{float})
|
|
218
219
|
_toLLEB_args = () # Etm/Utm/Ups._toLLEB arguments
|
|
219
220
|
|
|
220
|
-
def __init__(self, latlonh, lon=None, height=0, datum=
|
|
221
|
-
epoch=None, wrap=False, name
|
|
221
|
+
def __init__(self, latlonh, lon=None, height=0, datum=_WGS84, reframe=None,
|
|
222
|
+
epoch=None, wrap=False, **name):
|
|
222
223
|
'''Create an ellipsoidal C{LatLon} point from the given lat-, longitude
|
|
223
224
|
and height on the given datum, reference frame and epoch.
|
|
224
225
|
|
|
@@ -236,7 +237,7 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
236
237
|
if C{B{reframe}=None}.
|
|
237
238
|
@kwarg wrap: If C{True}, wrap or I{normalize} B{C{lat}} and B{C{lon}}
|
|
238
239
|
(C{bool}).
|
|
239
|
-
@kwarg name: Optional name (C{str}).
|
|
240
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
240
241
|
|
|
241
242
|
@raise RangeError: Value of C{lat} or B{C{lon}} outside the valid
|
|
242
243
|
range and L{rangerrors} set to C{True}.
|
|
@@ -247,9 +248,9 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
247
248
|
|
|
248
249
|
@raise UnitError: Invalid B{C{lat}}, B{C{lon}} or B{C{height}}.
|
|
249
250
|
'''
|
|
250
|
-
LatLonBase.__init__(self, latlonh, lon=lon, height=height, wrap=wrap, name
|
|
251
|
+
LatLonBase.__init__(self, latlonh, lon=lon, height=height, wrap=wrap, **name)
|
|
251
252
|
if datum not in (None, self._datum, _EWGS84):
|
|
252
|
-
self.datum = _ellipsoidal_datum(datum, name=name)
|
|
253
|
+
self.datum = _ellipsoidal_datum(datum, name=self.name)
|
|
253
254
|
if reframe:
|
|
254
255
|
self.reframe = reframe
|
|
255
256
|
self.epoch = epoch
|
|
@@ -736,25 +737,23 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
736
737
|
return _MODS.osgr.toOsgr(self, kTM=True, name=self.name) # datum=self.datum
|
|
737
738
|
|
|
738
739
|
def parse(self, strllh, height=0, datum=None, epoch=None, reframe=None,
|
|
739
|
-
sep=_COMMA_, wrap=False, name
|
|
740
|
+
sep=_COMMA_, wrap=False, **name):
|
|
740
741
|
'''Parse a string consisting of C{"lat, lon[, height]"},
|
|
741
742
|
representing a similar, ellipsoidal C{LatLon} point.
|
|
742
743
|
|
|
743
|
-
@arg strllh: Lat, lon and optional height (C{str}),
|
|
744
|
-
|
|
745
|
-
@kwarg height: Optional, default height (C{meter} or
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
this reframe I{without conversion}.
|
|
744
|
+
@arg strllh: Lat, lon and optional height (C{str}), see function
|
|
745
|
+
L{pygeodesy.parse3llh}.
|
|
746
|
+
@kwarg height: Optional, default height (C{meter} or C{None}).
|
|
747
|
+
@kwarg datum: Optional datum (L{Datum}), overriding this datum
|
|
748
|
+
I{without conversion}.
|
|
749
|
+
@kwarg epoch: Optional datum (L{Epoch}), overriding this epoch
|
|
750
|
+
I{without conversion}.
|
|
751
|
+
@kwarg reframe: Optional datum (L{RefFrame}), overriding this
|
|
752
|
+
reframe I{without conversion}.
|
|
753
753
|
@kwarg sep: Optional separator (C{str}).
|
|
754
|
-
@kwarg wrap: If C{True}, wrap or I{normalize} the lat-
|
|
755
|
-
|
|
756
|
-
@kwarg name: Optional
|
|
757
|
-
this name.
|
|
754
|
+
@kwarg wrap: If C{True}, wrap or I{normalize} the lat- and
|
|
755
|
+
longitude (C{bool}).
|
|
756
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}), overriding this name.
|
|
758
757
|
|
|
759
758
|
@return: The similar point (ellipsoidal C{LatLon}).
|
|
760
759
|
|
|
@@ -768,7 +767,7 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
768
767
|
r.epoch = epoch
|
|
769
768
|
if reframe not in (None, self.reframe):
|
|
770
769
|
r.reframe = reframe
|
|
771
|
-
return self._xnamed(r,
|
|
770
|
+
return self._xnamed(r, force=True, **name) if name else r
|
|
772
771
|
|
|
773
772
|
def _Radjust2(self, adjust, datum, meter_text2):
|
|
774
773
|
'''(INTERNAL) Adjust an C{elevation} or C{geoidHeight} with
|
|
@@ -834,15 +833,15 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
834
833
|
@see: Function L{pygeodesy.toCss}.
|
|
835
834
|
'''
|
|
836
835
|
return self._css if not toCss_kwds else _MODS.css.toCss(
|
|
837
|
-
self, **
|
|
836
|
+
self, **_name1__(toCss_kwds, _or_nameof=self))
|
|
838
837
|
|
|
839
|
-
def toDatum(self, datum2, height=None, name
|
|
838
|
+
def toDatum(self, datum2, height=None, **name):
|
|
840
839
|
'''Convert this point to an other datum.
|
|
841
840
|
|
|
842
841
|
@arg datum2: Datum to convert I{to} (L{Datum}).
|
|
843
842
|
@kwarg height: Optional height, overriding the
|
|
844
843
|
converted height (C{meter}).
|
|
845
|
-
@kwarg name: Optional name (C{str})
|
|
844
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
846
845
|
|
|
847
846
|
@return: The converted point (ellipsoidal C{LatLon})
|
|
848
847
|
or a copy of this point if B{C{datum2}}
|
|
@@ -850,10 +849,10 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
850
849
|
|
|
851
850
|
@raise TypeError: Invalid B{C{datum2}}.
|
|
852
851
|
'''
|
|
853
|
-
n =
|
|
852
|
+
n = self._name__(name)
|
|
854
853
|
d2 = _ellipsoidal_datum(datum2, name=n)
|
|
855
854
|
if self.datum == d2:
|
|
856
|
-
r = self.copy(name=
|
|
855
|
+
r = self.copy(name=n)
|
|
857
856
|
else:
|
|
858
857
|
kwds = _xkwds_not(None, LatLon=self.classof, name=n,
|
|
859
858
|
epoch=self.epoch, reframe=self.reframe)
|
|
@@ -871,7 +870,7 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
871
870
|
@see: Function L{pygeodesy.toEtm8}.
|
|
872
871
|
'''
|
|
873
872
|
return self._etm if not toEtm8_kwds else _MODS.etm.toEtm8(
|
|
874
|
-
self, **
|
|
873
|
+
self, **_name1__(toEtm8_kwds, _or_nameof=self))
|
|
875
874
|
|
|
876
875
|
def toLcc(self, **toLcc_kwds):
|
|
877
876
|
'''Convert this C{LatLon} point to a Lambert location.
|
|
@@ -883,7 +882,7 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
883
882
|
@see: Function L{pygeodesy.toLcc}.
|
|
884
883
|
'''
|
|
885
884
|
return self._lcc if not toLcc_kwds else _MODS.lcc.toLcc(
|
|
886
|
-
self, **
|
|
885
|
+
self, **_name1__(toLcc_kwds, _or_nameof=self))
|
|
887
886
|
|
|
888
887
|
def toMgrs(self, center=False, pole=NN):
|
|
889
888
|
'''Convert this C{LatLon} point to an MGRS coordinate.
|
|
@@ -913,12 +912,13 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
913
912
|
@see: Function L{pygeodesy.toOsgr}.
|
|
914
913
|
'''
|
|
915
914
|
if toOsgr_kwds:
|
|
916
|
-
|
|
915
|
+
kwds = _name1__(toOsgr_kwds, _or_nameof=self)
|
|
916
|
+
r = _MODS.osgr.toOsgr(self, kTM=kTM, **kwds)
|
|
917
917
|
else:
|
|
918
918
|
r = self._osgrTM if kTM else self._osgr
|
|
919
919
|
return r
|
|
920
920
|
|
|
921
|
-
def toRefFrame(self, reframe2, reframe=None, epoch=None, epoch2=None, height=None, name
|
|
921
|
+
def toRefFrame(self, reframe2, reframe=None, epoch=None, epoch2=None, height=None, **name):
|
|
922
922
|
'''Convert this point to an other reference frame and epoch.
|
|
923
923
|
|
|
924
924
|
@arg reframe2: Reference frame to convert I{to} (L{RefFrame}).
|
|
@@ -929,7 +929,7 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
929
929
|
@kwarg epoch2: Optional epoch to observe for the converted point (L{Epoch},
|
|
930
930
|
C{scalar} or C{str}), otherwise B{C{epoch}}.
|
|
931
931
|
@kwarg height: Optional height, overriding the converted height (C{meter}).
|
|
932
|
-
@kwarg name: Optional name (C{str}), C{B{reframe2}.name}
|
|
932
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}), overriding C{B{reframe2}.name}.
|
|
933
933
|
|
|
934
934
|
@return: The converted point (ellipsoidal C{LatLon}) or if conversion
|
|
935
935
|
C{isunity}, this point or a copy of this point if the B{C{name}}
|
|
@@ -942,7 +942,7 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
942
942
|
@raise TypeError: B{C{reframe2}} or B{C{reframe}} not a L{RefFrame}.
|
|
943
943
|
'''
|
|
944
944
|
return _MODS.trf._toRefFrame(self, reframe2, reframe=reframe, epoch=epoch,
|
|
945
|
-
epoch2=epoch2,
|
|
945
|
+
epoch2=epoch2, height=height, **name)
|
|
946
946
|
|
|
947
947
|
def toTransform(self, transform, inverse=False, datum=None, **LatLon_kwds):
|
|
948
948
|
'''Apply a Helmert transform to this geodetic point.
|
pygeodesy/ellipsoidalBaseDI.py
CHANGED
|
@@ -17,7 +17,6 @@ from pygeodesy.errors import _AssertionError, IntersectionError, _IsnotError, \
|
|
|
17
17
|
from pygeodesy.fmath import favg, fmean_
|
|
18
18
|
from pygeodesy.fsums import Fmt, fsumf_
|
|
19
19
|
from pygeodesy.formy import _isequalTo, opposing, _radical2
|
|
20
|
-
# from pygeodesy.internals import _dunder_nameof # from .lazily
|
|
21
20
|
from pygeodesy.interns import _antipodal_, _concentric_, _ellipsoidal_, \
|
|
22
21
|
_exceed_PI_radians_, _low_, _near_, \
|
|
23
22
|
_SPACE_, _too_
|
|
@@ -36,7 +35,7 @@ from pygeodesy.utily import m2km, unroll180, _unrollon, _unrollon3, \
|
|
|
36
35
|
from math import degrees, radians
|
|
37
36
|
|
|
38
37
|
__all__ = _ALL_LAZY.ellipsoidalBaseDI
|
|
39
|
-
__version__ = '24.05.
|
|
38
|
+
__version__ = '24.05.19'
|
|
40
39
|
|
|
41
40
|
_polar__ = 'polar?'
|
|
42
41
|
_B2END = _1_5 # _intersect3 bearing to pseudo-end point factor
|
|
@@ -400,12 +399,12 @@ class LatLonEllipsoidalBaseDI(LatLonEllipsoidalBase):
|
|
|
400
399
|
|
|
401
400
|
f, j = _fi_j2(f, len(Ps)) # like .vector3d.nearestOn6
|
|
402
401
|
|
|
403
|
-
n = self.nearestOn8.__name__
|
|
402
|
+
n = self.nearestOn8.__name__ # _dunder_nameof
|
|
404
403
|
c.rename(n)
|
|
405
404
|
if s is not c:
|
|
406
405
|
s = s.copy(name=n)
|
|
407
406
|
if e is not c:
|
|
408
|
-
e = e.copy(name=n)
|
|
407
|
+
e = e.copy(name=n) # name__=self.nearestOn8
|
|
409
408
|
return NearestOn8Tuple(c, c3.distance, f, j, s, e, c3.initial, c3.final,
|
|
410
409
|
iteration=m) # ._iteration for tests
|
|
411
410
|
|
|
@@ -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
|
@@ -31,8 +31,7 @@ from pygeodesy.ellipsoidalBase import CartesianEllipsoidalBase, \
|
|
|
31
31
|
_TOL_M, _Wrap
|
|
32
32
|
from pygeodesy.errors import _IsnotError, _xkwds, _xkwds_pop2
|
|
33
33
|
# from pygeodesy.fmath import fdot # from .nvectorBase
|
|
34
|
-
from pygeodesy.interns import
|
|
35
|
-
from pygeodesy.interns import _down_, _east_, _north_, _pole_ # PYCHOK used!
|
|
34
|
+
from pygeodesy.interns import _Nv00_, _COMMASPACE_, _pole_ # PYCHOK used!
|
|
36
35
|
from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _ALL_OTHER
|
|
37
36
|
# from pygeodesy.ltp import Ltp # _MODS
|
|
38
37
|
from pygeodesy.ltpTuples import Aer as _Aer, Ned as _Ned, Ned4Tuple, \
|
|
@@ -49,15 +48,15 @@ from pygeodesy.units import Bearing, Distance, Height, Scalar
|
|
|
49
48
|
# from math import fabs # from .nvectorBase
|
|
50
49
|
|
|
51
50
|
__all__ = _ALL_LAZY.ellipsoidalNvector
|
|
52
|
-
__version__ = '24.
|
|
51
|
+
__version__ = '24.05.19'
|
|
53
52
|
|
|
54
53
|
|
|
55
54
|
class Ned(_Ned):
|
|
56
55
|
'''DEPRECATED on 2024.02.04, use class L{pygeodesy.Ned}.'''
|
|
57
56
|
|
|
58
|
-
def __init__(self, north, east, down, name
|
|
57
|
+
def __init__(self, north, east, down, **name):
|
|
59
58
|
deprecated_class(self.__class__)
|
|
60
|
-
_Ned.__init__(self, north, east, down, name
|
|
59
|
+
_Ned.__init__(self, north, east, down, **name)
|
|
61
60
|
|
|
62
61
|
@deprecated_method # PYCHOK expected
|
|
63
62
|
def toRepr(self, prec=None, fmt=Fmt.SQUARE, sep=_COMMASPACE_, **unused):
|
|
@@ -434,7 +433,7 @@ class Nvector(NvectorBase):
|
|
|
434
433
|
'''
|
|
435
434
|
_datum = _WGS84 # default datum (L{Datum})
|
|
436
435
|
|
|
437
|
-
def __init__(self, x_xyz, y=None, z=None, h=0, datum=None, ll=None, name
|
|
436
|
+
def __init__(self, x_xyz, y=None, z=None, h=0, datum=None, ll=None, **name):
|
|
438
437
|
'''New n-vector normal to the earth's surface.
|
|
439
438
|
|
|
440
439
|
@arg x_xyz: X component of vector (C{scalar}) or (3-D) vector
|
|
@@ -449,13 +448,13 @@ class Nvector(NvectorBase):
|
|
|
449
448
|
(L{Datum}, L{Ellipsoid}, L{Ellipsoid2} or
|
|
450
449
|
L{a_f2Tuple}).
|
|
451
450
|
@kwarg ll: Optional, original latlon (C{LatLon}).
|
|
452
|
-
@kwarg name: Optional name (C{str}).
|
|
451
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
453
452
|
|
|
454
453
|
@raise TypeError: If B{C{datum}} is not a L{Datum}.
|
|
455
454
|
'''
|
|
456
|
-
NvectorBase.__init__(self, x_xyz, y=y, z=z, h=h, ll=ll, name
|
|
455
|
+
NvectorBase.__init__(self, x_xyz, y=y, z=z, h=h, ll=ll, **name)
|
|
457
456
|
if datum not in (None, self._datum):
|
|
458
|
-
self._datum = _ellipsoidal_datum(datum, name
|
|
457
|
+
self._datum = _ellipsoidal_datum(datum, **name)
|
|
459
458
|
|
|
460
459
|
@Property_RO
|
|
461
460
|
def datum(self):
|
|
@@ -550,7 +549,7 @@ def meanOf(points, datum=_WGS84, height=None, wrap=False,
|
|
|
550
549
|
# geographic mean
|
|
551
550
|
m = sumOf(p._N_vector for p in Ps.iterate(closed=False))
|
|
552
551
|
kwds = _xkwds(LatLon_and_kwds, height=height, datum=datum,
|
|
553
|
-
LatLon=LatLon,
|
|
552
|
+
LatLon=LatLon, name__=meanOf)
|
|
554
553
|
return m.toLatLon(**kwds)
|
|
555
554
|
|
|
556
555
|
|
|
@@ -618,7 +617,7 @@ def sumOf(nvectors, Vector=Nvector, h=None, **Vector_kwds):
|
|
|
618
617
|
|
|
619
618
|
|
|
620
619
|
@deprecated_function
|
|
621
|
-
def toNed(distance, bearing, elevation, Ned=Ned, name
|
|
620
|
+
def toNed(distance, bearing, elevation, Ned=Ned, **name):
|
|
622
621
|
'''DEPRECATED, use L{pygeodesy.Aer}C{(bearing, elevation,
|
|
623
622
|
distance).xyzLocal.toNed(B{Ned}, name=B{name})} or
|
|
624
623
|
L{XyzLocal}C{(pygeodesy.Aer(bearing, elevation,
|
|
@@ -633,7 +632,7 @@ def toNed(distance, bearing, elevation, Ned=Ned, name=NN):
|
|
|
633
632
|
frame horizontal (C{degrees}).
|
|
634
633
|
@kwarg Ned: Optional class to return the NED (C{Ned}) or
|
|
635
634
|
C{None}.
|
|
636
|
-
@kwarg name: Optional name (C{str}).
|
|
635
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
637
636
|
|
|
638
637
|
@return: An NED vector equivalent to this B{C{distance}},
|
|
639
638
|
B{C{bearing}} and B{C{elevation}} (DEPRECATED L{Ned})
|
pygeodesy/ellipsoids.py
CHANGED
|
@@ -76,16 +76,16 @@ from pygeodesy.fmath import cbrt, cbrt2, fdot, Fhorner, fpowers, hypot, hypot_,
|
|
|
76
76
|
from pygeodesy.interns import NN, _a_, _Airy1830_, _AiryModified_, _b_, _Bessel1841_, _beta_, \
|
|
77
77
|
_Clarke1866_, _Clarke1880IGN_, _DOT_, _f_, _GRS80_, _height_, \
|
|
78
78
|
_Intl1924_, _incompatible_, _invalid_, _Krassovski1940_, \
|
|
79
|
-
_Krassowsky1940_,
|
|
80
|
-
|
|
81
|
-
_vs_, _WGS72_, _WGS84_
|
|
79
|
+
_Krassowsky1940_, _lat_, _meridional_, _negative_, _not_finite_, \
|
|
80
|
+
_prime_vertical_, _radius_, _Sphere_, _SPACE_, _vs_, _WGS72_, _WGS84_
|
|
82
81
|
# from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS # from .named
|
|
83
|
-
from pygeodesy.named import _lazyNamedEnumItem as _lazy,
|
|
84
|
-
|
|
82
|
+
from pygeodesy.named import _lazyNamedEnumItem as _lazy, _name__, _name2__, _NamedEnum, \
|
|
83
|
+
_NamedEnumItem, _NamedTuple, _Pass, _ALL_LAZY, _MODS
|
|
85
84
|
from pygeodesy.namedTuples import Distance2Tuple, Vector3Tuple, Vector4Tuple
|
|
86
85
|
from pygeodesy.props import deprecated_Property_RO, Property_RO, property_doc_, \
|
|
87
86
|
deprecated_property_RO, property_RO
|
|
88
87
|
from pygeodesy.streprs import Fmt, fstr, instr, strs, unstr
|
|
88
|
+
# from pygeodesy.triaxials import _hartzell3 # _MODS
|
|
89
89
|
from pygeodesy.units import Bearing_, Distance, Float, Float_, Height, Lam_, Lat, Meter, \
|
|
90
90
|
Meter2, Meter3, Phi, Phi_, Radius, Radius_, Scalar
|
|
91
91
|
from pygeodesy.utily import atan1, atan1d, atan2b, degrees90, m2radians, radians2m, sincos2d
|
|
@@ -93,7 +93,7 @@ from pygeodesy.utily import atan1, atan1d, atan2b, degrees90, m2radians, radians
|
|
|
93
93
|
from math import asinh, atan, atanh, cos, degrees, exp, fabs, radians, sin, sinh, sqrt, tan
|
|
94
94
|
|
|
95
95
|
__all__ = _ALL_LAZY.ellipsoids
|
|
96
|
-
__version__ = '24.
|
|
96
|
+
__version__ = '24.05.28'
|
|
97
97
|
|
|
98
98
|
_f_0_0 = Float(f =_0_0) # zero flattening
|
|
99
99
|
_f__0_0 = Float(f_=_0_0) # zero inverse flattening
|
|
@@ -136,7 +136,7 @@ class a_f2Tuple(_NamedTuple):
|
|
|
136
136
|
|
|
137
137
|
@arg a: Equatorial radius (C{scalar} > 0).
|
|
138
138
|
@arg f: Flattening (C{scalar} < 1, negative for I{prolate}).
|
|
139
|
-
@kwarg name: Optional name (C{str}).
|
|
139
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
140
140
|
|
|
141
141
|
@return: An L{a_f2Tuple}C{(a, f)} instance.
|
|
142
142
|
|
|
@@ -157,13 +157,15 @@ class a_f2Tuple(_NamedTuple):
|
|
|
157
157
|
'''
|
|
158
158
|
return a_f2b(self.a, self.f) # PYCHOK .a and .f
|
|
159
159
|
|
|
160
|
-
def ellipsoid(self, name
|
|
160
|
+
def ellipsoid(self, **name):
|
|
161
161
|
'''Return an L{Ellipsoid} for this 2-tuple C{(a, f)}.
|
|
162
162
|
|
|
163
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
164
|
+
|
|
163
165
|
@raise NameError: A registered C{ellipsoid} with the
|
|
164
166
|
same B{C{name}} already exists.
|
|
165
167
|
'''
|
|
166
|
-
return Ellipsoid(self.a, f=self.f, name=
|
|
168
|
+
return Ellipsoid(self.a, f=self.f, name=self._name__(name)) # PYCHOK .a and .f
|
|
167
169
|
|
|
168
170
|
@Property_RO
|
|
169
171
|
def f_(self):
|
|
@@ -215,7 +217,7 @@ class Ellipsoid(_NamedEnumItem):
|
|
|
215
217
|
_KsOrder = 8 # Krüger series order (4, 6 or 8)
|
|
216
218
|
_rhumbsolve = NN # means, use PYGEODESY_RHUMBSOLVE
|
|
217
219
|
|
|
218
|
-
def __init__(self, a, b=None, f_=None, f=None, name
|
|
220
|
+
def __init__(self, a, b=None, f_=None, f=None, **name):
|
|
219
221
|
'''New L{Ellipsoid} from the I{equatorial} radius I{and} either
|
|
220
222
|
the I{polar} radius or I{inverse flattening} or I{flattening}.
|
|
221
223
|
|
|
@@ -224,7 +226,7 @@ class Ellipsoid(_NamedEnumItem):
|
|
|
224
226
|
@arg f_: Inverse flattening: M{a / (a - b)} (C{float} >>> 1.0).
|
|
225
227
|
@arg f: Flattening: M{(a - b) / a} (C{scalar}, near zero for
|
|
226
228
|
spherical).
|
|
227
|
-
@kwarg name: Optional, unique name (C{str}).
|
|
229
|
+
@kwarg name: Optional, unique C{B{name}=NN} (C{str}).
|
|
228
230
|
|
|
229
231
|
@raise NameError: Ellipsoid with the same B{C{name}} already exists.
|
|
230
232
|
|
|
@@ -234,7 +236,8 @@ class Ellipsoid(_NamedEnumItem):
|
|
|
234
236
|
@note: M{abs(f_) > 1 / EPS} or M{abs(1 / f_) < EPS} is forced
|
|
235
237
|
to M{1 / f_ = 0}, spherical.
|
|
236
238
|
'''
|
|
237
|
-
ff_ =
|
|
239
|
+
ff_ = f, f_ # assertion below
|
|
240
|
+
n = _name__(**name) if name else NN
|
|
238
241
|
try:
|
|
239
242
|
a = Radius_(a=a) # low=EPS
|
|
240
243
|
if not _isfinite(a):
|
|
@@ -268,7 +271,7 @@ class Ellipsoid(_NamedEnumItem):
|
|
|
268
271
|
|
|
269
272
|
except (TypeError, ValueError) as x:
|
|
270
273
|
d = _xkwds_not(None, b=b, f_=f_, f=f)
|
|
271
|
-
t = instr(self, a=a, name=
|
|
274
|
+
t = instr(self, a=a, name=n, **d)
|
|
272
275
|
raise _ValueError(t, cause=x)
|
|
273
276
|
|
|
274
277
|
self._a = a
|
|
@@ -276,7 +279,7 @@ class Ellipsoid(_NamedEnumItem):
|
|
|
276
279
|
self._f = f
|
|
277
280
|
self._f_ = f_
|
|
278
281
|
|
|
279
|
-
self._register(Ellipsoids,
|
|
282
|
+
self._register(Ellipsoids, n)
|
|
280
283
|
|
|
281
284
|
if f and f_: # see .test/testEllipsoidal.py
|
|
282
285
|
d = dict(eps=_TOL)
|
|
@@ -1023,7 +1026,7 @@ class Ellipsoid(_NamedEnumItem):
|
|
|
1023
1026
|
g = exact
|
|
1024
1027
|
E = _xattr(g, ellipsoid=None)
|
|
1025
1028
|
if not (E is self and isinstance(g, self._Geodesics)):
|
|
1026
|
-
raise _ValueError(exact=g, ellipsoid=E,
|
|
1029
|
+
raise _ValueError(exact=g, ellipsoid=E, txt_not_=self.name)
|
|
1027
1030
|
return g
|
|
1028
1031
|
|
|
1029
1032
|
@property_RO
|
|
@@ -1099,10 +1102,10 @@ class Ellipsoid(_NamedEnumItem):
|
|
|
1099
1102
|
methods L{Ellipsoid.height4} and L{Triaxial.hartzell4}.
|
|
1100
1103
|
'''
|
|
1101
1104
|
try:
|
|
1102
|
-
v, d = _MODS.triaxials.
|
|
1105
|
+
v, d, _ = _MODS.triaxials._hartzell3(pov, los, self._triaxial)
|
|
1103
1106
|
except Exception as x:
|
|
1104
1107
|
raise IntersectionError(pov=pov, los=los, cause=x)
|
|
1105
|
-
return Vector4Tuple(v.x, v.y, v.z, d,
|
|
1108
|
+
return Vector4Tuple(v.x, v.y, v.z, d, name__=self.hartzell4)
|
|
1106
1109
|
|
|
1107
1110
|
@Property_RO
|
|
1108
1111
|
def _hash(self):
|
|
@@ -1163,8 +1166,7 @@ class Ellipsoid(_NamedEnumItem):
|
|
|
1163
1166
|
v = v.times(t)
|
|
1164
1167
|
h = r * (_1_0 - t)
|
|
1165
1168
|
|
|
1166
|
-
return Vector4Tuple(v.x, v.y, v.z, h, iteration=i,
|
|
1167
|
-
name=self.height4.__name__)
|
|
1169
|
+
return Vector4Tuple(v.x, v.y, v.z, h, iteration=i, name__=self.height4)
|
|
1168
1170
|
|
|
1169
1171
|
def _hubeny_2(self, phi2, phi1, lam21, scaled=True, squared=True):
|
|
1170
1172
|
'''(INTERNAL) like function C{pygeodesy.flatLocal_}/C{pygeodesy.hubeny_},
|
|
@@ -1493,7 +1495,7 @@ class Ellipsoid(_NamedEnumItem):
|
|
|
1493
1495
|
r = exact
|
|
1494
1496
|
E = _xattr(r, ellipsoid=None)
|
|
1495
1497
|
if not (E is self and isinstance(r, self._Rhumbs)):
|
|
1496
|
-
raise _ValueError(exact=r, ellipsosid=E,
|
|
1498
|
+
raise _ValueError(exact=r, ellipsosid=E, txt_not_=self.name)
|
|
1497
1499
|
return r
|
|
1498
1500
|
|
|
1499
1501
|
@property_RO
|
|
@@ -1642,9 +1644,9 @@ class Ellipsoid(_NamedEnumItem):
|
|
|
1642
1644
|
r = self.e2s2(sin(a))
|
|
1643
1645
|
if r > EPS02:
|
|
1644
1646
|
n = self.a / sqrt(r)
|
|
1645
|
-
m = n * self.e21 / r
|
|
1647
|
+
m = n * self.e21 / r
|
|
1646
1648
|
else:
|
|
1647
|
-
m = n = _0_0
|
|
1649
|
+
m = n = _0_0
|
|
1648
1650
|
else:
|
|
1649
1651
|
m = n = self.a
|
|
1650
1652
|
if scaled and a:
|
|
@@ -1807,42 +1809,45 @@ class Ellipsoid(_NamedEnumItem):
|
|
|
1807
1809
|
(sqrt((_3_0 * self.a2_b2 + _1_0) * _0_25) * b) if a < b else a)
|
|
1808
1810
|
return Radius(Rtriaxial=q)
|
|
1809
1811
|
|
|
1810
|
-
def toEllipsoid2(self, name
|
|
1812
|
+
def toEllipsoid2(self, **name):
|
|
1811
1813
|
'''Get a copy of this ellipsoid as an L{Ellipsoid2}.
|
|
1812
1814
|
|
|
1813
|
-
@kwarg name: Optional, unique name (C{str}).
|
|
1815
|
+
@kwarg name: Optional, unique C{B{name}=NN} (C{str}).
|
|
1814
1816
|
|
|
1815
1817
|
@see: Property C{a_f}.
|
|
1816
1818
|
'''
|
|
1817
|
-
return Ellipsoid2(self, None, name
|
|
1819
|
+
return Ellipsoid2(self, None, **name)
|
|
1818
1820
|
|
|
1819
|
-
def toStr(self, prec=8, terse=0, name
|
|
1821
|
+
def toStr(self, prec=8, terse=0, **name): # PYCHOK expected
|
|
1820
1822
|
'''Return this ellipsoid as a text string.
|
|
1821
1823
|
|
|
1822
1824
|
@kwarg prec: Number of decimal digits, unstripped (C{int}).
|
|
1823
1825
|
@kwarg terse: Limit the number of items (C{int}, 0...18).
|
|
1824
|
-
@kwarg name:
|
|
1825
|
-
this ellipsoid's name.
|
|
1826
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}) or C{None} to
|
|
1827
|
+
exclude this ellipsoid's name.
|
|
1826
1828
|
|
|
1827
1829
|
@return: This C{Ellipsoid}'s attributes (C{str}).
|
|
1828
1830
|
'''
|
|
1829
1831
|
E = Ellipsoid
|
|
1830
|
-
t = E.a, E.b, E.f_, E.f,
|
|
1832
|
+
t = E.a, E.b, E.f_, E.f, E.f2, E.n, E.e, E.e2, E.e21, E.e22, E.e32, \
|
|
1831
1833
|
E.A, E.L, E.R1, E.R2, E.R3, E.Rbiaxial, E.Rtriaxial
|
|
1832
1834
|
if terse:
|
|
1833
1835
|
t = t[:terse]
|
|
1834
|
-
|
|
1836
|
+
n, _ = _name2__(**name) # name=None
|
|
1837
|
+
return self._instr(n, prec, props=t)
|
|
1835
1838
|
|
|
1836
|
-
def toTriaxial(self, name
|
|
1839
|
+
def toTriaxial(self, **name):
|
|
1837
1840
|
'''Convert this ellipsoid to a L{Triaxial_}.
|
|
1838
1841
|
|
|
1842
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
1843
|
+
|
|
1839
1844
|
@return: A L{Triaxial_} or L{Triaxial} with the C{X} axis
|
|
1840
1845
|
pointing east and C{Z} pointing north.
|
|
1841
1846
|
|
|
1842
1847
|
@see: Method L{Triaxial_.toEllipsoid}.
|
|
1843
1848
|
'''
|
|
1844
1849
|
T = self._triaxial
|
|
1845
|
-
return T.copy(name
|
|
1850
|
+
return T.copy(**name) if name else T
|
|
1846
1851
|
|
|
1847
1852
|
@property_RO
|
|
1848
1853
|
def _triaxial(self):
|
|
@@ -1864,12 +1869,14 @@ class Ellipsoid(_NamedEnumItem):
|
|
|
1864
1869
|
class Ellipsoid2(Ellipsoid):
|
|
1865
1870
|
'''An L{Ellipsoid} specified by I{equatorial} radius and I{flattening}.
|
|
1866
1871
|
'''
|
|
1867
|
-
def __init__(self, a, f, name
|
|
1872
|
+
def __init__(self, a, f=None, **name):
|
|
1868
1873
|
'''New L{Ellipsoid2}.
|
|
1869
1874
|
|
|
1870
|
-
@arg a: Equatorial radius, semi-axis (C{meter})
|
|
1871
|
-
|
|
1872
|
-
@
|
|
1875
|
+
@arg a: Equatorial radius, semi-axis (C{meter}) or a previous
|
|
1876
|
+
L{Ellipsoid} instance.
|
|
1877
|
+
@arg f: Flattening: (C{float} < 1.0, negative for I{prolate}),
|
|
1878
|
+
if B{C{a}} is in C{meter}.
|
|
1879
|
+
@kwarg name: Optional, unique C{B{name}=NN} (C{str}).
|
|
1873
1880
|
|
|
1874
1881
|
@raise NameError: Ellipsoid with that B{C{name}} already exists.
|
|
1875
1882
|
|
|
@@ -1880,9 +1887,9 @@ class Ellipsoid2(Ellipsoid):
|
|
|
1880
1887
|
'''
|
|
1881
1888
|
if f is None and isinstance(a, Ellipsoid):
|
|
1882
1889
|
Ellipsoid.__init__(self, a.a, f =a.f,
|
|
1883
|
-
b=a.b, f_=a.f_, name
|
|
1890
|
+
b=a.b, f_=a.f_, **name)
|
|
1884
1891
|
else:
|
|
1885
|
-
Ellipsoid.__init__(self, a, f=f, name
|
|
1892
|
+
Ellipsoid.__init__(self, a, f=f, **name)
|
|
1886
1893
|
|
|
1887
1894
|
|
|
1888
1895
|
def _spherical_a_b(a, b):
|
pygeodesy/elliptic.py
CHANGED
|
@@ -98,7 +98,7 @@ from math import asinh, atan, atan2, ceil, cosh, fabs, floor, \
|
|
|
98
98
|
radians, sin, sqrt, tanh
|
|
99
99
|
|
|
100
100
|
__all__ = _ALL_LAZY.elliptic
|
|
101
|
-
__version__ = '24.05.
|
|
101
|
+
__version__ = '24.05.18'
|
|
102
102
|
|
|
103
103
|
_TolRD = zqrt(EPS * 0.002)
|
|
104
104
|
_TolRF = zqrt(EPS * 0.030)
|
|
@@ -139,10 +139,10 @@ class Elliptic(_Named):
|
|
|
139
139
|
# _k2 = 0
|
|
140
140
|
# _kp2 = 0
|
|
141
141
|
|
|
142
|
-
def __init__(self, k2=0, alpha2=0, kp2=None, alphap2=None, name
|
|
142
|
+
def __init__(self, k2=0, alpha2=0, kp2=None, alphap2=None, **name):
|
|
143
143
|
'''Constructor, specifying the C{modulus} and C{parameter}.
|
|
144
144
|
|
|
145
|
-
@kwarg name: Optional name (C{str}).
|
|
145
|
+
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
146
146
|
|
|
147
147
|
@see: Method L{Elliptic.reset} for further details.
|
|
148
148
|
|
|
@@ -152,7 +152,6 @@ class Elliptic(_Named):
|
|
|
152
152
|
E(φ, k)} and C{H(φ, 0, k) = F(φ, k) - D(φ, k)}.
|
|
153
153
|
'''
|
|
154
154
|
self.reset(k2=k2, alpha2=alpha2, kp2=kp2, alphap2=alphap2)
|
|
155
|
-
|
|
156
155
|
if name:
|
|
157
156
|
self.name = name
|
|
158
157
|
|