pygeodesy 24.10.24__py2.py3-none-any.whl → 24.12.12__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 (118) hide show
  1. {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.12.12.dist-info}/METADATA +6 -6
  2. PyGeodesy-24.12.12.dist-info/RECORD +118 -0
  3. {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.12.12.dist-info}/WHEEL +1 -1
  4. pygeodesy/__init__.py +5 -5
  5. pygeodesy/__main__.py +1 -1
  6. pygeodesy/albers.py +5 -5
  7. pygeodesy/auxilats/_CX_4.py +1 -1
  8. pygeodesy/auxilats/_CX_6.py +1 -1
  9. pygeodesy/auxilats/_CX_8.py +1 -1
  10. pygeodesy/auxilats/_CX_Rs.py +1 -1
  11. pygeodesy/auxilats/__init__.py +1 -1
  12. pygeodesy/auxilats/__main__.py +1 -1
  13. pygeodesy/auxilats/auxAngle.py +5 -5
  14. pygeodesy/auxilats/auxDLat.py +6 -6
  15. pygeodesy/auxilats/auxDST.py +2 -2
  16. pygeodesy/auxilats/auxLat.py +5 -5
  17. pygeodesy/auxilats/auxily.py +2 -2
  18. pygeodesy/azimuthal.py +55 -65
  19. pygeodesy/basics.py +35 -34
  20. pygeodesy/booleans.py +37 -37
  21. pygeodesy/cartesianBase.py +26 -65
  22. pygeodesy/clipy.py +1 -1
  23. pygeodesy/constants.py +7 -7
  24. pygeodesy/css.py +8 -9
  25. pygeodesy/datums.py +1 -1
  26. pygeodesy/deprecated/__init__.py +2 -2
  27. pygeodesy/deprecated/bases.py +1 -1
  28. pygeodesy/deprecated/classes.py +10 -10
  29. pygeodesy/deprecated/consterns.py +1 -1
  30. pygeodesy/deprecated/datum.py +1 -1
  31. pygeodesy/deprecated/functions.py +23 -13
  32. pygeodesy/deprecated/nvector.py +1 -1
  33. pygeodesy/deprecated/rhumbBase.py +1 -1
  34. pygeodesy/deprecated/rhumbaux.py +1 -1
  35. pygeodesy/deprecated/rhumbsolve.py +1 -1
  36. pygeodesy/deprecated/rhumbx.py +1 -1
  37. pygeodesy/dms.py +1 -1
  38. pygeodesy/ecef.py +63 -69
  39. pygeodesy/elevations.py +1 -1
  40. pygeodesy/ellipsoidalBase.py +106 -121
  41. pygeodesy/ellipsoidalBaseDI.py +115 -119
  42. pygeodesy/ellipsoidalExact.py +36 -38
  43. pygeodesy/ellipsoidalGeodSolve.py +1 -1
  44. pygeodesy/ellipsoidalKarney.py +1 -1
  45. pygeodesy/ellipsoidalNvector.py +1 -1
  46. pygeodesy/ellipsoidalVincenty.py +6 -5
  47. pygeodesy/ellipsoids.py +7 -8
  48. pygeodesy/elliptic.py +6 -6
  49. pygeodesy/epsg.py +1 -1
  50. pygeodesy/errors.py +25 -25
  51. pygeodesy/etm.py +84 -76
  52. pygeodesy/fmath.py +54 -51
  53. pygeodesy/formy.py +74 -106
  54. pygeodesy/frechet.py +1 -1
  55. pygeodesy/fstats.py +1 -1
  56. pygeodesy/fsums.py +82 -72
  57. pygeodesy/gars.py +1 -1
  58. pygeodesy/geodesici.py +4 -4
  59. pygeodesy/geodesicw.py +16 -15
  60. pygeodesy/geodesicx/_C4_24.py +2 -2
  61. pygeodesy/geodesicx/_C4_27.py +2 -2
  62. pygeodesy/geodesicx/_C4_30.py +2 -2
  63. pygeodesy/geodesicx/__init__.py +3 -3
  64. pygeodesy/geodesicx/__main__.py +1 -1
  65. pygeodesy/geodesicx/gx.py +6 -5
  66. pygeodesy/geodesicx/gxarea.py +2 -2
  67. pygeodesy/geodesicx/gxbases.py +2 -2
  68. pygeodesy/geodesicx/gxline.py +16 -12
  69. pygeodesy/geodsolve.py +8 -17
  70. pygeodesy/geohash.py +1 -1
  71. pygeodesy/geoids.py +6 -6
  72. pygeodesy/hausdorff.py +1 -1
  73. pygeodesy/heights.py +3 -3
  74. pygeodesy/internals.py +64 -80
  75. pygeodesy/interns.py +2 -3
  76. pygeodesy/iters.py +1 -1
  77. pygeodesy/karney.py +4 -4
  78. pygeodesy/ktm.py +20 -21
  79. pygeodesy/latlonBase.py +296 -346
  80. pygeodesy/lazily.py +15 -15
  81. pygeodesy/lcc.py +5 -5
  82. pygeodesy/ltp.py +55 -59
  83. pygeodesy/ltpTuples.py +208 -192
  84. pygeodesy/mgrs.py +9 -10
  85. pygeodesy/named.py +153 -3
  86. pygeodesy/namedTuples.py +58 -7
  87. pygeodesy/nvectorBase.py +122 -105
  88. pygeodesy/osgr.py +10 -13
  89. pygeodesy/points.py +1 -1
  90. pygeodesy/props.py +3 -3
  91. pygeodesy/resections.py +26 -26
  92. pygeodesy/rhumb/__init__.py +2 -2
  93. pygeodesy/rhumb/aux_.py +2 -2
  94. pygeodesy/rhumb/bases.py +2 -2
  95. pygeodesy/rhumb/ekx.py +4 -4
  96. pygeodesy/rhumb/solve.py +4 -4
  97. pygeodesy/simplify.py +291 -403
  98. pygeodesy/solveBase.py +1 -1
  99. pygeodesy/sphericalBase.py +1 -1
  100. pygeodesy/sphericalNvector.py +84 -127
  101. pygeodesy/sphericalTrigonometry.py +66 -71
  102. pygeodesy/streprs.py +10 -5
  103. pygeodesy/trf.py +1 -1
  104. pygeodesy/triaxials.py +23 -16
  105. pygeodesy/units.py +17 -17
  106. pygeodesy/unitsBase.py +1 -1
  107. pygeodesy/ups.py +4 -4
  108. pygeodesy/utily.py +202 -145
  109. pygeodesy/utm.py +10 -10
  110. pygeodesy/utmups.py +1 -1
  111. pygeodesy/utmupsBase.py +1 -1
  112. pygeodesy/vector2d.py +17 -17
  113. pygeodesy/vector3d.py +32 -23
  114. pygeodesy/vector3dBase.py +22 -19
  115. pygeodesy/webmercator.py +5 -5
  116. pygeodesy/wgrs.py +5 -5
  117. PyGeodesy-24.10.24.dist-info/RECORD +0 -118
  118. {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.12.12.dist-info}/top_level.txt +0 -0
