pygeodesy 24.6.9__py2.py3-none-any.whl → 24.6.24__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {PyGeodesy-24.6.9.dist-info → PyGeodesy-24.6.24.dist-info}/METADATA +2 -2
- PyGeodesy-24.6.24.dist-info/RECORD +117 -0
- pygeodesy/__init__.py +33 -32
- 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 +9 -1
- 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 +16 -2
- 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 +100 -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 +909 -0
- pygeodesy/geodesicw.py +11 -13
- pygeodesy/geodesicx/__init__.py +4 -4
- pygeodesy/geodesicx/gx.py +18 -28
- pygeodesy/geodesicx/gxbases.py +20 -8
- pygeodesy/geodesicx/gxline.py +16 -22
- pygeodesy/geodsolve.py +80 -10
- pygeodesy/geohash.py +26 -34
- pygeodesy/geoids.py +28 -37
- pygeodesy/hausdorff.py +17 -18
- pygeodesy/heights.py +2 -2
- pygeodesy/internals.py +6 -0
- pygeodesy/interns.py +2 -2
- pygeodesy/karney.py +20 -4
- pygeodesy/ktm.py +13 -16
- pygeodesy/latlonBase.py +17 -19
- pygeodesy/lazily.py +7 -6
- pygeodesy/lcc.py +28 -31
- pygeodesy/ltp.py +7 -8
- pygeodesy/ltpTuples.py +68 -70
- 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/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 +204 -271
- 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.6.24.dist-info}/WHEEL +0 -0
- {PyGeodesy-24.6.9.dist-info → PyGeodesy-24.6.24.dist-info}/top_level.txt +0 -0
pygeodesy/basics.py
CHANGED
|
@@ -30,13 +30,14 @@ from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _FOR_DOCS, _getenv,
|
|
|
30
30
|
# from pygeodesy.nvectorBase import NvectorBase # _MODS
|
|
31
31
|
# from pygeodesy.props import _update_all # _MODS
|
|
32
32
|
# from pygeodesy.streprs import Fmt # _MODS
|
|
33
|
+
# from pygeodesy.unitsBase import _NamedUnit, Str # _MODS
|
|
33
34
|
|
|
34
35
|
from copy import copy as _copy, deepcopy as _deepcopy
|
|
35
36
|
from math import copysign as _copysign
|
|
36
37
|
import inspect as _inspect
|
|
37
38
|
|
|
38
39
|
__all__ = _ALL_LAZY.basics
|
|
39
|
-
__version__ = '24.
|
|
40
|
+
__version__ = '24.06.15'
|
|
40
41
|
|
|
41
42
|
_below_ = 'below'
|
|
42
43
|
_list_tuple_types = (list, tuple)
|
|
@@ -194,6 +195,13 @@ def copytype(x, y):
|
|
|
194
195
|
return type(y)(x if x else _0_0)
|
|
195
196
|
|
|
196
197
|
|
|
198
|
+
def _enumereverse(iterable):
|
|
199
|
+
'''(INTERNAL) Reversed C{enumberate}.
|
|
200
|
+
'''
|
|
201
|
+
for j in _reverange(len(iterable)):
|
|
202
|
+
yield j, iterable[j]
|
|
203
|
+
|
|
204
|
+
|
|
197
205
|
def halfs2(str2):
|
|
198
206
|
'''Split a string in 2 halfs.
|
|
199
207
|
|
pygeodesy/booleans.py
CHANGED
|
@@ -43,7 +43,7 @@ from pygeodesy.utily import fabs, _unrollon, _Wrap
|
|
|
43
43
|
# from math import fabs # from .utily
|
|
44
44
|
|
|
45
45
|
__all__ = _ALL_LAZY.booleans
|
|
46
|
-
__version__ = '24.06.
|
|
46
|
+
__version__ = '24.06.15'
|
|
47
47
|
|
|
48
48
|
_0_EPS = EPS # near-zero, positive
|
|
49
49
|
_EPS_0 = -EPS # near-zero, negative
|
|
@@ -131,8 +131,8 @@ class _LatLonBool(_Named):
|
|
|
131
131
|
|
|
132
132
|
@arg lat_ll: Latitude (C{scalar}) or a lat-/longitude (C{LatLon[FHP|GH]},
|
|
133
133
|
C{Clip[FHP|GH]4Tuple} or some other C{LatLon}).
|
|
134
|
-
@kwarg lon: Longitude (C{scalar}),
|
|
135
|
-
otherwise.
|
|
134
|
+
@kwarg lon: Longitude (C{scalar}), required B{C{lat_ll}} is scalar,
|
|
135
|
+
ignored otherwise.
|
|
136
136
|
@kwarg height: Height (C{scalar}), conventionally C{meter}.
|
|
137
137
|
@kwarg clipid: Clip identifier (C{int}).
|
|
138
138
|
@kwarg wrap: If C{True}, wrap or I{normalize} B{C{lat}} and B{C{lon}} (C{bool}).
|
|
@@ -1961,7 +1961,7 @@ def _other(this, other):
|
|
|
1961
1961
|
C = this.__class__
|
|
1962
1962
|
if isinstance(other, C):
|
|
1963
1963
|
return other
|
|
1964
|
-
raise _IsnotError(C
|
|
1964
|
+
raise _IsnotError(C, other=other)
|
|
1965
1965
|
|
|
1966
1966
|
|
|
1967
1967
|
def _outside(x1, x2, lo, hi):
|
pygeodesy/cartesianBase.py
CHANGED
|
@@ -43,7 +43,7 @@ from pygeodesy.vector3d import Vector3d, _xyzhdlln4
|
|
|
43
43
|
# from math import atan2, degrees, fabs, radians, sqrt # from .fmath, .utily
|
|
44
44
|
|
|
45
45
|
__all__ = _ALL_LAZY.cartesianBase
|
|
46
|
-
__version__ = '24.06.
|
|
46
|
+
__version__ = '24.06.11'
|
|
47
47
|
|
|
48
48
|
_r_ = 'r'
|
|
49
49
|
_theta_ = 'theta'
|
|
@@ -62,8 +62,7 @@ class CartesianBase(Vector3d):
|
|
|
62
62
|
L{Ecef9Tuple}, L{Vector3Tuple} or L{Vector4Tuple}.
|
|
63
63
|
@kwarg y: Cartesian Y coordinate (C{scalar}), ignored if B{C{x_xyz}}
|
|
64
64
|
is not C{scalar}, otherwise same units as B{C{x_xyz}}.
|
|
65
|
-
@kwarg z: Cartesian Z coordinate (C{scalar}),
|
|
66
|
-
is not C{scalar}, otherwise same units as B{C{x_xyz}}.
|
|
65
|
+
@kwarg z: Cartesian Z coordinate (C{scalar}), like B{C{y}}.
|
|
67
66
|
@kwarg datum: Optional datum (L{Datum}, L{Ellipsoid}, L{Ellipsoid2}
|
|
68
67
|
or L{a_f2Tuple}).
|
|
69
68
|
@kwarg ll_name: Optional C{B{name}=NN} (C{str}) and optional, original
|
|
@@ -711,15 +710,15 @@ class CartesianBase(Vector3d):
|
|
|
711
710
|
@kwarg datum: Optional datum (L{Datum}, L{Ellipsoid}, L{Ellipsoid2}
|
|
712
711
|
or L{a_f2Tuple}).
|
|
713
712
|
@kwarg height: Optional height, overriding the converted height
|
|
714
|
-
(C{meter}),
|
|
713
|
+
(C{meter}), only if C{B{LatLon} is not None}.
|
|
715
714
|
@kwarg LatLon: Optional class to return the geodetic point
|
|
716
715
|
(C{LatLon}) or C{None}.
|
|
717
716
|
@kwarg LatLon_kwds: Optional, additional B{C{LatLon}} keyword
|
|
718
717
|
arguments, ignored if C{B{LatLon} is None}.
|
|
719
718
|
|
|
720
|
-
@return: The geodetic point (B{C{LatLon}}) or if B{
|
|
721
|
-
is
|
|
722
|
-
|
|
719
|
+
@return: The geodetic point (B{C{LatLon}}) or if C{B{LatLon}
|
|
720
|
+
is None}, an L{Ecef9Tuple}C{(x, y, z, lat, lon, height,
|
|
721
|
+
C, M, datum)} with C{C} and C{M} if available.
|
|
723
722
|
|
|
724
723
|
@raise TypeError: Invalid B{C{datum}} or B{C{LatLon_kwds}}.
|
|
725
724
|
'''
|
|
@@ -775,7 +774,7 @@ class CartesianBase(Vector3d):
|
|
|
775
774
|
C{B{Nvector} is None}.
|
|
776
775
|
|
|
777
776
|
@return: An B{C{Nvector}} or a L{Vector4Tuple}C{(x, y, z, h)} if
|
|
778
|
-
B{
|
|
777
|
+
C{B{Nvector} is None}.
|
|
779
778
|
|
|
780
779
|
@raise TypeError: Invalid B{C{Nvector}}, B{C{datum}} or
|
|
781
780
|
B{C{name_Nvector_kwds}} item.
|
|
@@ -851,7 +850,7 @@ class CartesianBase(Vector3d):
|
|
|
851
850
|
arguments, ignored if C{B{Vector} is None}.
|
|
852
851
|
|
|
853
852
|
@return: A B{C{Vector}} or a L{Vector3Tuple}C{(x, y, z)} if
|
|
854
|
-
B{
|
|
853
|
+
C{B{Vector} is None}.
|
|
855
854
|
|
|
856
855
|
@raise TypeError: Invalid B{C{Vector}} or B{C{Vector_kwds}}.
|
|
857
856
|
'''
|
|
@@ -923,8 +922,7 @@ def rtp2xyz(r_rtp, theta=0, phi=0, **name_Cartesian_and_kwds):
|
|
|
923
922
|
|
|
924
923
|
@arg theta: Inclination B{C{theta}} (C{degrees} with respect to the positive z-axis),
|
|
925
924
|
required if C{B{r_rtp}} is C{scalar}, ignored otherwise.
|
|
926
|
-
@arg phi: Azimuthal angle B{C{phi}} (C{degrees}),
|
|
927
|
-
ignored otherwise.
|
|
925
|
+
@arg phi: Azimuthal angle B{C{phi}} (C{degrees}), like B{C{theta}}.
|
|
928
926
|
|
|
929
927
|
@see: Function L{rtp2xyz_} for further details.
|
|
930
928
|
'''
|
|
@@ -942,8 +940,7 @@ def rtp2xyz_(r_rtp, theta=0, phi=0, **name_Cartesian_and_kwds):
|
|
|
942
940
|
L{RadiusThetaPhi3Tuple} instance.
|
|
943
941
|
@arg theta: Inclination B{C{theta}} (C{radians} with respect to the positive z-axis),
|
|
944
942
|
required if C{B{r_rtp}} is C{scalar}, ignored otherwise.
|
|
945
|
-
@arg phi: Azimuthal angle B{C{phi}} (C{radians}),
|
|
946
|
-
ignored otherwise.
|
|
943
|
+
@arg phi: Azimuthal angle B{C{phi}} (C{radians}), like B{C{theta}}.
|
|
947
944
|
@kwarg name_Cartesian_and_kwds: Optional C{B{name}=NN} (C{str}), a C{B{Cartesian}=None}
|
|
948
945
|
class to return the coordinates and optional, additional C{B{Cartesian}}
|
|
949
946
|
keyword arguments.
|
|
@@ -1017,7 +1014,7 @@ def xyz2rtp_(x_xyz, y=0, z=0, **name):
|
|
|
1017
1014
|
C{Nvector}, L{Vector3d}, L{Vector3Tuple}, L{Vector4Tuple} or a C{tuple} or
|
|
1018
1015
|
C{list} of 3+ C{scalar} items) if no C{y_z} specified.
|
|
1019
1016
|
@arg y: Y component (C{scalar}), required if C{B{x_xyz}} is C{scalar}, ignored otherwise.
|
|
1020
|
-
@arg z: Z component (C{scalar}),
|
|
1017
|
+
@arg z: Z component (C{scalar}), like B{C{y}}.
|
|
1021
1018
|
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
1022
1019
|
|
|
1023
1020
|
@return: L{RadiusThetaPhi3Tuple}C{(r, theta, phi)} with radial distance C{r} (C{meter},
|
pygeodesy/css.py
CHANGED
|
@@ -33,7 +33,7 @@ from pygeodesy.units import Bearing, Degrees, Easting, Height, _heigHt, \
|
|
|
33
33
|
# from math import fabs # from .karney
|
|
34
34
|
|
|
35
35
|
__all__ = _ALL_LAZY.css
|
|
36
|
-
__version__ = '24.
|
|
36
|
+
__version__ = '24.06.11'
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
def _CS0(cs0):
|
|
@@ -312,7 +312,7 @@ class CassiniSoldner(_NamedBase):
|
|
|
312
312
|
s, c = _sincos2d(m.lat1) # == self.lat0 == self.LatitudeOrigin()
|
|
313
313
|
self._sb0, self._cb0 = _norm2(s * g.f1, c)
|
|
314
314
|
|
|
315
|
-
def reverse(self, easting, northing, LatLon=None, **
|
|
315
|
+
def reverse(self, easting, northing, LatLon=None, **name_LatLon_kwds):
|
|
316
316
|
'''Convert a Cassini-Soldner location to (ellipsoidal) geodetic
|
|
317
317
|
lat- and longitude.
|
|
318
318
|
|
|
@@ -320,12 +320,11 @@ class CassiniSoldner(_NamedBase):
|
|
|
320
320
|
@arg northing: Northing of the location (C{meter}).
|
|
321
321
|
@kwarg LatLon: Optional, ellipsoidal class to return the geodetic
|
|
322
322
|
location as (C{LatLon}) or C{None}.
|
|
323
|
-
@kwarg
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
name (C{str}).
|
|
323
|
+
@kwarg name_LatLon_kwds: Optional name C{B{name}=NN} (C{str}) and
|
|
324
|
+
optional, additional B{C{LatLon}} keyword arguments,
|
|
325
|
+
ignored if C{B{LatLon} is None}.
|
|
327
326
|
|
|
328
|
-
@return: Geodetic location B{C{LatLon}} or if B{
|
|
327
|
+
@return: Geodetic location B{C{LatLon}} or if C{B{LatLon} is None},
|
|
329
328
|
a L{LatLon2Tuple}C{(lat, lon)}.
|
|
330
329
|
|
|
331
330
|
@raise CSSError: Ellipsoidal mismatch of B{C{LatLon}} and this projection.
|
|
@@ -335,7 +334,7 @@ class CassiniSoldner(_NamedBase):
|
|
|
335
334
|
@see: Method L{CassiniSoldner.reverse4}, L{CassiniSoldner.forward}.
|
|
336
335
|
L{CassiniSoldner.forward4} and L{CassiniSoldner.forward6}.
|
|
337
336
|
'''
|
|
338
|
-
n, kwds = _name2__(
|
|
337
|
+
n, kwds = _name2__(name_LatLon_kwds, _or_nameof=self)
|
|
339
338
|
r = self.reverse4(easting, northing, name=n)
|
|
340
339
|
if LatLon is None:
|
|
341
340
|
r = LatLon2Tuple(r.lat, r.lon, name=r.name) # PYCHOK expected
|
|
@@ -520,9 +519,8 @@ class Css(_NamedBase):
|
|
|
520
519
|
@kwarg LatLon_kwds: Optional, additional B{C{LatLon}} keyword
|
|
521
520
|
arguments, ignored if C{B{LatLon} is None}.
|
|
522
521
|
|
|
523
|
-
@return: The geodetic point (B{C{LatLon}}) or if B{
|
|
524
|
-
|
|
525
|
-
datum)}.
|
|
522
|
+
@return: The geodetic point (B{C{LatLon}}) or if C{B{LatLon} is
|
|
523
|
+
None}, a L{LatLon4Tuple}C{(lat, lon, height, datum)}.
|
|
526
524
|
|
|
527
525
|
@raise TypeError: If B{C{LatLon}} or B{C{datum}} is not
|
|
528
526
|
ellipsoidal or invalid B{C{height}} or
|
|
@@ -610,15 +608,13 @@ def toCss(latlon, cs0=None, height=None, Css=Css, **name):
|
|
|
610
608
|
@arg latlon: Ellipsoidal point (C{LatLon} or L{LatLon4Tuple}).
|
|
611
609
|
@kwarg cs0: Optional, the Cassini-Soldner projection to use
|
|
612
610
|
(L{CassiniSoldner}).
|
|
613
|
-
@kwarg height: Optional height for the point, overriding the
|
|
614
|
-
|
|
615
|
-
@kwarg Css: Optional class to return the location (L{Css}) or
|
|
616
|
-
C{None}.
|
|
611
|
+
@kwarg height: Optional height for the point, overriding the default
|
|
612
|
+
height (C{meter}).
|
|
613
|
+
@kwarg Css: Optional class to return the location (L{Css}) or C{None}.
|
|
617
614
|
@kwarg name: Optional B{C{Css}} C{B{name}=NN} (C{str}).
|
|
618
615
|
|
|
619
|
-
@return: The Cassini-Soldner location (B{C{Css}}) or
|
|
620
|
-
L{EasNor3Tuple}C{(easting, northing, height)}
|
|
621
|
-
if B{C{Css}} is C{None}.
|
|
616
|
+
@return: The Cassini-Soldner location (B{C{Css}}) or if C{B{Css} is
|
|
617
|
+
None}, an L{EasNor3Tuple}C{(easting, northing, height)}.
|
|
622
618
|
|
|
623
619
|
@raise CSSError: Ellipsoidal mismatch of B{C{latlon}} and B{C{cs0}}.
|
|
624
620
|
|
pygeodesy/datums.py
CHANGED
|
@@ -94,7 +94,7 @@ from pygeodesy.units import _isRadius, Radius_, radians
|
|
|
94
94
|
# import operator as _operator # from .fmath
|
|
95
95
|
|
|
96
96
|
__all__ = _ALL_LAZY.datums
|
|
97
|
-
__version__ = '24.
|
|
97
|
+
__version__ = '24.06.24'
|
|
98
98
|
|
|
99
99
|
_a_ellipsoid_ = _UNDER_(_a_, _ellipsoid_)
|
|
100
100
|
_BD72_ = 'BD72'
|
|
@@ -248,18 +248,18 @@ class Transform(_NamedEnumItem):
|
|
|
248
248
|
self.s = s = (s1 - _1_0) / _S1_S
|
|
249
249
|
return s
|
|
250
250
|
|
|
251
|
-
def toStr(self, prec=5, fmt=Fmt.g, **
|
|
251
|
+
def toStr(self, prec=5, fmt=Fmt.g, **sep_name): # PYCHOK expected
|
|
252
252
|
'''Return this transform as a string.
|
|
253
253
|
|
|
254
254
|
@kwarg prec: Number of (decimal) digits, unstripped (C{int}).
|
|
255
255
|
@kwarg fmt: Optional C{float} format (C{letter}).
|
|
256
|
-
@kwarg
|
|
257
|
-
|
|
256
|
+
@kwarg sep_name: Optional C{B{name}=NN} (C{str}) or C{None}
|
|
257
|
+
to exclude this transform's name and separater
|
|
258
|
+
C{B{sep}=", "} to join the items (C{str}).
|
|
258
259
|
|
|
259
260
|
@return: Transform attributes (C{str}).
|
|
260
261
|
'''
|
|
261
|
-
|
|
262
|
-
return self._instr(name, prec, *_Names11, fmt=fmt)
|
|
262
|
+
return self._instr(*_Names11, fmt=fmt, prec=prec, **sep_name)
|
|
263
263
|
|
|
264
264
|
def transform(self, x, y, z, inverse=False, **Vector_and_kwds):
|
|
265
265
|
'''Transform a (cartesian) position, forward or inverse.
|
pygeodesy/deprecated/__init__.py
CHANGED
|
@@ -27,7 +27,7 @@ __all__ = (_ALL_DEPRECATED.deprecated_bases +
|
|
|
27
27
|
_ALL_DEPRECATED.deprecated_classes +
|
|
28
28
|
_ALL_DEPRECATED.deprecated_consterns +
|
|
29
29
|
_ALL_DEPRECATED.deprecated_functions)
|
|
30
|
-
__version__ = '24.
|
|
30
|
+
__version__ = '24.06.15'
|
|
31
31
|
|
|
32
32
|
if _unLazy0:
|
|
33
33
|
from pygeodesy.deprecated import bases, datum, nvector, rhumbBase, \
|
pygeodesy/deprecated/classes.py
CHANGED
|
@@ -19,10 +19,10 @@ from pygeodesy.namedTuples import Forward4Tuple as _Forward4Tuple, \
|
|
|
19
19
|
from pygeodesy.props import deprecated_class, deprecated_method
|
|
20
20
|
from pygeodesy.resections import TriAngle5Tuple as _TriAngle5Tuple
|
|
21
21
|
from pygeodesy.trf import TRFXform7Tuple as _TRFXform7Tuple
|
|
22
|
-
from pygeodesy.units import Bearing, Int, Lat, Lon, Meter
|
|
22
|
+
from pygeodesy.units import Bearing, Int, Lamd, Lat, Lon, Meter, Phid
|
|
23
23
|
|
|
24
24
|
__all__ = _ALL_DEPRECATED.deprecated_classes
|
|
25
|
-
__version__ = '24.
|
|
25
|
+
__version__ = '24.06.15'
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
class _Deprecated_NamedTuple(_NamedTuple):
|
|
@@ -151,6 +151,13 @@ def HeightIDW3(knots, **kwds): # PYCHOK no cover
|
|
|
151
151
|
return HeightIDW3(knots, **kwds)
|
|
152
152
|
|
|
153
153
|
|
|
154
|
+
class Lam_(Lamd):
|
|
155
|
+
'''DEPRECATED on 2024.06.15, use class L{Lamd}.'''
|
|
156
|
+
def __init__(self, *args, **kwds): # PYCHOK signature
|
|
157
|
+
deprecated_class(self.__class__)
|
|
158
|
+
Lamd.__init__(self, *args, **kwds)
|
|
159
|
+
|
|
160
|
+
|
|
154
161
|
class LatLonExact4Tuple(_Deprecated_NamedTuple):
|
|
155
162
|
'''DEPRECATED, use class L{Reverse4Tuple}, item C{gamma} for C{convergence}.'''
|
|
156
163
|
_Names_ = _reNames(_Reverse4Tuple._Names_, _gamma_, _convergence_)
|
|
@@ -163,6 +170,13 @@ class NearestOn4Tuple(_Deprecated_NamedTuple): # PYCHOK no cover
|
|
|
163
170
|
_Units_ = ( Lat, Lon, Meter, Bearing)
|
|
164
171
|
|
|
165
172
|
|
|
173
|
+
class Phi_(Phid):
|
|
174
|
+
'''DEPRECATED on 2024.06.15, use class L{Phid}.'''
|
|
175
|
+
def __init__(self, *args, **kwds): # PYCHOK signature
|
|
176
|
+
deprecated_class(self.__class__)
|
|
177
|
+
Phid.__init__(self, *args, **kwds)
|
|
178
|
+
|
|
179
|
+
|
|
166
180
|
class Ned3Tuple(_Deprecated_NamedTuple): # was in .ellipsoidalNvector
|
|
167
181
|
'''DEPRECATED, use class L{Ned4Tuple}, ignoring item C{ltp}.'''
|
|
168
182
|
assert _Ned4Tuple._Names_.index(_ltp_) == 3
|
pygeodesy/deprecated/datum.py
CHANGED
|
@@ -5,17 +5,17 @@ u'''DEPRECATED on 2022.09.12, use module L{pygeodesy.datums} or L{pygeodesy.elli
|
|
|
5
5
|
'''
|
|
6
6
|
|
|
7
7
|
# XXX only the items previously public
|
|
8
|
-
from pygeodesy.constants import R_M, R_MA, R_MB,
|
|
8
|
+
from pygeodesy.constants import R_FM, R_KM, R_M, R_MA, R_MB, R_NM, R_SM, R_VM
|
|
9
9
|
from pygeodesy.datums import Datum, Datums, Transform, Transforms
|
|
10
10
|
from pygeodesy.ellipsoids import Ellipsoid, Ellipsoids, Curvature2Tuple
|
|
11
11
|
from pygeodesy.lazily import _ALL_DEPRECATED, _ALL_OTHER
|
|
12
12
|
|
|
13
13
|
__all__ = _ALL_DEPRECATED.deprecated_datum
|
|
14
|
-
__version__ = '
|
|
14
|
+
__version__ = '24.06.15'
|
|
15
15
|
|
|
16
16
|
assert _ALL_OTHER(Curvature2Tuple, Datum, Ellipsoid, Transform) + \
|
|
17
17
|
tuple(_.name for _ in (Datums, Ellipsoids, Transforms,
|
|
18
|
-
R_M, R_MA, R_MB,
|
|
18
|
+
R_FM, R_KM, R_M, R_MA, R_MB, R_NM, R_SM, R_VM)) == __all__
|
|
19
19
|
|
|
20
20
|
# **) MIT License
|
|
21
21
|
#
|
|
@@ -14,7 +14,7 @@ from pygeodesy.props import deprecated_function
|
|
|
14
14
|
from pygeodesy.units import Number_, Scalar_
|
|
15
15
|
|
|
16
16
|
__all__ = _ALL_DEPRECATED.deprecated_functions
|
|
17
|
-
__version__ = '24.
|
|
17
|
+
__version__ = '24.06.11'
|
|
18
18
|
|
|
19
19
|
_WGS84 = _UTM = object()
|
|
20
20
|
|
|
@@ -41,9 +41,8 @@ def atand(x):
|
|
|
41
41
|
def bounds(points, wrap=True, LatLon=None): # PYCHOK no cover
|
|
42
42
|
'''DEPRECATED, use function L{pygeodesy.boundsOf}.
|
|
43
43
|
|
|
44
|
-
@return: 2-Tuple C{(latlonSW, latlonNE)}
|
|
45
|
-
|
|
46
|
-
B{C{LatLon}} is C{None}.
|
|
44
|
+
@return: 2-Tuple C{(latlonSW, latlonNE)}, each a B{C{LatLon}} or
|
|
45
|
+
4-Tuple C{(latS, lonW, latN, lonE)} if C{B{LatLon} is None}.
|
|
47
46
|
'''
|
|
48
47
|
return tuple(_MODS.points.boundsOf(points, wrap=wrap, LatLon=LatLon))
|
|
49
48
|
|
|
@@ -253,7 +252,7 @@ def parseUTM(strUTM, datum=_WGS84, Utm=_UTM, name=NN): # PYCHOK no cover
|
|
|
253
252
|
'''DEPRECATED, use function L{parseUTM5}.
|
|
254
253
|
|
|
255
254
|
@return: The UTM coordinate (B{L{Utm}}) or 4-tuple C{(zone,
|
|
256
|
-
hemisphere, easting, northing)} if B{
|
|
255
|
+
hemisphere, easting, northing)} if C{B{Utm} is None}.
|
|
257
256
|
'''
|
|
258
257
|
d = _MODS.datums.Datums.WGS84 if datum is _WGS84 else datum # PYCHOK shadows?
|
|
259
258
|
U = _MODS.utm.Utm if Utm is _UTM else Utm
|
|
@@ -305,9 +304,8 @@ def tienstra(pointA, pointB, pointC, alpha, **beta_gamma_useZ_Clas_and_kwds):
|
|
|
305
304
|
def toUtm(latlon, lon=None, datum=None, Utm=_UTM, cmoff=True, name=NN): # PYCHOK no cover
|
|
306
305
|
'''DEPRECATED, use function L{pygeodesy.toUtm8}.
|
|
307
306
|
|
|
308
|
-
@return: The UTM coordinate (B{C{Utm}}) or a 6-tuple C{(zone,
|
|
309
|
-
|
|
310
|
-
B{C{Utm}} is C{None} or B{C{cmoff}} is C{False}.
|
|
307
|
+
@return: The UTM coordinate (B{C{Utm}}) or a 6-tuple C{(zone, easting, northing,
|
|
308
|
+
band, convergence, scale)} if C{B{Utm} is None} or C{B{cmoff} is False}.
|
|
311
309
|
'''
|
|
312
310
|
U = _MODS.utm.Utm if Utm is _UTM else Utm
|
|
313
311
|
r = _MODS.utm.toUtm8(latlon, lon=lon, datum=datum, Utm=U, name=name, falsed=cmoff)
|
pygeodesy/dms.py
CHANGED
|
@@ -85,7 +85,7 @@ except ImportError: # Python 3+
|
|
|
85
85
|
from string import ascii_letters as _LETTERS
|
|
86
86
|
|
|
87
87
|
__all__ = _ALL_LAZY.dms
|
|
88
|
-
__version__ = '24.
|
|
88
|
+
__version__ = '24.06.11'
|
|
89
89
|
|
|
90
90
|
_beyond_ = 'beyond'
|
|
91
91
|
_DDDMMSS_ = 'DDDMMSS'
|
|
@@ -293,8 +293,8 @@ def clipDegrees(deg, limit):
|
|
|
293
293
|
|
|
294
294
|
@return: Clipped value (C{degrees}).
|
|
295
295
|
|
|
296
|
-
@raise RangeError: If B{C{deg}} outside the valid C{-/+B{limit}}
|
|
297
|
-
|
|
296
|
+
@raise RangeError: If B{C{deg}} outside the valid C{-/+B{limit}} range
|
|
297
|
+
and L{rangerrors<pygeodesy.rangerrors>} is C{True}.
|
|
298
298
|
'''
|
|
299
299
|
return _clip(deg, limit, _degrees_) if limit and limit > 0 else deg
|
|
300
300
|
|
|
@@ -307,8 +307,8 @@ def clipRadians(rad, limit):
|
|
|
307
307
|
|
|
308
308
|
@return: Clipped value (C{radians}).
|
|
309
309
|
|
|
310
|
-
@raise RangeError: If B{C{rad}} outside the valid C{-/+B{limit}}
|
|
311
|
-
|
|
310
|
+
@raise RangeError: If B{C{rad}} outside the valid C{-/+B{limit}} range
|
|
311
|
+
and L{rangerrors<pygeodesy.rangerrors>} is C{True}.
|
|
312
312
|
'''
|
|
313
313
|
return _clip(rad, limit, _radians_) if limit and limit > 0 else rad
|
|
314
314
|
|
|
@@ -456,17 +456,14 @@ def latlonDMS(lls, **m_form_prec_sep_s_D_M_S):
|
|
|
456
456
|
C{LatLon.toStr} and functions L{pygeodesy.latDMS} and
|
|
457
457
|
L{pygeodesy.lonDMS} for more details.
|
|
458
458
|
|
|
459
|
-
@return: A C{tuple} of C{str}s if B{C{lls}} is a list, sequence,
|
|
460
|
-
|
|
461
|
-
if B{C{lls}} is a single C{LatLon}.
|
|
459
|
+
@return: A C{tuple} of C{str}s if B{C{lls}} is a list, sequence, tuple, etc.
|
|
460
|
+
of C{LatLon}s or a single C{str} if B{C{lls}} is a single C{LatLon}.
|
|
462
461
|
|
|
463
|
-
@see: Functions L{pygeodesy.latlonDMS_}, L{pygeodesy.latDMS},
|
|
464
|
-
|
|
465
|
-
C{LatLon.toStr}.
|
|
462
|
+
@see: Functions L{pygeodesy.latlonDMS_}, L{pygeodesy.latDMS}, L{pygeodesy.lonDMS}
|
|
463
|
+
and L{pygeodesy.toDMS} and method C{LatLon.toStr}.
|
|
466
464
|
|
|
467
|
-
@note: Keyword argument C{B{sep}=None} to join a C{str}ing
|
|
468
|
-
|
|
469
|
-
use C{B{sep}.join(B{latlonDMS_}(...))} instead.
|
|
465
|
+
@note: Keyword argument C{B{sep}=None} to join a C{str}ing from the returned C{tuple}
|
|
466
|
+
has been I{DEPRECATED}, use C{B{sep}.join(B{latlonDMS_}(...))} instead.
|
|
470
467
|
'''
|
|
471
468
|
sep, kwds = _latlonDMS_sep2(latlonDMS, **m_form_prec_sep_s_D_M_S)
|
|
472
469
|
if isLatLon(lls):
|
|
@@ -610,7 +607,7 @@ def parseDDDMMSS(strDDDMMSS, suffix=_NSEW_, sep=S_SEP, clip=0, sexagecimal=False
|
|
|
610
607
|
B{C{suffix}} compass point.
|
|
611
608
|
|
|
612
609
|
@raise RangeError: Value of B{C{strDDDMMSS}} outside the valid C{-/+B{clip}}
|
|
613
|
-
range and L{pygeodesy.rangerrors}
|
|
610
|
+
range and L{rangerrors<pygeodesy.rangerrors>} is C{True}.
|
|
614
611
|
|
|
615
612
|
@note: Type C{str} values "[D]DD", "[D]DDMM", "[D]DDMMSS" and "[D]DD.MMSS"
|
|
616
613
|
for B{C{strDDDMMSS}} are parsed properly only if I{either} unsigned
|
|
@@ -746,14 +743,13 @@ def parseDMS(strDMS, suffix=_NSEW_, sep=S_SEP, clip=0, **s_D_M_S): # MCCABE 14
|
|
|
746
743
|
|
|
747
744
|
@raise ParseError: Invalid B{C{strDMS}} or B{C{clip}}.
|
|
748
745
|
|
|
749
|
-
@raise RangeError: Value of B{C{strDMS}} outside the valid C{-/+B{clip}}
|
|
750
|
-
|
|
746
|
+
@raise RangeError: Value of B{C{strDMS}} outside the valid C{-/+B{clip}} range
|
|
747
|
+
and L{rangerrors<pygeodesy.rangerrors>} is C{True}.
|
|
751
748
|
|
|
752
|
-
@note: Unlike function L{parseDDDMMSS}, type C{float}, C{int} and other
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
as
|
|
756
|
-
I{and not as 3.75} degrees!
|
|
749
|
+
@note: Unlike function L{parseDDDMMSS}, type C{float}, C{int} and other non-C{str}
|
|
750
|
+
B{C{strDMS}} values are considered decimal (and not sexagecimal) degrees.
|
|
751
|
+
For example, C{int(1230)} is returned as 1230.0 I{and not as 12.5} degrees
|
|
752
|
+
and C{float(345)} as 345.0 I{and not as 3.75} degrees!
|
|
757
753
|
|
|
758
754
|
@see: Functions L{pygeodesy.parseDDDMMSS}, L{pygeodesy.parseDMS2},
|
|
759
755
|
L{pygeodesy.parse3llh} and L{pygeodesy.toDMS}.
|
|
@@ -780,7 +776,7 @@ def parseDMS2(strLat, strLon, sep=S_SEP, clipLat=90, clipLon=180, wrap=False, **
|
|
|
780
776
|
|
|
781
777
|
@raise RangeError: Value of B{C{strLat}} or B{C{strLon}} outside the
|
|
782
778
|
valid C{-/+B{clipLat}} or C{-/+B{clipLon}} range
|
|
783
|
-
and L{pygeodesy.rangerrors}
|
|
779
|
+
and L{rangerrors<pygeodesy.rangerrors>} is C{True}.
|
|
784
780
|
|
|
785
781
|
@note: See the B{Notes} at function L{parseDMS}.
|
|
786
782
|
|
|
@@ -829,9 +825,9 @@ def parse3llh(strllh, height=0, sep=_COMMA_, clipLat=90, clipLon=180, wrap=False
|
|
|
829
825
|
@return: A L{LatLon3Tuple}C{(lat, lon, height)} in C{degrees},
|
|
830
826
|
C{degrees} and C{float}.
|
|
831
827
|
|
|
832
|
-
@raise RangeError: Lat- or longitude value of B{C{strllh}} outside
|
|
833
|
-
|
|
834
|
-
|
|
828
|
+
@raise RangeError: Lat- or longitude value of B{C{strllh}} outside the
|
|
829
|
+
valid C{-/+B{clipLat}} or C{-/+B{clipLon}} range
|
|
830
|
+
and L{rangerrors<pygeodesy.rangerrors>} is C{True}.
|
|
835
831
|
|
|
836
832
|
@raise ValueError: Invalid B{C{strllh}} or B{C{height}}.
|
|
837
833
|
|
|
@@ -870,7 +866,7 @@ def parseRad(strRad, suffix=_NSEW_, clip=0):
|
|
|
870
866
|
@raise ParseError: Invalid B{C{strRad}} or B{C{clip}}.
|
|
871
867
|
|
|
872
868
|
@raise RangeError: Value of B{C{strRad}} outside the valid C{-/+B{clip}}
|
|
873
|
-
range and L{pygeodesy.rangerrors}
|
|
869
|
+
range and L{rangerrors<pygeodesy.rangerrors>} is C{True}.
|
|
874
870
|
'''
|
|
875
871
|
def _Rad(strRad, suffix, clip):
|
|
876
872
|
try:
|
pygeodesy/ecef.py
CHANGED
|
@@ -86,7 +86,7 @@ from pygeodesy.utily import atan1, atan1d, atan2d, degrees90, degrees180, \
|
|
|
86
86
|
from math import atan2, cos, degrees, fabs, radians, sqrt
|
|
87
87
|
|
|
88
88
|
__all__ = _ALL_LAZY.ecef
|
|
89
|
-
__version__ = '24.06.
|
|
89
|
+
__version__ = '24.06.11'
|
|
90
90
|
|
|
91
91
|
_Ecef_ = 'Ecef'
|
|
92
92
|
_prolate_ = 'prolate'
|
|
@@ -949,7 +949,7 @@ class EcefMatrix(_NamedTuple):
|
|
|
949
949
|
|
|
950
950
|
@return: The matrix product (L{EcefMatrix}).
|
|
951
951
|
|
|
952
|
-
@raise TypeError: If B{C{other}} is not L{EcefMatrix}.
|
|
952
|
+
@raise TypeError: If B{C{other}} is not an L{EcefMatrix}.
|
|
953
953
|
'''
|
|
954
954
|
_xinstanceof(EcefMatrix, other=other)
|
|
955
955
|
# like LocalCartesian.MatrixMultiply, C{self.matrixTransposed3 X other.matrix3}
|
|
@@ -1185,7 +1185,7 @@ class Ecef9Tuple(_NamedTuple):
|
|
|
1185
1185
|
B{C{LatLon}} keyword arguments.
|
|
1186
1186
|
|
|
1187
1187
|
@return: An instance of C{B{LatLon}(lat, lon, **B{LatLon_kwds})}
|
|
1188
|
-
or if B{
|
|
1188
|
+
or if C{B{LatLon} is None}, a L{LatLon3Tuple}C{(lat, lon,
|
|
1189
1189
|
height)} respectively L{LatLon4Tuple}C{(lat, lon, height,
|
|
1190
1190
|
datum)} depending on whether C{datum} is un-/specified.
|
|
1191
1191
|
|
|
@@ -1233,7 +1233,7 @@ class Ecef9Tuple(_NamedTuple):
|
|
|
1233
1233
|
arguments, ignored if C{B{Vector} is None}.
|
|
1234
1234
|
|
|
1235
1235
|
@return: A C{Vector}C{(x, y, z, **Vector_kwds)} instance or a
|
|
1236
|
-
L{Vector3Tuple}C{(x, y, z)} if B{
|
|
1236
|
+
L{Vector3Tuple}C{(x, y, z)} if C{B{Vector} is None}.
|
|
1237
1237
|
|
|
1238
1238
|
@see: Propertes C{xyz} and C{xyzh}
|
|
1239
1239
|
'''
|
pygeodesy/elevations.py
CHANGED
|
@@ -34,7 +34,7 @@ from pygeodesy.units import Lat, Lon, Meter, Scalar, Str
|
|
|
34
34
|
# from math import fabs # from .karney
|
|
35
35
|
|
|
36
36
|
__all__ = _ALL_LAZY.elevations
|
|
37
|
-
__version__ = '24.
|
|
37
|
+
__version__ = '24.06.11'
|
|
38
38
|
|
|
39
39
|
try:
|
|
40
40
|
from urllib2 import urlopen # quote, urlcleanup
|
|
@@ -152,7 +152,7 @@ def elevation2(lat, lon, timeout=2.0):
|
|
|
152
152
|
|
|
153
153
|
@raise ValueError: Invalid B{C{timeout}}.
|
|
154
154
|
|
|
155
|
-
@note: The returned C{elevation
|
|
155
|
+
@note: The returned C{elevation is None} if B{C{lat}} or B{C{lon}} is
|
|
156
156
|
invalid or outside the C{Conterminous US (CONUS)}, if conversion
|
|
157
157
|
failed or if the query timed out. The C{"error"} is the C{HTTP-,
|
|
158
158
|
IO-, SSL-} or other C{-Error} as a string (C{str}).
|
|
@@ -208,8 +208,8 @@ def geoidHeight2(lat, lon, model=0, timeout=2.0):
|
|
|
208
208
|
|
|
209
209
|
@raise ValueError: Invalid B{C{timeout}}.
|
|
210
210
|
|
|
211
|
-
@note: The returned C{height
|
|
212
|
-
|
|
211
|
+
@note: The returned C{height is None} if B{C{lat}} or B{C{lon}} is
|
|
212
|
+
invalid or outside the C{Conterminous US (CONUS)}, if the
|
|
213
213
|
B{C{model}} was invalid, if conversion failed or if the query
|
|
214
214
|
timed out. The C{"error"} is the C{HTTP-, IO-, SSL-, URL-}
|
|
215
215
|
or other C{-Error} as a string (C{str}).
|
pygeodesy/ellipsoidalBase.py
CHANGED
|
@@ -18,9 +18,8 @@ from pygeodesy.cartesianBase import CartesianBase # PYCHOK used!
|
|
|
18
18
|
from pygeodesy.datums import Datum, Datums, _earth_ellipsoid, _ellipsoidal_datum, \
|
|
19
19
|
Transform, _WGS84, _EWGS84, _xinstanceof # _spherical_datum
|
|
20
20
|
# from pygeodesy.ellipsoids import _EWGS84 # from .datums
|
|
21
|
-
from pygeodesy.errors import
|
|
22
|
-
|
|
23
|
-
_xkwds_not
|
|
21
|
+
from pygeodesy.errors import _IsnotError, RangeError, _TypeError, _xattr, _xellipsoidal, \
|
|
22
|
+
_xellipsoids, _xError, _xkwds, _xkwds_not
|
|
24
23
|
# from pygeodesy.fmath import favg # _MODS
|
|
25
24
|
from pygeodesy.interns import NN, _COMMA_, _ellipsoidal_
|
|
26
25
|
from pygeodesy.latlonBase import LatLonBase, _trilaterate5, fabs, _Wrap
|
|
@@ -36,7 +35,7 @@ from pygeodesy.units import Epoch, _isDegrees, Radius_, _1mm as _TOL_M
|
|
|
36
35
|
# from math import fabs # from .latlonBase
|
|
37
36
|
|
|
38
37
|
__all__ = _ALL_LAZY.ellipsoidalBase
|
|
39
|
-
__version__ = '24.06.
|
|
38
|
+
__version__ = '24.06.24'
|
|
40
39
|
|
|
41
40
|
|
|
42
41
|
class CartesianEllipsoidalBase(CartesianBase):
|
|
@@ -120,13 +119,13 @@ class CartesianEllipsoidalBase(CartesianBase):
|
|
|
120
119
|
@kwarg Vector_kwds: Optional, additional B{C{Vector}} keyword arguments,
|
|
121
120
|
ignored if C{B{Vector} is None}.
|
|
122
121
|
|
|
123
|
-
@return: If B{
|
|
124
|
-
|
|
122
|
+
@return: If C{B{sphere} is True}, a 2-tuple of the C{center} and C{radius} of
|
|
123
|
+
the intersection of the I{spheres}. The C{radius} is C{0.0} for
|
|
125
124
|
abutting spheres (and the C{center} is aka the I{radical center}).
|
|
126
125
|
|
|
127
|
-
If B{
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
If C{B{sphere} is False}, a 2-tuple with the two intersection points
|
|
127
|
+
of the I{circles}. For abutting circles, both points are the same
|
|
128
|
+
instance, aka the I{radical center}.
|
|
130
129
|
|
|
131
130
|
@raise IntersectionError: Concentric, invalid or non-intersecting spheres or circles.
|
|
132
131
|
|
|
@@ -224,26 +223,25 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
224
223
|
|
|
225
224
|
@arg latlonh: Latitude (C{degrees} or DMS C{str} with N or S suffix) or
|
|
226
225
|
a previous C{LatLon} instance provided C{B{lon}=None}.
|
|
227
|
-
@kwarg lon: Longitude (C{degrees} or DMS C{str} with E or W suffix) or
|
|
228
|
-
|
|
229
|
-
@kwarg height: Optional height above (or below) the earth surface
|
|
230
|
-
|
|
226
|
+
@kwarg lon: Longitude (C{degrees} or DMS C{str} with E or W suffix) or C(None),
|
|
227
|
+
indicating B{C{latlonh}} is a C{LatLon}.
|
|
228
|
+
@kwarg height: Optional height above (or below) the earth surface (C{meter},
|
|
229
|
+
same units as the datum's ellipsoid axes).
|
|
231
230
|
@kwarg datum: Optional, ellipsoidal datum to use (L{Datum}, L{Ellipsoid},
|
|
232
231
|
L{Ellipsoid2} or L{a_f2Tuple}).
|
|
233
232
|
@kwarg reframe: Optional reference frame (L{RefFrame}).
|
|
234
|
-
@kwarg epoch: Optional epoch to observe for B{C{reframe}} (C{scalar}),
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
@kwarg wrap: If C{True}, wrap or I{normalize} B{C{lat}} and B{C{lon}}
|
|
238
|
-
(C{bool}).
|
|
233
|
+
@kwarg epoch: Optional epoch to observe for B{C{reframe}} (C{scalar}), a
|
|
234
|
+
non-zero, fractional calendar year, but silently ignored if
|
|
235
|
+
C{B{reframe}=None}.
|
|
236
|
+
@kwarg wrap: If C{True}, wrap or I{normalize} B{C{lat}} and B{C{lon}} (C{bool}).
|
|
239
237
|
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
240
238
|
|
|
241
|
-
@raise RangeError: Value of C{lat} or B{C{lon}} outside the valid
|
|
242
|
-
|
|
239
|
+
@raise RangeError: Value of C{lat} or B{C{lon}} outside the valid range and
|
|
240
|
+
L{rangerrors} set to C{True}.
|
|
243
241
|
|
|
244
|
-
@raise TypeError: If B{C{latlonh}} is not a C{LatLon}, B{C{datum}} is
|
|
245
|
-
|
|
246
|
-
|
|
242
|
+
@raise TypeError: If B{C{latlonh}} is not a C{LatLon}, B{C{datum}} is not a
|
|
243
|
+
L{Datum}, B{C{reframe}} is not a L{RefFrame} or B{C{epoch}}
|
|
244
|
+
is not C{scalar} non-zero.
|
|
247
245
|
|
|
248
246
|
@raise UnitError: Invalid B{C{lat}}, B{C{lon}} or B{C{height}}.
|
|
249
247
|
'''
|
|
@@ -300,8 +298,7 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
300
298
|
def datum(self, datum):
|
|
301
299
|
'''Set this point's datum I{without conversion} (L{Datum}).
|
|
302
300
|
|
|
303
|
-
@raise TypeError: The B{C{datum}} is not a L{Datum}
|
|
304
|
-
or not ellipsoidal.
|
|
301
|
+
@raise TypeError: The B{C{datum}} is not a L{Datum} or not ellipsoidal.
|
|
305
302
|
'''
|
|
306
303
|
_xinstanceof(Datum, datum=datum)
|
|
307
304
|
if not datum.isEllipsoidal:
|
|
@@ -410,9 +407,7 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
410
407
|
e = other.datum.ellipsoid
|
|
411
408
|
except AttributeError:
|
|
412
409
|
e = E # no datum, XXX assume equivalent?
|
|
413
|
-
|
|
414
|
-
raise _ValueError(e.named2, txt=_incompatible(E.named2))
|
|
415
|
-
return E
|
|
410
|
+
return _xellipsoids(E, e)
|
|
416
411
|
|
|
417
412
|
@property_doc_(''' this point's observed or C{reframe} epoch (C{float}).''')
|
|
418
413
|
def epoch(self):
|