pygeodesy 24.10.24__py2.py3-none-any.whl → 24.11.11__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.
Files changed (54) hide show
  1. {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.11.11.dist-info}/METADATA +4 -4
  2. {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.11.11.dist-info}/RECORD +54 -54
  3. {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.11.11.dist-info}/WHEEL +1 -1
  4. pygeodesy/__init__.py +2 -2
  5. pygeodesy/azimuthal.py +51 -61
  6. pygeodesy/basics.py +34 -33
  7. pygeodesy/booleans.py +36 -36
  8. pygeodesy/cartesianBase.py +5 -5
  9. pygeodesy/constants.py +4 -4
  10. pygeodesy/css.py +7 -8
  11. pygeodesy/deprecated/__init__.py +1 -1
  12. pygeodesy/deprecated/classes.py +9 -9
  13. pygeodesy/deprecated/functions.py +6 -6
  14. pygeodesy/ecef.py +11 -14
  15. pygeodesy/ellipsoidalBase.py +105 -120
  16. pygeodesy/ellipsoidalBaseDI.py +114 -118
  17. pygeodesy/ellipsoidalExact.py +35 -37
  18. pygeodesy/ellipsoids.py +3 -3
  19. pygeodesy/errors.py +24 -24
  20. pygeodesy/etm.py +80 -72
  21. pygeodesy/fmath.py +39 -37
  22. pygeodesy/formy.py +3 -2
  23. pygeodesy/fsums.py +51 -40
  24. pygeodesy/geodesicw.py +15 -14
  25. pygeodesy/geodesicx/__init__.py +2 -2
  26. pygeodesy/geodsolve.py +7 -16
  27. pygeodesy/geoids.py +5 -5
  28. pygeodesy/heights.py +2 -2
  29. pygeodesy/internals.py +63 -79
  30. pygeodesy/karney.py +2 -2
  31. pygeodesy/ktm.py +11 -13
  32. pygeodesy/latlonBase.py +6 -6
  33. pygeodesy/lazily.py +5 -5
  34. pygeodesy/lcc.py +4 -4
  35. pygeodesy/ltp.py +10 -10
  36. pygeodesy/ltpTuples.py +74 -75
  37. pygeodesy/mgrs.py +9 -10
  38. pygeodesy/named.py +4 -0
  39. pygeodesy/osgr.py +9 -12
  40. pygeodesy/props.py +2 -2
  41. pygeodesy/resections.py +9 -10
  42. pygeodesy/rhumb/__init__.py +1 -1
  43. pygeodesy/rhumb/solve.py +3 -3
  44. pygeodesy/simplify.py +5 -5
  45. pygeodesy/sphericalNvector.py +80 -123
  46. pygeodesy/sphericalTrigonometry.py +60 -66
  47. pygeodesy/units.py +2 -2
  48. pygeodesy/utm.py +6 -6
  49. pygeodesy/vector2d.py +13 -13
  50. pygeodesy/vector3d.py +19 -21
  51. pygeodesy/vector3dBase.py +18 -15
  52. pygeodesy/webmercator.py +4 -4
  53. pygeodesy/wgrs.py +4 -4
  54. {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.11.11.dist-info}/top_level.txt +0 -0
pygeodesy/internals.py CHANGED
@@ -7,7 +7,7 @@ u'''Mostly INTERNAL functions, except L{machine}, L{print_} and L{printf}.
7
7
  # from pygeodesy.errors import _AttributeError, _error_init, _UnexpectedError, _xError2 # _MODS
8
8
  from pygeodesy.interns import NN, _BAR_, _COLON_, _DASH_, _DOT_, _ELLIPSIS_, _EQUALSPACED_, \
9
9
  _immutable_, _NL_, _pygeodesy_, _PyPy__, _python_, _QUOTE1_, \
10
- _QUOTE2_, _s_, _SPACE_, _sys, _UNDER_, _utf_8_
10
+ _QUOTE2_, _s_, _SPACE_, _sys, _UNDER_
11
11
  from pygeodesy.interns import _COMMA_, _Python_ # PYCHOK used!
12
12
  # from pygeodesy.streprs import anstr, pairs, unstr # _MODS
13
13
 
@@ -16,6 +16,7 @@ from pygeodesy.interns import _COMMA_, _Python_ # PYCHOK used!
16
16
  # import sys as _sys # from .interns
17
17
 
18
18
  _0_0 = 0.0 # PYCHOK in .basics, .constants
19
+ _100_0 = 100.0 # in .constants
19
20
  _arm64_ = 'arm64'
20
21
  _iOS_ = 'iOS'
21
22
  _macOS_ = 'macOS'
@@ -40,14 +41,14 @@ def _DUNDER_nameof_(*names__): # in .errors._IsnotError
40
41
 
41
42
 
42
43
  def _Property_RO(method):
43
- '''(INTERNAL) Can't I{recursively} import L{props.property_RO}.
44
+ '''(INTERNAL) Can't import L{props.Property_RO}, I{recursively}.
44
45
  '''