pygeodesy/solveBase.py CHANGED
@@ -505,7 +505,7 @@ __all__ += _ALL_DOCS(_SolveBase, _SolveCapsBase, _SolveGDictBase, _SolveGDictLin
505
505
 
506
506
  # **) MIT License
507
507
  #
508
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
508
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
509
509
  #
510
510
  # Permission is hereby granted, free of charge, to any person obtaining a
511
511
  # copy of this software and associated documentation files (the "Software"),
@@ -701,7 +701,7 @@ __all__ += _ALL_DOCS(CartesianSphericalBase, LatLonSphericalBase)
701
701
 
702
702
  # **) MIT License
703
703
  #
704
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
704
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
705
705
  #
706
706
  # Permission is hereby granted, free of charge, to any person obtaining a
707
707
  # copy of this software and associated documentation files (the "Software"),
@@ -38,7 +38,7 @@ from pygeodesy.constants import EPS, EPS0, PI, PI2, PI_2, R_M, \
38
38
  _0_0, _0_5, _1_0
39
39
  # from pygeodesy.datums import Datums # from .sphericalBase
40
40
  from pygeodesy.errors import PointsError, VectorError, _xError, _xkwds
41
- from pygeodesy.fmath import fmean, fsum
41
+ from pygeodesy.fmath import fdot_, fmean, fsum
42
42
  # from pygeodesy.fsums import fsum # from .fmath
43
43
  from pygeodesy.interns import _composite_, _end_, _Nv00_, _other_, \
44
44
  _point_, _pole_
@@ -55,13 +55,13 @@ from pygeodesy.sphericalBase import _m2radians, CartesianSphericalBase, \
55
55
  _intersecant2, LatLonSphericalBase, \
56
56
  _radians2m, Datums
57
57
  from pygeodesy.units import Bearing, Bearing_, _isDegrees, Radius, Scalar
58
- from pygeodesy.utily import atan2, degrees360, fabs, sincos2, sincos2_, \
59
- sincos2d, _unrollon, _Wrap
58
+ from pygeodesy.utily import atan2, degrees360, sincos2, sincos2_, sincos2d, \
59
+ _unrollon, _Wrap, fabs
60
60
 
61
- # from math import atan2, fabs # from utily
61
+ # from math import fabs # from utily
62
62
 
63
63
  __all__ = _ALL_LAZY.sphericalNvector
64
- __version__ = '24.10.19'
64
+ __version__ = '24.11.24'
65
65
 
66
66
  _lines_ = 'lines'
67
67
 
@@ -273,8 +273,10 @@ class LatLon(LatLonNvectorBase, LatLonSphericalBase):
273
273
  a, b = self.philam
274
274
 
275
275
  sa, ca, sb, cb, st, ct = sincos2_(a, b, t)
276
- return Nvector(sb * ct - sa * cb * st,
277
- -cb * ct - sa * sb * st,
276
+
277
+ sa *= st
278
+ return Nvector(fdot_(sb, ct, -sa, cb),
279
+ -fdot_(cb, ct, sa, sb),
278
280
  ca * st, name=self.name) # XXX .unit()
279
281
 
280
282
  def greatCircleTo(self, other, wrap=False):
@@ -391,47 +393,29 @@ class LatLon(LatLonNvectorBase, LatLonSphericalBase):
391
393
  return i.toLatLon(height=h, LatLon=self.classof) # Nvector(i.x, i.y, i.z).toLatLon(...)
392
394
 
393
395
  def intersection(self, end1, start2, end2, height=None, wrap=False):
394
- '''Locate the intersection point of two lines each defined
395
- by two points or a start point and bearing from North.
396
-
397
- @arg end1: End point of the first line (L{LatLon}) or the
398
- initial bearing at this point (compass C{degrees360}).
399
- @arg start2: Start point of the second line (L{LatLon}).
400
- @arg end2: End point of the second line (L{LatLon}) or the
401
- initial bearing at the second point (compass
402
- C{degrees}).
403
- @kwarg height: Optional height at the intersection point,
404
- overriding the mean height (C{meter}).
405
- @kwarg wrap: If C{True}, wrap or I{normalize} and unroll all
406
- start and end points (C{bool}).
396
+ '''Locate an intersection point of two lines each defined by two
397
+ points or by a point and an (initial) bearing.
407
398
 
408
399
  @return: The intersection point (L{LatLon}).
409
400
 
410
- @raise TypeError: If B{C{start2}}, B{C{end1}} or B{C{end2}}
411
- point is not L{LatLon}.
412
-
413
- @raise ValueError: Intersection is ambiguous or infinite or
414
- the lines are parallel, coincident or null.
415
-
416
- @see: Function L{sphericalNvector.intersection} and method
417
- L{intersection2}.
401
+ @see: Method L{intersection2<sphericalNvector.LatLon.intersection2>}
402
+ for further details.
418
403
  '''
419
404
  return intersection(self, end1, start2, end2, height=height,
420
405
  wrap=wrap, LatLon=self.classof)
421
406
 
422
407
  def intersection2(self, end1, start2, end2, height=None, wrap=False):
423
- '''Locate the intersections of two (great circle) lines each defined
424
- by two points or by a start point and an (initial) bearing.
425
-
426
- @arg end1: End point of the first line (L{LatLon}) or the
427
- initial bearing at this point (compass C{degrees360}).
428
- @arg start2: Start point of the second line (L{LatLon}).
429
- @arg end2: End point of the second line (L{LatLon}) or the
430
- initial bearing at the second start point (compass
431
- C{degrees360}).
408
+ '''Locate both intersections of two (great circle) lines each defined
409
+ by two points or by a point and an (initial) bearing.
410
+
411
+ @arg end1: End point of the line starting at this point (L{LatLon})
412
+ or the bearing at this point (compass C{degrees360}).
413
+ @arg start2: Start point of the other line (L{LatLon}).
414
+ @arg end2: End point of the other line (L{LatLon}) or the bearing
415
+ at B{C{start2}} (compass C{degrees360}).
432
416
  @kwarg height: Optional height at the intersection and antipodal
433
417
  point, overriding the mean height (C{meter}).
434
- @kwarg wrap: If C{True}, wrap or I{normalize} and unroll
418
+ @kwarg wrap: If C{True}, wrap or I{normalize} and unroll the
435
419
  B{C{start2}} and both B{C{end*}} points (C{bool}).
436
420
 
437
421
  @return: 2-Tuple C{(intersection, antipode)}, each a B{C{LatLon}}.
@@ -442,8 +426,7 @@ class LatLon(LatLonNvectorBase, LatLonSphericalBase):
442
426
  @raise ValueError: Intersection is ambiguous or infinite or
443
427
  the lines are parallel, coincident or null.
444
428
 
445
- @see: Function L{sphericalNvector.intersection2} and method
446
- L{intersection}.
429
+ @see: Function L{sphericalNvector.intersection2}.
447
430
  '''
448
431
  return intersection2(self, end1, start2, end2, height=height,
449
432
  wrap=wrap, LatLon=self.classof)
@@ -472,17 +455,14 @@ class LatLon(LatLonNvectorBase, LatLonSphericalBase):
472
455
 
473
456
  # sum subtended angles of each edge (using n0, the
474
457
  # normal vector to this point for sign of α)
475
- def _subtangles(ps, w):
476
- Ps = self.PointsIter(ps, loop=1, wrap=w)
477
- n0 = self.toNvector()
478
- _m0 = n0.minus
479
- p1 = Ps[0]
480
- vs1 = _m0(p1.toNvector())
458
+ def _subt(Ps, n0, w):
459
+ p1 = Ps[0]
460
+ vs1 = n0.minus(p1.toNvector())
481
461
  for p2 in Ps.iterate(closed=True):
482
462
  if w and not Ps.looped:
483
463
  p2 = _unrollon(p1, p2)
484
- p1 = p2
485
- vs2 = _m0(p2.toNvector())
464
+ p1 = p2
465
+ vs2 = n0.minus(p2.toNvector())
486
466
  yield vs1.angleTo(vs2, vSign=n0) # PYCHOK false
487
467
  vs1 = vs2
488
468
 
@@ -491,7 +471,8 @@ class LatLon(LatLonNvectorBase, LatLonSphericalBase):
491
471
  # an exterior point will sum to 0°. On a sphere, enclosed
492
472
  # point angles will sum to less than 360° (due to spherical
493
473
  # excess), exterior point angles will be small but non-zero.
494
- s = fsum(_subtangles(points, wrap)) # normal vector
474
+ s = fsum(_subt(self.PointsIter(points, loop=1, wrap=wrap),
475
+ self.toNvector(), wrap)) # normal vector
495
476
  # XXX are winding number optimisations equally applicable to
496
477
  # spherical surface?
497
478
  return fabs(s) > PI
@@ -642,8 +623,8 @@ class LatLon(LatLonNvectorBase, LatLonSphericalBase):
642
623
  return r.closest, r.distance
643
624
 
644
625
  def nearestOn3(self, points, closed=False, radius=R_M, height=None, wrap=False):
645
- '''Locate the point on a path or polygon (with great circle
646
- arcs joining consecutive points) closest to this point.
626
+ '''Locate the point on a path or polygon (with great circle arcs
627
+ joining consecutive points) closest to this point.
647
628
 
648
629
  The closest point is either on within the extent of any great
649
630
  circle arc or the nearest of the arc's end points.
@@ -653,14 +634,14 @@ class LatLon(LatLonNvectorBase, LatLonSphericalBase):
653
634
  @kwarg radius: Mean earth radius (C{meter}) or C{None}.
654
635
  @kwarg height: Optional height, overriding the mean height
655
636
  for a point within the arc (C{meter}).
656
- @kwarg wrap: If C{True}, wrap or I{normalize} and unroll
657
- the B{C{points}} (C{bool}).
637
+ @kwarg wrap: If C{True}, wrap or I{normalize} and unroll the
638
+ B{C{points}} (C{bool}).
658
639
 
659
640
  @return: A L{NearestOn3Tuple}C{(closest, distance, angle)} of
660
641
  the C{closest} point (L{LatLon}), the C{distance}
661
642
  between this and the C{closest} point in C{meter},
662
- same units as B{C{radius}} or in C{radians} if
663
- C{B{radius} is None} and the C{angle} from this to
643
+ same units as B{C{radius}} (or in C{radians} if
644
+ C{B{radius} is None}) and the C{angle} from this to
664
645
  the C{closest} point in compass C{degrees360}.
665
646
 
666
647
  @raise TypeError: Some B{C{points}} are not C{LatLon}.
@@ -668,16 +649,16 @@ class LatLon(LatLonNvectorBase, LatLonSphericalBase):
668
649
  @raise ValueError: No B{C{points}}.
669
650
  '''
670
651
  Ps = self.PointsIter(points, loop=1, wrap=wrap)
671
- _r = self.distanceTo
652
+ _d = self.distanceTo
672
653
  _n = self.nearestOn
673
654
 
674
655
  c = p1 = Ps[0]
675
- r = _r(c, radius=None) # radians
656
+ r = _d(c, radius=None) # radians
676
657
  for p2 in Ps.iterate(closed=closed):
677
658
  if wrap and not Ps.looped:
678
659
  p2 = _unrollon(p1, p2)
679
660
  p = _n(p1, p2, height=height)
680
- d = _r(p, radius=None) # radians
661
+ d = _d(p, radius=None) # radians
681
662
  if d < r:
682
663
  c, r = p, d
683
664
  p1 = p2
@@ -775,13 +756,13 @@ class Nvector(NvectorBase):
775
756
 
776
757
  def greatCircle(self, bearing):
777
758
  '''Compute the n-vector normal to great circle obtained by
778
- heading on given compass bearing from this point as its
759
+ heading on given (initial) bearing from this point as its
779
760
  n-vector.
780
761
 
781
762
  Direction of vector is such that initial bearing vector
782
763
  b = c × p.
783
764
 
784
- @arg bearing: Initial compass bearing (C{degrees}).
765
+ @arg bearing: Initial bearing (compass C{degrees360}).
785
766
 
786
767
  @return: N-vector representing great circle (C{Nvector}).
787
768
 
@@ -889,77 +870,54 @@ def intersecant2(center, circle, point, other, **radius_exact_height_wrap):
889
870
 
890
871
 
891
872
  def intersection(start1, end1, start2, end2, height=None, wrap=False,
892
- LatLon=LatLon, **LatLon_kwds):
893
- '''Locate the intersections of two (great circle) lines each defined
894
- by two points or by a start point and an (initial) bearing.
873
+ **LatLon_and_kwds):
874
+ '''Locate an intersection point of two (great circle) lines each defined
875
+ by two points or by a point and an (initial) bearing.
895
876
 
896
- @arg start1: Start point of the first line (L{LatLon}).
897
- @arg end1: End point of the first line (L{LatLon}) or the initial
898
- bearing at the first start point (compass C{degrees360}).
899
- @arg start2: Start point of the second line (L{LatLon}).
900
- @arg end2: End point of the second line (L{LatLon}) or the initial
901
- bearing at the second start point (compass C{degrees360}).
902
- @kwarg height: Optional height at the intersection point,
903
- overriding the mean height (C{meter}).
904
- @kwarg wrap: If C{True}, wrap or I{normalize} and unroll B{C{start2}}
905
- and both B{C{end*}} points (C{bool}).
906
- @kwarg LatLon: Optional class to return the intersection point
907
- (L{LatLon}).
908
- @kwarg LatLon_kwds: Optional, additional B{C{LatLon}} keyword
909
- arguments, ignored if C{B{LatLon} is None}.
910
-
911
- @return: The intersection point (B{C{LatLon}}) or if C{B{LatLon}
912
- is None}, a cartesian L{Ecef9Tuple}C{(x, y, z, lat, lon,
913
- height, C, M, datum)} with C{C} and C{M} if available.
914
-
915
- @raise TypeError: If B{C{start*}} or B{C{end*}} is not L{LatLon}.
916
-
917
- @raise ValueError: Intersection is ambiguous or infinite or
918
- the lines are parallel, coincident or null.
877
+ @return: The intersection point (L{LatLon}) or if C{B{LatLon}=None},
878
+ a cartesian L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M,
879
+ datum)} with C{C} and C{M} if available.
919
880
 
