pygeodesy 24.5.8__py2.py3-none-any.whl → 24.5.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.5.8.dist-info → PyGeodesy-24.5.24.dist-info}/METADATA +2 -2
- PyGeodesy-24.5.24.dist-info/RECORD +116 -0
- pygeodesy/__init__.py +16 -12
- pygeodesy/__main__.py +9 -10
- pygeodesy/albers.py +42 -42
- pygeodesy/auxilats/__init__.py +1 -1
- pygeodesy/auxilats/__main__.py +7 -10
- pygeodesy/auxilats/auxAngle.py +32 -31
- pygeodesy/auxilats/auxLat.py +81 -51
- pygeodesy/azimuthal.py +123 -124
- pygeodesy/basics.py +165 -176
- pygeodesy/booleans.py +14 -15
- pygeodesy/cartesianBase.py +25 -23
- pygeodesy/clipy.py +3 -3
- pygeodesy/constants.py +8 -6
- pygeodesy/css.py +50 -42
- pygeodesy/datums.py +50 -48
- pygeodesy/dms.py +6 -6
- pygeodesy/ecef.py +27 -27
- pygeodesy/elevations.py +2 -2
- pygeodesy/ellipsoidalBase.py +28 -27
- pygeodesy/ellipsoidalBaseDI.py +8 -7
- pygeodesy/ellipsoidalNvector.py +11 -12
- pygeodesy/ellipsoids.py +41 -35
- pygeodesy/elliptic.py +12 -10
- pygeodesy/epsg.py +4 -3
- pygeodesy/errors.py +35 -13
- pygeodesy/etm.py +62 -53
- pygeodesy/fmath.py +48 -41
- pygeodesy/formy.py +93 -65
- pygeodesy/frechet.py +117 -102
- pygeodesy/fstats.py +52 -46
- pygeodesy/fsums.py +169 -145
- pygeodesy/gars.py +10 -9
- pygeodesy/geodesicw.py +32 -30
- pygeodesy/geodesicx/__init__.py +1 -1
- pygeodesy/geodesicx/__main__.py +4 -4
- pygeodesy/geodesicx/gx.py +40 -32
- pygeodesy/geodesicx/gxarea.py +15 -12
- pygeodesy/geodesicx/gxbases.py +3 -4
- pygeodesy/geodesicx/gxline.py +6 -8
- pygeodesy/geodsolve.py +28 -26
- pygeodesy/geohash.py +47 -44
- pygeodesy/geoids.py +37 -35
- pygeodesy/hausdorff.py +112 -99
- pygeodesy/heights.py +136 -129
- pygeodesy/internals.py +576 -0
- pygeodesy/interns.py +6 -207
- pygeodesy/iters.py +22 -19
- pygeodesy/karney.py +18 -15
- pygeodesy/ktm.py +31 -24
- pygeodesy/latlonBase.py +12 -11
- pygeodesy/lazily.py +140 -218
- pygeodesy/lcc.py +24 -25
- pygeodesy/ltp.py +83 -71
- pygeodesy/ltpTuples.py +7 -5
- pygeodesy/mgrs.py +5 -4
- pygeodesy/named.py +136 -49
- pygeodesy/namedTuples.py +33 -25
- pygeodesy/nvectorBase.py +10 -9
- pygeodesy/osgr.py +14 -12
- pygeodesy/points.py +13 -13
- pygeodesy/props.py +7 -7
- pygeodesy/rhumb/__init__.py +1 -1
- pygeodesy/rhumb/bases.py +3 -2
- pygeodesy/rhumb/solve.py +2 -2
- pygeodesy/solveBase.py +8 -7
- pygeodesy/sphericalTrigonometry.py +5 -5
- pygeodesy/streprs.py +8 -7
- pygeodesy/trf.py +8 -8
- pygeodesy/triaxials.py +67 -63
- pygeodesy/units.py +48 -50
- pygeodesy/unitsBase.py +24 -11
- pygeodesy/ups.py +7 -6
- pygeodesy/utily.py +4 -4
- pygeodesy/utm.py +53 -52
- pygeodesy/utmupsBase.py +11 -8
- pygeodesy/vector2d.py +6 -7
- pygeodesy/vector3d.py +16 -17
- pygeodesy/vector3dBase.py +5 -5
- PyGeodesy-24.5.8.dist-info/RECORD +0 -115
- {PyGeodesy-24.5.8.dist-info → PyGeodesy-24.5.24.dist-info}/WHEEL +0 -0
- {PyGeodesy-24.5.8.dist-info → PyGeodesy-24.5.24.dist-info}/top_level.txt +0 -0
pygeodesy/osgr.py
CHANGED
|
@@ -53,7 +53,7 @@ from pygeodesy.utily import degrees90, degrees180, sincostan3, truncate
|
|
|
53
53
|
from math import cos, fabs, radians, sin, sqrt
|
|
54
54
|
|
|
55
55
|
__all__ = _ALL_LAZY.osgr
|
|
56
|
-
__version__ = '
|
|
56
|
+
__version__ = '24.05.13'
|
|
57
57
|
|
|
58
58
|
_equivalent_ = 'equivalent'
|
|
59
59
|
_OSGR_ = 'OSGR'
|
|
@@ -324,17 +324,19 @@ class Osgr(_NamedBase):
|
|
|
324
324
|
r = NG.reverse(self)
|
|
325
325
|
|
|
326
326
|
elif self._latlon is None:
|
|
327
|
+
_F = _Fsumf_
|
|
327
328
|
e0 = self.easting - NG.eas0
|
|
328
329
|
n0 = m = self.northing - NG.nor0
|
|
329
330
|
|
|
330
|
-
_M = NG.Mabcd0
|
|
331
331
|
a0 = NG.a0
|
|
332
|
+
_M = NG.Mabcd0
|
|
332
333
|
a = NG.phi0
|
|
333
|
-
|
|
334
|
+
_a = fabs
|
|
335
|
+
_A = _F(a).fsum_
|
|
334
336
|
for self._iteration in range(1, _TRIPS):
|
|
335
337
|
a = _A(m / a0)
|
|
336
338
|
m = n0 - _M(a) # meridional arc
|
|
337
|
-
if
|
|
339
|
+
if _a(m) < eps:
|
|
338
340
|
break
|
|
339
341
|
else: # PYCHOK no cover
|
|
340
342
|
t = str(self)
|
|
@@ -354,14 +356,14 @@ class Osgr(_NamedBase):
|
|
|
354
356
|
d2 = d**2
|
|
355
357
|
|
|
356
358
|
a = (d2 * ta * (-1 + # Horner-like
|
|
357
|
-
d2 / 12 * (
|
|
358
|
-
d2 / 30 *
|
|
359
|
+
d2 / 12 * (_F( 5, 3 * ta2, -9 * ta2 * n2, n2) -
|
|
360
|
+
d2 / 30 * _F(61, 90 * ta2, 45 * ta4)))).fsum_(a)
|
|
359
361
|
|
|
360
362
|
b = (d / ca * ( 1 - # Horner-like
|
|
361
|
-
d2 / 6 * (
|
|
362
|
-
d2 / 20 * (
|
|
363
|
-
d2 / 42 *
|
|
364
|
-
|
|
363
|
+
d2 / 6 * (_F(v_r, 2 * ta2) -
|
|
364
|
+
d2 / 20 * (_F( 5, 28 * ta2, 24 * ta4) +
|
|
365
|
+
d2 / 42 * _F(61, 662 * ta2, 1320 * ta4,
|
|
366
|
+
720 * ta2 * ta4))))).fsum_(NG.lam0)
|
|
365
367
|
|
|
366
368
|
r = _LLEB(degrees90(a), degrees180(b), datum=self.datum, name=self.name)
|
|
367
369
|
r._iteration = self._iteration # only ellipsoidal LatLon
|
|
@@ -541,7 +543,7 @@ def parseOSGR(strOSGR, Osgr=Osgr, name=NN, **Osgr_kwds):
|
|
|
541
543
|
if not p:
|
|
542
544
|
raise ValueError
|
|
543
545
|
g = s[0]
|
|
544
|
-
if p == 2 and isfloat(g): # "easting,northing"
|
|
546
|
+
if p == 2 and isfloat(g, both=True): # "easting,northing"
|
|
545
547
|
e, n, m = _enstr2m3(*s, wide=_EN_WIDE + 1)
|
|
546
548
|
|
|
547
549
|
else:
|
|
@@ -681,7 +683,7 @@ def toOsgr(latlon, lon=None, kTM=False, datum=_WGS84, Osgr=Osgr, name=NN, # MCC
|
|
|
681
683
|
|
|
682
684
|
if __name__ == '__main__':
|
|
683
685
|
|
|
684
|
-
from pygeodesy
|
|
686
|
+
from pygeodesy import printf
|
|
685
687
|
from random import random, seed
|
|
686
688
|
from time import localtime
|
|
687
689
|
|
pygeodesy/points.py
CHANGED
|
@@ -26,8 +26,8 @@ C{ilon} longitude index in each 2+tuple.
|
|
|
26
26
|
'''
|
|
27
27
|
|
|
28
28
|
from pygeodesy.basics import isclass, isint, isscalar, issequence, \
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
_xdup, issubclassof, _Sequence, _xcopy, \
|
|
30
|
+
_xinstanceof
|
|
31
31
|
from pygeodesy.constants import EPS, EPS1, PI_2, R_M, isnear0, isnear1, \
|
|
32
32
|
_umod_360, _0_0, _0_5, _1_0, _2_0, _6_0, \
|
|
33
33
|
_90_0, _N_90_0, _180_0, _360_0
|
|
@@ -41,8 +41,8 @@ from pygeodesy.fmath import favg, fdot, hypot, Fsum, fsum
|
|
|
41
41
|
from pygeodesy.formy import _bearingTo2, equirectangular_, _spherical_datum
|
|
42
42
|
from pygeodesy.interns import NN, _colinear_, _COMMASPACE_, _composite_, \
|
|
43
43
|
_DEQUALSPACED_, _ELLIPSIS_, _EW_, _immutable_, \
|
|
44
|
-
_near_, _no_,
|
|
45
|
-
|
|
44
|
+
_near_, _no_, _NS_, _point_, _SPACE_, _UNDER_, \
|
|
45
|
+
_valid_ # _lat_, _lon_
|
|
46
46
|
from pygeodesy.iters import LatLon2PsxyIter, PointsIter, points2
|
|
47
47
|
from pygeodesy.latlonBase import LatLonBase, _latlonheight3, \
|
|
48
48
|
_ALL_DOCS, _ALL_LAZY, _MODS
|
|
@@ -59,10 +59,10 @@ from pygeodesy.units import Number_, Radius, Scalar, Scalar_
|
|
|
59
59
|
from pygeodesy.utily import atan2b, degrees90, degrees180, degrees2m, \
|
|
60
60
|
unroll180, _unrollon, unrollPI, _Wrap, wrap180
|
|
61
61
|
|
|
62
|
-
from math import cos, fabs, fmod, radians, sin
|
|
62
|
+
from math import cos, fabs, fmod as _fmod, radians, sin
|
|
63
63
|
|
|
64
64
|
__all__ = _ALL_LAZY.points
|
|
65
|
-
__version__ = '24.
|
|
65
|
+
__version__ = '24.05.19'
|
|
66
66
|
|
|
67
67
|
_ilat_ = 'ilat'
|
|
68
68
|
_ilon_ = 'ilon'
|
|
@@ -92,7 +92,7 @@ class LatLon_(LatLonBase): # XXX in heights._HeightBase.height
|
|
|
92
92
|
# python3 -m timeit -s "from pygeodesy... import LatLonBase as LL" "LL(0, 0)" 2.14 usec
|
|
93
93
|
# python3 -m timeit -s "from pygeodesy import LatLon_" "LatLon_(0, 0)" 216 nsec
|
|
94
94
|
|
|
95
|
-
def __init__(self, latlonh, lon=None, height=0, wrap=False,
|
|
95
|
+
def __init__(self, latlonh, lon=None, height=0, wrap=False, datum=None, **name):
|
|
96
96
|
'''New L{LatLon_}.
|
|
97
97
|
|
|
98
98
|
@note: The lat- and longitude values are taken I{as-given,
|
|
@@ -283,7 +283,7 @@ class _Basequence(_Sequence): # immutable, on purpose
|
|
|
283
283
|
'''
|
|
284
284
|
for i in self._findall(point, start_end):
|
|
285
285
|
return i
|
|
286
|
-
raise _IndexError(self._itemname, point,
|
|
286
|
+
raise _IndexError(self._itemname, point, txt_not_='found')
|
|
287
287
|
|
|
288
288
|
@property_RO
|
|
289
289
|
def isNumpy2(self): # PYCHOK no cover
|
|
@@ -1156,7 +1156,7 @@ def fractional(points, fi, j=None, wrap=None, LatLon=None, Vector=None, **kwds):
|
|
|
1156
1156
|
'''
|
|
1157
1157
|
if LatLon and Vector: # PYCHOK no cover
|
|
1158
1158
|
kwds = _xkwds(kwds, fi=fi, LatLon=LatLon, Vector=Vector)
|
|
1159
|
-
raise _TypeError(
|
|
1159
|
+
raise _TypeError(txt__=fractional, **kwds)
|
|
1160
1160
|
w = wrap if LatLon else False # intermediateTo
|
|
1161
1161
|
try:
|
|
1162
1162
|
if not isscalar(fi) or fi < 0:
|
|
@@ -1168,7 +1168,7 @@ def fractional(points, fi, j=None, wrap=None, LatLon=None, Vector=None, **kwds):
|
|
|
1168
1168
|
elif Vector:
|
|
1169
1169
|
p = Vector(p.x, p.y, p.z, **kwds)
|
|
1170
1170
|
except (IndexError, TypeError):
|
|
1171
|
-
raise _IndexError(fi=fi, points=points, wrap=w,
|
|
1171
|
+
raise _IndexError(fi=fi, points=points, wrap=w, txt__=fractional)
|
|
1172
1172
|
return p
|
|
1173
1173
|
|
|
1174
1174
|
|
|
@@ -1191,12 +1191,12 @@ def _fractional(points, fi, j, fin=None, wrap=None): # in .frechet.py
|
|
|
1191
1191
|
elif _isLatLon(p): # backward compatible default
|
|
1192
1192
|
p = LatLon2Tuple(favg(p.lat, q.lat, f=r),
|
|
1193
1193
|
favg(p.lon, q.lon, f=r),
|
|
1194
|
-
|
|
1194
|
+
name__=fractional)
|
|
1195
1195
|
else: # assume p and q are cartesian or vectorial
|
|
1196
1196
|
z = p.z if p.z is q.z else favg(p.z, q.z, f=r)
|
|
1197
1197
|
p = Vector3Tuple(favg(p.x, q.x, f=r),
|
|
1198
1198
|
favg(p.y, q.y, f=r), z,
|
|
1199
|
-
|
|
1199
|
+
name__=fractional)
|
|
1200
1200
|
return p
|
|
1201
1201
|
|
|
1202
1202
|
|
|
@@ -1353,7 +1353,7 @@ def isenclosedBy(point, points, wrap=False): # MCCABE 15
|
|
|
1353
1353
|
return dx, x2, y2
|
|
1354
1354
|
|
|
1355
1355
|
else:
|
|
1356
|
-
x0 =
|
|
1356
|
+
x0 = _fmod(x0, _360_0) # not x0 % 360!
|
|
1357
1357
|
x0_180_ = x0 - _180_0
|
|
1358
1358
|
x0_180 = x0 + _180_0
|
|
1359
1359
|
|
pygeodesy/props.py
CHANGED
|
@@ -25,7 +25,7 @@ from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, \
|
|
|
25
25
|
from functools import wraps as _wraps
|
|
26
26
|
|
|
27
27
|
__all__ = _ALL_LAZY.props
|
|
28
|
-
__version__ = '24.05.
|
|
28
|
+
__version__ = '24.05.12'
|
|
29
29
|
|
|
30
30
|
_class_ = 'class'
|
|
31
31
|
_dont_use_ = _DEPRECATED_ + ", don't use."
|
|
@@ -48,11 +48,11 @@ def _allPropertiesOf(Clas_or_inst, *Bases, **excls):
|
|
|
48
48
|
except AttributeError:
|
|
49
49
|
raise
|
|
50
50
|
S = () # not an inst
|
|
51
|
-
B
|
|
52
|
-
|
|
51
|
+
B = Bases or _PropertyBase
|
|
52
|
+
_isa = isinstance
|
|
53
53
|
for C in S:
|
|
54
54
|
for n, p in C.__dict__.items():
|
|
55
|
-
if
|
|
55
|
+
if _isa(p, B) and p.name == n and n not in excls:
|
|
56
56
|
yield p
|
|
57
57
|
|
|
58
58
|
|
|
@@ -252,9 +252,9 @@ class Property_RO(_PropertyBase):
|
|
|
252
252
|
<https://Docs.Python.org/3/library/functools.html#functools.cache>}
|
|
253
253
|
to I{cache} or I{memoize} the property value.
|
|
254
254
|
|
|
255
|
-
@see: Luciano Ramalho, "Fluent Python",
|
|
256
|
-
|
|
257
|
-
|
|
255
|
+
@see: Luciano Ramalho, "Fluent Python", O'Reilly, Example 19-24, 2016
|
|
256
|
+
p. 636 or Example 22-28, 2022 p. 870 and U{class Property
|
|
257
|
+
<https://docs.Python.org/3/howto/descriptor.html>}.
|
|
258
258
|
'''
|
|
259
259
|
_fget = method if _FOR_DOCS else self._fget # XXX force method.__doc__ to epydoc
|
|
260
260
|
_PropertyBase.__init__(self, method, _fget, self._fset_error)
|
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__ = '
|
|
12
|
+
__version__ = '24.05.24'
|
|
13
13
|
|
|
14
14
|
if _unLazy0: # or _isfrozen
|
|
15
15
|
from pygeodesy.rhumb.aux_ import RhumbAux, RhumbLineAux
|
pygeodesy/rhumb/bases.py
CHANGED
|
@@ -33,8 +33,9 @@ from pygeodesy.errors import IntersectionError, RhumbError, _xdatum, \
|
|
|
33
33
|
from pygeodesy.fmath import euclid, favg, sqrt_a, Fsum
|
|
34
34
|
# from pygeodesy.formy import opposing # _MODS
|
|
35
35
|
# from pygeodesy.fsums import Fsum # from .fmath
|
|
36
|
+
from pygeodesy.internals import _dunder_nameof, _under
|
|
36
37
|
from pygeodesy.interns import NN, _coincident_, _COMMASPACE_, _Dash, \
|
|
37
|
-
|
|
38
|
+
_parallel_, _too_
|
|
38
39
|
from pygeodesy.karney import _atan2d, Caps, _CapsBase, _diff182, _fix90, \
|
|
39
40
|
_norm180, GDict
|
|
40
41
|
# from pygeodesy.ktm import KTransverseMercator, _AlpCoeffs # _MODS
|
|
@@ -51,7 +52,7 @@ from pygeodesy.vector3d import _intersect3d3, Vector3d # in .Intersection below
|
|
|
51
52
|
from math import cos, fabs
|
|
52
53
|
|
|
53
54
|
__all__ = ()
|
|
54
|
-
__version__ = '24.
|
|
55
|
+
__version__ = '24.05.13'
|
|
55
56
|
|
|
56
57
|
_anti_ = _Dash('anti')
|
|
57
58
|
_rls = [] # instances of C{RbumbLine...} to be updated
|
pygeodesy/rhumb/solve.py
CHANGED
|
@@ -21,7 +21,7 @@ from pygeodesy.solveBase import _SolveBase, _SolveLineBase
|
|
|
21
21
|
from pygeodesy.utily import _unrollon, _Wrap, wrap360
|
|
22
22
|
|
|
23
23
|
__all__ = _ALL_LAZY.rhumb_solve
|
|
24
|
-
__version__ = '24.
|
|
24
|
+
__version__ = '24.04.13'
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
class _RhumbSolveBase(_SolveBase):
|
|
@@ -356,7 +356,7 @@ __all__ += _ALL_DOCS(_RhumbSolveBase)
|
|
|
356
356
|
|
|
357
357
|
if __name__ == '__main__':
|
|
358
358
|
|
|
359
|
-
from pygeodesy
|
|
359
|
+
from pygeodesy import printf
|
|
360
360
|
from sys import argv
|
|
361
361
|
|
|
362
362
|
def rhumb_intercept(rS, lat1, lon1, lat2, lon2, azi2, s23):
|
pygeodesy/solveBase.py
CHANGED
|
@@ -9,10 +9,11 @@ from pygeodesy.constants import DIG
|
|
|
9
9
|
from pygeodesy.datums import _earth_datum, _WGS84, _EWGS84
|
|
10
10
|
# from pygeodesy.ellipsoids import _EWGS84 # from .datums
|
|
11
11
|
from pygeodesy.errors import _AssertionError, _xkwds_get, _xkwds_item2
|
|
12
|
-
from pygeodesy.
|
|
13
|
-
|
|
12
|
+
from pygeodesy.internals import _enquote, printf
|
|
13
|
+
from pygeodesy.interns import NN, _0_, _BACKSLASH_, _COMMASPACE_, \
|
|
14
|
+
_EQUAL_, _Error_, _SPACE_, _UNUSED_
|
|
14
15
|
from pygeodesy.karney import Caps, _CapsBase, GDict
|
|
15
|
-
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY,
|
|
16
|
+
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _unlazy
|
|
16
17
|
from pygeodesy.named import callername, notOverloaded
|
|
17
18
|
from pygeodesy.props import Property, Property_RO, property_RO, _update_all
|
|
18
19
|
from pygeodesy.streprs import Fmt, fstr, fstrzs, pairs, strs
|
|
@@ -22,7 +23,7 @@ from pygeodesy.utily import unroll180, wrap360 # PYCHOK shared
|
|
|
22
23
|
from subprocess import PIPE as _PIPE, Popen as _Popen, STDOUT as _STDOUT
|
|
23
24
|
|
|
24
25
|
__all__ = _ALL_LAZY.solveBase
|
|
25
|
-
__version__ = '24.
|
|
26
|
+
__version__ = '24.05.20'
|
|
26
27
|
|
|
27
28
|
_ERROR_ = 'ERROR'
|
|
28
29
|
_text_True = dict() if _unlazy else dict(text=True)
|
|
@@ -105,7 +106,7 @@ class _SolveLineSolveBase(_CapsBase):
|
|
|
105
106
|
if floats:
|
|
106
107
|
v = map(float, v)
|
|
107
108
|
r = GDict(_zip(n, v)) # strict=True
|
|
108
|
-
return self._iter2tion(r, r)
|
|
109
|
+
return self._iter2tion(r, **r)
|
|
109
110
|
|
|
110
111
|
@property_RO
|
|
111
112
|
def invokation(self):
|
|
@@ -136,7 +137,7 @@ class _SolveLineSolveBase(_CapsBase):
|
|
|
136
137
|
s = self.status
|
|
137
138
|
if s:
|
|
138
139
|
raise self._Error(cmd=_cmd_stdin_(c, i), status=s,
|
|
139
|
-
|
|
140
|
+
txt_not_=_0_)
|
|
140
141
|
if self.verbose: # PYCHOK no cover
|
|
141
142
|
self._print(r)
|
|
142
143
|
return r
|
|
@@ -220,7 +221,7 @@ class _SolveLineSolveBase(_CapsBase):
|
|
|
220
221
|
_ = self.version # test path and ...
|
|
221
222
|
if self.status: # ... return code
|
|
222
223
|
S_p = Solve_path or {self._Solve_name: _enquote(path)}
|
|
223
|
-
raise self._Error(status=self.status,
|
|
224
|
+
raise self._Error(status=self.status, txt_not_=_0_, **S_p)
|
|
224
225
|
hold = path
|
|
225
226
|
finally: # restore in case of error
|
|
226
227
|
if self._Solve_path != hold:
|
|
@@ -30,9 +30,9 @@ from pygeodesy.formy import antipode_, bearing_, _bearingTo2, excessAbc_, \
|
|
|
30
30
|
excessGirard_, excessLHuilier_, opposing_, _radical2, \
|
|
31
31
|
vincentys_
|
|
32
32
|
from pygeodesy.interns import _1_, _2_, _coincident_, _composite_, _colinear_, \
|
|
33
|
-
_concentric_, _convex_, _end_, _infinite_,
|
|
34
|
-
_line_, _near_,
|
|
35
|
-
_SPACE_, _too_
|
|
33
|
+
_concentric_, _convex_, _end_, _infinite_, \
|
|
34
|
+
_invalid_, _line_, _near_, _null_, _parallel_, \
|
|
35
|
+
_point_, _SPACE_, _too_
|
|
36
36
|
from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _ALL_OTHER
|
|
37
37
|
# from pygeodesy.nvectorBase import NvectorBase, sumOf # _MODE
|
|
38
38
|
from pygeodesy.namedTuples import LatLon2Tuple, LatLon3Tuple, NearestOn3Tuple, \
|
|
@@ -54,7 +54,7 @@ from pygeodesy.vector3d import sumOf, Vector3d
|
|
|
54
54
|
from math import asin, atan2, cos, degrees, fabs, radians, sin
|
|
55
55
|
|
|
56
56
|
__all__ = _ALL_LAZY.sphericalTrigonometry
|
|
57
|
-
__version__ = '24.
|
|
57
|
+
__version__ = '24.045.19'
|
|
58
58
|
|
|
59
59
|
_PI_EPS4 = PI - EPS4
|
|
60
60
|
if _PI_EPS4 >= PI:
|
|
@@ -494,7 +494,7 @@ class LatLon(LatLonSphericalBase):
|
|
|
494
494
|
s0 = s
|
|
495
495
|
else:
|
|
496
496
|
t = _Fmt.SQUARE(points=i)
|
|
497
|
-
raise _ValueError(t, p2, wrap=wrap,
|
|
497
|
+
raise _ValueError(t, p2, wrap=wrap, txt_not_=_convex_)
|
|
498
498
|
gc1, v1 = gc, v2
|
|
499
499
|
|
|
500
500
|
return True # inside
|
pygeodesy/streprs.py
CHANGED
|
@@ -5,23 +5,24 @@ u'''Floating point and other formatting utilities.
|
|
|
5
5
|
'''
|
|
6
6
|
|
|
7
7
|
from pygeodesy.basics import isint, islistuple, isscalar, isstr, itemsorted, \
|
|
8
|
-
_zip,
|
|
8
|
+
_zip, _0_0
|
|
9
9
|
# from pygeodesy.constants import _0_0
|
|
10
10
|
from pygeodesy.errors import _or, _AttributeError, _IsnotError, _TypeError, \
|
|
11
11
|
_ValueError, _xkwds_get, _xkwds_item2, _xkwds_pop2
|
|
12
|
+
# from pygeodesy.internals import _dunder_nameof # from .lazily
|
|
12
13
|
from pygeodesy.interns import NN, _0_, _0to9_, MISSING, _BAR_, _COMMASPACE_, \
|
|
13
14
|
_DOT_, _E_, _ELLIPSIS_, _EQUAL_, _H_, _LR_PAIRS, \
|
|
14
|
-
_N_, _name_,
|
|
15
|
-
|
|
15
|
+
_N_, _name_, _not_scalar_, _PERCENT_, _SPACE_, \
|
|
16
|
+
_STAR_, _UNDER_
|
|
16
17
|
from pygeodesy.interns import _convergence_, _distant_, _e_, _eps_, _exceeds_, \
|
|
17
18
|
_EQUALSPACED_, _f_, _F_, _g_, _limit_, _no_, \
|
|
18
19
|
_tolerance_ # PYCHOK used!
|
|
19
|
-
from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS
|
|
20
|
+
from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _dunder_nameof
|
|
20
21
|
|
|
21
22
|
from math import fabs, log10 as _log10
|
|
22
23
|
|
|
23
24
|
__all__ = _ALL_LAZY.streprs
|
|
24
|
-
__version__ = '24.05.
|
|
25
|
+
__version__ = '24.05.19'
|
|
25
26
|
|
|
26
27
|
_at_ = 'at' # PYCHOK used!
|
|
27
28
|
_EN_PREC = 6 # max MGRS/OSGR precision, 1 micrometer
|
|
@@ -498,11 +499,11 @@ def _streprs(prec, objs, fmt, ints, force, strepr):
|
|
|
498
499
|
f = fmt.replace(_DOTSTAR_, Fmt.DOT(abs(prec)))
|
|
499
500
|
_ = f % (_0_0,)
|
|
500
501
|
except (TypeError, ValueError):
|
|
501
|
-
raise _ValueError(fmt=fmt,
|
|
502
|
+
raise _ValueError(fmt=fmt, txt_not_=repr(_DOTSTAR_))
|
|
502
503
|
fmt = f
|
|
503
504
|
|
|
504
505
|
else:
|
|
505
|
-
raise _ValueError(fmt=fmt,
|
|
506
|
+
raise _ValueError(fmt=fmt, txt_not_=repr(_Fspec_))
|
|
506
507
|
|
|
507
508
|
for i, o in enumerate(objs):
|
|
508
509
|
if force or isinstance(o, float):
|
pygeodesy/trf.py
CHANGED
|
@@ -69,7 +69,7 @@ en/how-to-deal-with-etrs89-datum-and-time-dependent-transformation-parameters-45
|
|
|
69
69
|
@var RefFrames.WGS84g1762: RefFrame(name='WGS84g1762', epoch=2005, datum=Datums.GRS80) .Xforms=(0, 0)
|
|
70
70
|
'''
|
|
71
71
|
|
|
72
|
-
from pygeodesy.basics import map1, neg, isidentifier, isstr, _xinstanceof,
|
|
72
|
+
from pygeodesy.basics import map1, neg, isidentifier, isstr, _xinstanceof, _xscalar
|
|
73
73
|
from pygeodesy.constants import _float as _F, _0_0s, _0_0, _0_001, _0_5, _1_0
|
|
74
74
|
from pygeodesy.datums import Datums, _earth_datum, _equall, _GDA2020_, _Names7, \
|
|
75
75
|
_negastr, Transform, _WGS84, _EWGS84, _operator
|
|
@@ -91,7 +91,7 @@ from math import ceil as _ceil, fabs
|
|
|
91
91
|
# import operator as _operator # from .datums
|
|
92
92
|
|
|
93
93
|
__all__ = _ALL_LAZY.trf
|
|
94
|
-
__version__ = '24.
|
|
94
|
+
__version__ = '24.05.21'
|
|
95
95
|
|
|
96
96
|
_EP0CH = Epoch(0, low=0)
|
|
97
97
|
_Es = {_EP0CH: _EP0CH} # L{Epoch}s, deleted below
|
|
@@ -242,7 +242,7 @@ class RefFrame(_NamedEnumItem):
|
|
|
242
242
|
return _toRefFrame(point, reframe2, reframe=self, **_xkwds(epoch_epoch2_name,
|
|
243
243
|
name=_xattr(reframe2, name=self.name)))
|
|
244
244
|
|
|
245
|
-
def toStr(self, epoch=None, name=NN, **unused): # PYCHOK
|
|
245
|
+
def toStr(self, epoch=None, name=NN, **unused): # PYCHOK signature
|
|
246
246
|
'''Return this reference frame as a string.
|
|
247
247
|
|
|
248
248
|
@kwarg epoch: Override this reframe's epoch (C{scalar} or C{str}).
|
|
@@ -383,14 +383,14 @@ class TransformXform(Transform):
|
|
|
383
383
|
def __hash__(self):
|
|
384
384
|
return Transform.__hash__(self)
|
|
385
385
|
|
|
386
|
-
def inverse(self, name
|
|
386
|
+
def inverse(self, **name):
|
|
387
387
|
'''Return the inverse of this transform.
|
|
388
388
|
|
|
389
|
-
@kwarg name: Optional, unique name (C{str}).
|
|
389
|
+
@kwarg name: Optional, unique C{B{name}=NN} (C{str}).
|
|
390
390
|
|
|
391
391
|
@return: Inverse (L{TransformXform}), unregistered.
|
|
392
392
|
'''
|
|
393
|
-
r = Transform.inverse(name
|
|
393
|
+
r = Transform.inverse(self, **name)
|
|
394
394
|
r._Xform = r.Xform.inverse()
|
|
395
395
|
return r
|
|
396
396
|
|
|
@@ -568,7 +568,7 @@ class TRFXform7Tuple(_NamedTuple):
|
|
|
568
568
|
return _NamedTuple.__hash__(self)
|
|
569
569
|
|
|
570
570
|
def __mul__(self, factor):
|
|
571
|
-
|
|
571
|
+
_xscalar(factor=factor)
|
|
572
572
|
return type(self)((x * factor for x in self), name=_STAR_) # .fsums._mul_op
|
|
573
573
|
|
|
574
574
|
def __neg__(self):
|
|
@@ -1733,7 +1733,7 @@ if __name__ == '__main__':
|
|
|
1733
1733
|
def _main():
|
|
1734
1734
|
from pygeodesy.basics import _args_kwds_names
|
|
1735
1735
|
from pygeodesy.interns import _COLONSPACE_,_COMMA_, _NL_, _NLATvar_, _vs_
|
|
1736
|
-
from pygeodesy
|
|
1736
|
+
from pygeodesy import printf
|
|
1737
1737
|
from time import localtime
|
|
1738
1738
|
|
|
1739
1739
|
D = date2epoch.__name__
|