45
46
  name = _DUNDER_nameof(method)
46
47
 
47
- def _del(inst, attr): # PYCHOK no cover
48
- delattr(inst, attr) # force error
48
+ def _del(inst, *unused): # PYCHOK no cover
49
+ inst.__dict__.pop(name, None)
49
50
 
50
- def _get(inst, **unused): # PYCHOK 2 vs 3 args
51
+ def _get(inst, *unused): # PYCHOK 2 vs 3 args
51
52
  try: # to get the cached value immediately
52
53
  v = inst.__dict__[name]
53
54
  except (AttributeError, KeyError):
@@ -69,7 +70,8 @@ class _MODS_Base(object):
69
70
 
70
71
  def __setattr__(self, attr, value): # PYCHOK no cover
71
72
  e = _MODS.errors
72
- t = _EQUALSPACED_(self._DOT_(attr), repr(value))
73
+ n = _DOT_(self.name, attr)
74
+ t = _EQUALSPACED_(n, repr(value))
73
75
  raise e._AttributeError(_immutable_, txt=t)
74
76
 
75
77
  @_Property_RO
@@ -84,7 +86,6 @@ class _MODS_Base(object):
84
86
  '''Get platform 2-list C{[bits, machine]}, I{once}.
85
87
  '''
86
88
  import platform as p
87
-
88
89
  m = p.machine() # ARM64, arm64, x86_64, iPhone13,2, etc.
89
90
  m = m.replace(_COMMA_, _UNDER_)
90
91
  if m.lower() == 'x86_64': # PYCHOK on Intel or Rosetta2 ...
@@ -99,30 +100,15 @@ class _MODS_Base(object):
99
100
 
100
101
  @_Property_RO
101
102
  def ctypes3(self):
102
- '''Get 3-tuple C{(ctypes.CDLL, ._dlopen, .util.findlibrary)}, I{once}.
103
+ '''Get C{ctypes.CDLL}, C{find_library} and C{dlopen}, I{once}.
103
104
  '''
104
- if _ismacOS():
105
- from ctypes import CDLL, DEFAULT_MODE, _dlopen
106
-
107
- def dlopen(name):
108
- return _dlopen(name, DEFAULT_MODE)
109
-
110
- else: # PYCHOK no cover
111
- from ctypes import CDLL
112
- dlopen = _passarg
113
-
114
- from ctypes.util import find_library
115
- return CDLL, dlopen, find_library
105
+ import ctypes as c
106
+ from ctypes.util import find_library as f
116
107
 
117
- @_Property_RO
118
- def ctypes5(self):
119
- '''Get 5-tuple C{(ctypes.byref, .c_char_p, .c_size_t, .c_uint, .sizeof)}, I{once}.
120
- '''
121
- from ctypes import byref, c_char_p, c_size_t, c_uint, sizeof # get_errno
122
- return byref, c_char_p, c_size_t, c_uint, sizeof
108
+ def dlopen(name): # on macOS only
109
+ return c._dlopen(name, c.DEFAULT_MODE)
123
110
 
124
- def _DOT_(self, name): # PYCHOK no cover
125
- return _DOT_(self.name, name)
111
+ return c.CDLL, f, (dlopen if _ismacOS() else None)
126
112
 
127
113
  @_Property_RO
128
114
  def errors(self):
@@ -143,15 +129,10 @@ class _MODS_Base(object):
143
129
  '''
144
130
  try: # Pythonista only
145
131
  from platform import iOS_ver
146
- return iOS_ver()
132
+ t = iOS_ver()
147
133
  except (AttributeError, ImportError):
148
- return NN, (NN, NN, NN), NN
149
-
150
- @_Property_RO
151
- def libc(self):
152
- '''Load C{libc.dll|dylib}, I{once}.
153
- '''
154
- return _load_lib('libc')
134
+ t = NN, (NN, NN, NN), NN
135
+ return t
155
136
 
156
137
  @_Property_RO
157
138
  def name(self):
@@ -161,13 +142,12 @@ class _MODS_Base(object):
161
142
 
162
143
  @_Property_RO
163
144
  def nix2(self): # PYCHOK no cover