920
- @see: Function L{sphericalNvector.intersection2}.
881
+ @see: Function L{intersection2<sphericalNvector.intersection2>}
882
+ for further details.
921
883
  '''
922
884
  i, _, h = _intersect3(start1, end1, start2, end2, height, wrap)
923
- kwds = _xkwds(LatLon_kwds, height=h, LatLon=LatLon)
885
+ kwds = _xkwds(LatLon_and_kwds, height=h, LatLon=LatLon)
924
886
  return i.toLatLon(**kwds)
925
887
 
926
888
 
927
889
  def intersection2(start1, end1, start2, end2, height=None, wrap=False,
928
- LatLon=LatLon, **LatLon_kwds):
929
- '''Locate the intersections of two (great circle) lines each defined
930
- by two points or by a start point and an (initial) bearing.
890
+ **LatLon_and_kwds):
891
+ '''Locate both intersections of two (great circle) lines each defined
892
+ by two points or by a point and an (initial) bearing.
931
893
 
932
894
  @arg start1: Start point of the first line (L{LatLon}).
933
- @arg end1: End point of the first line (L{LatLon}) or the
934
- initial bearing at the first start point
935
- (compass C{degrees360}).
895
+ @arg end1: End point of the first line (L{LatLon}) or the bearing at
896
+ B{C{start1}} (compass C{degrees360}).
936
897
  @arg start2: Start point of the second line (L{LatLon}).
937
- @arg end2: End point of the second line (L{LatLon}) or the
938
- initial bearing at the second start point
939
- (compass C{degrees360}).
940
- @kwarg height: Optional height at the intersection and antipodal
941
- point, overriding the mean height (C{meter}).
942
- @kwarg wrap: If C{True}, wrap or I{normalize} and unroll B{C{start2}}
943
- and both B{C{end*}} points (C{bool}).
944
- @kwarg LatLon: Optional class to return the intersection and
945
- antipodal points (L{LatLon}).
946
- @kwarg LatLon_kwds: Optional, additional B{C{LatLon}} keyword
947
- arguments, ignored if C{B{LatLon} is None}.
948
-
949
- @return: 2-Tuple C{(intersection, antipode)}, each a (B{C{LatLon}})
950
- or if C{B{LatLon} is None}, a cartesian L{Ecef9Tuple}C{(x,
951
- y, z, lat, lon, height, C, M, datum)} with C{C} and C{M}
952
- if available.
898
+ @arg end2: End point of the second line (L{LatLon}) or the bearing at
899
+ B{C{start2}} (compass C{degrees360}).
900
+ @kwarg height: Optional height at the intersection and antipodal point,
901
+ overriding the mean height (C{meter}).
902
+ @kwarg wrap: If C{True}, wrap or I{normalize} and unroll B{C{start2}} and
903
+ both B{C{end*}} points (C{bool}).
904
+ @kwarg LatLon_and_kwds: Optional class C{B{LatLon}=}L{LatLon} to return
905
+ the intersection points and optionally, additional B{C{LatLon}}
906
+ keyword arguments, ignored if C{B{LatLon} is None}.
907
+
908
+ @return: 2-Tuple C{(intersection, antipode)}, each a (B{C{LatLon}}) or if
909
+ C{B{LatLon}=None}, a cartesian L{Ecef9Tuple}C{(x, y, z, lat, lon,
910
+ height, C, M, datum)} with C{C} and C{M} if available.
953
911
 
954
912
  @raise TypeError: If B{C{start*}} or B{C{end*}} is not L{LatLon}.
955
913
 
956
- @raise ValueError: Intersection is ambiguous or infinite or
957
- the lines are parallel, coincident or null.
914
+ @raise ValueError: Intersection is ambiguous or infinite or the lines are
915
+ parallel, coincident or null.
958
916
 
959
917
  @see: Function L{sphericalNvector.intersection}.
960
918
  '''
