pygeodesy 25.4.8__py2.py3-none-any.whl → 25.4.25__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/__init__.py +30 -27
- pygeodesy/__main__.py +3 -3
- pygeodesy/albers.py +29 -36
- pygeodesy/auxilats/_CX_4.py +2 -2
- pygeodesy/auxilats/_CX_6.py +2 -2
- pygeodesy/auxilats/_CX_8.py +2 -2
- pygeodesy/auxilats/_CX_Rs.py +9 -9
- pygeodesy/auxilats/__init__.py +3 -3
- pygeodesy/auxilats/__main__.py +8 -6
- pygeodesy/auxilats/auxAngle.py +2 -2
- pygeodesy/auxilats/auxLat.py +5 -5
- pygeodesy/auxilats/auxily.py +5 -3
- pygeodesy/azimuthal.py +7 -6
- pygeodesy/basics.py +31 -17
- pygeodesy/booleans.py +12 -10
- pygeodesy/cartesianBase.py +21 -20
- pygeodesy/clipy.py +11 -10
- pygeodesy/constants.py +11 -10
- pygeodesy/css.py +14 -11
- pygeodesy/datums.py +8 -8
- pygeodesy/deprecated/bases.py +2 -2
- pygeodesy/deprecated/classes.py +2 -2
- pygeodesy/deprecated/consterns.py +4 -4
- pygeodesy/dms.py +8 -8
- pygeodesy/ecef.py +10 -7
- pygeodesy/elevations.py +9 -8
- pygeodesy/ellipsoidalBase.py +19 -8
- pygeodesy/ellipsoidalBaseDI.py +17 -15
- pygeodesy/ellipsoidalNvector.py +6 -3
- pygeodesy/ellipsoidalVincenty.py +4 -1
- pygeodesy/ellipsoids.py +167 -138
- pygeodesy/elliptic.py +9 -9
- pygeodesy/errors.py +44 -43
- pygeodesy/etm.py +7 -7
- pygeodesy/fmath.py +10 -9
- pygeodesy/formy.py +11 -12
- pygeodesy/frechet.py +216 -109
- pygeodesy/fstats.py +5 -4
- pygeodesy/fsums.py +78 -77
- pygeodesy/gars.py +4 -3
- pygeodesy/geodesici.py +15 -14
- pygeodesy/geodesicw.py +34 -32
- pygeodesy/geodesicx/__init__.py +1 -1
- pygeodesy/geodesicx/__main__.py +11 -9
- pygeodesy/geodesicx/gx.py +30 -33
- pygeodesy/geodesicx/gxarea.py +2 -2
- pygeodesy/geodesicx/gxline.py +5 -5
- pygeodesy/geodsolve.py +18 -17
- pygeodesy/geohash.py +5 -5
- pygeodesy/geoids.py +34 -31
- pygeodesy/hausdorff.py +17 -13
- pygeodesy/heights.py +2 -4
- pygeodesy/internals.py +28 -44
- pygeodesy/interns.py +10 -7
- pygeodesy/iters.py +8 -8
- pygeodesy/karney.py +68 -62
- pygeodesy/ktm.py +5 -5
- pygeodesy/latlonBase.py +14 -18
- pygeodesy/lazily.py +65 -63
- pygeodesy/lcc.py +11 -9
- pygeodesy/ltp.py +8 -7
- pygeodesy/ltpTuples.py +2 -2
- pygeodesy/mgrs.py +7 -6
- pygeodesy/named.py +47 -31
- pygeodesy/nvectorBase.py +7 -7
- pygeodesy/osgr.py +9 -8
- pygeodesy/points.py +12 -10
- pygeodesy/props.py +25 -25
- pygeodesy/resections.py +11 -10
- pygeodesy/rhumb/__init__.py +1 -1
- pygeodesy/rhumb/aux_.py +7 -7
- pygeodesy/rhumb/bases.py +22 -20
- pygeodesy/rhumb/ekx.py +6 -6
- pygeodesy/rhumb/solve.py +15 -15
- pygeodesy/solveBase.py +3 -3
- pygeodesy/sphericalBase.py +6 -6
- pygeodesy/sphericalNvector.py +6 -5
- pygeodesy/sphericalTrigonometry.py +8 -7
- pygeodesy/streprs.py +14 -14
- pygeodesy/trf.py +14 -12
- pygeodesy/triaxials.py +29 -26
- pygeodesy/units.py +5 -4
- pygeodesy/unitsBase.py +5 -4
- pygeodesy/ups.py +3 -3
- pygeodesy/utily.py +4 -4
- pygeodesy/utmups.py +4 -4
- pygeodesy/utmupsBase.py +88 -18
- pygeodesy/vector2d.py +18 -11
- pygeodesy/vector3d.py +7 -6
- pygeodesy/webmercator.py +6 -5
- pygeodesy/wgrs.py +6 -5
- {pygeodesy-25.4.8.dist-info → pygeodesy-25.4.25.dist-info}/METADATA +27 -23
- pygeodesy-25.4.25.dist-info/RECORD +118 -0
- pygeodesy-25.4.8.dist-info/RECORD +0 -118
- {pygeodesy-25.4.8.dist-info → pygeodesy-25.4.25.dist-info}/WHEEL +0 -0
- {pygeodesy-25.4.8.dist-info → pygeodesy-25.4.25.dist-info}/top_level.txt +0 -0
pygeodesy/dms.py
CHANGED
|
@@ -62,11 +62,11 @@ U{Vector-based geodesy<https://www.Movable-Type.co.UK/scripts/latlong-vectors.ht
|
|
|
62
62
|
'''
|
|
63
63
|
|
|
64
64
|
from pygeodesy.basics import copysign0, isLatLon, isodd, issequence, isstr, \
|
|
65
|
-
neg as _neg # in .ups
|
|
65
|
+
neg as _neg, typename # in .ups
|
|
66
66
|
from pygeodesy.constants import _umod_360, _0_0, _0_5, _60_0, _360_0, _3600_0
|
|
67
67
|
from pygeodesy.errors import ParseError, RangeError, _TypeError, _ValueError, \
|
|
68
|
-
_parseX, rangerrors, _xError, _xkwds,
|
|
69
|
-
# from pygeodesy.internals import
|
|
68
|
+
_parseX, rangerrors, _xError, _xkwds, _envPYGEODESY
|
|
69
|
+
# from pygeodesy.internals import _envPYGEODESY, typename # from .errors
|
|
70
70
|
from pygeodesy.interns import NN, _COMMA_, _d_, _DASH_, _deg_, _degrees_, _DOT_, \
|
|
71
71
|
_0_, _e_, _E_, _EW_, _f_, _F_, _g_, _MINUS_, _N_, \
|
|
72
72
|
_NE_, _NS_, _NSEW_, _NW_, _PERCENTDOTSTAR_, _PLUS_, \
|
|
@@ -86,7 +86,7 @@ except ImportError: # Python 3+
|
|
|
86
86
|
from string import ascii_letters as _LETTERS
|
|
87
87
|
|
|
88
88
|
__all__ = _ALL_LAZY.dms
|
|
89
|
-
__version__ = '
|
|
89
|
+
__version__ = '25.04.14'
|
|
90
90
|
|
|
91
91
|
_beyond_ = 'beyond'
|
|
92
92
|
_deg_min_ = 'deg+min'
|
|
@@ -100,7 +100,7 @@ F_D_, F_DM_, F_DMS_, F_DEG_, F_MIN_, F_SEC_, F_D60_, F__E_, F__F_, F__G
|
|
|
100
100
|
F_D__, F_DM__, F_DMS__, F_DEG__, F_MIN__, F_SEC__, F_D60__, F__E__, F__F__, F__G__, F_RAD__ = (NN(
|
|
101
101
|
_PLUS_, _) for _ in _F_s)
|
|
102
102
|
del _F_s
|
|
103
|
-
_F_DMS =
|
|
103
|
+
_F_DMS = _envPYGEODESY('FMT_FORM') or F_DMS
|
|
104
104
|
|
|
105
105
|
_F_case = {F_D: F_D, F_DEG: F_D, _degrees_: F_D, # unsigned _F_s
|
|
106
106
|
F_DM: F_DM, F_MIN: F_DM, _deg_min_: F_DM,
|
|
@@ -348,7 +348,7 @@ def compassPoint(bearing, prec=3):
|
|
|
348
348
|
p = _MODS.units.Precision_(prec, low=1, high=4) \
|
|
349
349
|
if prec != 3 else int(prec)
|
|
350
350
|
m = 2 << p
|
|
351
|
-
w = 32 // m # if m
|
|
351
|
+
w = 32 // m # if _isin(m, 4, 8, 16, 32)
|
|
352
352
|
# not round(b), half-even rounding in Python 3+, but
|
|
353
353
|
# round-away-from-zero as int(b + copysign0(_0_5, b))
|
|
354
354
|
w *= int(b * m / _360_0 + _0_5) % m
|
|
@@ -483,7 +483,7 @@ def _latlonDMS_sep2(where, sep=None, **kwds):
|
|
|
483
483
|
i = _MODS.inters
|
|
484
484
|
k = Fmt.EQUAL(sep=repr(sep))
|
|
485
485
|
k = _SPACE_(i._keyword_, i._arg_, k, i._of_)
|
|
486
|
-
n = where
|
|
486
|
+
n = typename(where)
|
|
487
487
|
t = _latlonDMS_sep2.__doc__ % (sep, n)
|
|
488
488
|
_MODS.props._throwarning(k, n, t)
|
|
489
489
|
return sep, kwds
|
|
@@ -670,7 +670,7 @@ def _DDDMMSS6(t, S):
|
|
|
670
670
|
# check [D]DDMMSS form and compass point
|
|
671
671
|
X = _EW_ if isodd(n) else _NS_
|
|
672
672
|
if not (P in X or (S in X and (P.isdigit() or P == _DOT_))):
|
|
673
|
-
t = parseDDDMMSS
|
|
673
|
+
t = typename(parseDDDMMSS)[(5 if isodd(n) else 6):]
|
|
674
674
|
t = _SPACE_('form', t, 'applies', _DASH_.join(X))
|
|
675
675
|
raise ParseError(t)
|
|
676
676
|
else:
|
pygeodesy/ecef.py
CHANGED
|
@@ -57,8 +57,8 @@ for conversion between geodetic and I{local cartesian} coordinates in a I{local
|
|
|
57
57
|
plane} as opposed to I{geocentric} (ECEF) ones.
|
|
58
58
|
'''
|
|
59
59
|
|
|
60
|
-
from pygeodesy.basics import copysign0, isscalar, issubclassof, neg, map1, \
|
|
61
|
-
_xinstanceof, _xsubclassof # _args_kwds_names
|
|
60
|
+
from pygeodesy.basics import copysign0, _isin, isscalar, issubclassof, neg, map1, \
|
|
61
|
+
_xinstanceof, _xsubclassof, typename # _args_kwds_names
|
|
62
62
|
from pygeodesy.constants import EPS, EPS0, EPS02, EPS1, EPS2, EPS_2, INT0, PI, PI_2, \
|
|
63
63
|
_0_0, _0_0001, _0_01, _0_5, _1_0, _1_0_1T, _N_1_0, \
|
|
64
64
|
_2_0, _N_2_0, _3_0, _4_0, _6_0, _60_0, _90_0, _N_90_0, \
|
|
@@ -69,6 +69,7 @@ from pygeodesy.errors import _IndexError, LenError, _ValueError, _TypesError, \
|
|
|
69
69
|
_xattr, _xdatum, _xkwds, _xkwds_get
|
|
70
70
|
from pygeodesy.fmath import cbrt, fdot, Fpowers, hypot, hypot1, hypot2_, sqrt0
|
|
71
71
|
from pygeodesy.fsums import Fsum, fsumf_, Fmt, unstr
|
|
72
|
+
# from pygeodesy.internals import typename # from .basics
|
|
72
73
|
from pygeodesy.interns import NN, _a_, _C_, _datum_, _ellipsoid_, _f_, _height_, \
|
|
73
74
|
_lat_, _lon_, _M_, _name_, _singular_, _SPACE_, \
|
|
74
75
|
_x_, _xyz_, _y_, _z_
|
|
@@ -89,7 +90,7 @@ from pygeodesy.utily import atan1, atan1d, atan2, atan2d, degrees90, degrees180,
|
|
|
89
90
|
from math import cos, degrees, fabs, radians, sqrt
|
|
90
91
|
|
|
91
92
|
__all__ = _ALL_LAZY.ecef
|
|
92
|
-
__version__ = '
|
|
93
|
+
__version__ = '25.04.24'
|
|
93
94
|
|
|
94
95
|
_Ecef_ = 'Ecef'
|
|
95
96
|
_prolate_ = 'prolate'
|
|
@@ -138,7 +139,7 @@ class _EcefBase(_NamedBase):
|
|
|
138
139
|
else:
|
|
139
140
|
raise ValueError() # _invalid_
|
|
140
141
|
|
|
141
|
-
if
|
|
142
|
+
if not _isin(E, _EWGS84, _WGS84):
|
|
142
143
|
d = _ellipsoidal_datum(E, **name)
|
|
143
144
|
E = d.ellipsoid
|
|
144
145
|
if E.a < EPS or E.f > EPS1:
|
|
@@ -956,7 +957,7 @@ class EcefMatrix(_NamedTuple):
|
|
|
956
957
|
# <https://GeographicLib.SourceForge.io/C++/doc/LocalCartesian_8cpp_source.html>
|
|
957
958
|
# X = (fdot(self.column(r), *other.column(c)) for r in (0,1,2) for c in (0,1,2))
|
|
958
959
|
X = (fdot(self[r::3], *other[c::3]) for r in range(3) for c in range(3))
|
|
959
|
-
return _xnamed(EcefMatrix(*X), EcefMatrix.multiply
|
|
960
|
+
return _xnamed(EcefMatrix(*X), typename(EcefMatrix.multiply))
|
|
960
961
|
|
|
961
962
|
def rotate(self, xyz, *xyz0):
|
|
962
963
|
'''Forward rotation M{M0' ⋅ ([x, y, z] - [x0, y0, z0])'}.
|
|
@@ -1141,6 +1142,8 @@ class Ecef9Tuple(_NamedTuple, _NamedLocal):
|
|
|
1141
1142
|
'''
|
|
1142
1143
|
return PhiLam2Tuple(radians(self.lat), self.lamVermeille, name=self.name)
|
|
1143
1144
|
|
|
1145
|
+
phiVermeille = phi
|
|
1146
|
+
|
|
1144
1147
|
def toCartesian(self, Cartesian=None, **Cartesian_kwds):
|
|
1145
1148
|
'''Return the geocentric C{(x, y, z)} coordinates as an ellipsoidal or spherical
|
|
1146
1149
|
C{Cartesian}.
|
|
@@ -1157,7 +1160,7 @@ class Ecef9Tuple(_NamedTuple, _NamedLocal):
|
|
|
1157
1160
|
|
|
1158
1161
|
@raise TypeError: Invalid B{C{Cartesian}} or B{C{Cartesian_kwds}} item.
|
|
1159
1162
|
'''
|
|
1160
|
-
if Cartesian
|
|
1163
|
+
if _isin(Cartesian, None, Vector4Tuple):
|
|
1161
1164
|
r = self.xyzh
|
|
1162
1165
|
elif Cartesian is Vector3Tuple:
|
|
1163
1166
|
r = self.xyz
|
|
@@ -1177,7 +1180,7 @@ class Ecef9Tuple(_NamedTuple, _NamedLocal):
|
|
|
1177
1180
|
@raise TypeError: The B{C{datum2}} is not a L{Datum}.
|
|
1178
1181
|
'''
|
|
1179
1182
|
n = _name__(name, _or_nameof=self)
|
|
1180
|
-
if self.datum
|
|
1183
|
+
if _isin(self.datum, None, datum2): # PYCHOK _Names_
|
|
1181
1184
|
r = self.copy(name=n)
|
|
1182
1185
|
else:
|
|
1183
1186
|
c = self._CartesianBase(self, datum=self.datum, name=n) # PYCHOK _Names_
|
pygeodesy/elevations.py
CHANGED
|
@@ -21,11 +21,12 @@ U{USGS10mElev.py<https://Gist.GitHub.com/pyRobShrk>}.
|
|
|
21
21
|
C{"/Applications/Python\\ X.Y/Install\\ Certificates.command"}
|
|
22
22
|
'''
|
|
23
23
|
|
|
24
|
-
from pygeodesy.basics import clips, ub2str
|
|
24
|
+
from pygeodesy.basics import clips, ub2str, typename
|
|
25
25
|
from pygeodesy.errors import ParseError, _xkwds_get
|
|
26
|
-
from pygeodesy.
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
# from pygeodesy.internals import typename # from .basics
|
|
27
|
+
from pygeodesy.interns import NN, _AMPERSAND_, _COLONSPACE_, _DMAIN_, \
|
|
28
|
+
_elevation_, _height_, _LCURLY_, _n_a_, \
|
|
29
|
+
_no_, _RCURLY_, _SPACE_
|
|
29
30
|
from pygeodesy.lazily import _ALL_LAZY
|
|
30
31
|
from pygeodesy.named import _NamedTuple
|
|
31
32
|
from pygeodesy.streprs import fabs, Fmt, fstr, lrstrip
|
|
@@ -34,7 +35,7 @@ from pygeodesy.units import Lat, Lon, Meter, Scalar, Str
|
|
|
34
35
|
# from math import fabs # from .karney
|
|
35
36
|
|
|
36
37
|
__all__ = _ALL_LAZY.elevations
|
|
37
|
-
__version__ = '
|
|
38
|
+
__version__ = '25.04.14'
|
|
38
39
|
|
|
39
40
|
try:
|
|
40
41
|
from urllib2 import urlopen # quote, urlcleanup
|
|
@@ -91,7 +92,7 @@ except ImportError:
|
|
|
91
92
|
def _error(fun, lat, lon, e):
|
|
92
93
|
'''(INTERNAL) Format an error
|
|
93
94
|
'''
|
|
94
|
-
return _COLONSPACE_(Fmt.PAREN(fun
|
|
95
|
+
return _COLONSPACE_(Fmt.PAREN(typename(fun), fstr((lat, lon))), e)
|
|
95
96
|
|
|
96
97
|
|
|
97
98
|
def _qURL(url, timeout=2, **params):
|
|
@@ -243,14 +244,14 @@ def geoidHeight2(lat, lon, model=0, timeout=2.0):
|
|
|
243
244
|
return GeoidHeight2Tuple(None, e)
|
|
244
245
|
|
|
245
246
|
|
|
246
|
-
if __name__ ==
|
|
247
|
+
if __name__ == _DMAIN_:
|
|
247
248
|
|
|
248
249
|
from pygeodesy import printf
|
|
249
250
|
# <https://WikiPedia.org/wiki/Mount_Diablo>
|
|
250
251
|
for f in (elevation2, # (1173.79, '3DEP 1/3 arc-second')
|
|
251
252
|
geoidHeight2): # (-31.699, u'GEOID12B')
|
|
252
253
|
t = f(37.8816, -121.9142)
|
|
253
|
-
printf(_COLONSPACE_(f
|
|
254
|
+
printf(_COLONSPACE_(typename(f), t))
|
|
254
255
|
|
|
255
256
|
# **) MIT License
|
|
256
257
|
#
|
pygeodesy/ellipsoidalBase.py
CHANGED
|
@@ -12,30 +12,41 @@ and published under the same MIT Licence**, see for example U{latlon-ellipsoidal
|
|
|
12
12
|
# make sure int/int division yields float quotient, see .basics
|
|
13
13
|
from __future__ import division as _; del _ # PYCHOK semicolon
|
|
14
14
|
|
|
15
|
-
# from pygeodesy.
|
|
15
|
+
# from pygeodesy.azimuthal import EquidistantExact, EquidistantKarney # _MODS
|
|
16
|
+
from pygeodesy.basics import _isin, _xinstanceof
|
|
16
17
|
from pygeodesy.constants import EPS, EPS0, EPS1, _0_0, _0_5
|
|
17
18
|
from pygeodesy.cartesianBase import CartesianBase # PYCHOK used!
|
|
19
|
+
# from pygeodesy.css import toCss # _MODS
|
|
18
20
|
from pygeodesy.datums import Datum, Datums, _earth_ellipsoid, _ellipsoidal_datum, \
|
|
19
|
-
Transform, _WGS84, _EWGS84
|
|
21
|
+
Transform, _WGS84, _EWGS84 # _spherical_datum
|
|
22
|
+
# from pygeodesy.dms import parse3llh # _MODS
|
|
23
|
+
# from pygeodesy.elevations import elevation2, geoidHeight2 # _MODS
|
|
24
|
+
# from pygeodesy.ellipsoidalBaseDI import _intersect3, _intersections2, _nearestOn2 # _MODS
|
|
20
25
|
# from pygeodesy.ellipsoids import _EWGS84 # from .datums
|
|
21
26
|
from pygeodesy.errors import _IsnotError, RangeError, _TypeError, _xattr, _xellipsoidal, \
|
|
22
27
|
_xellipsoids, _xError, _xkwds, _xkwds_not
|
|
28
|
+
# from pygeodesy.etm import etm, toEtm8 # _MODS
|
|
23
29
|
# from pygeodesy.fmath import favg # _MODS
|
|
24
30
|
from pygeodesy.interns import NN, _COMMA_, _ellipsoidal_
|
|
25
31
|
from pygeodesy.latlonBase import LatLonBase, _trilaterate5, fabs, _Wrap
|
|
26
32
|
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
|
|
27
33
|
# from pygeodesy.lcc import toLcc # _MODS
|
|
28
34
|
# from pygeodesy.namedTuples import Vector3Tuple # _MODS
|
|
35
|
+
# from pygeodesy.osgr import toOsgr # _MODS
|
|
36
|
+
# from pygeodesy.points import isenclosedBy # _MODS
|
|
29
37
|
from pygeodesy.props import deprecated_method, deprecated_property_RO, \
|
|
30
38
|
Property_RO, property_doc_, property_RO, _update_all
|
|
31
|
-
# from pygeodesy.trf import
|
|
39
|
+
# from pygeodesy.trf import RefFrame, _toRefFrame # _MODS
|
|
32
40
|
from pygeodesy.units import Epoch, _isDegrees, Radius_, _1mm as _TOL_M
|
|
41
|
+
# from pygeodesy import ups, utm, utmups # MODS
|
|
42
|
+
# from pygeodesy.utmupsBase import _lowerleft # MODS
|
|
33
43
|
# from pygeodesy.utily import _Wrap # from .latlonBase
|
|
44
|
+
# from pygeodesy.vector3d import _intersects2 # _MODS
|
|
34
45
|
|
|
35
46
|
# from math import fabs # from .latlonBase
|
|
36
47
|
|
|
37
48
|
__all__ = _ALL_LAZY.ellipsoidalBase
|
|
38
|
-
__version__ = '
|
|
49
|
+
__version__ = '25.04.14'
|
|
39
50
|
|
|
40
51
|
|
|
41
52
|
class CartesianEllipsoidalBase(CartesianBase):
|
|
@@ -246,7 +257,7 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
246
257
|
@raise UnitError: Invalid B{C{lat}}, B{C{lon}} or B{C{height}}.
|
|
247
258
|
'''
|
|
248
259
|
LatLonBase.__init__(self, latlonh, lon=lon, height=height, wrap=wrap, **name)
|
|
249
|
-
if
|
|
260
|
+
if not _isin(datum, None, self._datum, _EWGS84):
|
|
250
261
|
self.datum = _ellipsoidal_datum(datum, name=self.name)
|
|
251
262
|
if reframe:
|
|
252
263
|
self.reframe = reframe
|
|
@@ -738,7 +749,7 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
738
749
|
n = Datums.NAD83.ellipsoid.rocGauss(self.lat)
|
|
739
750
|
if n > EPS0:
|
|
740
751
|
# use ratio, datum and NAD83 units may differ
|
|
741
|
-
E = self.ellipsoid() if datum
|
|
752
|
+
E = self.ellipsoid() if _isin(datum, None, self.datum) else \
|
|
742
753
|
_earth_ellipsoid(datum)
|
|
743
754
|
r = E.rocGauss(self.lat)
|
|
744
755
|
if r > EPS0 and fabs(r - n) > EPS: # EPS1
|
|
@@ -1109,9 +1120,9 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
1109
1120
|
def _lowerleft(utmups, center):
|
|
1110
1121
|
'''(INTERNAL) Optionally I{un}-center C{utmups}.
|
|
1111
1122
|
'''
|
|
1112
|
-
if center
|
|
1123
|
+
if _isin(center, False, 0, _0_0):
|
|
1113
1124
|
u = utmups
|
|
1114
|
-
elif center
|
|
1125
|
+
elif _isin(center, True):
|
|
1115
1126
|
u = utmups._lowerleft
|
|
1116
1127
|
else:
|
|
1117
1128
|
u = _MODS.utmupsBase._lowerleft(utmups, center)
|
pygeodesy/ellipsoidalBaseDI.py
CHANGED
|
@@ -7,34 +7,36 @@ class C{LatLonEllipsoidalBaseDI} and functions.
|
|
|
7
7
|
# make sure int/int division yields float quotient, see .basics
|
|
8
8
|
from __future__ import division as _; del _ # PYCHOK semicolon
|
|
9
9
|
|
|
10
|
-
from pygeodesy.
|
|
10
|
+
# from pygeodesy.azimuthal import _Equidistants # _MODS
|
|
11
|
+
from pygeodesy.basics import isLatLon, _xsubclassof, typename
|
|
11
12
|
from pygeodesy.constants import EPS, MAX, PI, PI2, PI_4, isnear0, isnear1, \
|
|
12
13
|
_EPSqrt as _TOL, _0_0, _0_01, _1_0, _1_5, _3_0
|
|
13
14
|
# from pygeodesy.dms import F_DMS # _MODS
|
|
14
15
|
from pygeodesy.ellipsoidalBase import LatLonEllipsoidalBase, _TOL_M, property_RO
|
|
15
|
-
from pygeodesy.errors import _AssertionError, IntersectionError, _IsnotError, \
|
|
16
|
-
|
|
16
|
+
from pygeodesy.errors import _AssertionError, IntersectionError, _IsnotError, _or, \
|
|
17
|
+
_ValueError, _xellipsoidal, _xError, _xkwds_not
|
|
17
18
|
from pygeodesy.fmath import favg, fmean_
|
|
18
19
|
from pygeodesy.fsums import Fmt, fsumf_
|
|
19
20
|
from pygeodesy.formy import _isequalTo, opposing, _radical2
|
|
20
|
-
from pygeodesy.
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
# from pygeodesy.geodesicw import _Intersecant2, _PlumbTo # _MODS
|
|
22
|
+
# from pygeodesy.internals import typename # from .basics
|
|
23
|
+
from pygeodesy.interns import _antipodal_, _concentric_, _ellipsoidal_, _low_, \
|
|
24
|
+
_exceed_PI_radians_, _near_, _SPACE_, _too_
|
|
23
25
|
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
|
|
24
|
-
from pygeodesy.namedTuples import Bearing2Tuple, Destination2Tuple, \
|
|
25
|
-
|
|
26
|
-
NearestOn8Tuple, _LL4Tuple
|
|
26
|
+
from pygeodesy.namedTuples import Bearing2Tuple, Destination2Tuple, Intersection3Tuple, \
|
|
27
|
+
NearestOn2Tuple, NearestOn8Tuple, _LL4Tuple
|
|
27
28
|
# from pygeodesy.props import property_RO # from .ellipsoidalBase
|
|
29
|
+
# from pygeodesy.sphericalNvector import _intersects2 # _MODS
|
|
30
|
+
# from pygeodesy.sphericalTrigonometry import _intersect, LatLon # _MODS
|
|
28
31
|
# from pygeodesy.streprs import Fmt # from .fsums
|
|
29
|
-
from pygeodesy.units import _fi_j2, _isDegrees, _isHeight, _isRadius,
|
|
30
|
-
|
|
31
|
-
from pygeodesy.
|
|
32
|
-
_Wrap, wrap360
|
|
32
|
+
from pygeodesy.units import _fi_j2, _isDegrees, _isHeight, _isRadius, Radius_, Scalar
|
|
33
|
+
from pygeodesy.utily import m2km, unroll180, _unrollon, _unrollon3, _Wrap, wrap360
|
|
34
|
+
# from pygeodesy.vector3d import _intersects2, _intersect3d3, _nearestOn2, Vector3d # _MODS
|
|
33
35
|
|
|
34
36
|
from math import degrees, radians
|
|
35
37
|
|
|
36
38
|
__all__ = _ALL_LAZY.ellipsoidalBaseDI
|
|
37
|
-
__version__ = '
|
|
39
|
+
__version__ = '25.04.21'
|
|
38
40
|
|
|
39
41
|
_polar__ = 'polar?'
|
|
40
42
|
_TRIPS = 33 # _intersect3, _intersects2, _nearestOn interations, 6..9 sufficient?
|
|
@@ -390,7 +392,7 @@ class LatLonEllipsoidalBaseDI(LatLonEllipsoidalBase):
|
|
|
390
392
|
|
|
391
393
|
f, j = _fi_j2(f, len(Ps)) # like .vector3d.nearestOn6
|
|
392
394
|
|
|
393
|
-
n = self
|
|
395
|
+
n = typename(self)
|
|
394
396
|
c.rename(n)
|
|
395
397
|
if s is not c:
|
|
396
398
|
s = s.copy(name=n)
|
pygeodesy/ellipsoidalNvector.py
CHANGED
|
@@ -23,14 +23,17 @@ The Journal of Navigation (2010), vol 63, nr 3, pp 395-417.
|
|
|
23
23
|
# make sure int/int division yields float quotient, see .basics
|
|
24
24
|
from __future__ import division as _; del _ # PYCHOK semicolon
|
|
25
25
|
|
|
26
|
-
from pygeodesy.basics import issubclassof, map2, _xinstanceof,
|
|
26
|
+
from pygeodesy.basics import _isin, issubclassof, map2, _xinstanceof, \
|
|
27
|
+
_xsubclassof
|
|
27
28
|
from pygeodesy.datums import _earth_ellipsoid, _ellipsoidal_datum, _WGS84
|
|
28
29
|
# from pygeodesy.dms import F_D, toDMS # _MODS
|
|
30
|
+
# from pygeodesy.ecef import EcefVeness # _MODS
|
|
29
31
|
from pygeodesy.ellipsoidalBase import CartesianEllipsoidalBase, \
|
|
30
32
|
_nearestOn, LatLonEllipsoidalBase, \
|
|
31
33
|
_TOL_M, _Wrap
|
|
32
34
|
from pygeodesy.errors import _xkwds, _xkwds_pop2
|
|
33
35
|
# from pygeodesy.fmath import fdot # from .nvectorBase
|
|
36
|
+
# from pygeodesy.formy import _isequalTo # _MODS
|
|
34
37
|
from pygeodesy.interns import _Nv00_, _COMMASPACE_, _pole_ # PYCHOK used!
|
|
35
38
|
from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _ALL_OTHER
|
|
36
39
|
# from pygeodesy.ltp import Ltp # _MODS
|
|
@@ -48,7 +51,7 @@ from pygeodesy.units import Bearing, Distance, Height, Scalar
|
|
|
48
51
|
# from math import fabs # from .nvectorBase
|
|
49
52
|
|
|
50
53
|
__all__ = _ALL_LAZY.ellipsoidalNvector
|
|
51
|
-
__version__ = '
|
|
54
|
+
__version__ = '25.04.21'
|
|
52
55
|
|
|
53
56
|
|
|
54
57
|
class Ned(_Ned):
|
|
@@ -453,7 +456,7 @@ class Nvector(NvectorBase):
|
|
|
453
456
|
@raise TypeError: If B{C{datum}} is not a L{Datum}.
|
|
454
457
|
'''
|
|
455
458
|
NvectorBase.__init__(self, x_xyz, y=y, z=z, h=h, ll=ll, **name)
|
|
456
|
-
if
|
|
459
|
+
if not _isin(datum, None, self._datum):
|
|
457
460
|
self._datum = _ellipsoidal_datum(datum, **name)
|
|
458
461
|
|
|
459
462
|
@Property_RO
|
pygeodesy/ellipsoidalVincenty.py
CHANGED
|
@@ -51,10 +51,13 @@ or by converting to anothor datum:
|
|
|
51
51
|
from __future__ import division as _; del _ # PYCHOK semicolon
|
|
52
52
|
|
|
53
53
|
from pygeodesy.constants import EPS, EPS0, _0_0, _1_0, _2_0, _3_0, _4_0, _6_0
|
|
54
|
+
# from pygeodesy.ecef import EcefVeness # _MODS
|
|
54
55
|
from pygeodesy.ellipsoidalBase import CartesianEllipsoidalBase, _nearestOn
|
|
55
56
|
from pygeodesy.ellipsoidalBaseDI import LatLonEllipsoidalBaseDI, \
|
|
56
57
|
_intersection3, _intersections2, \
|
|
57
58
|
_TOL_M, intersecant2
|
|
59
|
+
# from pygeodesy.ellipsoidalExact import areaOf, perimeterOf # _MODS
|
|
60
|
+
# from pygeodesy.ellipsoidalKarney import areaOf, perimeterOf # _MODS
|
|
58
61
|
from pygeodesy.errors import _and, _ValueError, _xkwds
|
|
59
62
|
from pygeodesy.fmath import Fpolynomial, hypot, hypot1
|
|
60
63
|
from pygeodesy.interns import _ambiguous_, _antipodal_, _COLONSPACE_, \
|
|
@@ -73,7 +76,7 @@ from pygeodesy.utily import atan2, atan2b, atan2d, sincos2, sincos2d, \
|
|
|
73
76
|
from math import cos, degrees, fabs, radians, tan as _tan
|
|
74
77
|
|
|
75
78
|
__all__ = _ALL_LAZY.ellipsoidalVincenty
|
|
76
|
-
__version__ = '
|
|
79
|
+
__version__ = '25.04.21'
|
|
77
80
|
|
|
78
81
|
_antipodal_to_ = _SPACE_(_antipodal_, _to_)
|
|
79
82
|
|