164
- '''Get Linux 2-list C{[distro, version]}, I{once}.
145
+ '''Get Linux 2-tuple C{(distro, version)}, I{once}.
165
146
  '''
166
- import platform as p
167
-
168
- n, v = p.uname()[0], NN
147
+ from platform import uname
148
+ v, n = NN, uname()[0] # [0] == .system
169
149
  if n.lower() == 'linux':
170
- try: # use distro only for Linux, not macOS, etc.
150
+ try: # use distro only on Linux, not macOS, etc.
171
151
  import distro # <https://PyPI.org/project/distro>
172
152
  _a = _MODS.streprs.anstr
173
153
  v = _a(distro.version()) # first
@@ -197,7 +177,6 @@ class _MODS_Base(object):
197
177
  '''Get 2-list C{[OS, release]}, I{once}.
198
178
  '''
199
179
  import platform as p
200
-
201
180
  _Nix, _ = _MODS.nix2
202
181
  # - mac_ver() returns ('10.12.5', ..., 'x86_64') on
203
182
  # macOS and ('10.3.3', ..., 'iPad4,2') on iOS
@@ -217,26 +196,26 @@ class _MODS_Base(object):
217
196
  if v and n:
218
197
  break
219
198
  else:
220
- n = v = NN # XXX AssertioError?
199
+ n = v = NN # XXX AssertionError?
221
200
  return [n, v]
222
201
 
223
202
  @_Property_RO
224
203
  def _Popen_kwds2(self):
225
204
  '''(INTERNAL) Get C{subprocess.Popen} and C{-kwds}.
226
205
  '''
227
- import subprocess as _sub
206
+ import subprocess as s
228
207
  kwds = dict(creationflags=0, # executable=sys.executable, shell=True,
229
- stdin=_sub.PIPE, stdout=_sub.PIPE, stderr=_sub.STDOUT)
230
- if _sys.version_info[:2] > (3, 6):
208
+ stdin=s.PIPE, stdout=s.PIPE, stderr=s.STDOUT)
209
+ if _MODS.sys_version_info2 > (3, 6):
231
210
  kwds.update(text=True)
232
- return _sub.Popen, kwds
211
+ return s.Popen, kwds
233
212
 
234
213
  @_Property_RO
235
214
  def Pythonarchine(self):
236
215
  '''Get 3- or 4-list C{[PyPy, Python, bits, machine]}, I{once}.
237
216
  '''
238
217
  v = _sys.version
239
- l3 = [_Python_(v)] + self.bits_machine2
218
+ l3 = [_Python_(v)] + _MODS.bits_machine2
240
219
  pypy = _PyPy__(v)
241
220
  if pypy: # PYCHOK no cover
242
221
  l3.insert(0, pypy)
@@ -270,23 +249,23 @@ def _caller3(up, base=True): # in .lazily, .named
270
249
  for the caller B{C{up}} frames back in the Python call stack.
271
250
 
272
251
  @kwarg base: Use C{B{base}=False} for the fully-qualified file
273
- name, otherwise the base (module) name (C{bool}).
252
+ name, otherwise the base (module) name (C{bool}).
274
253
  '''
275
254
  f = None
276
- _f = _MODS.os.path.basename if base else _passarg
255
+ _b = _MODS.os.path.basename if base else _passarg
277
256
  try:
278
257
  f = _sys._getframe(up + 1) # == inspect.stack()[up + 1][0]
279
258
  t = _MODS.inspect.getframeinfo(f)
280
- t = t.function, _f(t.filename), t.lineno
259
+ t = t.function, _b(t.filename), t.lineno
281
260
  # or ...
282
261
  # f = _sys._getframe(up + 1)
283
262
  # c = f.f_code
284
263
  # t = (c.co_name, # caller name
285
- # _f(c.co_filename), # file name .py
264
+ # _b(c.co_filename), # file name .py
286
265
  # f.f_lineno) # line number
287
266
  # or ...
288
267
  # t = _MODS.inspect.stack()[up + 1] # (frame, filename, lineno, function, ...)
289
- # t = t[3], _f(t[1]), t[2]
268
+ # t = t[3], _b(t[1]), t[2]
290
269
  except (AttributeError, IndexError, ValueError):
291
270
  # sys._getframe(1) ... 'importlib._bootstrap' line 1032,
292
271
  # may throw a ValueError('call stack not deep enough')
@@ -307,7 +286,7 @@ def _enquote(strs, quote=_QUOTE2_, white=NN): # in .basics, .solveBase
307
286
  return strs
308
287
 
309
288
 
310
- def _fper(p, q, per=100.0, prec=1):
289
+ def _fper(p, q, per=_100_0, prec=1):
311
290
  '''Format a percentage C{B{p} * B{per} / B{q}} (C{str}).
312
291
  '''