961
919
  i, a, h = _intersect3(start1, end1, start2, end2, height, wrap)
962
- kwds = _xkwds(LatLon_kwds, height=h, LatLon=LatLon)
920
+ kwds = _xkwds(LatLon_and_kwds, height=h, LatLon=LatLon)
963
921
  return i.toLatLon(**kwds), a.toLatLon(**kwds)
964
922
 
965
923
 
@@ -1022,21 +980,20 @@ def _intersect3(start1, end1, start2, end2, height, wrap):
1022
980
  return (i1, i2, h) if d > 0 else (i2, i1, h)
1023
981
 
1024
982
 
1025
- def meanOf(points, height=None, wrap=False, LatLon=LatLon, **LatLon_kwds):
983
+ def meanOf(points, height=None, wrap=False, **LatLon_and_kwds):
1026
984
  '''Compute the I{geographic} mean of the supplied points.
1027
985
 
1028
986
  @arg points: Array of points to be averaged (L{LatLon}[]).
1029
- @kwarg height: Optional height, overriding the mean height
1030
- (C{meter}).
987
+ @kwarg height: Optional height, overriding the mean height (C{meter}).
1031
988
  @kwarg wrap: If C{True}, wrap or I{normalize} B{C{points}} (C{bool}).
1032
- @kwarg LatLon: Optional class to return the mean point (L{LatLon}).
1033
- @kwarg LatLon_kwds: Optional, additional B{C{LatLon}} keyword
1034
- arguments, ignored if C{B{LatLon} is None}.
989
+ @kwarg LatLon_and_kwds: Optional class C{B{LatLon}=}L{LatLon} to return
990
+ the mean point and optionally, additional B{C{LatLon}}
991
+ keyword arguments, ignored if C{B{LatLon} is None}.
1035
992
 
1036
993
  @return: Point at geographic mean and mean height (B{C{LatLon}}).
1037
994
 
1038
- @raise PointsError: Insufficient number of B{C{points}} or
1039
- some B{C{points}} are not C{LatLon}.
995
+ @raise PointsError: Insufficient number of B{C{points}} or some
996
+ B{C{points}} are not C{LatLon}.
1040
997
  '''
