pygeodesy 25.11.5__py2.py3-none-any.whl → 25.12.31__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 +46 -25
- pygeodesy/__main__.py +1 -1
- pygeodesy/albers.py +1 -1
- pygeodesy/angles.py +960 -0
- pygeodesy/auxilats/_CX_4.py +1 -1
- pygeodesy/auxilats/_CX_6.py +1 -1
- pygeodesy/auxilats/_CX_8.py +1 -1
- pygeodesy/auxilats/_CX_Rs.py +1 -1
- pygeodesy/auxilats/__init__.py +2 -2
- pygeodesy/auxilats/__main__.py +1 -1
- pygeodesy/auxilats/auxAngle.py +7 -8
- pygeodesy/auxilats/auxDLat.py +1 -1
- pygeodesy/auxilats/auxDST.py +1 -1
- pygeodesy/auxilats/auxLat.py +1 -1
- pygeodesy/auxilats/auxily.py +1 -1
- pygeodesy/azimuthal.py +6 -5
- pygeodesy/basics.py +14 -10
- pygeodesy/booleans.py +1 -1
- pygeodesy/cartesianBase.py +7 -7
- pygeodesy/clipy.py +1 -1
- pygeodesy/constants.py +29 -24
- pygeodesy/css.py +1 -1
- pygeodesy/datums.py +1 -1
- pygeodesy/deprecated/__init__.py +1 -1
- pygeodesy/deprecated/bases.py +1 -1
- pygeodesy/deprecated/classes.py +14 -7
- pygeodesy/deprecated/consterns.py +1 -1
- pygeodesy/deprecated/datum.py +1 -1
- pygeodesy/deprecated/functions.py +1 -1
- pygeodesy/deprecated/nvector.py +1 -1
- pygeodesy/deprecated/rhumbBase.py +1 -1
- pygeodesy/deprecated/rhumbaux.py +1 -1
- pygeodesy/deprecated/rhumbsolve.py +1 -1
- pygeodesy/deprecated/rhumbx.py +1 -1
- pygeodesy/dms.py +1 -1
- pygeodesy/ecef.py +1 -1
- pygeodesy/ecefLocals.py +1 -1
- pygeodesy/elevations.py +1 -1
- pygeodesy/ellipsoidalBase.py +1 -1
- pygeodesy/ellipsoidalBaseDI.py +1 -1
- pygeodesy/ellipsoidalExact.py +1 -1
- pygeodesy/ellipsoidalGeodSolve.py +1 -1
- pygeodesy/ellipsoidalKarney.py +1 -1
- pygeodesy/ellipsoidalNvector.py +1 -1
- pygeodesy/ellipsoidalVincenty.py +1 -1
- pygeodesy/ellipsoids.py +30 -17
- pygeodesy/elliptic.py +1 -1
- pygeodesy/epsg.py +1 -1
- pygeodesy/errors.py +8 -4
- pygeodesy/etm.py +1 -1
- pygeodesy/fmath.py +19 -14
- pygeodesy/formy.py +251 -10
- pygeodesy/frechet.py +1 -1
- pygeodesy/fstats.py +1 -1
- pygeodesy/fsums.py +41 -29
- pygeodesy/gars.py +1 -1
- pygeodesy/geod3solve.py +489 -0
- pygeodesy/geodesici.py +9 -8
- pygeodesy/geodesicw.py +1 -1
- pygeodesy/geodesicx/_C4_24.py +1 -1
- pygeodesy/geodesicx/_C4_27.py +1 -1
- pygeodesy/geodesicx/_C4_30.py +1 -1
- pygeodesy/geodesicx/__init__.py +2 -2
- pygeodesy/geodesicx/__main__.py +1 -1
- pygeodesy/geodesicx/gx.py +1 -1
- pygeodesy/geodesicx/gxarea.py +54 -24
- pygeodesy/geodesicx/gxbases.py +1 -1
- pygeodesy/geodesicx/gxline.py +1 -1
- pygeodesy/geodsolve.py +73 -104
- pygeodesy/geohash.py +1 -1
- pygeodesy/geoids.py +1 -1
- pygeodesy/hausdorff.py +1 -1
- pygeodesy/heights.py +1 -1
- pygeodesy/internals.py +1 -1
- pygeodesy/interns.py +3 -3
- pygeodesy/iters.py +1 -1
- pygeodesy/karney.py +152 -151
- pygeodesy/ktm.py +1 -1
- pygeodesy/latlonBase.py +1 -1
- pygeodesy/lazily.py +24 -13
- pygeodesy/lcc.py +1 -1
- pygeodesy/ltp.py +1 -1
- pygeodesy/ltpTuples.py +1 -1
- pygeodesy/mgrs.py +3 -3
- pygeodesy/named.py +15 -10
- pygeodesy/namedTuples.py +1 -1
- pygeodesy/nvectorBase.py +1 -1
- pygeodesy/osgr.py +1 -1
- pygeodesy/points.py +1 -1
- pygeodesy/props.py +6 -4
- pygeodesy/resections.py +1 -1
- pygeodesy/rhumb/__init__.py +8 -6
- pygeodesy/rhumb/aux_.py +1 -1
- pygeodesy/rhumb/bases.py +1 -1
- pygeodesy/rhumb/ekx.py +1 -1
- pygeodesy/rhumb/solve.py +91 -84
- pygeodesy/simplify.py +1 -1
- pygeodesy/solveBase.py +72 -49
- pygeodesy/sphericalBase.py +1 -1
- pygeodesy/sphericalNvector.py +1 -1
- pygeodesy/sphericalTrigonometry.py +1 -1
- pygeodesy/streprs.py +6 -4
- pygeodesy/trf.py +2 -4
- pygeodesy/triaxials/__init__.py +70 -0
- pygeodesy/triaxials/bases.py +966 -0
- pygeodesy/triaxials/conformal3.py +617 -0
- pygeodesy/triaxials/triaxial3.py +968 -0
- pygeodesy/{triaxials.py → triaxials/triaxial5.py} +353 -781
- pygeodesy/units.py +1 -1
- pygeodesy/unitsBase.py +1 -1
- pygeodesy/ups.py +2 -3
- pygeodesy/utily.py +17 -14
- pygeodesy/utm.py +1 -1
- pygeodesy/utmups.py +1 -1
- pygeodesy/utmupsBase.py +1 -1
- pygeodesy/vector2d.py +1 -1
- pygeodesy/vector3d.py +1 -1
- pygeodesy/vector3dBase.py +1 -1
- pygeodesy/webmercator.py +1 -1
- pygeodesy/wgrs.py +1 -1
- {pygeodesy-25.11.5.dist-info → pygeodesy-25.12.31.dist-info}/METADATA +28 -21
- pygeodesy-25.12.31.dist-info/RECORD +125 -0
- pygeodesy-25.11.5.dist-info/RECORD +0 -119
- {pygeodesy-25.11.5.dist-info → pygeodesy-25.12.31.dist-info}/WHEEL +0 -0
- {pygeodesy-25.11.5.dist-info → pygeodesy-25.12.31.dist-info}/top_level.txt +0 -0
pygeodesy/ltpTuples.py
CHANGED
|
@@ -1626,7 +1626,7 @@ __all__ += _ALL_DOCS(_AbcBase)
|
|
|
1626
1626
|
|
|
1627
1627
|
# **) MIT License
|
|
1628
1628
|
#
|
|
1629
|
-
# Copyright (C) 2016-
|
|
1629
|
+
# Copyright (C) 2016-2026 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
1630
1630
|
#
|
|
1631
1631
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
1632
1632
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/mgrs.py
CHANGED
|
@@ -32,7 +32,7 @@ the UPS encoding I{at} the south and north pole.
|
|
|
32
32
|
Set env variable C{PYGEODESY_GEOCONVERT} to the (fully qualified) path of the
|
|
33
33
|
C{GeoConvert} executable to run this module as I{python[3] -m pygeodesy.mgrs}
|
|
34
34
|
and compare the MGRS results with those from I{Karney}'s utility U{GeoConvert
|
|
35
|
-
<https://GeographicLib.
|
|
35
|
+
<https://GeographicLib.SourceForge.io/C++/doc/GeoConvert.1.html>}.
|
|
36
36
|
'''
|
|
37
37
|
|
|
38
38
|
from pygeodesy.basics import halfs2, _isin, _splituple, _xinstanceof
|
|
@@ -660,7 +660,7 @@ if __name__ == _DMAIN_:
|
|
|
660
660
|
|
|
661
661
|
# from math import fabs # from .ellipsoidalVincenty
|
|
662
662
|
|
|
663
|
-
# <https://GeographicLib.
|
|
663
|
+
# <https://GeographicLib.SourceForge.io/C++/doc/GeoConvert.1.html>
|
|
664
664
|
G = _Xables.GeoConvert(_Xables.bin_)
|
|
665
665
|
if _Xables.X_OK(G):
|
|
666
666
|
from pygeodesy.internals import _popen2
|
|
@@ -732,7 +732,7 @@ if __name__ == _DMAIN_:
|
|
|
732
732
|
|
|
733
733
|
# **) MIT License
|
|
734
734
|
#
|
|
735
|
-
# Copyright (C) 2016-
|
|
735
|
+
# Copyright (C) 2016-2026 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
736
736
|
#
|
|
737
737
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
738
738
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/named.py
CHANGED
|
@@ -17,9 +17,9 @@ from pygeodesy.basics import isbool, isidentifier, iskeyword, isstr, itemsorted,
|
|
|
17
17
|
len2, _xcopy, _xdup, _xinstanceof, _xsubclassof, _zip
|
|
18
18
|
# from pygeodesy.ecef import EcefKarney # _MODS
|
|
19
19
|
from pygeodesy.errors import _AssertionError, _AttributeError, _ImmutableError, \
|
|
20
|
-
_incompatible,
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
_incompatible, _KeyError, LenError, _NameError, \
|
|
21
|
+
_NotImplementedError, _TypeError, _TypesError, \
|
|
22
|
+
_UnexpectedError, UnitError, _ValueError, \
|
|
23
23
|
_xattr, _xkwds, _xkwds_item2, _xkwds_pop2
|
|
24
24
|
from pygeodesy.internals import _caller3, _envPYGEODESY, _isPyPy, _sizeof, \
|
|
25
25
|
typename, _under
|
|
@@ -35,7 +35,7 @@ from pygeodesy.streprs import attrs, Fmt, lrstrip, pairs, reprs, unstr
|
|
|
35
35
|
# from pygeodesy.units import _toUnit # _MODS
|
|
36
36
|
|
|
37
37
|
__all__ = _ALL_LAZY.named
|
|
38
|
-
__version__ = '25.
|
|
38
|
+
__version__ = '25.11.13'
|
|
39
39
|
|
|
40
40
|
_COMMANL_ = _COMMA_ + _NL_
|
|
41
41
|
_COMMASPACEDOT_ = _COMMASPACE_ + _DOT_
|
|
@@ -987,10 +987,14 @@ class _NamedTuple(tuple, _Named):
|
|
|
987
987
|
'''
|
|
988
988
|
try:
|
|
989
989
|
return tuple.__getitem__(self, self._Names_.index(name))
|
|
990
|
-
except IndexError as x:
|
|
991
|
-
raise _IndexError(self._DOT_(name), cause=x)
|
|
990
|
+
except IndexError: # as x:
|
|
991
|
+
pass # raise _IndexError(self._DOT_(name), cause=x)
|
|
992
992
|
except ValueError: # e.g. _iteration
|
|
993
|
-
|
|
993
|
+
try: # tuple has no __getattr__?
|
|
994
|
+
return tuple.__getattr__(self, name) # __getattribute__?
|
|
995
|
+
except AttributeError:
|
|
996
|
+
pass
|
|
997
|
+
raise _AttributeError(self._DOT_(name), txt=repr(self))
|
|
994
998
|
|
|
995
999
|
# def __getitem__(self, index): # index, slice, etc.
|
|
996
1000
|
# '''Get the item(s) at an B{C{index}} or slice.
|
|
@@ -1103,7 +1107,8 @@ class _NamedTuple(tuple, _Named):
|
|
|
1103
1107
|
|
|
1104
1108
|
@return: Tuple items (C{str}).
|
|
1105
1109
|
'''
|
|
1106
|
-
|
|
1110
|
+
t = reprs(self, prec=prec, fmt=fmt)
|
|
1111
|
+
return Fmt.PAREN(sep.join(t)) if sep else t
|
|
1107
1112
|
|
|
1108
1113
|
def toUnits(self, Error=UnitError, **name): # overloaded in .frechet, .hausdorff
|
|
1109
1114
|
'''Return a copy of this C{Named-Tuple} with each item value wrapped
|
|
@@ -1183,7 +1188,7 @@ def callername(up=1, dflt=NN, source=False, underOK=False):
|
|
|
1183
1188
|
|
|
1184
1189
|
@return: The callable name (C{str}) or B{C{dflt}} if none found.
|
|
1185
1190
|
'''
|
|
1186
|
-
try: # see .
|
|
1191
|
+
try: # see .internals._caller3
|
|
1187
1192
|
for u in range(up, up + 32):
|
|
1188
1193
|
n, f, s = _caller3(u)
|
|
1189
1194
|
if n and (underOK or n.startswith(_DUNDER_) or
|
|
@@ -1468,7 +1473,7 @@ __all__ += _ALL_DOCS(_Named,
|
|
|
1468
1473
|
|
|
1469
1474
|
# **) MIT License
|
|
1470
1475
|
#
|
|
1471
|
-
# Copyright (C) 2016-
|
|
1476
|
+
# Copyright (C) 2016-2026 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
1472
1477
|
#
|
|
1473
1478
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
1474
1479
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/namedTuples.py
CHANGED
|
@@ -763,7 +763,7 @@ def _v2Cls(v, Cls, Cartesian_kwds): # in .vector3d
|
|
|
763
763
|
|
|
764
764
|
# **) MIT License
|
|
765
765
|
#
|
|
766
|
-
# Copyright (C) 2016-
|
|
766
|
+
# Copyright (C) 2016-2026 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
767
767
|
#
|
|
768
768
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
769
769
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/nvectorBase.py
CHANGED
|
@@ -687,7 +687,7 @@ __all__ += _ALL_DOCS(LatLonNvectorBase, NvectorBase, sumOf) # classes
|
|
|
687
687
|
|
|
688
688
|
# **) MIT License
|
|
689
689
|
#
|
|
690
|
-
# Copyright (C) 2016-
|
|
690
|
+
# Copyright (C) 2016-2026 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
691
691
|
#
|
|
692
692
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
693
693
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/osgr.py
CHANGED
|
@@ -723,7 +723,7 @@ if __name__ == _DMAIN_:
|
|
|
723
723
|
|
|
724
724
|
# **) MIT License
|
|
725
725
|
#
|
|
726
|
-
# Copyright (C) 2016-
|
|
726
|
+
# Copyright (C) 2016-2026 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
727
727
|
#
|
|
728
728
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
729
729
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/points.py
CHANGED
|
@@ -1666,7 +1666,7 @@ __all__ += _ALL_DOCS(_Array2LatLon, _Basequence)
|
|
|
1666
1666
|
|
|
1667
1667
|
# **) MIT License
|
|
1668
1668
|
#
|
|
1669
|
-
# Copyright (C) 2016-
|
|
1669
|
+
# Copyright (C) 2016-2026 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
1670
1670
|
#
|
|
1671
1671
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
1672
1672
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/props.py
CHANGED
|
@@ -26,7 +26,7 @@ from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, \
|
|
|
26
26
|
from functools import wraps as _wraps
|
|
27
27
|
|
|
28
28
|
__all__ = _ALL_LAZY.props
|
|
29
|
-
__version__ = '25.
|
|
29
|
+
__version__ = '25.12.31'
|
|
30
30
|
|
|
31
31
|
_class_ = 'class'
|
|
32
32
|
_DNL_ = _NL_ * 2 # PYCHOK used!
|
|
@@ -696,12 +696,14 @@ class DeprecationWarnings(object):
|
|
|
696
696
|
'''
|
|
697
697
|
return self._Warnings if _WARNINGS_X_DEV else None
|
|
698
698
|
|
|
699
|
-
|
|
700
|
-
|
|
699
|
+
if not _FOR_DOCS: # PYCHOK force epydoc
|
|
700
|
+
DeprecationWarnings = DeprecationWarnings() # singleton
|
|
701
|
+
_throwarning = DeprecationWarnings.throw
|
|
702
|
+
# del _FOR_DOCS
|
|
701
703
|
|
|
702
704
|
# **) MIT License
|
|
703
705
|
#
|
|
704
|
-
# Copyright (C) 2016-
|
|
706
|
+
# Copyright (C) 2016-2026 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
705
707
|
#
|
|
706
708
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
707
709
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/resections.py
CHANGED
|
@@ -1028,7 +1028,7 @@ def _zidw(x, y, useZ, *ABC):
|
|
|
1028
1028
|
|
|
1029
1029
|
# **) MIT License
|
|
1030
1030
|
#
|
|
1031
|
-
# Copyright (C) 2016-
|
|
1031
|
+
# Copyright (C) 2016-2026 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
1032
1032
|
#
|
|
1033
1033
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
1034
1034
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/rhumb/__init__.py
CHANGED
|
@@ -3,21 +3,23 @@
|
|
|
3
3
|
|
|
4
4
|
u'''Package of lazily imported C{rhumb} modules L{rhumb.aux_}, L{rhumb.ekx} and L{rhumb.solve}.
|
|
5
5
|
|
|
6
|
-
@note: C{S12} area calculations in classes L{RhumbAux} and L{RhumbLineAux} depend on class
|
|
7
|
-
which requires U{numpy<https://PyPI.org/project/numpy>} to be installed,
|
|
6
|
+
@note: C{S12} area calculations in classes L{RhumbAux} and L{RhumbLineAux} depend on class
|
|
7
|
+
L{AuxDST} which requires U{numpy<https://PyPI.org/project/numpy>} to be installed,
|
|
8
|
+
version 1.16 or newer.
|
|
8
9
|
'''
|
|
9
10
|
from pygeodesy.lazily import _ALL_LAZY, _ALL_OTHER, _lazy_import_as, _unLazy0
|
|
10
11
|
|
|
11
12
|
__all__ = _ALL_LAZY.rhumb
|
|
12
|
-
__version__ = '25.
|
|
13
|
+
__version__ = '25.12.06'
|
|
13
14
|
|
|
14
15
|
if _unLazy0: # or _isfrozen
|
|
15
16
|
from pygeodesy.rhumb.aux_ import RhumbAux, RhumbLineAux
|
|
16
17
|
from pygeodesy.rhumb.ekx import Rhumb, RhumbLine
|
|
17
|
-
from pygeodesy.rhumb.solve import RhumbSolve, RhumbLineSolve,
|
|
18
|
+
from pygeodesy.rhumb.solve import RhumbSolve, RhumbLineSolve, \
|
|
19
|
+
RhumbSolve7Tuple, Rhumb8Tuple # in .karney
|
|
18
20
|
|
|
19
21
|
__all__ += _ALL_OTHER(RhumbAux, RhumbLineAux, Rhumb, RhumbLine,
|
|
20
|
-
RhumbSolve, RhumbLineSolve, RhumbSolve7Tuple)
|
|
22
|
+
RhumbSolve, RhumbLineSolve, RhumbSolve7Tuple, Rhumb8Tuple)
|
|
21
23
|
assert _ALL_LAZY.rhumb_aux_ + _ALL_LAZY.rhumb_ekx + _ALL_LAZY.rhumb_solve == __all__
|
|
22
24
|
|
|
23
25
|
else: # lazily import modules and exported attrs
|
|
@@ -25,7 +27,7 @@ else: # lazily import modules and exported attrs
|
|
|
25
27
|
|
|
26
28
|
# **) MIT License
|
|
27
29
|
#
|
|
28
|
-
# Copyright (C) 2018-
|
|
30
|
+
# Copyright (C) 2018-2026 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
29
31
|
#
|
|
30
32
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
31
33
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/rhumb/aux_.py
CHANGED
|
@@ -356,7 +356,7 @@ __all__ += _ALL_DOCS(Caps)
|
|
|
356
356
|
|
|
357
357
|
# **) MIT License
|
|
358
358
|
#
|
|
359
|
-
# Copyright (C) 2023-
|
|
359
|
+
# Copyright (C) 2023-2026 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
360
360
|
#
|
|
361
361
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
362
362
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/rhumb/bases.py
CHANGED
|
@@ -1134,7 +1134,7 @@ if __name__ == _DMAIN_:
|
|
|
1134
1134
|
|
|
1135
1135
|
# **) MIT License
|
|
1136
1136
|
#
|
|
1137
|
-
# Copyright (C) 2022-
|
|
1137
|
+
# Copyright (C) 2022-2026 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
1138
1138
|
#
|
|
1139
1139
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
1140
1140
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/rhumb/ekx.py
CHANGED
|
@@ -546,7 +546,7 @@ __all__ += _ALL_DOCS(Caps)
|
|
|
546
546
|
|
|
547
547
|
# **) MIT License
|
|
548
548
|
#
|
|
549
|
-
# Copyright (C) 2022-
|
|
549
|
+
# Copyright (C) 2022-2026 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
550
550
|
#
|
|
551
551
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
552
552
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/rhumb/solve.py
CHANGED
|
@@ -11,27 +11,29 @@ as an (exact) rhumb or rhumb line from I{either GeographicLib 2.0 or 2.2+}.
|
|
|
11
11
|
from pygeodesy.basics import _xinstanceof
|
|
12
12
|
from pygeodesy.constants import _180_0, _N_180_0, _over, _0_0 # PYCHOK used!
|
|
13
13
|
from pygeodesy.errors import RhumbError # PYCHOK used!
|
|
14
|
-
from pygeodesy.interns import NN, _a12_, _azi12_, _DMAIN_, _lat2_,
|
|
15
|
-
_S12_, _UNDER_
|
|
16
|
-
from pygeodesy.karney import Caps, GDict, _norm180, Rhumb8Tuple,
|
|
17
|
-
|
|
14
|
+
from pygeodesy.interns import NN, _a12_, _azi12_, _DMAIN_, _lat2_, \
|
|
15
|
+
_lon2_, _s12_, _S12_, _UNDER_
|
|
16
|
+
from pygeodesy.karney import Caps, GDict, _norm180, Rhumb8Tuple, \
|
|
17
|
+
_sincos2d, _Xables
|
|
18
|
+
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY # _ALL_MODS as _MODS
|
|
18
19
|
from pygeodesy.namedTuples import Destination3Tuple, Distance3Tuple
|
|
19
|
-
from pygeodesy.props import
|
|
20
|
+
from pygeodesy.props import Property, Property_RO
|
|
20
21
|
from pygeodesy.solveBase import _SolveGDictBase, _SolveGDictLineBase
|
|
21
22
|
from pygeodesy.utily import _unrollon, _Wrap, wrap360
|
|
22
23
|
|
|
23
24
|
__all__ = _ALL_LAZY.rhumb_solve
|
|
24
|
-
__version__ = '25.
|
|
25
|
+
__version__ = '25.12.06'
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
class _RhumbSolveBase(_SolveGDictBase):
|
|
28
29
|
'''(INTERNAL) Base class for L{RhumbSolve} and L{RhumbLineSolve}.
|
|
29
30
|
'''
|
|
30
|
-
_Error
|
|
31
|
-
_Names_Direct
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
_Error = RhumbError
|
|
32
|
+
_Names_Direct = \
|
|
33
|
+
_Names_Distance = _lat2_, _lon2_, _S12_
|
|
34
|
+
_Names_Inverse = _azi12_, _s12_, _S12_
|
|
35
|
+
_Xable_name = _Xables.RhumbSolve.__name__ # typename
|
|
36
|
+
_Xable_path = _Xables.RhumbSolve()
|
|
35
37
|
|
|
36
38
|
@Property_RO
|
|
37
39
|
def _cmdBasic(self):
|
|
@@ -62,19 +64,6 @@ class _RhumbSolveBase(_SolveGDictBase):
|
|
|
62
64
|
def _s_option(self): # == not -E for GeodSolve
|
|
63
65
|
return () if self.Exact else ('-s',)
|
|
64
66
|
|
|
65
|
-
def toStr(self, **prec_sep): # PYCHOK signature
|
|
66
|
-
'''Return this C{RhumbSolve} as string.
|
|
67
|
-
|
|
68
|
-
@kwarg prec_sep: Keyword argumens C{B{prec}=6} and C{B{sep}=", "}
|
|
69
|
-
for the C{float} C{prec}ision, number of decimal digits
|
|
70
|
-
(0..9) and the C{sep}arator string to join. Trailing
|
|
71
|
-
zero decimals are stripped for B{C{prec}} values of 1
|
|
72
|
-
and above, but kept for negative B{C{prec}} values.
|
|
73
|
-
|
|
74
|
-
@return: RhumbSolve items (C{str}).
|
|
75
|
-
'''
|
|
76
|
-
return self._toStr(RhumbSolve=self.RhumbSolve, **prec_sep)
|
|
77
|
-
|
|
78
67
|
# @Property_RO
|
|
79
68
|
# def _u_option(self):
|
|
80
69
|
# return '-u' if self.unroll else ()
|
|
@@ -229,6 +218,15 @@ class RhumbSolve(_RhumbSolveBase):
|
|
|
229
218
|
|
|
230
219
|
Line = DirectLine
|
|
231
220
|
|
|
221
|
+
def toStr(self, **prec_sep_other): # PYCHOK signature
|
|
222
|
+
'''Return this C{RhumbSolve} as string.
|
|
223
|
+
|
|
224
|
+
@kwarg prec_sep: See L{toStr<pygeodesy.solveBase._SolveBase.toStr>}.
|
|
225
|
+
|
|
226
|
+
@return: RhumbSolve items (C{str}).
|
|
227
|
+
'''
|
|
228
|
+
return _RhumbSolveBase.toStr(self, RhumbSolve=self.RhumbSolve, **prec_sep_other)
|
|
229
|
+
|
|
232
230
|
|
|
233
231
|
class RhumbLineSolve(_RhumbSolveBase, _SolveGDictLineBase):
|
|
234
232
|
'''Wrapper to invoke I{Karney}'s U{RhumbSolve<https://GeographicLib.SourceForge.io/C++/doc/RhumbSolve.1.html>}
|
|
@@ -281,7 +279,7 @@ class RhumbLineSolve(_RhumbSolveBase, _SolveGDictLineBase):
|
|
|
281
279
|
# azi12, a12, s12, S12}.
|
|
282
280
|
# '''
|
|
283
281
|
# s = a12 * self._mpd
|
|
284
|
-
# a = self._GDictInvoke(self._cmdArc, self.
|
|
282
|
+
# a = self._GDictInvoke(self._cmdArc, self._Names_Distance, s)
|
|
285
283
|
# r = GDict(a12=a12, s12=s, **self._lla1)
|
|
286
284
|
# r.updated(a)
|
|
287
285
|
# return r
|
|
@@ -316,24 +314,19 @@ class RhumbLineSolve(_RhumbSolveBase, _SolveGDictLineBase):
|
|
|
316
314
|
@return: A L{GDict} with 7 items C{lat1, lon1, lat2, lon2,
|
|
317
315
|
azi12, s12, S12}.
|
|
318
316
|
'''
|
|
319
|
-
d = self._GDictInvoke(self._cmdDistance, self.
|
|
317
|
+
d = self._GDictInvoke(self._cmdDistance, self._Names_Distance, s12)
|
|
320
318
|
r = GDict(s12=s12, **self._lla1) # a12=_over(s12, self._mpd)
|
|
321
319
|
r.update(d)
|
|
322
320
|
return r
|
|
323
321
|
|
|
324
|
-
def toStr(self, **
|
|
322
|
+
def toStr(self, **prec_sep_other): # PYCHOK signature
|
|
325
323
|
'''Return this C{RhumbLineSolve} as string.
|
|
326
324
|
|
|
327
|
-
@kwarg prec_sep:
|
|
328
|
-
for the C{float} C{prec}ision, number of decimal digits
|
|
329
|
-
(0..9) and the C{sep}arator string to join. Trailing
|
|
330
|
-
zero decimals are stripped for B{C{prec}} values of 1
|
|
331
|
-
and above, but kept for negative B{C{prec}} values.
|
|
325
|
+
@kwarg prec_sep: See L{toStr<pygeodesy.solveBase._SolveBase.toStr>}.
|
|
332
326
|
|
|
333
327
|
@return: RhumbLineSolve items (C{str}).
|
|
334
328
|
'''
|
|
335
|
-
return _SolveGDictLineBase.
|
|
336
|
-
RhumbSolve=self.RhumbSolve, **prec_sep)
|
|
329
|
+
return _SolveGDictLineBase.toStr(self, rhumb=self._solve, **prec_sep_other)
|
|
337
330
|
|
|
338
331
|
|
|
339
332
|
class RhumbSolve7Tuple(Rhumb8Tuple):
|
|
@@ -346,12 +339,6 @@ class RhumbSolve7Tuple(Rhumb8Tuple):
|
|
|
346
339
|
_Names_ = Rhumb8Tuple._Names_[:7] # drop a12
|
|
347
340
|
_Units_ = Rhumb8Tuple._Units_[:7]
|
|
348
341
|
|
|
349
|
-
@deprecated_method
|
|
350
|
-
def _to7Tuple(self): # PYCHOK no cover
|
|
351
|
-
'''DEPRECATED, I{don't use!}
|
|
352
|
-
'''
|
|
353
|
-
return _MODS.deprecated.classes.Rhumb7Tuple(self[:7])
|
|
354
|
-
|
|
355
342
|
|
|
356
343
|
__all__ += _ALL_DOCS(_RhumbSolveBase)
|
|
357
344
|
|
|
@@ -391,7 +378,7 @@ if __name__ == _DMAIN_:
|
|
|
391
378
|
break
|
|
392
379
|
|
|
393
380
|
rS = RhumbSolve(name='Test')
|
|
394
|
-
rS.verbose = '--verbose' in argv # or '-v' in argv
|
|
381
|
+
rS.verbose = v = '--verbose' in argv # or '-v' in argv
|
|
395
382
|
|
|
396
383
|
if not _Xables.X_OK(rS.RhumbSolve): # not set
|
|
397
384
|
rS.RhumbSolve = _Xables.RhumbSolve(_Xables.bin_)
|
|
@@ -404,76 +391,83 @@ if __name__ == _DMAIN_:
|
|
|
404
391
|
exit()
|
|
405
392
|
|
|
406
393
|
r = rS.Direct(40.6, -73.8, 51, 5.5e6)
|
|
407
|
-
printf('Direct: %r', r
|
|
408
|
-
printf('Direct3: %r', rS.Direct3(40.6, -73.8, 51, 5.5e6))
|
|
394
|
+
printf('Direct: %r', r)
|
|
395
|
+
printf('Direct3: %r', rS.Direct3(40.6, -73.8, 51, 5.5e6), nt=v)
|
|
409
396
|
|
|
410
|
-
printf('Inverse: %r', rS.Inverse( 40.6, -73.8, 51.6, -0.5)
|
|
397
|
+
printf('Inverse: %r', rS.Inverse( 40.6, -73.8, 51.6, -0.5))
|
|
411
398
|
printf('Inverse1: %r', rS.Inverse1(40.6, -73.8, 51.6, -0.5))
|
|
412
|
-
printf('Inverse3: %r', rS.Inverse3(40.6, -73.8, 51.6, -0.5))
|
|
399
|
+
printf('Inverse3: %r', rS.Inverse3(40.6, -73.8, 51.6, -0.5), nt=v)
|
|
413
400
|
|
|
414
|
-
printf('Inverse: %r', rS.Inverse( 40.6, -73.8, 35.8, 140.3)
|
|
401
|
+
printf('Inverse: %r', rS.Inverse( 40.6, -73.8, 35.8, 140.3))
|
|
415
402
|
printf('Inverse1: %r', rS.Inverse1(40.6, -73.8, 35.8, 140.3))
|
|
416
|
-
printf('Inverse3: %r', rS.Inverse3(40.6, -73.8, 35.8, 140.3))
|
|
403
|
+
printf('Inverse3: %r', rS.Inverse3(40.6, -73.8, 35.8, 140.3), nt=v)
|
|
417
404
|
|
|
418
405
|
rlS = RhumbLineSolve(rS, 40.6, -73.8, 51, name='LineTest')
|
|
406
|
+
printf('Line: %r', rlS)
|
|
419
407
|
p = rlS.Position(5.5e6)
|
|
420
|
-
printf('Position: %s
|
|
408
|
+
printf('Position: %r %s', p, p == r)
|
|
421
409
|
# p = rlS.ArcPosition(49.475527)
|
|
422
|
-
# printf('ArcPosition: %
|
|
410
|
+
# printf('ArcPosition: %r %s', p, p == r)
|
|
423
411
|
|
|
424
412
|
|
|
425
413
|
# % python3 -m pygeodesy.rhumb.solve
|
|
426
414
|
|
|
427
|
-
# version: /opt/local/bin/RhumbSolve: GeographicLib version 2.
|
|
428
|
-
|
|
429
|
-
# Direct: GDict(azi12=51, lat1=40.6, lat2=71.6889, lon1=-73.8, lon2=0.25552, s12=5500000.0, S12=44095641862956.109375)
|
|
415
|
+
# version: /opt/local/bin/RhumbSolve: GeographicLib version 2.7
|
|
416
|
+
# Direct: GDict(azi12=51, lat1=40.6, lat2=71.6889, lon1=-73.8, lon2=0.25552, s12=5500000.0, S12=44095641862956.132812)
|
|
430
417
|
# Direct3: Destination3Tuple(lat=71.6889, lon=0.25552, final=51.0)
|
|
431
|
-
|
|
432
|
-
# Inverse: GDict(a12=51.929543, azi12=77.76839, lat1=40.6, lat2=51.6, lon1=-73.8, lon2=-0.5, s12=5771083.383328, S12=37395209100030.390625)
|
|
418
|
+
# Inverse: GDict(a12=51.929543, azi12=77.76839, lat1=40.6, lat2=51.6, lon1=-73.8, lon2=-0.5, s12=5771083.383328, S12=37395209100030.382812)
|
|
433
419
|
# Inverse1: 51.929542507561905
|
|
434
420
|
# Inverse3: Distance3Tuple(distance=5771083.383328, initial=77.76839, final=77.76839)
|
|
435
|
-
|
|
436
421
|
# Inverse: GDict(a12=115.02062, azi12=-92.388888, lat1=40.6, lat2=35.8, lon1=-73.8, lon2=140.3, s12=12782581.067684, S12=-63760642939072.5)
|
|
437
422
|
# Inverse1: 115.02061966879248
|
|
438
423
|
# Inverse3: Distance3Tuple(distance=12782581.067684, initial=267.611112, final=267.611112)
|
|
439
|
-
|
|
440
|
-
# Position:
|
|
424
|
+
# Line: RhumbLineSolve(invokation=1, rhumb=RhumbSolve(ellipsoid=Ellipsoid(name='WGS84', a=6378137, f=0.00335281, f_=298.25722356, b=6356752.31424518), invokation=9, RhumbSolve='/opt/local/bin/RhumbSolve', status=0), status=0)
|
|
425
|
+
# Position: GDict(azi12=51, lat1=40.6, lat2=71.6889, lon1=-73.8, lon2=0.25552, s12=5500000.0, S12=44095641862956.132812) True
|
|
441
426
|
|
|
442
427
|
|
|
443
428
|
# % python3 -m pygeodesy.rhumb.solve --verbose
|
|
444
429
|
|
|
445
|
-
# RhumbSolve 'Test'
|
|
446
|
-
# RhumbSolve 'Test'
|
|
447
|
-
#
|
|
448
|
-
#
|
|
449
|
-
# RhumbSolve 'Test'
|
|
450
|
-
|
|
451
|
-
#
|
|
452
|
-
#
|
|
453
|
-
# RhumbSolve 'Test'
|
|
430
|
+
# RhumbSolve 'Test'@1: /opt/local/bin/RhumbSolve --version (invoke)
|
|
431
|
+
# RhumbSolve 'Test'@1: '/opt/local/bin/RhumbSolve: GeographicLib version 2.7' (0, stdout/-err)
|
|
432
|
+
# RhumbSolve 'Test'@1: /opt/local/bin/RhumbSolve: GeographicLib version 2.7 (0)
|
|
433
|
+
# version: /opt/local/bin/RhumbSolve: GeographicLib version 2.7
|
|
434
|
+
# RhumbSolve 'Test'@2: /opt/local/bin/RhumbSolve -p 10 \ 40.6 -73.8 51.0 5500000.0 (Direct)
|
|
435
|
+
# RhumbSolve 'Test'@2: '71.688899882813033 0.255519824423445 44095641862956.133' (0, stdout/-err)
|
|
436
|
+
# RhumbSolve 'Test'@2: lat2=71.688899882813033, lon2=0.255519824423445, S12=44095641862956.133 (0)
|
|
437
|
+
# Direct: GDict(azi12=51, lat1=40.6, lat2=71.6889, lon1=-73.8, lon2=0.25552, s12=5500000.0, S12=44095641862956.132812)
|
|
438
|
+
# RhumbSolve 'Test'@3: /opt/local/bin/RhumbSolve -p 10 \ 40.6 -73.8 51.0 5500000.0 (Direct3)
|
|
439
|
+
# RhumbSolve 'Test'@3: '71.688899882813033 0.255519824423445 44095641862956.133' (0, stdout/-err)
|
|
440
|
+
# RhumbSolve 'Test'@3: lat2=71.688899882813033, lon2=0.255519824423445, S12=44095641862956.133 (0)
|
|
454
441
|
# Direct3: Destination3Tuple(lat=71.6889, lon=0.25552, final=51.0)
|
|
455
|
-
#
|
|
456
|
-
# RhumbSolve 'Test'
|
|
457
|
-
|
|
458
|
-
#
|
|
459
|
-
#
|
|
460
|
-
# RhumbSolve 'Test'
|
|
442
|
+
#
|
|
443
|
+
# RhumbSolve 'Test'@4: /opt/local/bin/RhumbSolve -p 10 -i \ 40.6 -73.8 51.6 -0.5 (Inverse)
|
|
444
|
+
# RhumbSolve 'Test'@4: '77.768389710255676 5771083.3833280280 37395209100030.383' (0, stdout/-err)
|
|
445
|
+
# RhumbSolve 'Test'@4: azi12=77.768389710255676, s12=5771083.383328028, S12=37395209100030.383 (0)
|
|
446
|
+
# Inverse: GDict(a12=51.929543, azi12=77.76839, lat1=40.6, lat2=51.6, lon1=-73.8, lon2=-0.5, s12=5771083.383328, S12=37395209100030.382812)
|
|
447
|
+
# RhumbSolve 'Test'@5: /opt/local/bin/RhumbSolve -p 10 -i \ 40.6 -73.8 51.6 -0.5 (Inverse1)
|
|
448
|
+
# RhumbSolve 'Test'@5: '77.768389710255676 5771083.3833280280 37395209100030.383' (0, stdout/-err)
|
|
449
|
+
# RhumbSolve 'Test'@5: azi12=77.768389710255676, s12=5771083.383328028, S12=37395209100030.383 (0)
|
|
461
450
|
# Inverse1: 51.929542507561905
|
|
462
|
-
# RhumbSolve 'Test'
|
|
463
|
-
# RhumbSolve 'Test'
|
|
451
|
+
# RhumbSolve 'Test'@6: /opt/local/bin/RhumbSolve -p 10 -i \ 40.6 -73.8 51.6 -0.5 (Inverse3)
|
|
452
|
+
# RhumbSolve 'Test'@6: '77.768389710255676 5771083.3833280280 37395209100030.383' (0, stdout/-err)
|
|
453
|
+
# RhumbSolve 'Test'@6: azi12=77.768389710255676, s12=5771083.383328028, S12=37395209100030.383 (0)
|
|
464
454
|
# Inverse3: Distance3Tuple(distance=5771083.383328, initial=77.76839, final=77.76839)
|
|
465
|
-
#
|
|
466
|
-
# RhumbSolve 'Test'
|
|
467
|
-
|
|
455
|
+
#
|
|
456
|
+
# RhumbSolve 'Test'@7: /opt/local/bin/RhumbSolve -p 10 -i \ 40.6 -73.8 35.8 140.30000000000001 (Inverse)
|
|
457
|
+
# RhumbSolve 'Test'@7: '-92.388887981699654 12782581.0676841699 -63760642939072.500' (0, stdout/-err)
|
|
458
|
+
# RhumbSolve 'Test'@7: azi12=-92.388887981699654, s12=12782581.0676841699, S12=-63760642939072.5 (0)
|
|
468
459
|
# Inverse: GDict(a12=115.02062, azi12=-92.388888, lat1=40.6, lat2=35.8, lon1=-73.8, lon2=140.3, s12=12782581.067684, S12=-63760642939072.5)
|
|
469
|
-
# RhumbSolve 'Test'
|
|
470
|
-
# RhumbSolve 'Test'
|
|
460
|
+
# RhumbSolve 'Test'@8: /opt/local/bin/RhumbSolve -p 10 -i \ 40.6 -73.8 35.8 140.30000000000001 (Inverse1)
|
|
461
|
+
# RhumbSolve 'Test'@8: '-92.388887981699654 12782581.0676841699 -63760642939072.500' (0, stdout/-err)
|
|
462
|
+
# RhumbSolve 'Test'@8: azi12=-92.388887981699654, s12=12782581.0676841699, S12=-63760642939072.5 (0)
|
|
471
463
|
# Inverse1: 115.02061966879248
|
|
472
|
-
# RhumbSolve 'Test'
|
|
473
|
-
# RhumbSolve 'Test'
|
|
464
|
+
# RhumbSolve 'Test'@9: /opt/local/bin/RhumbSolve -p 10 -i \ 40.6 -73.8 35.8 140.30000000000001 (Inverse3)
|
|
465
|
+
# RhumbSolve 'Test'@9: '-92.388887981699654 12782581.0676841699 -63760642939072.500' (0, stdout/-err)
|
|
466
|
+
# RhumbSolve 'Test'@9: azi12=-92.388887981699654, s12=12782581.0676841699, S12=-63760642939072.5 (0)
|
|
474
467
|
# Inverse3: Distance3Tuple(distance=12782581.067684, initial=267.611112, final=267.611112)
|
|
475
|
-
|
|
476
|
-
#
|
|
468
|
+
#
|
|
469
|
+
# Line: RhumbLineSolve(invokation=1, rhumb=RhumbSolve(ellipsoid=Ellipsoid(name='WGS84', a=6378137, f=0.00335281, f_=298.25722356, b=6356752.31424518), invokation=9, RhumbSolve='/opt/local/bin/RhumbSolve', status=0), status=0)
|
|
470
|
+
# Position: GDict(azi12=51, lat1=40.6, lat2=71.6889, lon1=-73.8, lon2=0.25552, s12=5500000.0, S12=44095641862956.132812) True
|
|
477
471
|
|
|
478
472
|
|
|
479
473
|
# % python3 -m pygeodesy.rhumb.solve 60 0 30 0 45 1e6
|
|
@@ -497,9 +491,22 @@ if __name__ == _DMAIN_:
|
|
|
497
491
|
# 15 3083112.636 49.63458221, 25.76787606, 4.96052409e-16
|
|
498
492
|
|
|
499
493
|
|
|
494
|
+
# % python3 -m pygeodesy.rhumb.solve 60 0 30 0 45 1e6
|
|
495
|
+
|
|
496
|
+
# version: /opt/local/bin/RhumbSolve: GeographicLib version 2.7
|
|
497
|
+
# s23 lat3 lon3 cos()
|
|
498
|
+
# 1 1000000.000 36.37559999, 7.58982303, -5.83098638e-01
|
|
499
|
+
# 2 4532573.097 58.84251798, 41.57078946, 4.05349594e-01
|
|
500
|
+
# 3 2233216.895 44.22871762, 17.86660260, -2.91432608e-01
|
|
501
|
+
# 4 3168401.173 50.17678842, 26.60741388, 3.00555188e-02
|
|
502
|
+
# 5 3082690.347 49.63189746, 25.76374255, -1.49446251e-04
|
|
503
|
+
# 6 3083112.629 49.63458216, 25.76787599, -2.59865140e-09
|
|
504
|
+
# 7 3083112.636 49.63458221, 25.76787606, -4.96052409e-16
|
|
505
|
+
# 8 3083112.636 49.63458221, 25.76787606, 0.00000000e+00
|
|
506
|
+
|
|
500
507
|
# **) MIT License
|
|
501
508
|
#
|
|
502
|
-
# Copyright (C) 2022-
|
|
509
|
+
# Copyright (C) 2022-2026 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
503
510
|
#
|
|
504
511
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
505
512
|
# copy of this software and associated documentation files (the "Software"),
|
pygeodesy/simplify.py
CHANGED
|
@@ -514,7 +514,7 @@ def simplifyVW(points, area=_1mm, radius=R_M, indices=False,
|
|
|
514
514
|
|
|
515
515
|
# **) MIT License
|
|
516
516
|
#
|
|
517
|
-
# Copyright (C) 2016-
|
|
517
|
+
# Copyright (C) 2016-2026 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
518
518
|
#
|
|
519
519
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
520
520
|
# copy of this software and associated documentation files (the "Software"),
|