313
292
  return '%.*f%%' % (prec, (float(p) * per / float(q)))
@@ -335,7 +314,7 @@ def _headof(name):
335
314
  # return (a == b) if _isPyPy() else (a is b)
336
315
 
337
316
 
338
- def _isAppleSi():
317
+ def _isAppleSi(): # PYCHOK no cover
339
318
  '''(INTERNAL) Is this C{macOS on Apple Silicon}? (C{bool})
340
319
  '''
341
320
  return _ismacOS() and machine().startswith(_arm64_)
@@ -366,7 +345,7 @@ def _isNix(): # in test/bases
366
345
  return _MODS.nix2[0]
367
346
 
368
347
 
369
- def _isPyChecker():
348
+ def _isPyChecker(): # PYCHOK no cover
370
349
  '''(INTERNAL) Is C{PyChecker} running? (C{bool}).
371
350
  '''
372
351
  # .../pychecker/checker.py --limit 0 --stdlib pygeodesy/<mod>/<name>.py
@@ -390,17 +369,19 @@ def _isWindows(): # in test/bases
390
369
  def _load_lib(name):
391
370
  '''(INTERNAL) Load a C{dylib}, B{C{name}} must startwith('lib').
392
371
  '''
393
- # macOS 11+ (aka 10.16) no longer provides direct loading of
394
- # system libraries. As a result, C{ctypes.util.find_library}
395
- # will not find any library, unless previously installed by a
396
- # low-level dlopen(name) call (with the library base C{name}).
397
- CDLL, dlopen, find_lib = _MODS.ctypes3
398
-
372
+ CDLL, find_lib, dlopen = _MODS.ctypes3
399
373
  ns = find_lib(name), name
400
- if dlopen is not _passarg: # _ismacOS()
374
+ if dlopen:
375
+ # macOS 11+ (aka 10.16) no longer provides direct loading of
376
+ # system libraries. As a result, C{ctypes.util.find_library}
377
+ # will not find any library, unless previously installed by a
378
+ # low-level dlopen(name) call (with the library base C{name}).
401
379
  ns += (_DOT_(name, 'dylib'),
402
380
  _DOT_(name, 'framework'), _MODS.os.path.join(
403
381
  _DOT_(name, 'framework'), name))
382
+ else: # not macOS
383
+ dlopen = _passarg # no-op
384
+
404
385
  for n in ns:
405
386
  try:
406
387
  if n and dlopen(n): # pre-load handle
@@ -548,7 +529,7 @@ def _Pythonarchine(sep=NN): # in .lazily, test/bases versions
548
529
  def _secs2str(secs): # in .geoids, ../test/bases
549
530
  '''Convert a time in C{secs} to C{str}.
550
531
  '''
551
- if secs < 100.0: # _100_0
532
+ if secs < _100_0:
552
533
  unit = len(_SIsecs) - 1
553
534
  while 0 < secs < 1 and unit > 0:
554
535
  secs *= 1e3 # _1000_0
@@ -610,18 +591,18 @@ def _sizeof(obj, deep=True):
610
591
 
611
592
 
612
593
  def _sysctl_uint(name):
613
- '''(INTERNAL) Get an unsigned int sysctl item by name, use on macOS ONLY!
594
+ '''(INTERNAL) Get an C{unsigned int sysctl} item by name, I{ONLY on macOS!}
614
595
  '''
615
- libc = _MODS.libc
596
+ libc = _load_lib('libc') if _ismacOS() else None
616
597
  if libc: # <https://StackOverflow.com/questions/759892/python-ctypes-and-sysctl>
617
- byref, char_p, size_t, uint, sizeof = _MODS.ctypes5
618
- n = name if str is bytes else bytes(name, _utf_8_) # PYCHOK isPython2 = str is bytes
619
- u = uint(0)
620
- z = size_t(sizeof(u))
621
- r = libc.sysctlbyname(char_p(n), byref(u), byref(z), None, size_t(0))
622
- else: # couldn't find or load 'libc'
598
+ import ctypes as c
599
+ n = c.c_char_p(_MODS.basics.str2ub(name)) # bytes(name, _utf_8_)
600
+ u = c.c_uint(0)
601
+ z = c.c_size_t(c.sizeof(u))
602
+ r = libc.sysctlbyname(n, c.byref(u), c.byref(z), None, c.c_size_t(0)) # PYCHOK attr
603
+ else: # not macOS or couldn't find or load 'libc'=
623
604
  r = -2
624
- return int(r if r else u.value) # -1 ENOENT error, -2 no libc
605
+ return int(r if r else u.value) # -1 ENOENT error, -2 no libc or not macOS
625
606
 
626
607
 
627
608
  def _tailof(name):
@@ -637,7 +618,7 @@ def _under(name): # PYCHOK in .datums, .auxilats, .ups, .utm, .utmupsBase, ...
637
618
  return name if name.startswith(_UNDER_) else NN(_UNDER_, name)
638
619
 
639
620
 
640
- def _usage(file_py, *args, **opts_help): # in .etm, .geodesici
621
+ def _usage(file_py, *args, **opts_help): # in .etm, .geodesici # PYCHOK no cover
641
622
  '''(INTERNAL) Build "usage: python -m ..." cmd line for module B{C{file_py}}.
