pygeodesy 24.9.29__py2.py3-none-any.whl → 24.10.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.9.29.dist-info → PyGeodesy-24.10.24.dist-info}/METADATA +15 -15
- {PyGeodesy-24.9.29.dist-info → PyGeodesy-24.10.24.dist-info}/RECORD +56 -56
- pygeodesy/__init__.py +20 -19
- pygeodesy/__main__.py +5 -5
- pygeodesy/albers.py +12 -17
- pygeodesy/basics.py +38 -41
- pygeodesy/booleans.py +54 -46
- pygeodesy/cartesianBase.py +2 -2
- pygeodesy/constants.py +20 -16
- pygeodesy/datums.py +3 -3
- pygeodesy/dms.py +250 -270
- pygeodesy/ellipsoidalBase.py +2 -2
- pygeodesy/ellipsoidalBaseDI.py +10 -10
- pygeodesy/ellipsoidalNvector.py +4 -4
- pygeodesy/ellipsoidalVincenty.py +2 -2
- pygeodesy/ellipsoids.py +7 -48
- pygeodesy/elliptic.py +14 -14
- pygeodesy/errors.py +15 -10
- pygeodesy/etm.py +18 -2
- pygeodesy/fmath.py +188 -176
- pygeodesy/formy.py +4 -4
- pygeodesy/fstats.py +54 -56
- pygeodesy/fsums.py +304 -266
- pygeodesy/geodesici.py +43 -40
- pygeodesy/geodesicw.py +3 -3
- pygeodesy/geodesicx/gxarea.py +3 -2
- pygeodesy/geodsolve.py +73 -24
- pygeodesy/geohash.py +2 -2
- pygeodesy/geoids.py +28 -27
- pygeodesy/internals.py +156 -85
- pygeodesy/interns.py +23 -20
- pygeodesy/karney.py +61 -12
- pygeodesy/latlonBase.py +13 -15
- pygeodesy/lazily.py +206 -214
- pygeodesy/mgrs.py +13 -13
- pygeodesy/named.py +11 -10
- pygeodesy/nvectorBase.py +1 -1
- pygeodesy/points.py +2 -2
- pygeodesy/props.py +34 -13
- pygeodesy/rhumb/bases.py +5 -5
- pygeodesy/rhumb/solve.py +7 -8
- pygeodesy/solveBase.py +7 -25
- pygeodesy/sphericalBase.py +20 -23
- pygeodesy/sphericalNvector.py +24 -23
- pygeodesy/sphericalTrigonometry.py +9 -8
- pygeodesy/streprs.py +11 -8
- pygeodesy/trf.py +6 -4
- pygeodesy/triaxials.py +46 -9
- pygeodesy/units.py +4 -3
- pygeodesy/ups.py +6 -6
- pygeodesy/utily.py +2 -2
- pygeodesy/utm.py +2 -2
- pygeodesy/vector3d.py +5 -5
- pygeodesy/vector3dBase.py +4 -5
- {PyGeodesy-24.9.29.dist-info → PyGeodesy-24.10.24.dist-info}/WHEEL +0 -0
- {PyGeodesy-24.9.29.dist-info → PyGeodesy-24.10.24.dist-info}/top_level.txt +0 -0
|
@@ -10,7 +10,7 @@ L{perimeterOf}, I{all spherical}.
|
|
|
10
10
|
|
|
11
11
|
Pure Python implementation of geodetic (lat-/longitude) methods using
|
|
12
12
|
spherical trigonometry, transcoded from JavaScript originals by
|
|
13
|
-
I{(C) Chris Veness 2011-
|
|
13
|
+
I{(C) Chris Veness 2011-2024} published under the same MIT Licence**, see
|
|
14
14
|
U{Latitude/Longitude<https://www.Movable-Type.co.UK/scripts/latlong.html>}.
|
|
15
15
|
'''
|
|
16
16
|
# make sure int/int division yields float quotient, see .basics
|
|
@@ -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.10.12'
|
|
58
58
|
|
|
59
59
|
_PI_EPS4 = PI - EPS4
|
|
60
60
|
if _PI_EPS4 >= PI:
|
|
@@ -885,13 +885,14 @@ def intersecant2(center, circle, point, other, **radius_exact_height_wrap):
|
|
|
885
885
|
two points or as a point and bearing.
|
|
886
886
|
|
|
887
887
|
@arg center: Center of the circle (L{LatLon}).
|
|
888
|
-
@arg circle: Radius of the circle (C{meter}, same units as
|
|
889
|
-
or a point on the circle (L{LatLon}).
|
|
888
|
+
@arg circle: Radius of the circle (C{meter}, same units as the earth
|
|
889
|
+
B{C{radius}}) or a point on the circle (L{LatLon}).
|
|
890
890
|
@arg point: A point on the (great circle) line (L{LatLon}).
|
|
891
891
|
@arg other: An other point on the (great circle) line (L{LatLon}) or
|
|
892
892
|
the bearing at the B{C{point}} (compass C{degrees360}).
|
|
893
|
-
@kwarg radius_exact_height_wrap: Optional keyword arguments, see
|
|
894
|
-
|
|
893
|
+
@kwarg radius_exact_height_wrap: Optional keyword arguments, see method
|
|
894
|
+
L{intersecant2<pygeodesy.sphericalBase.LatLonSphericalBase.
|
|
895
|
+
intersecant2>} for further details.
|
|
895
896
|
|
|
896
897
|
@return: 2-Tuple of the intersection points (representing a chord), each
|
|
897
898
|
an instance of the B{C{point}} class. Both points are the same
|
|
@@ -899,8 +900,8 @@ def intersecant2(center, circle, point, other, **radius_exact_height_wrap):
|
|
|
899
900
|
|
|
900
901
|
@raise IntersectionError: The circle and line do not intersect.
|
|
901
902
|
|
|
902
|
-
@raise TypeError: If B{C{center}}
|
|
903
|
-
|
|
903
|
+
@raise TypeError: If B{C{center}}, B{C{point}}, B{C{circle}} or B{C{other}}
|
|
904
|
+
not L{LatLon}.
|
|
904
905
|
|
|
905
906
|
@raise UnitError: Invalid B{C{circle}}, B{C{other}}, B{C{radius}},
|
|
906
907
|
B{C{exact}}, B{C{height}} or B{C{napieradius}}.
|
pygeodesy/streprs.py
CHANGED
|
@@ -9,7 +9,7 @@ from pygeodesy.basics import isint, islistuple, isscalar, isstr, itemsorted, \
|
|
|
9
9
|
# from pygeodesy.constants import _0_0
|
|
10
10
|
from pygeodesy.errors import _or, _IsnotError, _TypeError, _ValueError, \
|
|
11
11
|
_xkwds_get, _xkwds_item2
|
|
12
|
-
|
|
12
|
+
from pygeodesy.internals import _DUNDER_nameof
|
|
13
13
|
from pygeodesy.interns import NN, _0_, _0to9_, MISSING, _BAR_, _COMMASPACE_, \
|
|
14
14
|
_DOT_, _E_, _ELLIPSIS_, _EQUAL_, _H_, _LR_PAIRS, \
|
|
15
15
|
_N_, _name_, _not_scalar_, _PERCENT_, _SPACE_, \
|
|
@@ -17,12 +17,12 @@ from pygeodesy.interns import NN, _0_, _0to9_, MISSING, _BAR_, _COMMASPACE_, \
|
|
|
17
17
|
from pygeodesy.interns import _convergence_, _distant_, _e_, _eps_, _exceeds_, \
|
|
18
18
|
_EQUALSPACED_, _f_, _F_, _g_, _limit_, _no_, \
|
|
19
19
|
_tolerance_ # PYCHOK used!
|
|
20
|
-
from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS
|
|
20
|
+
from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS
|
|
21
21
|
|
|
22
22
|
from math import fabs, log10 as _log10
|
|
23
23
|
|
|
24
24
|
__all__ = _ALL_LAZY.streprs
|
|
25
|
-
__version__ = '24.
|
|
25
|
+
__version__ = '24.10.14'
|
|
26
26
|
|
|
27
27
|
_at_ = 'at' # PYCHOK used!
|
|
28
28
|
_EN_PREC = 6 # max MGRS/OSGR precision, 1 micrometer
|
|
@@ -545,23 +545,26 @@ def unstr(where, *args, **kwds_):
|
|
|
545
545
|
|
|
546
546
|
@return: Representation (C{str}).
|
|
547
547
|
'''
|
|
548
|
-
def _C_e_g_kwds3(_Cdot=None, _ELLIPSIS=
|
|
548
|
+
def _C_e_g_kwds3(_Cdot=None, _ELLIPSIS=0, _fmt=Fmt.g, **kwds):
|
|
549
549
|
return _Cdot, _ELLIPSIS, _fmt, kwds
|
|
550
550
|
|
|
551
551
|
C, e, g, kwds = _C_e_g_kwds3(**kwds_)
|
|
552
|
-
|
|
553
|
-
|
|
552
|
+
if e and len(args) > (e + 1):
|
|
553
|
+
t = reprs(args[:e], fmt=g)
|
|
554
554
|
t += _ELLIPSIS_,
|
|
555
|
+
t += reprs(args[-1:], fmt=g)
|
|
556
|
+
else:
|
|
557
|
+
t = reprs(args, fmt=g) if args else ()
|
|
555
558
|
if kwds:
|
|
556
559
|
t += pairs(itemsorted(kwds), fmt=g)
|
|
557
|
-
n = where if isstr(where) else
|
|
560
|
+
n = where if isstr(where) else _DUNDER_nameof(where) # _NN_
|
|
558
561
|
if C and hasattr(C, n):
|
|
559
562
|
try: # bound method of class C?
|
|
560
563
|
where = where.__func__
|
|
561
564
|
except AttributeError:
|
|
562
565
|
pass # method of C?
|
|
563
566
|
if getattr(C, n, None) is where:
|
|
564
|
-
n = _DOT_(
|
|
567
|
+
n = _DOT_(_DUNDER_nameof(C), n)
|
|
565
568
|
return Fmt.PAREN(n, _COMMASPACE_.join(t))
|
|
566
569
|
|
|
567
570
|
|
pygeodesy/trf.py
CHANGED
|
@@ -5,7 +5,7 @@ u'''I{Veness}' Terrestrial Reference Frames (TRF).
|
|
|
5
5
|
|
|
6
6
|
Classes L{RefFrame}, registry L{RefFrames} and L{TRFError}.
|
|
7
7
|
|
|
8
|
-
Transcoded from I{Chris Veness'} (C) 2006-
|
|
8
|
+
Transcoded from I{Chris Veness'} (C) 2006-2024 JavaScript originals U{latlon-ellipsoidal-referenceframe.js
|
|
9
9
|
<https://GitHub.com/ChrisVeness/geodesy/blob/master/latlon-ellipsoidal-referenceframe.js>} and
|
|
10
10
|
U{latlon-ellipsoidal-referenceframe-txparams.js
|
|
11
11
|
<https://GitHub.com/ChrisVeness/geodesy/blob/master/latlon-ellipsoidal-referenceframe-txparams.js>}.
|
|
@@ -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.10.14'
|
|
95
95
|
|
|
96
96
|
_EP0CH = Epoch(0, low=0)
|
|
97
97
|
_Es = {_EP0CH: _EP0CH} # L{Epoch}s, deleted below
|
|
@@ -391,7 +391,9 @@ class TransformXform(Transform):
|
|
|
391
391
|
@return: Inverse (L{TransformXform}), unregistered.
|
|
392
392
|
'''
|
|
393
393
|
r = Transform.inverse(self, **name)
|
|
394
|
-
|
|
394
|
+
X = self.Xform
|
|
395
|
+
if X: # unregistered
|
|
396
|
+
r._Xform = X.inverse()
|
|
395
397
|
return r
|
|
396
398
|
|
|
397
399
|
def rename(self, name=NN):
|
|
@@ -1778,7 +1780,7 @@ if __name__ == '__main__':
|
|
|
1778
1780
|
raise AssertionError(_SPACE_(n, _vs_, t))
|
|
1779
1781
|
|
|
1780
1782
|
_main()
|
|
1781
|
-
|
|
1783
|
+
# del _main
|
|
1782
1784
|
|
|
1783
1785
|
# **) MIT License
|
|
1784
1786
|
#
|
pygeodesy/triaxials.py
CHANGED
|
@@ -30,14 +30,14 @@ see the U{GeographicLib<https://GeographicLib.SourceForge.io>} documentation.
|
|
|
30
30
|
# make sure int/int division yields float quotient, see .basics
|
|
31
31
|
from __future__ import division as _; del _ # PYCHOK semicolon
|
|
32
32
|
|
|
33
|
-
from pygeodesy.basics import isLatLon, isscalar
|
|
33
|
+
from pygeodesy.basics import isLatLon, isscalar
|
|
34
34
|
from pygeodesy.constants import EPS, EPS0, EPS02, EPS4, INT0, PI2, PI_3, PI4, \
|
|
35
|
-
_EPS2e4, float0_, isfinite, isnear1, _over, \
|
|
35
|
+
_EPS2e4, _SQRT2_2, float0_, isfinite, isnear1, _over, \
|
|
36
36
|
_0_0, _0_5, _1_0, _N_1_0, _64_0, _4_0 # PYCHOK used!
|
|
37
37
|
from pygeodesy.datums import Datum, _spherical_datum, _WGS84, Ellipsoid, _EWGS84, Fmt
|
|
38
38
|
# from pygeodesy.ellipsoids import Ellipsoid, _EWGS84 # from .datums
|
|
39
39
|
# from pygeodesy.elliptic import Elliptic # _MODS
|
|
40
|
-
|
|
40
|
+
from pygeodesy.errors import _AssertionError, _ValueError
|
|
41
41
|
from pygeodesy.fmath import Fdot, fdot, fmean_, hypot, hypot_, norm2, sqrt0
|
|
42
42
|
from pygeodesy.fsums import _Fsumf_, fsumf_, fsum1f_
|
|
43
43
|
from pygeodesy.interns import NN, _a_, _b_, _beta_, _c_, _distant_, _finite_, \
|
|
@@ -59,7 +59,7 @@ from pygeodesy.vector3d import _otherV3d, Vector3d, _ALL_LAZY, _MODS
|
|
|
59
59
|
from math import atan2, fabs, sqrt
|
|
60
60
|
|
|
61
61
|
__all__ = _ALL_LAZY.triaxials
|
|
62
|
-
__version__ = '24.
|
|
62
|
+
__version__ = '24.10.15'
|
|
63
63
|
|
|
64
64
|
_not_ordered_ = _not_('ordered')
|
|
65
65
|
_omega_ = 'omega'
|
|
@@ -1272,13 +1272,13 @@ def hartzell4(pov, los=False, tri_biax=_WGS84, **name):
|
|
|
1272
1272
|
T = tri_biax
|
|
1273
1273
|
else:
|
|
1274
1274
|
D = tri_biax if isinstance(tri_biax, Datum) else \
|
|
1275
|
-
_spherical_datum(tri_biax, name__=hartzell4) #
|
|
1275
|
+
_spherical_datum(tri_biax, name__=hartzell4) # _DUNDER_nameof
|
|
1276
1276
|
T = D.ellipsoid._triaxial
|
|
1277
1277
|
try:
|
|
1278
1278
|
v, h, i = _hartzell3(pov, los, T)
|
|
1279
1279
|
except Exception as x:
|
|
1280
1280
|
raise TriaxialError(pov=pov, los=los, tri_biax=tri_biax, cause=x)
|
|
1281
|
-
return Vector4Tuple(v.x, v.y, v.z, h, iteration=i, #
|
|
1281
|
+
return Vector4Tuple(v.x, v.y, v.z, h, iteration=i, # _DUNDER_nameof
|
|
1282
1282
|
name=_name__(name, name__=hartzell4))
|
|
1283
1283
|
|
|
1284
1284
|
|
|
@@ -1308,12 +1308,49 @@ def _over02(p, q):
|
|
|
1308
1308
|
return (p / q)**2 if p and q else _0_0
|
|
1309
1309
|
|
|
1310
1310
|
|
|
1311
|
+
def _plumbTo3(px, py, E, eps=EPS): # in .ellipsoids.Ellipsoid.height4
|
|
1312
|
+
'''(INTERNAL) Nearest point on a 2-D ellipse in 1st quadrant.
|
|
1313
|
+
'''
|
|
1314
|
+
a, b = E.a, E.b
|
|
1315
|
+
if min(px, py, a, b) < EPS0:
|
|
1316
|
+
raise _AssertionError(px=px, py=py, a=a, b=b, E=E)
|
|
1317
|
+
|
|
1318
|
+
a2 = a - b * E.b_a
|
|
1319
|
+
b2 = b - a * E.a_b
|
|
1320
|
+
tx = ty = _SQRT2_2
|
|
1321
|
+
for i in range(16): # max 5
|
|
1322
|
+
ex = a2 * tx**3
|
|
1323
|
+
ey = b2 * ty**3
|
|
1324
|
+
|
|
1325
|
+
qx = px - ex
|
|
1326
|
+
qy = py - ey
|
|
1327
|
+
q = hypot(qx, qy)
|
|
1328
|
+
if q < EPS0: # PYCHOK no cover
|
|
1329
|
+
break
|
|
1330
|
+
r = hypot(ex - tx * a,
|
|
1331
|
+
ey - ty * b) / q
|
|
1332
|
+
|
|
1333
|
+
sx, tx = tx, min(_1_0, max(0, (ex + qx * r) / a))
|
|
1334
|
+
sy, ty = ty, min(_1_0, max(0, (ey + qy * r) / b))
|
|
1335
|
+
t = hypot(ty, tx)
|
|
1336
|
+
if t < EPS0: # PYCHOK no cover
|
|
1337
|
+
break
|
|
1338
|
+
tx = tx / t # /= chokes PyChecker
|
|
1339
|
+
ty = ty / t
|
|
1340
|
+
if fabs(sx - tx) < eps and \
|
|
1341
|
+
fabs(sy - ty) < eps:
|
|
1342
|
+
break
|
|
1343
|
+
|
|
1344
|
+
tx *= a / px
|
|
1345
|
+
ty *= b / py
|
|
1346
|
+
return tx, ty, i # x and y as fractions
|
|
1347
|
+
|
|
1348
|
+
|
|
1311
1349
|
def _plumbTo4(x, y, a, b, eps=EPS):
|
|
1312
1350
|
'''(INTERNAL) Nearest point on and distance to a 2-D ellipse, I{unordered}.
|
|
1313
1351
|
|
|
1314
|
-
@see: Function C{
|
|
1315
|
-
|
|
1316
|
-
Documentation/DistancePointEllipseEllipsoid.pdf>}.
|
|
1352
|
+
@see: Function C{_plumbTo3} and I{Eberly}'s U{Distance from a Point to ... an Ellipse ...
|
|
1353
|
+
<https://www.GeometricTools.com/Documentation/DistancePointEllipseEllipsoid.pdf>}.
|
|
1317
1354
|
'''
|
|
1318
1355
|
if b > a:
|
|
1319
1356
|
b, a, d, i = _plumbTo4(y, x, b, a, eps=eps)
|
pygeodesy/units.py
CHANGED
|
@@ -18,7 +18,7 @@ from pygeodesy.interns import NN, _azimuth_, _band_, _bearing_, _COMMASPACE_, \
|
|
|
18
18
|
_NS_, _NSEW_, _number_, _PERCENT_, _phi_, _precision_, \
|
|
19
19
|
_radians_, _radians2_, _radius_, _S_, _scalar_, \
|
|
20
20
|
_units_, _W_, _zone_, _std_ # PYCHOK used!
|
|
21
|
-
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
|
|
21
|
+
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
|
|
22
22
|
# from pygeodesy.named import _name__ # _MODS
|
|
23
23
|
from pygeodesy.props import Property_RO
|
|
24
24
|
# from pygeodesy.streprs import Fmt, fstr # from .unitsBase
|
|
@@ -27,7 +27,7 @@ from pygeodesy.unitsBase import Float, Int, _NamedUnit, Radius, Str, Fmt, fstr
|
|
|
27
27
|
from math import degrees, isnan, radians
|
|
28
28
|
|
|
29
29
|
__all__ = _ALL_LAZY.units
|
|
30
|
-
__version__ = '24.
|
|
30
|
+
__version__ = '24.10.12'
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
class Float_(Float):
|
|
@@ -858,13 +858,14 @@ def _xlimits(arg, low, high, g=False):
|
|
|
858
858
|
def _std_repr(*Classes):
|
|
859
859
|
'''(INTERNAL) Use standard C{repr} or named C{toRepr}.
|
|
860
860
|
'''
|
|
861
|
+
from pygeodesy.internals import _getenv
|
|
861
862
|
for C in Classes:
|
|
862
863
|
if hasattr(C, _std_repr.__name__): # PYCHOK del _std_repr
|
|
863
864
|
env = 'PYGEODESY_%s_STD_REPR' % (C.__name__.upper(),)
|
|
864
865
|
if _getenv(env, _std_).lower() != _std_:
|
|
865
866
|
C._std_repr = False
|
|
866
867
|
|
|
867
|
-
_std_repr(Azimuth, Bearing, Bool, Degrees, Float, Int, Meter, Radians, Str) # PYCHOK expected
|
|
868
|
+
_std_repr(Azimuth, Bearing, Bool, Degrees, Epoch, Float, Int, Meter, Radians, Str) # PYCHOK expected
|
|
868
869
|
del _std_repr
|
|
869
870
|
|
|
870
871
|
__all__ += _ALL_DOCS(_NamedUnit)
|
pygeodesy/ups.py
CHANGED
|
@@ -28,12 +28,12 @@ from pygeodesy.datums import _ellipsoidal_datum, _WGS84
|
|
|
28
28
|
from pygeodesy.dms import degDMS, _neg, parseDMS2
|
|
29
29
|
from pygeodesy.errors import RangeError, _ValueError, _xkwds_pop2
|
|
30
30
|
from pygeodesy.fmath import hypot, hypot1, sqrt0
|
|
31
|
-
|
|
31
|
+
from pygeodesy.internals import _getPYGEODESY, _under
|
|
32
32
|
from pygeodesy.interns import NN, _COMMASPACE_, _inside_, _N_, \
|
|
33
33
|
_pole_, _range_, _S_, _scale0_, \
|
|
34
34
|
_SPACE_, _std_, _to_, _UTM_
|
|
35
|
-
from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS
|
|
36
|
-
from pygeodesy.named import nameof,
|
|
35
|
+
# from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS # from .named
|
|
36
|
+
from pygeodesy.named import nameof, _ALL_LAZY, _MODS
|
|
37
37
|
from pygeodesy.namedTuples import EasNor2Tuple, UtmUps5Tuple, \
|
|
38
38
|
UtmUps8Tuple, UtmUpsLatLon5Tuple
|
|
39
39
|
from pygeodesy.props import deprecated_method, property_doc_, \
|
|
@@ -49,9 +49,9 @@ from pygeodesy.utmupsBase import Fmt, _LLEB, _hemi, _parseUTMUPS5, _to4lldn, \
|
|
|
49
49
|
from math import atan2, fabs, radians, tan
|
|
50
50
|
|
|
51
51
|
__all__ = _ALL_LAZY.ups
|
|
52
|
-
__version__ = '24.
|
|
52
|
+
__version__ = '24.10.14'
|
|
53
53
|
|
|
54
|
-
_BZ_UPS =
|
|
54
|
+
_BZ_UPS = _getPYGEODESY('UPS_POLES', _std_) == _std_
|
|
55
55
|
_Falsing = Meter(2000e3) # false easting and northing (C{meter})
|
|
56
56
|
_K0_UPS = Float(_K0_UPS= 0.994) # scale factor at central meridian
|
|
57
57
|
_K1_UPS = Float(_K1_UPS=_1_0) # rescale point scale factor
|
|
@@ -229,7 +229,7 @@ class Ups(UtmUpsBase):
|
|
|
229
229
|
|
|
230
230
|
r = hypot(x, y)
|
|
231
231
|
t = (r * E.es_c / (self.scale0 * E.a * _2_0)) if r > 0 else EPS0
|
|
232
|
-
t = E.es_tauf(
|
|
232
|
+
t = E.es_tauf(_0_5 / t - _0_5 * t)
|
|
233
233
|
a = atan1d(t)
|
|
234
234
|
if self._pole == _N_:
|
|
235
235
|
b, g = atan2(x, -y), 1
|
pygeodesy/utily.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
u'''Various utility functions.
|
|
5
5
|
|
|
6
|
-
After I{(C) Chris Veness 2011-
|
|
6
|
+
After I{(C) Chris Veness 2011-2024} published under the same MIT Licence**, see
|
|
7
7
|
U{Latitude/Longitude<https://www.Movable-Type.co.UK/scripts/latlong.html>} and
|
|
8
8
|
U{Vector-based geodesy<https://www.Movable-Type.co.UK/scripts/latlong-vectors.html>}.
|
|
9
9
|
'''
|
|
@@ -27,7 +27,7 @@ from pygeodesy.units import Degrees, Degrees_, Feet, Float, Lam, Lamd, \
|
|
|
27
27
|
from math import acos, asin, atan2, cos, degrees, fabs, radians, sin, tan # pow
|
|
28
28
|
|
|
29
29
|
__all__ = _ALL_LAZY.utily
|
|
30
|
-
__version__ = '24.
|
|
30
|
+
__version__ = '24.10.12'
|
|
31
31
|
|
|
32
32
|
# read constant name "_M_Unit" as "meter per Unit"
|
|
33
33
|
_M_CHAIN = _F( 20.1168) # yard2m(1) * 22
|
pygeodesy/utm.py
CHANGED
|
@@ -8,7 +8,7 @@ L{utmZoneBand5}.
|
|
|
8
8
|
|
|
9
9
|
Pure Python implementation of UTM / WGS-84 conversion functions using
|
|
10
10
|
an ellipsoidal earth model, transcoded from JavaScript originals by
|
|
11
|
-
I{(C) Chris Veness 2011-
|
|
11
|
+
I{(C) Chris Veness 2011-2024} published under the same MIT Licence**, see
|
|
12
12
|
U{UTM<https://www.Movable-Type.co.UK/scripts/latlong-utm-mgrs.html>} and
|
|
13
13
|
U{Module utm<https://www.Movable-Type.co.UK/scripts/geodesy/docs/module-utm.html>}.
|
|
14
14
|
|
|
@@ -63,7 +63,7 @@ from math import asinh, atanh, atan2, cos, cosh, degrees, fabs, \
|
|
|
63
63
|
# import operator as _operator # from .fmath
|
|
64
64
|
|
|
65
65
|
__all__ = _ALL_LAZY.utm
|
|
66
|
-
__version__ = '24.
|
|
66
|
+
__version__ = '24.10.12'
|
|
67
67
|
|
|
68
68
|
_Bands = 'CDEFGHJKLMNPQRSTUVWXX' # UTM latitude bands C..X (no
|
|
69
69
|
# I|O) 8° each, covering 80°S to 84°N and X repeated for 80-84°N
|
pygeodesy/vector3d.py
CHANGED
|
@@ -11,9 +11,9 @@ from pygeodesy.constants import EPS, EPS0, EPS1, EPS4, INT0, isnear0, \
|
|
|
11
11
|
_0_0, _1_0
|
|
12
12
|
from pygeodesy.errors import IntersectionError, _ValueError, VectorError, \
|
|
13
13
|
_xattr, _xError, _xkwds, _xkwds_get, _xkwds_item2
|
|
14
|
-
from pygeodesy.fmath import euclid, fabs, fdot, hypot, sqrt
|
|
15
|
-
# from pygeodesy.fsums import fsum1_ # from
|
|
16
|
-
# from pygeodesy.formy import _radical2 #
|
|
14
|
+
from pygeodesy.fmath import euclid, fabs, fdot, hypot, sqrt
|
|
15
|
+
# from pygeodesy.fsums import fsum1_ # from _MODS
|
|
16
|
+
# from pygeodesy.formy import _radical2 # _MODS
|
|
17
17
|
from pygeodesy.interns import _COMMA_, _concentric_, _intersection_, \
|
|
18
18
|
_near_, _negative_, _no_, _too_
|
|
19
19
|
from pygeodesy.iters import PointsIter, Fmt
|
|
@@ -31,7 +31,7 @@ from pygeodesy.vector3dBase import Vector3dBase
|
|
|
31
31
|
# from math import fabs, sqrt # from .fmath
|
|
32
32
|
|
|
33
33
|
__all__ = _ALL_LAZY.vector3d
|
|
34
|
-
__version__ = '24.
|
|
34
|
+
__version__ = '24.10.01'
|
|
35
35
|
|
|
36
36
|
_vector2d = _MODS.into(vector2d=__name__)
|
|
37
37
|
|
|
@@ -595,7 +595,7 @@ def _intersects2(center1, r1, center2, r2, sphere=True, too_d=None, # in Cartes
|
|
|
595
595
|
if d < max(r2 - r1, EPS):
|
|
596
596
|
raise IntersectionError(_near_(_concentric_)) # XXX ConcentricError?
|
|
597
597
|
|
|
598
|
-
o = fsum1_(-d, r1, r2) # overlap == -(d - (r1 + r2))
|
|
598
|
+
o = _MODS.fsums.fsum1_(-d, r1, r2) # overlap == -(d - (r1 + r2))
|
|
599
599
|
# compute intersections with c1 at (0, 0) and c2 at (d, 0), like
|
|
600
600
|
# <https://MathWorld.Wolfram.com/Circle-CircleIntersection.html>
|
|
601
601
|
if o > EPS: # overlapping, r1, r2 == R, r
|
pygeodesy/vector3dBase.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
u'''(INTERNAL) Private, 3-D vector base class C{Vector3dBase}.
|
|
5
5
|
|
|
6
6
|
A pure Python implementation of vector-based functions by I{(C) Chris Veness
|
|
7
|
-
2011-
|
|
7
|
+
2011-2024} published under the same MIT Licence**, see U{Vector-based geodesy
|
|
8
8
|
<https://www.Movable-Type.co.UK/scripts/latlong-vectors.html>}.
|
|
9
9
|
'''
|
|
10
10
|
|
|
@@ -16,8 +16,7 @@ from pygeodesy.constants import EPS, EPS0, INT0, PI, PI2, _copysignINF, \
|
|
|
16
16
|
from pygeodesy.errors import CrossError, VectorError, _xcallable, _xError
|
|
17
17
|
from pygeodesy.fmath import euclid_, fdot, hypot_, hypot2_
|
|
18
18
|
from pygeodesy.interns import _coincident_, _colinear_, _COMMASPACE_, _xyz_
|
|
19
|
-
from pygeodesy.lazily import _ALL_LAZY, _ALL_DOCS, _ALL_MODS as _MODS
|
|
20
|
-
_sys_version_info2
|
|
19
|
+
from pygeodesy.lazily import _ALL_LAZY, _ALL_DOCS, _ALL_MODS as _MODS
|
|
21
20
|
from pygeodesy.named import _NamedBase, _NotImplemented, _xother3
|
|
22
21
|
# from pygeodesy.namedTuples import Vector3Tuple # _MODS
|
|
23
22
|
from pygeodesy.props import deprecated_method, Property, Property_RO, \
|
|
@@ -29,7 +28,7 @@ from pygeodesy.utily import sincos2, atan2, fabs
|
|
|
29
28
|
from math import ceil as _ceil, floor as _floor, trunc as _trunc
|
|
30
29
|
|
|
31
30
|
__all__ = _ALL_LAZY.vector3dBase
|
|
32
|
-
__version__ = '24.
|
|
31
|
+
__version__ = '24.10.12'
|
|
33
32
|
|
|
34
33
|
|
|
35
34
|
class Vector3dBase(_NamedBase): # sync __methods__ with .fsums.Fsum
|
|
@@ -421,7 +420,7 @@ class Vector3dBase(_NamedBase): # sync __methods__ with .fsums.Fsum
|
|
|
421
420
|
'''
|
|
422
421
|
return self._mapped(_trunc)
|
|
423
422
|
|
|
424
|
-
if
|
|
423
|
+
if _MODS.sys_version_info2 < (3, 0): # PYCHOK no cover
|
|
425
424
|
# <https://docs.Python.org/2/library/operator.html#mapping-operators-to-functions>
|
|
426
425
|
__div__ = __truediv__
|
|
427
426
|
__idiv__ = __itruediv__
|
|
File without changes
|
|
File without changes
|