pygeodesy 24.6.9__py2.py3-none-any.whl → 24.7.7__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {PyGeodesy-24.6.9.dist-info → PyGeodesy-24.7.7.dist-info}/METADATA +2 -2
- PyGeodesy-24.7.7.dist-info/RECORD +117 -0
- pygeodesy/__init__.py +39 -32
- pygeodesy/__main__.py +6 -1
- pygeodesy/albers.py +2 -2
- pygeodesy/auxilats/__init__.py +1 -1
- pygeodesy/auxilats/auxAngle.py +40 -39
- pygeodesy/auxilats/auxDLat.py +3 -2
- pygeodesy/auxilats/auxLat.py +16 -18
- pygeodesy/auxilats/auxily.py +1 -1
- pygeodesy/azimuthal.py +10 -10
- pygeodesy/basics.py +16 -4
- pygeodesy/booleans.py +4 -4
- pygeodesy/cartesianBase.py +11 -14
- pygeodesy/css.py +14 -18
- pygeodesy/datums.py +6 -6
- pygeodesy/deprecated/__init__.py +1 -1
- pygeodesy/deprecated/classes.py +25 -4
- pygeodesy/deprecated/datum.py +3 -3
- pygeodesy/deprecated/functions.py +6 -8
- pygeodesy/dms.py +23 -27
- pygeodesy/ecef.py +4 -4
- pygeodesy/elevations.py +4 -4
- pygeodesy/ellipsoidalBase.py +23 -28
- pygeodesy/ellipsoidalBaseDI.py +19 -23
- pygeodesy/ellipsoidalExact.py +3 -3
- pygeodesy/ellipsoidalGeodSolve.py +15 -23
- pygeodesy/ellipsoidalKarney.py +37 -60
- pygeodesy/ellipsoidalNvector.py +38 -44
- pygeodesy/ellipsoidalVincenty.py +11 -14
- pygeodesy/ellipsoids.py +107 -101
- pygeodesy/errors.py +109 -48
- pygeodesy/etm.py +32 -44
- pygeodesy/formy.py +55 -58
- pygeodesy/frechet.py +18 -20
- pygeodesy/fsums.py +3 -3
- pygeodesy/gars.py +3 -4
- pygeodesy/geodesici.py +1696 -0
- pygeodesy/geodesicw.py +15 -15
- pygeodesy/geodesicx/__init__.py +4 -4
- pygeodesy/geodesicx/gx.py +34 -55
- pygeodesy/geodesicx/gxbases.py +20 -8
- pygeodesy/geodesicx/gxline.py +93 -88
- pygeodesy/geodsolve.py +108 -59
- pygeodesy/geohash.py +26 -34
- pygeodesy/geoids.py +28 -37
- pygeodesy/hausdorff.py +17 -18
- pygeodesy/heights.py +2 -2
- pygeodesy/internals.py +46 -13
- pygeodesy/interns.py +2 -2
- pygeodesy/karney.py +78 -15
- pygeodesy/ktm.py +13 -16
- pygeodesy/latlonBase.py +17 -19
- pygeodesy/lazily.py +28 -25
- pygeodesy/lcc.py +28 -31
- pygeodesy/ltp.py +7 -8
- pygeodesy/ltpTuples.py +71 -73
- pygeodesy/mgrs.py +8 -9
- pygeodesy/named.py +19 -10
- pygeodesy/nvectorBase.py +9 -10
- pygeodesy/osgr.py +9 -9
- pygeodesy/points.py +6 -6
- pygeodesy/rhumb/__init__.py +1 -1
- pygeodesy/rhumb/aux_.py +5 -5
- pygeodesy/rhumb/bases.py +30 -31
- pygeodesy/rhumb/ekx.py +3 -4
- pygeodesy/rhumb/solve.py +21 -22
- pygeodesy/solveBase.py +177 -123
- pygeodesy/sphericalBase.py +10 -11
- pygeodesy/sphericalNvector.py +13 -13
- pygeodesy/sphericalTrigonometry.py +86 -97
- pygeodesy/streprs.py +4 -34
- pygeodesy/triaxials.py +48 -43
- pygeodesy/units.py +208 -275
- pygeodesy/unitsBase.py +115 -107
- pygeodesy/ups.py +26 -31
- pygeodesy/utily.py +8 -8
- pygeodesy/utm.py +35 -40
- pygeodesy/utmups.py +43 -46
- pygeodesy/utmupsBase.py +8 -9
- pygeodesy/vector3d.py +26 -27
- pygeodesy/vector3dBase.py +6 -7
- pygeodesy/webmercator.py +19 -21
- pygeodesy/wgrs.py +18 -20
- PyGeodesy-24.6.9.dist-info/RECORD +0 -116
- {PyGeodesy-24.6.9.dist-info → PyGeodesy-24.7.7.dist-info}/WHEEL +0 -0
- {PyGeodesy-24.6.9.dist-info → PyGeodesy-24.7.7.dist-info}/top_level.txt +0 -0
pygeodesy/ltpTuples.py
CHANGED
|
@@ -11,11 +11,11 @@ L{ChLVYX2Tuple}, L{ChLVyx2Tuple} and L{Footprint5Tuple}.
|
|
|
11
11
|
@see: References in module L{ltp}.
|
|
12
12
|
'''
|
|
13
13
|
|
|
14
|
-
# from pygeodesy.basics import issubclassof #
|
|
14
|
+
# from pygeodesy.basics import issubclassof # _MODS
|
|
15
15
|
from pygeodesy.constants import _0_0, _1_0, _90_0, _N_90_0
|
|
16
16
|
# from pygeodesy.dms import F_D, toDMS # _MODS
|
|
17
|
-
from pygeodesy.errors import _TypeError, _TypesError, _xattr, \
|
|
18
|
-
|
|
17
|
+
from pygeodesy.errors import _TypeError, _TypesError, _xattr, _xkwds, \
|
|
18
|
+
_xkwds_item2
|
|
19
19
|
from pygeodesy.fmath import hypot, hypot_
|
|
20
20
|
from pygeodesy.interns import NN, _4_, _azimuth_, _center_, _COMMASPACE_, \
|
|
21
21
|
_ecef_, _elevation_, _height_, _lat_, _lon_, \
|
|
@@ -29,14 +29,14 @@ from pygeodesy.props import deprecated_method, deprecated_Property_RO, \
|
|
|
29
29
|
Property_RO, property_RO
|
|
30
30
|
from pygeodesy.streprs import Fmt, fstr, strs, _xzipairs
|
|
31
31
|
from pygeodesy.units import Bearing, Degrees, Degrees_, Height, _isDegrees, \
|
|
32
|
-
_isMeter, Lat, Lon, Meter, Meter_
|
|
32
|
+
_isMeter, Lat, Lon, Meter, Meter_
|
|
33
33
|
from pygeodesy.utily import atan2d, atan2b, sincos2_, sincos2d_, cos, radians
|
|
34
34
|
from pygeodesy.vector3d import Vector3d
|
|
35
35
|
|
|
36
36
|
# from math import cos, radians # from .utily
|
|
37
37
|
|
|
38
38
|
__all__ = _ALL_LAZY.ltpTuples
|
|
39
|
-
__version__ = '24.06.
|
|
39
|
+
__version__ = '24.06.28'
|
|
40
40
|
|
|
41
41
|
_aer_ = 'aer'
|
|
42
42
|
_alt_ = 'alt'
|
|
@@ -126,12 +126,12 @@ class _AbcBase(_NamedBase):
|
|
|
126
126
|
'''Get the I{local} I{Azimuth, Elevation, slant Range} (AER) components.
|
|
127
127
|
|
|
128
128
|
@kwarg Aer: Class to return AER (L{Aer}) or C{None}.
|
|
129
|
-
@kwarg name_Aer_kwds: Optional C{B{name}=NN} (C{str}) and
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
@kwarg name_Aer_kwds: Optional C{B{name}=NN} (C{str}) and optional,
|
|
130
|
+
additional B{L{Aer}} keyword arguments, ignored if
|
|
131
|
+
C{B{Aer} is None}.
|
|
132
132
|
|
|
133
|
-
@return: AER as an L{Aer} instance or if C{B{Aer} is None},
|
|
134
|
-
|
|
133
|
+
@return: AER as an L{Aer} instance or if C{B{Aer} is None}, an
|
|
134
|
+
L{Aer4Tuple}C{(azimuth, elevation, slantrange, ltp)}.
|
|
135
135
|
|
|
136
136
|
@raise TypeError: Invalid B{C{Aer}} or B{C{name_Aer_kwds}}.
|
|
137
137
|
'''
|
|
@@ -141,12 +141,12 @@ class _AbcBase(_NamedBase):
|
|
|
141
141
|
'''Get the I{local} I{East, North, Up} (ENU) components.
|
|
142
142
|
|
|
143
143
|
@kwarg Enu: Class to return ENU (L{Enu}) or C{None}.
|
|
144
|
-
@kwarg name_Enu_kwds: Optional C{B{name}=NN} (C{str}) and
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
@kwarg name_Enu_kwds: Optional C{B{name}=NN} (C{str}) and optional,
|
|
145
|
+
additional B{L{Enu}} keyword arguments, ignored if
|
|
146
|
+
C{B{Enu} is None}.
|
|
147
147
|
|
|
148
|
-
@return: ENU as an L{Enu} instance or if C{B{Enu} is None},
|
|
149
|
-
|
|
148
|
+
@return: ENU as an L{Enu} instance or if C{B{Enu} is None}, an
|
|
149
|
+
L{Enu4Tuple}C{(east, north, up, ltp)}.
|
|
150
150
|
|
|
151
151
|
@raise TypeError: Invalid B{C{Enu}} or B{C{name_Enu_kwds}}.
|
|
152
152
|
'''
|
|
@@ -156,12 +156,12 @@ class _AbcBase(_NamedBase):
|
|
|
156
156
|
'''Get the I{local} I{North, East, Down} (NED) components.
|
|
157
157
|
|
|
158
158
|
@kwarg Ned: Class to return NED (L{Ned}) or C{None}.
|
|
159
|
-
@kwarg name_Ned_kwds: Optional C{B{name}=NN} (C{str}) and
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
@kwarg name_Ned_kwds: Optional C{B{name}=NN} (C{str}) and optional,
|
|
160
|
+
additional B{L{Ned}} keyword arguments, ignored if
|
|
161
|
+
C{B{Ned} is None}.
|
|
162
162
|
|
|
163
|
-
@return: NED as an L{Ned} instance or if C{B{Ned} is None},
|
|
164
|
-
|
|
163
|
+
@return: NED as an L{Ned} instance or if C{B{Ned} is None}, an
|
|
164
|
+
L{Ned4Tuple}C{(north, east, down, ltp)}.
|
|
165
165
|
|
|
166
166
|
@raise TypeError: Invalid B{C{Ned}} or B{C{name_Ned_kwds}}.
|
|
167
167
|
'''
|
|
@@ -170,14 +170,14 @@ class _AbcBase(_NamedBase):
|
|
|
170
170
|
def toXyz(self, Xyz=None, **name_Xyz_kwds):
|
|
171
171
|
'''Get the local I{X, Y, Z} (XYZ) components.
|
|
172
172
|
|
|
173
|
-
@kwarg Xyz: Class to return XYZ (L{XyzLocal}, L{Enu},
|
|
174
|
-
|
|
175
|
-
@kwarg name_Xyz_kwds: Optional C{B{name}=NN} (C{str}) and
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
@kwarg Xyz: Class to return XYZ (L{XyzLocal}, L{Enu}, L{Ned}, L{Aer})
|
|
174
|
+
or C{None}.
|
|
175
|
+
@kwarg name_Xyz_kwds: Optional C{B{name}=NN} (C{str}) and optional,
|
|
176
|
+
additional B{C{Xyz}} keyword arguments, ignored if
|
|
177
|
+
C{B{Xyz} is None}.
|
|
178
178
|
|
|
179
|
-
@return: XYZ as an B{C{Xyz}} instance or if C{B{Xyz} is None},
|
|
180
|
-
|
|
179
|
+
@return: XYZ as an B{C{Xyz}} instance or if C{B{Xyz} is None}, an
|
|
180
|
+
L{Xyz4Tuple}C{(x, y, z, ltp)}.
|
|
181
181
|
|
|
182
182
|
@raise TypeError: Invalid B{C{Xyz}} or B{C{name_Xyz_kwds}}.
|
|
183
183
|
'''
|
|
@@ -209,7 +209,7 @@ class _Abc4Tuple(_NamedTuple):
|
|
|
209
209
|
'''(INTERNAL) Convert 4-Tuple to C{Cls} instance.
|
|
210
210
|
'''
|
|
211
211
|
kwds = _name1__(Cls_kwds, _or_nameof=self)
|
|
212
|
-
_is =
|
|
212
|
+
_is = _MODS.basics.issubclassof
|
|
213
213
|
if Cls is None:
|
|
214
214
|
n, _ = _name2__(Cls_kwds)
|
|
215
215
|
r = self.copy(name=n) if n else self
|
|
@@ -349,7 +349,7 @@ class Aer(_AbcBase):
|
|
|
349
349
|
number of (decimal) digits, unstripped
|
|
350
350
|
(C{int}), C{B{fmt}='[]'} the enclosing
|
|
351
351
|
backets format (C{str}) and separator
|
|
352
|
-
C{B{sep}=
|
|
352
|
+
C{B{sep}=", "} to join (C{str}).
|
|
353
353
|
|
|
354
354
|
@return: This AER as "[degrees360, degrees90, meter]" (C{str}).
|
|
355
355
|
'''
|
|
@@ -572,7 +572,7 @@ class Ned(_AbcBase):
|
|
|
572
572
|
number of (decimal) digits, unstripped
|
|
573
573
|
(C{int}), C{B{fmt}='[]'} the enclosing
|
|
574
574
|
backets format (C{str}) and separator
|
|
575
|
-
C{B{sep}=
|
|
575
|
+
C{B{sep}=", "} to join (C{str}).
|
|
576
576
|
|
|
577
577
|
@return: This NED as "[meter, meter, meter]" (C{str}).
|
|
578
578
|
'''
|
|
@@ -659,7 +659,7 @@ class _Vector3d(Vector3d):
|
|
|
659
659
|
number of (decimal) digits, unstripped
|
|
660
660
|
(C{int}), C{B{fmt}='[]'} the enclosing
|
|
661
661
|
backets format (C{str}) and separator
|
|
662
|
-
C{B{sep}=
|
|
662
|
+
C{B{sep}=", "} to join (C{str}).
|
|
663
663
|
|
|
664
664
|
@return: This XYZ as "[meter, meter, meter]" (C{str}).
|
|
665
665
|
'''
|
|
@@ -824,18 +824,17 @@ class XyzLocal(_Vector3d):
|
|
|
824
824
|
|
|
825
825
|
@kwarg Cartesian: Optional class to return C{(x, y, z)} (C{Cartesian})
|
|
826
826
|
or C{None}.
|
|
827
|
-
@kwarg ltp: Optional I{local tangent plane} (LTP) (L{Ltp}),
|
|
828
|
-
|
|
829
|
-
@kwarg name_Cartesian_kwds: Optional C{B{name}=NN} (C{str}) and
|
|
830
|
-
|
|
831
|
-
|
|
827
|
+
@kwarg ltp: Optional I{local tangent plane} (LTP) (L{Ltp}), overriding
|
|
828
|
+
this C{ltp}.
|
|
829
|
+
@kwarg name_Cartesian_kwds: Optional C{B{name}=NN} (C{str}) and optional,
|
|
830
|
+
additional B{C{Cartesian}} keyword arguments, ignored if
|
|
831
|
+
C{B{Cartesian} is None}.
|
|
832
832
|
|
|
833
833
|
@return: A B{C{Cartesian}} instance of if C{B{Cartesian} is None}, an
|
|
834
|
-
L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)}
|
|
835
|
-
|
|
834
|
+
L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with
|
|
835
|
+
C{M=None}, always.
|
|
836
836
|
|
|
837
|
-
@raise TypeError: Invalid B{C{ltp}}, B{C{Cartesian}} or
|
|
838
|
-
B{C{name_Cartesian_kwds}}.
|
|
837
|
+
@raise TypeError: Invalid B{C{ltp}}, B{C{Cartesian}} or B{C{name_Cartesian_kwds}}.
|
|
839
838
|
'''
|
|
840
839
|
ltp, kwds, n = self._ltp_kwds_name3(ltp, name_Cartesian_kwds)
|
|
841
840
|
if Cartesian is None:
|
|
@@ -851,12 +850,12 @@ class XyzLocal(_Vector3d):
|
|
|
851
850
|
'''Get the local I{East, North, Up} (ENU) components.
|
|
852
851
|
|
|
853
852
|
@kwarg Enu: Class to return ENU (L{Enu}) or C{None}.
|
|
854
|
-
@kwarg name_Enu_kwds: Optional C{B{name}=NN} (C{str}) and
|
|
855
|
-
|
|
856
|
-
|
|
853
|
+
@kwarg name_Enu_kwds: Optional C{B{name}=NN} (C{str}) and optional,
|
|
854
|
+
additional B{C{Enu}} keyword arguments, ignored if
|
|
855
|
+
C{B{Enu} is None}.
|
|
857
856
|
|
|
858
|
-
@return: ENU as an L{Enu} instance or if C{B{Enu} is None},
|
|
859
|
-
|
|
857
|
+
@return: ENU as an L{Enu} instance or if C{B{Enu} is None}, an
|
|
858
|
+
L{Enu4Tuple}C{(east, north, up, ltp)}.
|
|
860
859
|
|
|
861
860
|
@raise TypeError: Invalid B{C{Enu}} or B{C{name_Enu_kwds}}.
|
|
862
861
|
'''
|
|
@@ -865,20 +864,19 @@ class XyzLocal(_Vector3d):
|
|
|
865
864
|
def toLatLon(self, LatLon=None, ltp=None, **name_LatLon_kwds):
|
|
866
865
|
'''Get the geodetic C{(lat, lon, height)} coordinates if this local.
|
|
867
866
|
|
|
868
|
-
@kwarg LatLon: Optional class to return C{(x, y, z)} (C{LatLon})
|
|
869
|
-
|
|
870
|
-
@kwarg ltp: Optional I{local tangent plane} (LTP) (L{Ltp}),
|
|
871
|
-
|
|
872
|
-
@kwarg name_LatLon_kwds: Optional C{B{name}=NN} (C{str}) and
|
|
873
|
-
|
|
874
|
-
|
|
867
|
+
@kwarg LatLon: Optional class to return C{(x, y, z)} (C{LatLon}) or
|
|
868
|
+
C{None}.
|
|
869
|
+
@kwarg ltp: Optional I{local tangent plane} (LTP) (L{Ltp}), overriding
|
|
870
|
+
this ENU/NED/AER/XYZ's LTP.
|
|
871
|
+
@kwarg name_LatLon_kwds: Optional C{B{name}=NN} (C{str}) and optional,
|
|
872
|
+
additional B{C{LatLon}} keyword arguments, ignored if
|
|
873
|
+
C{B{LatLon} is None}.
|
|
875
874
|
|
|
876
875
|
@return: An B{C{LatLon}} instance of if C{B{LatLon} is None}, an
|
|
877
|
-
L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M,
|
|
878
|
-
|
|
876
|
+
L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with
|
|
877
|
+
C{M=None}, always.
|
|
879
878
|
|
|
880
|
-
@raise TypeError: Invalid B{C{
|
|
881
|
-
B{C{name_LatLon_kwds}}.
|
|
879
|
+
@raise TypeError: Invalid B{C{LatLon}}, B{C{ltp}} or B{C{name_LatLon_kwds}}.
|
|
882
880
|
'''
|
|
883
881
|
ltp, kwds, n = self._ltp_kwds_name3(ltp, name_LatLon_kwds)
|
|
884
882
|
t = ltp._local2ecef(self, nine=True)
|
|
@@ -895,9 +893,9 @@ class XyzLocal(_Vector3d):
|
|
|
895
893
|
@kwarg M: Optionally include the rotation matrix (C{bool}).
|
|
896
894
|
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
897
895
|
|
|
898
|
-
@return: L{Local9Tuple}C{(x, y, z, lat, lon, height, ltp,
|
|
899
|
-
|
|
900
|
-
|
|
896
|
+
@return: L{Local9Tuple}C{(x, y, z, lat, lon, height, ltp, ecef, M)}
|
|
897
|
+
with C{ltp} this C{Ltp}, C{ecef} an L{Ecef9Tuple} and C{M}
|
|
898
|
+
an L{EcefMatrix} or C{None}.
|
|
901
899
|
'''
|
|
902
900
|
ltp = self.ltp # see C{self.toLatLon}
|
|
903
901
|
t = ltp._local2ecef(self, nine=True, M=M)
|
|
@@ -909,12 +907,12 @@ class XyzLocal(_Vector3d):
|
|
|
909
907
|
'''Get the local I{North, East, Down} (Ned) components.
|
|
910
908
|
|
|
911
909
|
@kwarg Ned: Class to return NED (L{Ned}) or C{None}.
|
|
912
|
-
@kwarg name_Ned_kwds: Optional C{B{name}=NN} (C{str}) and
|
|
913
|
-
|
|
914
|
-
|
|
910
|
+
@kwarg name_Ned_kwds: Optional C{B{name}=NN} (C{str}) and optional,
|
|
911
|
+
additional B{C{Ned}} keyword arguments, ignored if
|
|
912
|
+
C{B{Ned} is None}.
|
|
915
913
|
|
|
916
|
-
@return: NED as an L{Ned} instance or if C{B{Ned} is None},
|
|
917
|
-
|
|
914
|
+
@return: NED as an L{Ned} instance or if C{B{Ned} is None}, an
|
|
915
|
+
L{Ned4Tuple}C{(north, east, down, ltp)}.
|
|
918
916
|
|
|
919
917
|
@raise TypeError: Invalid B{C{Ned}} or B{C{name_Ned_kwds}}.
|
|
920
918
|
'''
|
|
@@ -923,14 +921,14 @@ class XyzLocal(_Vector3d):
|
|
|
923
921
|
def toXyz(self, Xyz=None, **name_Xyz_kwds):
|
|
924
922
|
'''Get the local I{X, Y, Z} (XYZ) components.
|
|
925
923
|
|
|
926
|
-
@kwarg Xyz: Class to return XYZ (L{XyzLocal}, L{Enu},
|
|
927
|
-
|
|
928
|
-
@kwarg name_Xyz_kwds: Optional C{B{name}=NN} (C{str}) and
|
|
929
|
-
|
|
930
|
-
|
|
924
|
+
@kwarg Xyz: Class to return XYZ (L{XyzLocal}, L{Enu}, L{Ned}, L{Aer})
|
|
925
|
+
or C{None}.
|
|
926
|
+
@kwarg name_Xyz_kwds: Optional C{B{name}=NN} (C{str}) and optional,
|
|
927
|
+
additional B{C{Xyz}} keyword arguments, ignored if
|
|
928
|
+
C{B{Xyz} is None}.
|
|
931
929
|
|
|
932
|
-
@return: XYZ as an B{C{Xyz}} instance or if C{B{Xyz} is None},
|
|
933
|
-
|
|
930
|
+
@return: XYZ as an B{C{Xyz}} instance or if C{B{Xyz} is None}, an
|
|
931
|
+
L{Xyz4Tuple}C{(x, y, z, ltp)}.
|
|
934
932
|
|
|
935
933
|
@raise TypeError: Invalid B{C{Xyz}} or B{C{name_EXyz_kwds}}.
|
|
936
934
|
'''
|
|
@@ -1183,7 +1181,7 @@ class Local9Tuple(_NamedTuple):
|
|
|
1183
1181
|
@kwarg Aer: Class to return AER (L{Aer}) or C{None}.
|
|
1184
1182
|
@kwarg name_Aer_kwds: Optional C{B{name}=NN} (C{str}) and optional,
|
|
1185
1183
|
additional B{L{Aer}} keyword arguments, ignored if
|
|
1186
|
-
B{
|
|
1184
|
+
C{B{Aer} is None}.
|
|
1187
1185
|
|
|
1188
1186
|
@return: AER as an L{Aer} instance or if C{B{Aer} is None}, an
|
|
1189
1187
|
L{Aer4Tuple}C{(azimuth, elevation, slantrange, ltp)}.
|
|
@@ -1247,7 +1245,7 @@ class Local9Tuple(_NamedTuple):
|
|
|
1247
1245
|
@kwarg Ned: Class to return NED (L{Ned}) or C{None}.
|
|
1248
1246
|
@kwarg name_Ned_kwds: Optional C{B{name}=NN} (C{str}) and optional,
|
|
1249
1247
|
additional B{L{Ned}} keyword arguments, ignored if
|
|
1250
|
-
B{
|
|
1248
|
+
C{B{Ned} is None}.
|
|
1251
1249
|
|
|
1252
1250
|
@return: NED as an L{Ned} instance or if C{B{Ned} is None}, an
|
|
1253
1251
|
L{Ned4Tuple}C{(north, east, down, ltp)}.
|
pygeodesy/mgrs.py
CHANGED
|
@@ -55,7 +55,7 @@ from pygeodesy.utm import toUtm8, _to3zBlat, Utm, _UTM_ZONE_MAX, _UTM_ZONE_MIN
|
|
|
55
55
|
# from pygeodesy.utmupsBase import _UTM_ZONE_MAX, _UTM_ZONE_MIN # from .utm
|
|
56
56
|
|
|
57
57
|
__all__ = _ALL_LAZY.mgrs
|
|
58
|
-
__version__ = '24.06.
|
|
58
|
+
__version__ = '24.06.11'
|
|
59
59
|
|
|
60
60
|
_AN_ = 'AN' # default south pole grid tile and band B
|
|
61
61
|
_AtoPx_ = _AtoZnoIO_.tillP
|
|
@@ -596,18 +596,17 @@ def toMgrs(utmups, Mgrs=Mgrs, **name_Mgrs_kwds):
|
|
|
596
596
|
@arg utmups: A UTM or UPS coordinate (L{Utm}, L{Etm} or L{Ups}).
|
|
597
597
|
@kwarg Mgrs: Optional class to return the MGRS grid reference
|
|
598
598
|
(L{Mgrs}) or C{None}.
|
|
599
|
-
@kwarg name_Mgrs_kwds: Optional C{B{name}=NN} (C{str}) and
|
|
600
|
-
|
|
601
|
-
|
|
599
|
+
@kwarg name_Mgrs_kwds: Optional C{B{name}=NN} (C{str}) and optional,
|
|
600
|
+
additional B{C{Mgrs}} keyword arguments, ignored if
|
|
601
|
+
C{B{Mgrs} is None}.
|
|
602
602
|
|
|
603
|
-
@return: The MGRS grid reference as B{C{Mgrs}} or if C{B{Mgrs}
|
|
604
|
-
|
|
605
|
-
|
|
603
|
+
@return: The MGRS grid reference as B{C{Mgrs}} or if C{B{Mgrs} is
|
|
604
|
+
None} as an L{Mgrs6Tuple}C{(zone, EN, easting, northing,
|
|
605
|
+
band, datum)}.
|
|
606
606
|
|
|
607
607
|
@raise MGRSError: Invalid B{C{utmups}}.
|
|
608
608
|
|
|
609
|
-
@raise TypeError: If B{C{utmups}} is not L{Utm} nor L{
|
|
610
|
-
nor L{Ups}.
|
|
609
|
+
@raise TypeError: If B{C{utmups}} is not L{Utm}, L{Etm} nor L{Ups}.
|
|
611
610
|
'''
|
|
612
611
|
# _MODS.utmups.utmupsValidate(utmups, MGRS=True, Error-MGRSError)
|
|
613
612
|
_xinstanceof(Utm, Ups, utmups=utmups) # Utm, Etm, Ups
|
pygeodesy/named.py
CHANGED
|
@@ -34,7 +34,7 @@ from pygeodesy.streprs import attrs, Fmt, lrstrip, pairs, reprs, unstr
|
|
|
34
34
|
# from pygeodesy.units import _toUnit # _MODS
|
|
35
35
|
|
|
36
36
|
__all__ = _ALL_LAZY.named
|
|
37
|
-
__version__ = '24.06.
|
|
37
|
+
__version__ = '24.06.24'
|
|
38
38
|
|
|
39
39
|
_COMMANL_ = _COMMA_ + _NL_
|
|
40
40
|
_COMMASPACEDOT_ = _COMMASPACE_ + _DOT_
|
|
@@ -72,6 +72,15 @@ class ADict(dict):
|
|
|
72
72
|
'''
|
|
73
73
|
return self.toRepr()
|
|
74
74
|
|
|
75
|
+
def __setattr__(self, name, value):
|
|
76
|
+
'''Set the value of a I{known} item by B{C{name}}.
|
|
77
|
+
'''
|
|
78
|
+
try:
|
|
79
|
+
if self[name] != value:
|
|
80
|
+
self[name] = value
|
|
81
|
+
except KeyError:
|
|
82
|
+
dict.__setattr__(self, name, value)
|
|
83
|
+
|
|
75
84
|
def __str__(self):
|
|
76
85
|
'''Default C{str(self)}.
|
|
77
86
|
'''
|
|
@@ -241,15 +250,16 @@ class _Named(object):
|
|
|
241
250
|
# _update_all(d)
|
|
242
251
|
return d
|
|
243
252
|
|
|
244
|
-
def _instr(self,
|
|
245
|
-
'''(INTERNAL) Format, used by C{Conic}, C{Ellipsoid}, C{Transform}, C{Triaxial}.
|
|
253
|
+
def _instr(self, *attrs, **fmt_prec_props_sep_name__kwds):
|
|
254
|
+
'''(INTERNAL) Format, used by C{Conic}, C{Ellipsoid}, C{Geodesic...}, C{Transform}, C{Triaxial}.
|
|
246
255
|
'''
|
|
247
|
-
def
|
|
248
|
-
return fmt, props, kwds
|
|
256
|
+
def _fmt_prec_props_kwds(fmt=Fmt.F, prec=6, props=(), sep=_COMMASPACE_, **kwds):
|
|
257
|
+
return fmt, prec, props, sep, kwds
|
|
249
258
|
|
|
250
|
-
|
|
259
|
+
name, kwds = _name2__(**fmt_prec_props_sep_name__kwds)
|
|
260
|
+
fmt, prec, props, sep, kwds = _fmt_prec_props_kwds(**kwds)
|
|
251
261
|
|
|
252
|
-
t = () if name is None else (Fmt.EQUAL(name=repr(self.
|
|
262
|
+
t = () if name is None else (Fmt.EQUAL(name=repr(name or self.name)),)
|
|
253
263
|
if attrs:
|
|
254
264
|
t += pairs(((a, getattr(self, a)) for a in attrs),
|
|
255
265
|
prec=prec, ints=True, fmt=fmt)
|
|
@@ -258,7 +268,7 @@ class _Named(object):
|
|
|
258
268
|
prec=prec, ints=True)
|
|
259
269
|
if kwds:
|
|
260
270
|
t += pairs(kwds, prec=prec)
|
|
261
|
-
return
|
|
271
|
+
return sep.join(t) if sep else t
|
|
262
272
|
|
|
263
273
|
@property_RO
|
|
264
274
|
def iteration(self): # see .karney.GDict
|
|
@@ -1090,8 +1100,7 @@ class _NamedTuple(tuple, _Named):
|
|
|
1090
1100
|
'''Yield the items, each as a C{2-tuple (name, value}) with the
|
|
1091
1101
|
value wrapped as an instance of its L{units} class.
|
|
1092
1102
|
|
|
1093
|
-
@kwarg Error: Optional C{B{Error}=UnitError} to raise
|
|
1094
|
-
L{units} issues.
|
|
1103
|
+
@kwarg Error: Optional C{B{Error}=UnitError} to raise.
|
|
1095
1104
|
|
|
1096
1105
|
@raise Error: Invalid C{Named-Tuple} item or L{units} class.
|
|
1097
1106
|
|
pygeodesy/nvectorBase.py
CHANGED
|
@@ -14,7 +14,7 @@ and published under the same MIT Licence**, see U{Vector-based geodesy
|
|
|
14
14
|
from pygeodesy.constants import EPS, EPS1, EPS_2, R_M, _2_0, _N_2_0
|
|
15
15
|
# from pygeodesy.datums import _spherical_datum # from .formy
|
|
16
16
|
from pygeodesy.errors import IntersectionError, _ValueError, VectorError, \
|
|
17
|
-
_xkwds, _xkwds_pop2
|
|
17
|
+
_xattrs, _xkwds, _xkwds_pop2
|
|
18
18
|
from pygeodesy.fmath import fdot, fidw, hypot_ # PYCHOK fdot shared
|
|
19
19
|
from pygeodesy.fsums import Fsum, fsumf_
|
|
20
20
|
from pygeodesy.formy import _isequalTo, n_xyz2latlon, n_xyz2philam, \
|
|
@@ -30,7 +30,7 @@ from pygeodesy.namedTuples import Trilaterate5Tuple, Vector3Tuple, \
|
|
|
30
30
|
Vector4Tuple, map1
|
|
31
31
|
from pygeodesy.props import deprecated_method, Property_RO, property_doc_, \
|
|
32
32
|
property_RO, _update_all
|
|
33
|
-
from pygeodesy.streprs import Fmt, hstr, unstr
|
|
33
|
+
from pygeodesy.streprs import Fmt, hstr, unstr
|
|
34
34
|
from pygeodesy.units import Bearing, Height, Radius_, Scalar
|
|
35
35
|
from pygeodesy.utily import sincos2d, _unrollon, _unrollon3
|
|
36
36
|
from pygeodesy.vector3d import Vector3d, _xyzhdlln4
|
|
@@ -38,7 +38,7 @@ from pygeodesy.vector3d import Vector3d, _xyzhdlln4
|
|
|
38
38
|
from math import fabs, sqrt
|
|
39
39
|
|
|
40
40
|
__all__ = _ALL_LAZY.nvectorBase
|
|
41
|
-
__version__ = '24.06.
|
|
41
|
+
__version__ = '24.06.12'
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
class NvectorBase(Vector3d): # XXX kept private
|
|
@@ -53,10 +53,9 @@ class NvectorBase(Vector3d): # XXX kept private
|
|
|
53
53
|
|
|
54
54
|
@arg x_xyz: X component of vector (C{scalar}) or (3-D) vector
|
|
55
55
|
(C{Nvector}, L{Vector3d}, L{Vector3Tuple} or L{Vector4Tuple}).
|
|
56
|
-
@kwarg y: Y component of vector (C{scalar}),
|
|
57
|
-
C{scalar}
|
|
58
|
-
@kwarg z: Z component of vector (C{scalar}),
|
|
59
|
-
C{scalar}, otherwise same units as B{C{x_xyz}}.
|
|
56
|
+
@kwarg y: Y component of vector (C{scalar}), required if B{C{x_xyz}} is
|
|
57
|
+
C{scalar} and same units as B{C{x_xyz}}, ignored otherwise.
|
|
58
|
+
@kwarg z: Z component of vector (C{scalar}), like B{C{y}}.
|
|
60
59
|
@kwarg h: Optional height above surface (C{meter}).
|
|
61
60
|
@kwarg datum: Optional, I{pass-thru} datum (L{Datum}).
|
|
62
61
|
@kwarg ll_name: Optional C{B{name}=NN} (C{str}) and optional, original
|
|
@@ -346,7 +345,7 @@ class NvectorBase(Vector3d): # XXX kept private
|
|
|
346
345
|
def toVector3d(self, norm=True):
|
|
347
346
|
'''Convert this n-vector to a 3-D vector, I{ignoring height}.
|
|
348
347
|
|
|
349
|
-
@kwarg norm:
|
|
348
|
+
@kwarg norm: If C{True}, normalize the 3-D vector (C{bool}).
|
|
350
349
|
|
|
351
350
|
@return: The (normalized) vector (L{Vector3d}).
|
|
352
351
|
'''
|
|
@@ -366,7 +365,7 @@ class NvectorBase(Vector3d): # XXX kept private
|
|
|
366
365
|
|
|
367
366
|
@return: Normalized vector (C{Nvector}).
|
|
368
367
|
'''
|
|
369
|
-
return _xattrs(Vector3d.unit(self, ll=ll), _under(_h_))
|
|
368
|
+
return _xattrs(Vector3d.unit(self, ll=ll), self, _under(_h_))
|
|
370
369
|
|
|
371
370
|
@Property_RO
|
|
372
371
|
def xyzh(self):
|
|
@@ -572,7 +571,7 @@ def sumOf(nvectors, Vector=None, h=None, **Vector_kwds):
|
|
|
572
571
|
arguments, ignored if C{B{Vector} is None}.
|
|
573
572
|
|
|
574
573
|
@return: Vectorial sum (B{C{Vector}}) or a L{Vector4Tuple}C{(x, y,
|
|
575
|
-
z, h)} if B{
|
|
574
|
+
z, h)} if C{B{Vector} is None}.
|
|
576
575
|
|
|
577
576
|
@raise VectorError: No B{C{nvectors}}.
|
|
578
577
|
'''
|
pygeodesy/osgr.py
CHANGED
|
@@ -46,14 +46,14 @@ from pygeodesy.namedTuples import EasNor2Tuple, LatLon2Tuple, \
|
|
|
46
46
|
from pygeodesy.props import Property_RO, property_RO
|
|
47
47
|
from pygeodesy.streprs import _EN_WIDE, enstr2, _enstr2m3, Fmt, \
|
|
48
48
|
_resolution10, unstr, _xzipairs
|
|
49
|
-
from pygeodesy.units import Easting,
|
|
50
|
-
|
|
49
|
+
from pygeodesy.units import Easting, Lamd, Lat, Lon, Northing, \
|
|
50
|
+
Phid, Scalar, _10um, _100km
|
|
51
51
|
from pygeodesy.utily import degrees90, degrees180, sincostan3, truncate
|
|
52
52
|
|
|
53
53
|
from math import cos, fabs, radians, sin, sqrt
|
|
54
54
|
|
|
55
55
|
__all__ = _ALL_LAZY.osgr
|
|
56
|
-
__version__ = '24.
|
|
56
|
+
__version__ = '24.06.15'
|
|
57
57
|
|
|
58
58
|
_equivalent_ = 'equivalent'
|
|
59
59
|
_OSGR_ = 'OSGR'
|
|
@@ -108,7 +108,7 @@ class _NG(object):
|
|
|
108
108
|
|
|
109
109
|
@Property_RO
|
|
110
110
|
def lam0(self): # True origin longitude C{radians}
|
|
111
|
-
return
|
|
111
|
+
return Lamd(self.lon0)
|
|
112
112
|
|
|
113
113
|
@Property_RO
|
|
114
114
|
def lat0(self): # True origin latitude, 49°N
|
|
@@ -160,7 +160,7 @@ class _NG(object):
|
|
|
160
160
|
|
|
161
161
|
@Property_RO
|
|
162
162
|
def phi0(self): # True origin latitude C{radians}
|
|
163
|
-
return
|
|
163
|
+
return Phid(self.lat0)
|
|
164
164
|
|
|
165
165
|
def reverse(self, osgr): # convert C{osgr} to (ellipsoidal} LatLon, as I{Karney}'s
|
|
166
166
|
# U{Reverse<https://GeographicLib.SourceForge.io/C++/doc/OSGB_8hpp_source.html>}
|
|
@@ -296,7 +296,7 @@ class Osgr(_NamedBase):
|
|
|
296
296
|
@kwarg LatLon_kwds: Optional, additional B{C{LatLon}} keyword
|
|
297
297
|
arguments, ignored if C{B{LatLon} is None}.
|
|
298
298
|
|
|
299
|
-
@return: A B{C{LatLon}} instance or if B{
|
|
299
|
+
@return: A B{C{LatLon}} instance or if C{B{LatLon} is None}
|
|
300
300
|
a L{LatLonDatum3Tuple}C{(lat, lon, datum)}.
|
|
301
301
|
|
|
302
302
|
@note: While OS grid references are based on the OSGB36 datum,
|
|
@@ -520,8 +520,8 @@ def parseOSGR(strOSGR, Osgr=Osgr, **name_Osgr_kwds):
|
|
|
520
520
|
optional, additional B{C{Osgr}} keyword arguments,
|
|
521
521
|
ignored if C{B{Osgr} is None}.
|
|
522
522
|
|
|
523
|
-
@return: An (B{C{Osgr}}) instance or if B{
|
|
524
|
-
|
|
523
|
+
@return: An (B{C{Osgr}}) instance or if C{B{Osgr} is None}, an
|
|
524
|
+
L{EasNor2Tuple}C{(easting, northing)}.
|
|
525
525
|
|
|
526
526
|
@raise OSGRError: Invalid B{C{strOSGR}}.
|
|
527
527
|
'''
|
|
@@ -598,7 +598,7 @@ def toOsgr(latlon, lon=None, kTM=False, datum=_WGS84, Osgr=Osgr, # MCCABE 14
|
|
|
598
598
|
and additional B{C{Osgr}} keyword arguments,
|
|
599
599
|
ignored if C{B{Osgr} is None}.
|
|
600
600
|
|
|
601
|
-
@return: An (B{C{Osgr}}) instance or if B{
|
|
601
|
+
@return: An (B{C{Osgr}}) instance or if C{B{Osgr} is None}
|
|
602
602
|
an L{EasNor2Tuple}C{(easting, northing)}.
|
|
603
603
|
|
|
604
604
|
@note: If L{isint}C{(B{prec})} both easting and northing are
|
pygeodesy/points.py
CHANGED
|
@@ -62,7 +62,7 @@ from pygeodesy.utily import atan2b, degrees90, degrees180, degrees2m, \
|
|
|
62
62
|
from math import cos, fabs, fmod as _fmod, radians, sin
|
|
63
63
|
|
|
64
64
|
__all__ = _ALL_LAZY.points
|
|
65
|
-
__version__ = '24.06.
|
|
65
|
+
__version__ = '24.06.15'
|
|
66
66
|
|
|
67
67
|
_ilat_ = 'ilat'
|
|
68
68
|
_ilon_ = 'ilon'
|
|
@@ -391,7 +391,7 @@ class _Array2LatLon(_Basequence): # immutable, on purpose
|
|
|
391
391
|
# check the attr indices
|
|
392
392
|
for n, (ai, i) in enumerate(ais):
|
|
393
393
|
if not isint(i):
|
|
394
|
-
raise _IsnotError(int
|
|
394
|
+
raise _IsnotError(int, **{ai: i})
|
|
395
395
|
i = int(i)
|
|
396
396
|
if not 0 <= i < shape[1]:
|
|
397
397
|
raise _ValueError(ai, i)
|
|
@@ -959,8 +959,8 @@ def areaOf(points, adjust=True, radius=R_M, wrap=True):
|
|
|
959
959
|
the B{C{points}} (C{bool}).
|
|
960
960
|
|
|
961
961
|
@return: Approximate area (I{square} C{meter}, same units as
|
|
962
|
-
B{C{radius}} or C{radians} I{squared} if B{
|
|
963
|
-
is
|
|
962
|
+
B{C{radius}} or C{radians} I{squared} if C{B{radius}
|
|
963
|
+
is None}).
|
|
964
964
|
|
|
965
965
|
@raise PointsError: Insufficient number of B{C{points}}
|
|
966
966
|
|
|
@@ -992,8 +992,8 @@ def boundsOf(points, wrap=False, LatLon=None): # was=True
|
|
|
992
992
|
@kwarg LatLon: Optional class to return the C{bounds}
|
|
993
993
|
corners (C{LatLon}) or C{None}.
|
|
994
994
|
|
|
995
|
-
@return: A L{Bounds2Tuple}C{(latlonSW, latlonNE)}
|
|
996
|
-
B{C{LatLon}}
|
|
995
|
+
@return: A L{Bounds2Tuple}C{(latlonSW, latlonNE)}, each
|
|
996
|
+
a B{C{LatLon}} or if C{B{LatLon} is None}, a
|
|
997
997
|
L{Bounds4Tuple}C{(latS, lonW, latN, lonE)}.
|
|
998
998
|
|
|
999
999
|
@raise PointsError: Insufficient number of B{C{points}}
|
pygeodesy/rhumb/__init__.py
CHANGED
|
@@ -9,7 +9,7 @@ u'''Package of lazily imported C{rhumb} modules L{rhumb.aux_}, L{rhumb.ekx} and
|
|
|
9
9
|
from pygeodesy.lazily import _ALL_LAZY, _ALL_OTHER, _lazy_import_as, _unLazy0
|
|
10
10
|
|
|
11
11
|
__all__ = _ALL_LAZY.rhumb
|
|
12
|
-
__version__ = '24.
|
|
12
|
+
__version__ = '24.06.18'
|
|
13
13
|
|
|
14
14
|
if _unLazy0: # or _isfrozen
|
|
15
15
|
from pygeodesy.rhumb.aux_ import RhumbAux, RhumbLineAux
|
pygeodesy/rhumb/aux_.py
CHANGED
|
@@ -47,7 +47,7 @@ from pygeodesy.rhumb.bases import RhumbBase, RhumbLineBase, \
|
|
|
47
47
|
from math import ceil as _ceil, fabs, radians
|
|
48
48
|
|
|
49
49
|
__all__ = _ALL_LAZY.rhumb_aux_
|
|
50
|
-
__version__ = '24.
|
|
50
|
+
__version__ = '24.06.11'
|
|
51
51
|
|
|
52
52
|
# DIGITS = (sizeof(real) * 8) bits
|
|
53
53
|
# = (ctypes.sizeof(ctypes.c_double(1.0)) * 8) bits
|
|
@@ -74,14 +74,14 @@ class RhumbAux(RhumbBase):
|
|
|
74
74
|
@kwarg a_earth: This rhumb's earth model (L{Datum}, L{Ellipsoid},
|
|
75
75
|
L{Ellipsoid2}, L{a_f2Tuple}, 2-tuple C{(a, f)}) or
|
|
76
76
|
the (equatorial) radius (C{meter}, conventionally).
|
|
77
|
-
@kwarg f: The ellipsoid's flattening (C{scalar}),
|
|
78
|
-
C{scalar}, ignored otherwise.
|
|
77
|
+
@kwarg f: The ellipsoid's flattening (C{scalar}), required if B{C{a_earth}}
|
|
78
|
+
is C{scalar}, ignored otherwise.
|
|
79
79
|
@kwarg exact: If C{True}, use the exact expressions for the I{Auxiliary
|
|
80
80
|
Latitudes}, otherwise use the I{Fourier} series expansion
|
|
81
81
|
(C{bool}), see also property C{exact}.
|
|
82
82
|
@kwarg TMorder_name: Optional C{B{name}=NN} (C{str}) and optional
|
|
83
|
-
keyword argument C{B{TMorder}=6}
|
|
84
|
-
|
|
83
|
+
keyword argument C{B{TMorder}=6}, the order of the
|
|
84
|
+
L{KTransverseMercator}, see property C{TMorder}.
|
|
85
85
|
|
|
86
86
|
@raise ImportError: Package C{numpy} not found or not installed, only
|
|
87
87
|
required for area C{S12} when C{B{exact} is True}.
|