642
623
  '''
643
624
  if opts_help:
@@ -671,12 +652,12 @@ def _usage_argv(argv0, *args):
671
652
  o = _MODS.os
672
653
  m = o.path.dirname(argv0)
673
654
  m = m.replace(o.getcwd(), _ELLIPSIS_) \
674
- .replace(o.sep, _DOT_).strip()
655
+ .replace(o.sep, _DOT_).strip()
675
656
  b = o.path.basename(argv0)
676
657
  b, x = o.path.splitext(b)
677
658
  if x == '.py' and not _is_DUNDER_main(b):
678
659
  m = _DOT_(m or _pygeodesy_, b)
679
- p = NN(_python_, _sys.version_info[0])
660
+ p = NN(_python_, _MODS.sys_version_info2[0])
680
661
  return (p, '-m', _enquote(m)) + args
681
662
 
682
663
 
@@ -689,7 +670,7 @@ def _version2(version, n=2):
689
670
  return t[:n]
690
671
 
691
672
 
692
- def _version_info(package): # in .Base.karney, .basics
673
+ def _version_info(package): # in .basics, .karney._kWrapped.Math
693
674
  '''(INTERNAL) Get the C{package.__version_info__} as a 2- or
694
675
  3-tuple C{(major, minor, revision)} if C{int}s.
695
676
  '''
@@ -713,14 +694,14 @@ def _version_ints(vs):
713
694
 
714
695
 
715
696
  def _versions(sep=_SPACE_):
716
- '''(INTERNAL) Get pygeodesy, PyPy and Python versions, bits, machine and OS as C{7- or 8-list} or C{str}.
697
+ '''(INTERNAL) Get pygeodesy, PyPy and Python versions, bits, machine and OS as C{8- or 9-list} or C{str}.
717
698
  '''
718
699
  l7 = [_pygeodesy_, _MODS.version] + _Pythonarchine() + _osversion2()
719
700
  return sep.join(l7) if sep else l7 # 5- or 6-list
720
701
 
721
702
 
722
703
  __all__ = tuple(map(_DUNDER_nameof, (machine, print_, printf)))
723
- __version__ = '24.10.20'
704
+ __version__ = '24.11.06'
724
705
 
725
706
  if _is_DUNDER_main(__name__): # PYCHOK no cover
726
707
 
@@ -732,6 +713,9 @@ if _is_DUNDER_main(__name__): # PYCHOK no cover
732
713
 
733
714
  _main()
734
715
 
716
+ # % python3 -m pygeodesy.internals
717
+ # pygeodesy 24.11.11 Python 3.13.0 64bit arm64 macOS 14.6.1 _isfrozen False isLazy 1
718
+
735
719
  # **) MIT License
736
720
  #
737
721
  # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
pygeodesy/karney.py CHANGED
@@ -64,7 +64,7 @@ Karney-based functionality
64
64
  <https://GeographicLib.SourceForge.io/C++/doc/classGeographicLib_1_1Intersect.html>} from I{GeographicLib 2.3+}
65
65
 
