pygeodesy 24.12.12__py2.py3-none-any.whl → 25.1.9__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 CHANGED
@@ -7,9 +7,9 @@ methods for geodetic (lat-/longitude), geocentric (U{ECEF<https://WikiPedia.org/
7
7
  cartesian) and certain U{triaxial ellipsoidal<https://GeographicLib.SourceForge.io/1.44/triaxial.html>}
8
8
  coordinates.
9
9
 
10
- Transcoded from U{JavaScript originals<https://GitHub.com/ChrisVeness/geodesy>} by I{Chris Veness (C) 2005-2024}
11
- and from several U{C++ classes<https://GeographicLib.SourceForge.io/C++/doc/annotated.html>} by I{Charles F. F.
12
- Karney (C) 2008-2024} and published under the same U{MIT License<https://OpenSource.org/licenses/MIT>}**.
10
+ Transcoded in part from U{JavaScript originals<https://GitHub.com/ChrisVeness/geodesy>} by I{Chris Veness (C)
11
+ 2005-2024} and from several U{C++ classes<https://GeographicLib.SourceForge.io/C++/doc/annotated.html>} by I{Charles
12
+ F. F. Karney (C) 2008-2024} and published under the same U{MIT License<https://OpenSource.org/licenses/MIT>}**.
13
13
 
14
14
  There are four modules for ellipsoidal earth models, C{ellipsoidalExact}, C{-Karney}, C{-Vincenty} and C{-Nvector}
15
15
  and two for spherical ones, C{sphericalTrigonometry} and C{-Nvector}. Each module provides a geodetic B{C{LatLon}}
@@ -64,17 +64,17 @@ wiki/Hausdorff_distance>} distances.
64
64
  Installation
65
65
  ============
66
66
 
67
- To install PyGeodesy, type C{python[3] -m pip install PyGeodesy} or C{python[3] -m easy_install
68
- PyGeodesy} in a terminal or command window.
67
+ To install PyGeodesy, type C{python[3] -m pip install pygeodesy} or C{python[3] -m easy_install
68
+ pygeodesy} in a terminal or command window.
69
69
 
70
- If the wheel C{PyGeodesy-yy.m.d-py2.py3-none-any.whl} is missing in U{PyPI Download files<https://
71
- PyPI.org/project/PyGeodesy/#files>}, download the file from U{GitHub/dist<https://GitHub.com/mrJean1/
70
+ If the wheel C{pygeodesy-yy.m.d-py2.py3-none-any.whl} is missing in U{PyPI Download files<https://
71
+ PyPI.org/project/pygeodesy/#files>}, download the file from U{GitHub/dist<https://GitHub.com/mrJean1/
72
72
  PyGeodesy/tree/master/dist>}. Install that with C{python[3] -m pip install <path-to-downloaded-wheel>}
73
73
  and verify with C{python[3] -m pygeodesy}.
74
74
 
75
- Alternatively, download C{PyGeodesy-yy.m.d.zip} from U{PyPI<https://PyPI.org/project/PyGeodesy>}
75
+ Alternatively, download C{pygeodesy-yy.m.d.tar.gz} from U{PyPI<https://PyPI.org/project/pygeodesy>}
76
76
  or U{GitHub<https://GitHub.com/mrJean1/PyGeodesy>}, C{unzip} the downloaded file, C{cd} to
77
- directory C{Pygeodesy-yy.m.d} and type C{python[3] setup.py install}.
77
+ directory C{pygeodesy-yy.m.d} and type C{python[3] setup.py install}.
78
78
 
79
79
  To run all PyGeodesy tests, type C{python[3] test/run.py} or type C{python[3] test/unitTestSuite.py}
80
80
  before or after installation.
@@ -113,16 +113,16 @@ env variable C{PYGEODESY_RHUMBSOLVE} or with property L{Ellipsoid.rhumbsolve}.
113
113
  Documentation
114
114
  =============
115
115
 
116
- In addition to the C{pygeodesy} package, the U{PyGeodesy<https://PyPI.org/project/PyGeodesy>}
116
+ In addition to the C{pygeodesy} package, the U{PyGeodesy<https://PyPI.org/project/pygeodesy>}
117
117
  U{distribution files<https://GitHub.com/mrJean1/PyGeodesy/tree/master/dist>} contain the tests,
118
118
  the test results (on macOS only) and the complete U{documentation<https://mrJean1.GitHub.io/PyGeodesy>}
119
119
  (generated by U{Epydoc<https://PyPI.org/project/epydoc>} using command line:
120
- C{epydoc --html --no-private --no-source --name=PyGeodesy --url=... -v pygeodesy}).
120
+ C{epydoc --html --no-private --no-source --name=pygeodesy --url=... -v pygeodesy}).
121
121
 
122
122
  Tests
123
123
  =====
124
124
 
125
- The tests ran with Python 3.13.0 (with U{geographiclib<https://PyPI.org/project/geographiclib>} 2.0),
125
+ The tests ran with Python 3.13.1 (with U{geographiclib<https://PyPI.org/project/geographiclib>} 2.0),
126
126
  Python 3.12.7 (with U{geographiclib<https://PyPI.org/project/geographiclib>} 2.0,
127
127
  U{numpy<https://PyPI.org/project/numpy>} 2.1.0, U{scipy<https://PyPI.org/project/scipy>} 1.14.1,
128
128
  U{GeodSolve<https://GeographicLib.SourceForge.io/C++/doc/utilities.html>} 2.3,
@@ -146,24 +146,24 @@ env variable C{PYGEODESY_WARNINGS=on} for all Python versions. The results of t
146
146
  the distribution files.
147
147
 
148
148
  Test coverage has been measured with U{coverage<https://PyPI.org/project/coverage>} 7.6.1 using Python
149
- 3.13.0, 3.12.7, 3.11.5 and 3.10.8. The complete coverage report in HTML and a PDF summary are included in
149
+ 3.13.1, 3.12.7, 3.11.5 and 3.10.8. The complete coverage report in HTML and a PDF summary are included in
150
150
  the distribution files.
151
151
 
152
- Python 3.13.0, 3.12.7, 3.11.5 and 3.10.8 run on Apple M1 Silicon (C{arm64}), I{natively}. Python 2.7.18 runs
152
+ Python 3.13.1, 3.12.7, 3.11.5 and 3.10.8 run on Apple M1 Silicon (C{arm64}), I{natively}. Python 2.7.18 runs
153
153
  on Intel (C{x86_64}) or Intel I{emulation} ("C{arm64_x86_64}", see function L{machine<pygeodesy.machine>}).
154
154
 
155
- The tests also ran with Python 3.13.0 (and U{geographiclib<https://PyPI.org/project/geographiclib>} 2.0) on
155
+ The tests also ran with Python 3.13.1 (and U{geographiclib<https://PyPI.org/project/geographiclib>} 2.0) on
156
156
  U{Debian 12<https://Cirrus-CI.com/github/mrJean1/PyGeodesy/master>} in 64-bit only, with Python 3.12.5 (and
157
- U{geographiclib<https://PyPI.org/project/geographiclib>} 2.0) on U{Windows
158
- 2019Server<https://CI.AppVeyor.com/project/mrJean1/pygeodesy>} in 64-bit only and with Python 2.7.18 (and
159
- U{geographiclib<https://PyPI.org/project/geographiclib>} 1.52) on U{Windows
160
- 10<https://CI.AppVeyor.com/project/mrJean1/pygeodesy>} in 64- and 32-bit.
157
+ U{geographiclib<https://PyPI.org/project/geographiclib>} 2.0) on U{Windows 2019Server
158
+ <https://CI.AppVeyor.com/project/mrJean1/pygeodesy>} in 64-bit only and with Python 2.7.18 (and U{geographiclib
159
+ <https://PyPI.org/project/geographiclib>} 1.52) on U{Windows 10<https://CI.AppVeyor.com/project/mrJean1/pygeodesy>}
160
+ in 64- and 32-bit.
161
161
 
162
162
  A single-File and single-Directory application with C{pygeodesy} has been bundled using U{PyInstaller
163
163
  <https://PyPI.org/project/pyinstaller>} 3.4 and 64-bit Python 3.7.3 on macOS 10.13.6 High Sierra.
164
164
 
165
- Previously, the tests were run with Python 3.12.0-6, 3.11.2-4, 3.10.1-7, 3.9.6, 3.9.1, 3.8.7, 3.7.1, 2.7.15, U{PyPy
166
- <https://PyPy.org>} 7.3.12 (Python 3.10.12), 7.3.1 (Python 3.6.9) and U{PyPy<https://PyPy.org>} 7.1.1 (Python
165
+ Previously, the tests were run with Python 3.13.0, 3.12.0-6, 3.11.2-4, 3.10.1-7, 3.9.6, 3.9.1, 3.8.7, 3.7.1, 2.7.15,
166
+ U{PyPy<https://PyPy.org>} 7.3.12 (Python 3.10.12), 7.3.1 (Python 3.6.9) and U{PyPy<https://PyPy.org>} 7.1.1 (Python
167
167
  2.7.13) (and U{geographiclib <https://PyPI.org/project/geographiclib>} 1.52, U{numpy<https://PyPI.org/project/numpy>}
168
168
  1.16.3, 1.16.4, 1.16.6, 1.19.0, 1.19.4, 1.19.5 or 1.22.4 and U{scipy<https://PyPI.org/project/scipy>} 1.2.1, 1.4.1,
169
169
  1.5.2 or 1.8.1) on U{Ubuntu 16.04<https://Travis-CI.com/mrJean1/PyGeodesy>}, with Python 3.10.0-1, 3.9.0-5, 3.8.0-6,
@@ -197,7 +197,7 @@ characters and if so, I{not} C{unicode}.
197
197
  Env variables
198
198
  =============
199
199
 
200
- The following environment variables are observed by C{PyGeodesy}:
200
+ The following environment variables are observed by C{pygeodesy}:
201
201
 
202
202
  - C{PYGEODESY_EXCEPTION_CHAINING} - see module L{errors<pygeodesy.errors>}.
203
203
  - C{PYGEODESY_FMT_FORM} - see module L{dms<pygeodesy.dms>}.
@@ -355,7 +355,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.}
355
355
 
356
356
  @var pygeodesy_abspath: Fully qualified C{pygeodesy} directory name (C{str}).
357
357
 
358
- @var version: Normalized C{PyGeodesy} version (C{str}).
358
+ @var version: Normalized C{pygeodesy} version (C{str}).
359
359
  '''
360
360
 
361
361
  import os.path as _os_path
@@ -566,7 +566,7 @@ if _init__all__ and not _lazy_import2: # import and set __all__
566
566
  # GilderGeek<https://GitHub.com/mrJean1/PyGeodesy/issues/31>)
567
567
  ns = list(lazily._ALL_INIT)
568
568
  # XXX ps = () if _isfrozen else set([_pygeodesy_] + __name__.split(_DOT_))
569
- for mod, attrs in lazily._ALL_LAZY.enums():
569
+ for mod, attrs in lazily._all_enums():
570
570
  mod = _headof(_headof(mod))
571
571
  if mod not in globalocals:
572
572
  t = _DOT_(_pygeodesy_, mod)
@@ -598,7 +598,7 @@ else:
598
598
 
599
599
  from pygeodesy.internals import _version2, _DOT_ # PYCHOK import
600
600
  # from pygeodesy.interns import _DOT_ # from .internals
601
- __version__ = '24.12.12'
601
+ __version__ = '25.01.09'
602
602
  # see setup.py for similar logic
603
603
  version = _DOT_(*_version2(__version__, n=3))
604
604
 
pygeodesy/basics.py CHANGED
@@ -37,7 +37,7 @@ from math import copysign as _copysign
37
37
  # import inspect as _inspect # _MODS
38
38
 
39
39
  __all__ = _ALL_LAZY.basics
40
- __version__ = '24.11.02'
40
+ __version__ = '24.12.31'
41
41
 
42
42
  _below_ = 'below'
43
43
  _list_tuple_types = (list, tuple)
@@ -362,25 +362,48 @@ def isint(obj, both=False):
362
362
  return False
363
363
 
364
364
 
365
- def isiterable(obj):
365
+ def isiterable(obj, strict=False):
366
366
  '''Is B{C{obj}}ect C{iterable}?
367
367
 
368
368
  @arg obj: The object (any C{type}).
369
+ @kwarg strict: If C{True}, check class attributes (C{bool}).
369
370
 
370
371
  @return: C{True} if C{iterable}, C{False} otherwise.
371
372
  '''
372
373
  # <https://PyPI.org/project/isiterable/>
373
- return hasattr(obj, '__iter__') # map, range, set
374
+ return isiterabletype(obj) if strict else hasattr(obj, '__iter__') # map, range, set
374
375
 
375
376
 
376
- def isiterablen(obj):
377
+ def isiterablen(obj, strict=False):
377
378
  '''Is B{C{obj}}ect C{iterable} and has C{len}gth?
378
379
 
379
380
  @arg obj: The object (any C{type}).
381
+ @kwarg strict: If C{True}, check class attributes (C{bool}).
380
382
 
381
383
  @return: C{True} if C{iterable} with C{len}gth, C{False} otherwise.
382
384
  '''
383
- return hasattr(obj, '__len__') and hasattr(obj, '__getitem__')
385
+ _has = isiterabletype if strict else hasattr
386
+ return _has(obj, '__len__') and _has(obj, '__getitem__')
387
+
388
+
389
+ def isiterabletype(obj, method='__iter__'):
390
+ '''Is B{C{obj}}ect an instance of an C{iterable} class or type?
391
+
392
+ @arg obj: The object (any C{type}).
393
+ @kwarg method: The name of the required method (C{str}).
394
+
395
+ @return: The C{base-class} if C{iterable}, C{None} otherwise.
396
+ '''
397
+ try: # <https://StackOverflow.com/questions/73568964>
398
+ for b in type(obj).__mro__[:-1]: # ignore C{object}
399
+ try:
400
+ if callable(b.__dict__[method]):
401
+ return b
402
+ except (AttributeError, KeyError):
403
+ pass
404
+ except (AttributeError, TypeError):
405
+ pass
406
+ return None
384
407
 
385
408
 
386
409
  try:
@@ -558,7 +581,7 @@ def map1(fun1, *xs): # XXX map_
558
581
  return tuple(map(fun1, xs))
559
582
 
560
583
 
561
- def map2(fun, *xs):
584
+ def map2(fun, *xs, **strict):
562
585
  '''Like Python's B{C{map}} but returning a C{tuple} of results.
563
586
 
564
587
  Unlike Python 2's built-in L{map}, Python 3+ L{map} returns a
@@ -568,10 +591,39 @@ def map2(fun, *xs):
568
591
 
569
592
  @arg fun: Function (C{callable}).
570
593
  @arg xs: Arguments (C{all positional}).
594
+ @kwarg strict: See U{Python 3.14+ map<https://docs.Python.org/
595
+ 3.14/library/functions.html#map>} (C{bool}).
571
596
 
572
597
  @return: Function results (C{tuple}).
573
598
  '''
574
- return tuple(map(fun, *xs))
599
+ return tuple(map(fun, *xs, **strict) if strict else map(fun, *xs))
600
+
601
+
602
+ def max2(*xs):
603
+ '''Return 2-tuple C{(max(xs), xs.index(max(xs)))}.
604
+ '''
605
+ return _max2min2(xs, max, max2)
606
+
607
+
608
+ def _max2min2(xs, _m, _m2):
609
+ '''(INTERNAL) Helper for C{max2} and C{min2}.
610
+ '''
611
+ if len(xs) == 1:
612
+ x = xs[0]
613
+ if isiterable(x) or isiterablen(x):
614
+ x, i = _m2(*x)
615
+ else:
616
+ i = 0
617
+ else:
618
+ x = _m(xs) # max or min
619
+ i = xs.index(x)
620
+ return x, i
621
+
622
+
623
+ def min2(*xs):
624
+ '''Return 2-tuple C{(min(xs), xs.index(min(xs)))}.
625
+ '''
626
+ return _max2min2(xs, min, min2)
575
627
 
576
628
 
577
629
  def neg(x, neg0=None):
pygeodesy/constants.py CHANGED
@@ -26,7 +26,7 @@ except ImportError: # Python 2-
26
26
  _inf, _nan = float(_INF_), float(_NAN_)
27
27
 
28
28
  __all__ = _ALL_LAZY.constants
29
- __version__ = '24.11.06'
29
+ __version__ = '24.12.22'
30
30
 
31
31
 
32
32
  def _copysign_0_0(y):
@@ -182,6 +182,7 @@ _9_0 = _float( 9) # PYCHOK expected
182
182
  _10_0 = _float( 10) # PYCHOK expected
183
183
  _16_0 = _float( 16) # PYCHOK expected
184
184
  _32_0 = _float( 32) # PYCHOK expected
185
+ _45_0 = _float( 45) # PYCHOK expected
185
186
  _60_0 = _float( 60) # PYCHOK expected
186
187
  _64_0 = _float( 64) # PYCHOK expected
187
188
  _90_0 = _float( 90) # PYCHOK expected
@@ -189,7 +190,6 @@ _100_0 = _float(_100_0) # PYCHOK expected
189
190
  _180_0 = _float( 180) # PYCHOK expected
190
191
  _270_0 = _float( 270) # PYCHOK expected
191
192
  _360_0 = _float( 360) # PYCHOK expected
192
- _400_0 = _float( 400) # PYCHOK expected
193
193
  _720_0 = _float( 720) # PYCHOK expected
194
194
  _1000_0 = _float(1000) # PYCHOK expected
195
195
  _3600_0 = _float(3600) # PYCHOK expected
@@ -27,7 +27,7 @@ __all__ = (_ALL_DEPRECATED.deprecated_bases +
27
27
  _ALL_DEPRECATED.deprecated_classes +
28
28
  _ALL_DEPRECATED.deprecated_consterns +
29
29
  _ALL_DEPRECATED.deprecated_functions)
30
- __version__ = '24.11.28'
30
+ __version__ = '24.12.31'
31
31
 
32
32
  if _unLazy0:
33
33
  from pygeodesy.deprecated import bases, datum, nvector, rhumbBase, \
@@ -22,7 +22,7 @@ from pygeodesy.trf import TRFXform7Tuple as _TRFXform7Tuple
22
22
  from pygeodesy.units import Bearing, Int, Lamd, Lat, Lon, Meter, Phid
23
23
 
24
24
  __all__ = _ALL_DEPRECATED.deprecated_classes
25
- __version__ = '24.11.07'
25
+ __version__ = '24.12.31'
26
26
 
27
27
 
28
28
  class _Deprecated_NamedTuple(_NamedTuple):
@@ -111,6 +111,62 @@ def Fn_rt(root, *xs, **name_RESIDUAL_raiser): # PYCHOK no cover
111
111
  Froot.__init__(self, root, *xs, **name_RESIDUAL_raiser)
112
112
 
113
113
 
114
+ def FrechetCosineAndoyerLambert(point1s, **kwds): # PYCHOK no cover
115
+ '''DEPRECATED on 2024.12.31, use class L{FrechetCosineLaw} with C{B{corr}=1}.'''
116
+ FrechetCosineLaw = _MODS.frechet.FrechetCosineLaw
117
+
118
+ class FrechetCosineAndoyerLambert(FrechetCosineLaw):
119
+ '''DEPRECATED on 2024.12.31, use class L{FrechetCosineLaw} with C{B{corr}=1}.
120
+ '''
121
+ def __init__(self, point1s, **seed_name__radius_wrap):
122
+ deprecated_class(self.__class__)
123
+ FrechetCosineLaw.__init__(self, point1s, corr=1, **seed_name__radius_wrap)
124
+
125
+ return FrechetCosineAndoyerLambert(point1s, **kwds)
126
+
127
+
128
+ def FrechetCosineForsytheAndoyerLambert(point1s, **kwds): # PYCHOK no cover
129
+ '''DEPRECATED on 2024.12.31, use class L{FrechetCosineLaw} with C{B{corr}=2}.'''
130
+ FrechetCosineLaw = _MODS.frechet.FrechetCosineLaw
131
+
132
+ class FrechetCosineForsytheAndoyerLambert(FrechetCosineLaw):
133
+ '''DEPRECATED on 2024.12.31, use class L{FrechetCosineLaw} with C{B{corr}=w}.
134
+ '''
135
+ def __init__(self, point1s, **seed_name__radius_wrap):
136
+ deprecated_class(self.__class__)
137
+ FrechetCosineLaw.__init__(self, point1s, corr=2, **seed_name__radius_wrap)
138
+
139
+ return FrechetCosineForsytheAndoyerLambert(point1s, **kwds)
140
+
141
+
142
+ def HausdorffCosineAndoyerLambert(point1s, **kwds): # PYCHOK no cover
143
+ '''DEPRECATED on 2024.12.31, use class L{HausdorffCosineLaw} with C{B{corr}=1}.'''
144
+ HausdorffCosineLaw = _MODS.hausdorff.HausdorffCosineLaw
145
+
146
+ class HausdorffCosineAndoyerLambert(HausdorffCosineLaw):
147
+ '''DEPRECATED on 2024.12.31, use class L{HausdorffCosineLaw} with C{B{corr}=1}.
148
+ '''
149
+ def __init__(self, point1s, **seed_name__radius_wrap):
150
+ deprecated_class(self.__class__)
151
+ HausdorffCosineLaw.__init__(self, point1s, corr=1, **seed_name__radius_wrap)
152
+
153
+ return HausdorffCosineAndoyerLambert(point1s, **kwds)
154
+
155
+
156
+ def HausdorffCosineForsytheAndoyerLambert(point1s, **kwds): # PYCHOK no cover
157
+ '''DEPRECATED on 2024.12.31, use class L{HausdorffCosineLaw} with C{B{corr}=2}.'''
158
+ HausdorffCosineLaw = _MODS.hausdorff.HausdorffCosineLaw
159
+
160
+ class HausdorffCosineForsytheAndoyerLambert(HausdorffCosineLaw):
161
+ '''DEPRECATED on 2024.12.31, use class L{HausdorffCosineLaw} with C{B{corr}=2}
162
+ '''
163
+ def __init__(self, point1s, **seed_name__radius_wrap):
164
+ deprecated_class(self.__class__)
165
+ HausdorffCosineLaw.__init__(self, point1s, corr=2, **seed_name__radius_wrap)
166
+
167
+ return HausdorffCosineForsytheAndoyerLambert(point1s, **kwds)
168
+
169
+
114
170
  def HeightIDW(knots, **kwds): # PYCHOK no cover
115
171
  '''DEPRECATED, use class L{HeightIDWeuclidean}.'''
116
172
  HeightIDWeuclidean = _MODS.heights.HeightIDWeuclidean
@@ -151,6 +207,34 @@ def HeightIDW3(knots, **kwds): # PYCHOK no cover
151
207
  return HeightIDW3(knots, **kwds)
152
208
 
153
209
 
210
+ def HeightIDWcosineAndoyerLambert(knots, **kwds): # PYCHOK no cover
211
+ '''DEPRECATED on 2024.12.31, use class L{HeightIDWcosineLaw} with C{B{corr}=1}.'''
212
+ HeightIDWcosineLaw = _MODS.heights.HeightIDWcosineLaw
213
+
214
+ class HeightIDWcosineAndoyerLambert(HeightIDWcosineLaw):
215
+ '''DEPRECATED on 2024.12.31, use class L{HeightIDWcosineLaw} with C{B{corr}=1}.
216
+ '''
217
+ def __init__(self, knots, **beta_name__datum_wrap):
218
+ deprecated_class(self.__class__)
219
+ HeightIDWcosineLaw.__init__(self, knots, corr=1, **beta_name__datum_wrap)
220
+
221
+ return HeightIDWcosineAndoyerLambert(knots, **kwds)
222
+
223
+
224
+ def HeightIDWcosineForsytheAndoyerLambert(knots, **kwds): # PYCHOK no cover
225
+ '''DEPRECATED on 2024.12.31, use class L{HeightIDWcosineLaw} with C{B{corr}=2}.'''
226
+ HeightIDWcosineLaw = _MODS.heights.HeightIDWcosineLaw
227
+
228
+ class HeightIDWcosineForsytheAndoyerLambert(HeightIDWcosineLaw):
229
+ '''DEPRECATED on 2024.12.31, use class L{HeightIDWcosineLaw} with C{B{corr}=2}.
230
+ '''
231
+ def __init__(self, knots, **beta_name__datum_wrap):
232
+ deprecated_class(self.__class__)
233
+ HeightIDWcosineLaw.__init__(self, knots, corr=2, **beta_name__datum_wrap)
234
+
235
+ return HeightIDWcosineForsytheAndoyerLambert(knots, **kwds)
236
+
237
+
154
238
  class Lam_(Lamd):
155
239
  '''DEPRECATED on 2024.06.15, use class L{Lamd}.'''
156
240
  def __init__(self, *args, **kwds): # PYCHOK no cover
@@ -11,11 +11,11 @@ from pygeodesy.ellipsoids import Ellipsoid, Ellipsoids, Curvature2Tuple
11
11
  from pygeodesy.lazily import _ALL_DEPRECATED, _ALL_OTHER
12
12
 
13
13
  __all__ = _ALL_DEPRECATED.deprecated_datum
14
- __version__ = '24.06.15'
14
+ __version__ = '24.12.31'
15
15
 
16
- assert _ALL_OTHER(Curvature2Tuple, Datum, Ellipsoid, Transform) + \
17
- tuple(_.name for _ in (Datums, Ellipsoids, Transforms,
18
- R_FM, R_KM, R_M, R_MA, R_MB, R_NM, R_SM, R_VM)) == __all__
16
+ assert _ALL_OTHER(Curvature2Tuple, Datum, Ellipsoid, Transform) + tuple(_.name for _ in
17
+ (Datums, Ellipsoids, Transforms,
18
+ R_FM, R_KM, R_M, R_MA, R_MB, R_NM, R_SM, R_VM)) == __all__
19
19
 
20
20
  # **) MIT License
21
21
  #
@@ -14,7 +14,7 @@ from pygeodesy.props import deprecated_function
14
14
  from pygeodesy.units import _1mm, Number_, Scalar_
15
15
 
16
16
  __all__ = _ALL_DEPRECATED.deprecated_functions
17
- __version__ = '24.11.28'
17
+ __version__ = '24.12.31'
18
18
 
19
19
  _WGS84 = _UTM = object()
20
20
 
@@ -84,6 +84,30 @@ def copysign(x, y): # PYCHOK no cover
84
84
  return _MODS.basics.copysign0(x, y)
85
85
 
86
86
 
87
+ @deprecated_function
88
+ def cosineAndoyerLambert(lat1, lon1, lat2, lon2, **datum_wrap):
89
+ '''DEPRECATED on 2024.12.31, use function L{pygeodesy.cosineLaw} with C{B{corr}=1}.'''
90
+ return _MODS.formy.cosineLaw(lat1, lon1, lat2, lon2, corr=1, **datum_wrap)
91
+
92
+
93
+ @deprecated_function
94
+ def cosineAndoyerLambert_(phi2, phi1, lam21, **datum):
95
+ '''DEPRECATED on 2024.12.31, use function L{pygeodesy.cosineLaw_} with C{B{corr}=1}.'''
96
+ return _MODS.formy.cosineLaw_(phi2, phi1, lam21, corr=1, **datum)
97
+
98
+
99
+ @deprecated_function
100
+ def cosineForsytheAndoyerLambert(lat1, lon1, lat2, lon2, **datum_wrap):
101
+ '''DEPRECATED on 2024.12.31, use function L{pygeodesy.cosineLaw} with C{B{corr}=2}.'''
102
+ return _MODS.formy.cosineLaw(lat1, lon1, lat2, lon2, corr=2, **datum_wrap)
103
+
104
+
105
+ @deprecated_function
106
+ def cosineForsytheAndoyerLambert_(phi2, phi1, lam21, **datum):
107
+ '''DEPRECATED on 2024.12.31, use function L{pygeodesy.cosineLaw_} with C{B{corr}=2}.'''
108
+ return _MODS.formy.cosineLaw_(phi2, phi1, lam21, corr=2, **datum)
109
+
110
+
87
111
  @deprecated_function
88
112
  def decodeEPSG2(arg): # PYCHOK no cover
89
113
  '''DEPRECATED, use function L{epsg.decode2}.
pygeodesy/ecef.py CHANGED
@@ -1102,12 +1102,12 @@ class Ecef9Tuple(_NamedTuple, _NamedLocal):
1102
1102
  '''
1103
1103
  return Lon(Vermeille=degrees(self.lamVermeille))
1104
1104
 
1105
- def _ltp_toLocal(self, ltp, Cls_and_kwds, **nam_Cls): # for C{_NamedLocal}
1105
+ def _ltp_toLocal(self, ltp, Xyz_kwds, **Xyz): # overloads C{_NamedLocal}'s
1106
1106
  '''(INTERNAL) Invoke C{ltp._xLtp(ltp)._ecef2local}.
1107
1107
  '''
1108
- Cls, kwds = self._ltp_toLocal2(Cls_and_kwds, **nam_Cls) # in ._NamedLocal
1109
- ltp = self._ltp._xLtp(ltp, self._Ltp) # both in ._NamedLocal
1110
- return ltp._ecef2local(self, Cls, kwds)
1108
+ Xyz_ = self._ltp_toLocal2(Xyz_kwds, **Xyz) # in ._NamedLocal
1109
+ ltp = self._ltp._xLtp(ltp, self._Ltp) # both in ._NamedLocal
1110
+ return ltp._ecef2local(self, *Xyz_)
1111
1111
 
1112
1112
  @Property_RO
1113
1113
  def phi(self):
pygeodesy/fmath.py CHANGED
@@ -23,7 +23,7 @@ from math import fabs, sqrt # pow
23
23
  import operator as _operator # in .datums, .trf, .utm
24
24
 
25
25
  __all__ = _ALL_LAZY.fmath
26
- __version__ = '24.12.02'
26
+ __version__ = '25.01.09'
27
27
 
28
28
  # sqrt(2) - 1 <https://WikiPedia.org/wiki/Square_root_of_2>
29
29
  _0_4142 = 0.41421356237309504880 # ... ~ 3730904090310553 / 9007199254740992
@@ -834,7 +834,7 @@ if _MODS.sys_version_info2 < (3, 8): # PYCHOK no cover
834
834
  '''
835
835
  return float(_Hypot(*xs))
836
836
 
837
- elif _MODS.sys_version_info2 < (3, 10):
837
+ elif _MODS.sys_version_info2 < (3, 10): # PYCHOK no cover
838
838
  # In Python 3.8 and 3.9 C{math.hypot} is inaccurate, see
839
839
  # U{agdhruv<https://GitHub.com/geopy/geopy/issues/466>},
840
840
  # U{cffk<https://Bugs.Python.org/issue43088>} and module
@@ -981,7 +981,7 @@ def _root(x, p, where):
981
981
  raise ValueError(_negative_)
982
982
  except Exception as X:
983
983
  raise _xError(X, unstr(where, x))
984
- return _0_0
984
+ return _0_0 if p else _1_0
985
985
 
986
986
 
987
987
  def sqrt0(x, Error=None):