1041
998
  def _N_vs(ps, w):
1042
999
  Ps = _Nv00.PointsIter(ps, wrap=w)
@@ -1047,9 +1004,9 @@ def meanOf(points, height=None, wrap=False, LatLon=LatLon, **LatLon_kwds):
1047
1004
  # geographic mean
1048
1005
  n = _nsumOf(_N_vs(points, wrap), height, Nvector, {})
1049
1006
  except (TypeError, ValueError) as x:
1050
- raise PointsError(points=points, wrap=wrap, LatLon=LatLon, cause=x)
1051
- return n.toLatLon(**_xkwds(LatLon_kwds, LatLon=LatLon, height=n.h,
1052
- name=meanOf.__name__))
1007
+ raise PointsError(points=points, wrap=wrap, cause=x, **LatLon_and_kwds)
1008
+ return n.toLatLon(**_xkwds(LatLon_and_kwds, LatLon=LatLon, height=n.h,
1009
+ name=meanOf.__name__))
1053
1010
 
1054
1011
 
1055
1012
  @deprecated_function
@@ -1164,8 +1121,8 @@ def sumOf(nvectors, Vector=Nvector, h=None, **Vector_kwds):
1164
1121
  def triangulate(point1, bearing1, point2, bearing2,
1165
1122
  height=None, wrap=False,
1166
1123
  LatLon=LatLon, **LatLon_kwds):
1167
- '''Locate a point given two known points and the (initial) bearing
1168
- from those points.
1124
+ '''Locate a point given two known, reference points and the (initial)
1125
+ bearing from those points.
1169
1126
 
1170
1127
  @arg point1: First reference point (L{LatLon}).
1171
1128
  @arg bearing1: Bearing at the first point (compass C{degrees360}).
@@ -1244,7 +1201,7 @@ __all__ += _ALL_OTHER(Cartesian, LatLon, Nvector, # classes
1244
1201
 
1245
1202
  # **) MIT License
1246
1203
  #
1247
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
1204
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
1248
1205
  #
1249
1206
  # Permission is hereby granted, free of charge, to any person obtaining a
1250
1207
  # copy of this software and associated documentation files (the "Software"),