66
66
  - L{JacobiConformal} -- U{JacobiConformal
67
- <https://geographiclib.sourceforge.io/C++/doc/classGeographicLib_1_1experimental_1_1JacobiConformal.html>}
67
+ <https://GeographicLib.SourceForge.io/C++/doc/classGeographicLib_1_1experimental_1_1JacobiConformal.html>}
68
68
 
69
69
  - L{KTransverseMercator} - U{TransverseMercator
70
70
  <https://GeographicLib.SourceForge.io/C++/doc/classGeographicLib_1_1TransverseMercator.html>}
@@ -165,7 +165,7 @@ from pygeodesy.utily import atan2d, sincos2d, tand, _unrollon, fabs
165
165
  # from math import fabs # from .utily
166
166
 
167
167
  __all__ = _ALL_LAZY.karney
168
- __version__ = '24.10.14'
168
+ __version__ = '24.11.09'
169
169
 
170
170
  _2_4_ = '2.4'
171
171
  _K_2_0 = _getenv(_PYGEODESY(_xgeographiclib, 1), _2_)
pygeodesy/ktm.py CHANGED
@@ -49,8 +49,7 @@ from pygeodesy.constants import INF, _K0_UTM, PI, PI_2, _0_0s, _0_0, \
49
49
  from pygeodesy.datums import Datum, _spherical_datum, _WGS84, _EWGS84
50
50
  # from pygeodesy.ellipsoids import _EWGS84 # from .datums
51
51
  from pygeodesy.errors import _ValueError, _xkwds_pop2, _Xorder
52
- from pygeodesy.fmath import hypot, hypot1
53
- from pygeodesy.fsums import fsum1f_
52
+ from pygeodesy.fmath import fdot_, hypot, hypot1
54
53
  from pygeodesy.interns import _COMMASPACE_, _singular_
55
54
  from pygeodesy.karney import _atan2d, _diff182, _fix90, _norm180, \
56
55
  _polynomial, _unsigned2
@@ -67,7 +66,7 @@ from cmath import polar
67
66
  from math import atan2, asinh, cos, cosh, degrees, fabs, sin, sinh, sqrt, tanh
68
67
 
69
68
  __all__ = _ALL_LAZY.ktm
70
- __version__ = '24.08.31'
69
+ __version__ = '24.11.11'
71
70
 
72
71
 
73
72
  class KTMError(_ValueError):
@@ -433,10 +432,10 @@ def _cma(a, b0, b1, Cn):
433
432
  @see: CPython function U{_Py_c_prod<https://GitHub.com/python/
434
433
  cpython/blob/main/Objects/complexobject.c>}.
435
434
 
436
- @note: Python function C{cmath.fsum} is no longer available.
435
+ @note: Python function C{cmath.fsum} no longer exists.
437
436
  '''
438
- r = fsum1f_(a.real * b0.real, -a.imag * b0.imag, -b1.real, Cn)
439
- j = fsum1f_(a.real * b0.imag, a.imag * b0.real, -b1.imag)
437
+ r = fdot_(a.real, b0.real, -a.imag, b0.imag, -b1.real, _1_0, start=Cn)
438
+ j = fdot_(a.real, b0.imag, a.imag, b0.real, -b1.imag, _1_0)
440
439
  return complex(r, j)
441
440
 
442
441
 
@@ -461,19 +460,18 @@ def _Cyxgk4(E, xi_, eta_, C):
461
460
  y0 = complex(Cn) # +0j
462
461
  z0 = complex(Cn * (n * 2))
463
462
  n -= 1
464
- _c = _cma
465
463
  while n > 0:
466
464
  Cn = C[n]
467
- y1 = _c(a, y0, y1, Cn)
468
- z1 = _c(a, z0, z1, Cn * (n * 2))
465
+ y1 = _cma(a, y0, y1, Cn)
466
+ z1 = _cma(a, z0, z1, Cn * (n * 2))
469
467
  n -= 1
470
468
  Cn = C[n]
471
- y0 = _c(a, y1, y0, Cn)
472
- z0 = _c(a, z1, z0, Cn * (n * 2))
469
+ y0 = _cma(a, y1, y0, Cn)
470
+ z0 = _cma(a, z1, z0, Cn * (n * 2))
473
471
  n -= 1
474
472
  # assert n == 0
475
- x = _c(s, y0, -x, _0_0)
476
- c = _c(c, z0, z1, _1_0)
473
+ x = _cma(s, y0, -x, _0_0)
474
+ c = _cma(c, z0, z1, _1_0)
477
475
 
478
476
  # Gauss-Schreiber to Gauss-Krueger TM
479
477
  # C{cmath.polar} handles INF, NAN, etc.
pygeodesy/latlonBase.py CHANGED
@@ -47,14 +47,14 @@ from pygeodesy.units import _isDegrees, _isRadius, Distance_, Lat, Lon, \
47
47
  Height, Radius, Radius_, Scalar, Scalar_
48
48
  from pygeodesy.utily import _unrollon, _unrollon3, _Wrap
49
49
  # from pygeodesy.vector2d import _circin6, Circin6Tuple, _circum3, circum4_, \
50
- # Circum3Tuple, _radii11ABC # _MODS
50
+ # Circum3Tuple, _radii11ABC4 # _MODS
51
51
  # from pygeodesy.vector3d import nearestOn6, Vector3d # _MODS
52
52
 
53
53
  from contextlib import contextmanager
54
54
  from math import asin, cos, degrees, fabs, radians
55
55
 
56
56
  __all__ = _ALL_LAZY.latlonBase
57
- __version__ = '24.10.19'
57
+ __version__ = '24.11.10'
58
58
 
59
59
  _formy = _MODS.into(formy=__name__)
60
60
 
@@ -1142,7 +1142,7 @@ class LatLonBase(_NamedBase):
1142
1142
  Circles<https://MathWorld.Wolfram.com/TangentCircles.html>}.
1143
1143
  '''
1144
1144
  with _toCartesian3(self, point2, point3, wrap) as cs:
1145
- return _MODS.vector2d._radii11ABC(*cs, useZ=True)[0]
1145
+ return _MODS.vector2d._radii11ABC4(*cs, useZ=True)[0]
1146
1146
 
1147
1147
  def _rhumb3(self, exact, radius): # != .sphericalBase._rhumbs3
1148
1148
  '''(INTERNAL) Get the C{rhumb} for this point's datum or for
@@ -1505,9 +1505,9 @@ class LatLonBase(_NamedBase):
1505
1505
  @kwarg h: Optional height, overriding this point's height (C{meter}).
1506
1506
  @kwarg Nvector: Optional class to return the C{n-vector} components
1507
1507
  (C{Nvector}) or C{None}.
1508
- @kwarg name_Nvector_kwds: Optional C{B{name}=NN} (C{str}) and optional,
1509
- additional B{C{Nvector}} keyword arguments, ignored if
1510
- C{B{Nvector} is None}.
1508
+ @kwarg name_Nvector_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
1509
+ additional B{C{Nvector}} keyword arguments, ignored if C{B{Nvector}
1510
+ is None}.
1511
1511
 
1512
1512
  @return: An named B{C{Nvector}} or if C{B{Nvector} is None} a named
1513
1513
  L{Vector4Tuple}C{(x, y, z, h)}.
pygeodesy/lazily.py CHANGED
@@ -174,8 +174,8 @@ _ALL_INIT = _a(_pygeodesy_abspath_, _version_)
174
174
  # __all__ value for most modules, accessible as _ALL_LAZY.<module>
175
175
  _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
176
176
  albers=_a('AlbersEqualArea', 'AlbersEqualArea2', 'AlbersEqualArea4',
177
- 'AlbersEqualAreaCylindrical', 'AlbersEqualAreaNorth', 'AlbersEqualAreaSouth',
178
- 'AlbersError', 'Albers7Tuple'),
177
+ 'AlbersEqualAreaCylindrical', 'AlbersEqualAreaNorth', 'AlbersEqualAreaSouth',
178
+ 'AlbersError', 'Albers7Tuple'),
179
179
  auxilats=_a(), # module only
180
180
  azimuthal=_a('AzimuthalError', 'Azimuthal7Tuple',
181
181
  'Equidistant', 'EquidistantExact', 'EquidistantGeodSolve', 'EquidistantKarney',
@@ -241,8 +241,8 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
241
241
  fmath=_a('Fdot', 'Fhorner', 'Fhypot', 'Fpolynomial', 'Fpowers', 'Fcbrt', 'Froot', 'Fsqrt',
242
242
  'bqrt', 'cbrt', 'cbrt2', 'euclid', 'euclid_',
243
243
  'facos1', 'fasin1', 'fatan', 'fatan1', 'fatan2', 'favg',
244
- 'fdot', 'fdot3', 'fma', 'fmean', 'fmean_', 'fhorner', 'fidw', 'f2mul_', 'fpolynomial',
245
- 'fpowers', 'fprod', 'frandoms', 'frange', 'freduce', 'fremainder',
244
+ 'fdot', 'fdot_', 'fdot3', 'fma', 'fmean', 'fmean_', 'fhorner', 'fidw', 'f2mul_',
245
+ 'fpolynomial', 'fpowers', 'fprod', 'frandoms', 'frange', 'freduce', 'fremainder',
246
246
  'hypot', 'hypot_', 'hypot1', 'hypot2', 'hypot2_',
247
247
  'norm2', 'norm_', 'sqrt0', 'sqrt3', 'sqrt_a', 'zcrt', 'zqrt'),
248
248
  formy=_a('Radical2Tuple',
@@ -511,7 +511,7 @@ class _ALL_MODS(_internals._MODS_Base):
511
511
  _internals._MODS = _ALL_MODS = _ALL_MODS() # PYCHOK singleton
512
512
 
513
513
  __all__ = _ALL_LAZY.lazily
514
- __version__ = '24.10.15'
514
+ __version__ = '24.11.09'
515
515
 
516
516
 
517
517
  def _ALL_OTHER(*objs):
pygeodesy/lcc.py CHANGED
@@ -48,7 +48,7 @@ from pygeodesy.utily import atan1, degrees90, degrees180, sincos2, tanPI_2_2
48
48
  from math import atan, fabs, log, radians, sin, sqrt
49
49
 
50
50
  __all__ = _ALL_LAZY.lcc
51
- __version__ = '24.06.24'
51
+ __version__ = '24.11.06'
52
52
 
53
53
  _E0_ = 'E0'
54
54
  _N0_ = 'N0'
@@ -620,9 +620,9 @@ def toLcc(latlon, conic=Conics.WRF_Lb, height=None, Lcc=Lcc,
620
620
  @kwarg height: Optional height for the point, overriding the
621
621
  default height (C{meter}).
622
622
  @kwarg Lcc: Class to return the I{Lambert} location (L{Lcc}).
623
- @kwarg name_Lcc_kwds: Optional C{B{name}=NN} (C{str}) and optional,
624
- additional B{C{Lcc}} keyword arguments, ignored if
625
- B{C{Lcc} is None}.
623
+ @kwarg name_Lcc_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
624
+ additional B{C{Lcc}} keyword arguments, ignored if B{C{Lcc}
625
+ is None}.
626
626
 
627
627
  @return: The I{Lambert} location (L{Lcc}) or if C{B{Lcc} is None},
628
628
  an L{EasNor3Tuple}C{(easting, northing, height)}.
pygeodesy/ltp.py CHANGED
@@ -44,7 +44,7 @@ from pygeodesy.vector3d import _ALL_LAZY, Vector3d
44
44
  # from math import fabs, floor as _floor # from .fmath, .fsums
45
45
 
46
46
  __all__ = _ALL_LAZY.ltp
47
- __version__ = '24.08.18'
47
+ __version__ = '24.11.06'
48
48
 
49
49
  _height0_ = _height_ + _0_
50
50
  _narrow_ = 'narrow'
@@ -150,9 +150,9 @@ class Attitude(_NamedBase):
150
150
  @kwarg z: Z component of vector (C{scalar}), same units as B{C{x}}.
151
151
  @kwarg Vector: Class to return transformed point (C{Cartesian}, L{Vector3d}
152
152
  or C{Vector3Tuple}) or C{None}.
153
- @kwarg name_Vector_kwds: Optional C{B{name}=NN} (C{str}) and optional,
154
- additional B{C{Vector}} keyword arguments, ignored if
155
- C{B{Vector} is None}.
153
+ @kwarg name_Vector_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
154
+ additional B{C{Vector}} keyword arguments, ignored if C{B{Vector}
155
+ is None}.
156
156
 
157
157
  @return: A named B{C{Vector}} instance or if C{B{Vector} is None},
158
158
  a named L{Vector3Tuple}C{(x, y, z)}.
@@ -469,9 +469,9 @@ class LocalCartesian(_NamedBase):
469
469
 
470
470
  @arg ecef: Geocentric (and geodetic) (L{Ecef9Tuple}).
471
471
  @arg Xyz: An L{XyzLocal}, L{Enu} or L{Ned} I{class} or C{None}.
472
- @arg name_Xyz_kwds: Optional C{B{name}=NN} (C{str}) and optional,
473
- additional B{C{Xyz}} keyword arguments, ignored if
474
- C{B{Xyz} is None}.
472
+ @arg name_Xyz_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
473
+ additional B{C{Xyz}} keyword arguments, ignored if C{B{Xyz}
474
+ is None}.
475
475
 
476
476
  @return: An C{B{Xyz}(x, y, z, ltp, **B{name_Xyz_kwds}} instance or
477
477
  if C{B{Xyz} is None}, a L{Local9Tuple}C{(x, y, z, lat, lon,
@@ -1098,9 +1098,9 @@ def tyr3d(tilt=INT0, yaw=INT0, roll=INT0, Vector=Vector3d, **name_Vector_kwds):
1098
1098
  (clockwise rotation along and around the y-axis).
1099
1099
  @kwarg Vector: Class to return the direction vector (C{Cartesian},
1100
1100
  L{Vector3d} or C{Vector3Tuple}) or C{None}.
1101
- @kwarg name_Vector_kwds: Optional C{B{name}=NN} (C{str}) and optional,
1102
- additional B{C{Vector}} keyword arguments, ignored if
1103
- C{B{Vector} is None}.
1101
+ @kwarg name_Vector_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
1102
+ additional B{C{Vector}} keyword arguments, ignored if C{B{Vector}
1103
+ is None}.
1104
1104
 
1105
1105
  @return: A named B{C{Vector}} instance or if C{B{Vector} is None},
1106
1106
  a named L{Vector3Tuple}C{(x, y, z)}.