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.
- {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.12.12.dist-info}/METADATA +6 -6
- PyGeodesy-24.12.12.dist-info/RECORD +118 -0
- {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.12.12.dist-info}/WHEEL +1 -1
- pygeodesy/__init__.py +5 -5
- pygeodesy/__main__.py +1 -1
- pygeodesy/albers.py +5 -5
- 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 +1 -1
- pygeodesy/auxilats/__main__.py +1 -1
- pygeodesy/auxilats/auxAngle.py +5 -5
- pygeodesy/auxilats/auxDLat.py +6 -6
- pygeodesy/auxilats/auxDST.py +2 -2
- pygeodesy/auxilats/auxLat.py +5 -5
- pygeodesy/auxilats/auxily.py +2 -2
- pygeodesy/azimuthal.py +55 -65
- pygeodesy/basics.py +35 -34
- pygeodesy/booleans.py +37 -37
- pygeodesy/cartesianBase.py +26 -65
- pygeodesy/clipy.py +1 -1
- pygeodesy/constants.py +7 -7
- pygeodesy/css.py +8 -9
- pygeodesy/datums.py +1 -1
- pygeodesy/deprecated/__init__.py +2 -2
- pygeodesy/deprecated/bases.py +1 -1
- pygeodesy/deprecated/classes.py +10 -10
- pygeodesy/deprecated/consterns.py +1 -1
- pygeodesy/deprecated/datum.py +1 -1
- pygeodesy/deprecated/functions.py +23 -13
- 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 +63 -69
- pygeodesy/elevations.py +1 -1
- pygeodesy/ellipsoidalBase.py +106 -121
- pygeodesy/ellipsoidalBaseDI.py +115 -119
- pygeodesy/ellipsoidalExact.py +36 -38
- pygeodesy/ellipsoidalGeodSolve.py +1 -1
- pygeodesy/ellipsoidalKarney.py +1 -1
- pygeodesy/ellipsoidalNvector.py +1 -1
- pygeodesy/ellipsoidalVincenty.py +6 -5
- pygeodesy/ellipsoids.py +7 -8
- pygeodesy/elliptic.py +6 -6
- pygeodesy/epsg.py +1 -1
- pygeodesy/errors.py +25 -25
- pygeodesy/etm.py +84 -76
- pygeodesy/fmath.py +54 -51
- pygeodesy/formy.py +74 -106
- pygeodesy/frechet.py +1 -1
- pygeodesy/fstats.py +1 -1
- pygeodesy/fsums.py +82 -72
- pygeodesy/gars.py +1 -1
- pygeodesy/geodesici.py +4 -4
- pygeodesy/geodesicw.py +16 -15
- pygeodesy/geodesicx/_C4_24.py +2 -2
- pygeodesy/geodesicx/_C4_27.py +2 -2
- pygeodesy/geodesicx/_C4_30.py +2 -2
- pygeodesy/geodesicx/__init__.py +3 -3
- pygeodesy/geodesicx/__main__.py +1 -1
- pygeodesy/geodesicx/gx.py +6 -5
- pygeodesy/geodesicx/gxarea.py +2 -2
- pygeodesy/geodesicx/gxbases.py +2 -2
- pygeodesy/geodesicx/gxline.py +16 -12
- pygeodesy/geodsolve.py +8 -17
- pygeodesy/geohash.py +1 -1
- pygeodesy/geoids.py +6 -6
- pygeodesy/hausdorff.py +1 -1
- pygeodesy/heights.py +3 -3
- pygeodesy/internals.py +64 -80
- pygeodesy/interns.py +2 -3
- pygeodesy/iters.py +1 -1
- pygeodesy/karney.py +4 -4
- pygeodesy/ktm.py +20 -21
- pygeodesy/latlonBase.py +296 -346
- pygeodesy/lazily.py +15 -15
- pygeodesy/lcc.py +5 -5
- pygeodesy/ltp.py +55 -59
- pygeodesy/ltpTuples.py +208 -192
- pygeodesy/mgrs.py +9 -10
- pygeodesy/named.py +153 -3
- pygeodesy/namedTuples.py +58 -7
- pygeodesy/nvectorBase.py +122 -105
- pygeodesy/osgr.py +10 -13
- pygeodesy/points.py +1 -1
- pygeodesy/props.py +3 -3
- pygeodesy/resections.py +26 -26
- pygeodesy/rhumb/__init__.py +2 -2
- pygeodesy/rhumb/aux_.py +2 -2
- pygeodesy/rhumb/bases.py +2 -2
- pygeodesy/rhumb/ekx.py +4 -4
- pygeodesy/rhumb/solve.py +4 -4
- pygeodesy/simplify.py +291 -403
- pygeodesy/solveBase.py +1 -1
- pygeodesy/sphericalBase.py +1 -1
- pygeodesy/sphericalNvector.py +84 -127
- pygeodesy/sphericalTrigonometry.py +66 -71
- pygeodesy/streprs.py +10 -5
- pygeodesy/trf.py +1 -1
- pygeodesy/triaxials.py +23 -16
- pygeodesy/units.py +17 -17
- pygeodesy/unitsBase.py +1 -1
- pygeodesy/ups.py +4 -4
- pygeodesy/utily.py +202 -145
- pygeodesy/utm.py +10 -10
- pygeodesy/utmups.py +1 -1
- pygeodesy/utmupsBase.py +1 -1
- pygeodesy/vector2d.py +17 -17
- pygeodesy/vector3d.py +32 -23
- pygeodesy/vector3dBase.py +22 -19
- pygeodesy/webmercator.py +5 -5
- pygeodesy/wgrs.py +5 -5
- PyGeodesy-24.10.24.dist-info/RECORD +0 -118
- {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.12.12.dist-info}/top_level.txt +0 -0
pygeodesy/ellipsoidalBase.py
CHANGED
|
@@ -35,7 +35,7 @@ from pygeodesy.units import Epoch, _isDegrees, Radius_, _1mm as _TOL_M
|
|
|
35
35
|
# from math import fabs # from .latlonBase
|
|
36
36
|
|
|
37
37
|
__all__ = _ALL_LAZY.ellipsoidalBase
|
|
38
|
-
__version__ = '24.
|
|
38
|
+
__version__ = '24.12.04'
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
class CartesianEllipsoidalBase(CartesianBase):
|
|
@@ -77,7 +77,7 @@ class CartesianEllipsoidalBase(CartesianBase):
|
|
|
77
77
|
@deprecated_method
|
|
78
78
|
def convertRefFrame(self, reframe2, reframe, epoch=None):
|
|
79
79
|
'''DEPRECATED, use method L{toRefFrame}.'''
|
|
80
|
-
return self.toRefFrame(reframe2, reframe=reframe, epoch=epoch)
|
|
80
|
+
return self.toRefFrame(reframe2, reframe=reframe, epoch=epoch) # PYCHOK no cover
|
|
81
81
|
|
|
82
82
|
@property_RO
|
|
83
83
|
def ellipsoidalCartesian(self):
|
|
@@ -276,7 +276,7 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
276
276
|
@deprecated_property_RO
|
|
277
277
|
def convergence(self):
|
|
278
278
|
'''DEPRECATED, use property C{gamma}.'''
|
|
279
|
-
return self.gamma
|
|
279
|
+
return self.gamma # PYCHOK no cover
|
|
280
280
|
|
|
281
281
|
@deprecated_method
|
|
282
282
|
def convertDatum(self, datum2):
|
|
@@ -330,7 +330,7 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
330
330
|
formula.
|
|
331
331
|
'''
|
|
332
332
|
p = self.others(other)
|
|
333
|
-
if wrap:
|
|
333
|
+
if wrap: # PYCHOK no cover
|
|
334
334
|
p = _Wrap.point(p)
|
|
335
335
|
E = self.ellipsoids(other)
|
|
336
336
|
return E.distance2(*(self.latlon + p.latlon))
|
|
@@ -488,46 +488,43 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
488
488
|
'''I{Must be overloaded}.'''
|
|
489
489
|
self._notOverloaded(other, fraction, height=height, wrap=wrap)
|
|
490
490
|
|
|
491
|
-
def intersection3(self, end1,
|
|
491
|
+
def intersection3(self, end1, start2, end2, height=None, wrap=False, # was=True
|
|
492
492
|
equidistant=None, tol=_TOL_M):
|
|
493
|
-
'''I{Iteratively} compute the intersection point of two lines, each
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
@arg end1: End point of this line (C{LatLon}) or the initial
|
|
497
|
-
|
|
498
|
-
@arg
|
|
499
|
-
@arg end2: End point of the
|
|
500
|
-
bearing at
|
|
501
|
-
@kwarg height: Optional height at the intersection (C{meter},
|
|
502
|
-
|
|
503
|
-
@kwarg wrap: If C{True}, wrap or I{normalize} and unroll
|
|
504
|
-
|
|
505
|
-
@kwarg equidistant: An azimuthal equidistant projection (I{class} or
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
@kwarg tol: Tolerance for convergence and skew line distance and
|
|
509
|
-
|
|
493
|
+
'''I{Iteratively} compute the intersection point of two geodesic lines, each
|
|
494
|
+
given as two points or as a start point and a bearing from North.
|
|
495
|
+
|
|
496
|
+
@arg end1: End point of this line (C{LatLon}) or the initial bearing at
|
|
497
|
+
this point (compass C{degrees360}).
|
|
498
|
+
@arg start2: Start point of the second line (this C{LatLon}).
|
|
499
|
+
@arg end2: End point of the second line (this C{LatLon}) or the initial
|
|
500
|
+
bearing at B{C{start2}} (compass C{degrees360}).
|
|
501
|
+
@kwarg height: Optional height at the intersection (C{meter}, conventionally)
|
|
502
|
+
or C{None} for the mean height.
|
|
503
|
+
@kwarg wrap: If C{True}, wrap or I{normalize} and unroll B{C{start2}} and
|
|
504
|
+
both B{C{end*}} points (C{bool}).
|
|
505
|
+
@kwarg equidistant: An azimuthal equidistant projection (I{class} or function
|
|
506
|
+
L{pygeodesy.equidistant}), or C{None} for this point's
|
|
507
|
+
preferred C{.Equidistant}.
|
|
508
|
+
@kwarg tol: Tolerance for convergence and skew line distance and length
|
|
509
|
+
(C{meter}, conventionally).
|
|
510
510
|
|
|
511
|
-
@return: An L{Intersection3Tuple}C{(point, outside1, outside2)}
|
|
512
|
-
|
|
511
|
+
@return: An L{Intersection3Tuple}C{(point, outside1, outside2)} with C{point}
|
|
512
|
+
a C{LatLon} instance.
|
|
513
513
|
|
|
514
514
|
@raise ImportError: Package U{geographiclib
|
|
515
|
-
<https://PyPI.org/project/geographiclib>}
|
|
516
|
-
|
|
515
|
+
<https://PyPI.org/project/geographiclib>} not
|
|
516
|
+
installed or not found, but only in case
|
|
517
517
|
C{B{equidistant}=}L{EquidistantKarney}.
|
|
518
518
|
|
|
519
|
-
@raise IntersectionError: Skew, colinear, parallel or otherwise
|
|
520
|
-
|
|
521
|
-
for the given B{C{tol}}.
|
|
519
|
+
@raise IntersectionError: Skew, colinear, parallel or otherwise non-intersecting
|
|
520
|
+
lines or no convergence for the given B{C{tol}}.
|
|
522
521
|
|
|
523
|
-
@raise TypeError:
|
|
524
|
-
is not C{LatLon}.
|
|
522
|
+
@raise TypeError: Invalid B{C{end1}}, B{C{start2}} or B{C{end2}}.
|
|
525
523
|
|
|
526
|
-
@note: For each line specified with an initial bearing, a pseudo-end
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
of the C{authalic} earth perimeter).
|
|
524
|
+
@note: For each line specified with an initial bearing, a pseudo-end point is
|
|
525
|
+
computed as the C{destination} along that bearing at about 1.5 times the
|
|
526
|
+
distance from the start point to an initial gu-/estimate of the intersection
|
|
527
|
+
point (and between 1/8 and 3/8 of the C{authalic} earth perimeter).
|
|
531
528
|
|
|
532
529
|
@see: I{Karney's} U{intersect.cpp<https://SourceForge.net/p/geographiclib/
|
|
533
530
|
discussion/1026621/thread/21aaff9f/>}, U{The B{ellipsoidal} case<https://
|
|
@@ -536,30 +533,30 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
536
533
|
B{14. MARITIME BOUNDARIES} for more details about the iteration algorithm.
|
|
537
534
|
'''
|
|
538
535
|
try:
|
|
539
|
-
s2 = self.others(
|
|
536
|
+
s2 = self.others(start2=start2)
|
|
540
537
|
return _MODS.ellipsoidalBaseDI._intersect3(self, end1,
|
|
541
538
|
s2, end2,
|
|
542
539
|
height=height, wrap=wrap,
|
|
543
540
|
equidistant=equidistant, tol=tol,
|
|
544
541
|
LatLon=self.classof, datum=self.datum)
|
|
545
542
|
except (TypeError, ValueError) as x:
|
|
546
|
-
raise _xError(x, start1=self, end1=end1,
|
|
543
|
+
raise _xError(x, start1=self, end1=end1, start2=start2, end2=end2,
|
|
547
544
|
height=height, wrap=wrap, tol=tol)
|
|
548
545
|
|
|
549
|
-
def intersections2(self, radius1,
|
|
550
|
-
|
|
551
|
-
'''I{Iteratively} compute the intersection points of two circles,
|
|
552
|
-
|
|
546
|
+
def intersections2(self, radius1, center2, radius2, height=None, wrap=False, # was=True
|
|
547
|
+
equidistant=None, tol=_TOL_M):
|
|
548
|
+
'''I{Iteratively} compute the intersection points of two circles, each
|
|
549
|
+
defined by a center point and a radius.
|
|
553
550
|
|
|
554
551
|
@arg radius1: Radius of this circle (C{meter}, conventionally).
|
|
555
|
-
@arg
|
|
552
|
+
@arg center2: Center of the other circle (this C{LatLon}).
|
|
556
553
|
@arg radius2: Radius of the other circle (C{meter}, same units as
|
|
557
554
|
B{C{radius1}}).
|
|
558
555
|
@kwarg height: Optional height for the intersection points (C{meter},
|
|
559
556
|
conventionally) or C{None} for the I{"radical height"}
|
|
560
557
|
at the I{radical line} between both centers.
|
|
561
|
-
@kwarg wrap: If C{True}, wrap or I{normalize} and unroll
|
|
562
|
-
|
|
558
|
+
@kwarg wrap: If C{True}, wrap or I{normalize} and unroll B{C{center2}}
|
|
559
|
+
(C{bool}).
|
|
563
560
|
@kwarg equidistant: An azimuthal equidistant projection (I{class} or
|
|
564
561
|
function L{pygeodesy.equidistant}) or C{None}
|
|
565
562
|
for this point's preferred C{.Equidistant}.
|
|
@@ -579,7 +576,7 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
579
576
|
non-intersecting circles or no
|
|
580
577
|
convergence for the given B{C{tol}}.
|
|
581
578
|
|
|
582
|
-
@raise TypeError: Invalid B{C{
|
|
579
|
+
@raise TypeError: Invalid B{C{center2}} or B{C{equidistant}}.
|
|
583
580
|
|
|
584
581
|
@raise UnitError: Invalid B{C{radius1}}, B{C{radius2}} or B{C{height}}.
|
|
585
582
|
|
|
@@ -591,15 +588,15 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
591
588
|
intersections.
|
|
592
589
|
'''
|
|
593
590
|
try:
|
|
594
|
-
c2 = self.others(
|
|
591
|
+
c2 = self.others(center2=center2)
|
|
595
592
|
return _MODS.ellipsoidalBaseDI._intersections2(self, radius1,
|
|
596
593
|
c2, radius2,
|
|
597
594
|
height=height, wrap=wrap,
|
|
598
595
|
equidistant=equidistant, tol=tol,
|
|
599
596
|
LatLon=self.classof, datum=self.datum)
|
|
600
597
|
except (AssertionError, TypeError, ValueError) as x:
|
|
601
|
-
raise _xError(x, center=self, radius1=radius1,
|
|
602
|
-
|
|
598
|
+
raise _xError(x, center=self, radius1=radius1, center2=center2, radius2=radius2,
|
|
599
|
+
height=height, wrap=wrap, tol=tol)
|
|
603
600
|
|
|
604
601
|
def isenclosedBy(self, points, wrap=False):
|
|
605
602
|
'''Check whether a polygon or composite encloses this point.
|
|
@@ -654,23 +651,22 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
654
651
|
|
|
655
652
|
def nearestOn(self, point1, point2, within=True, height=None, wrap=False, # was=True
|
|
656
653
|
equidistant=None, tol=_TOL_M):
|
|
657
|
-
'''I{Iteratively} locate the closest point on the geodesic
|
|
658
|
-
two other (ellipsoidal) points.
|
|
659
|
-
|
|
660
|
-
@arg point1: Start point (C{LatLon}).
|
|
661
|
-
@arg point2: End point (C{LatLon}).
|
|
662
|
-
@kwarg within: If C{True}, return the closest point I{between}
|
|
663
|
-
B{C{
|
|
664
|
-
|
|
665
|
-
@kwarg height: Optional height for the closest point (C{meter},
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
for this point's preferred C{.Equidistant}.
|
|
654
|
+
'''I{Iteratively} locate the closest point on the geodesic (line)
|
|
655
|
+
between two other (ellipsoidal) points.
|
|
656
|
+
|
|
657
|
+
@arg point1: Start point of the geodesic (C{LatLon}).
|
|
658
|
+
@arg point2: End point of the geodesic (C{LatLon}).
|
|
659
|
+
@kwarg within: If C{True}, return the closest point I{between} B{C{point1}} and
|
|
660
|
+
B{C{point2}}, otherwise the closest point elsewhere on the geodesic
|
|
661
|
+
(C{bool}).
|
|
662
|
+
@kwarg height: Optional height for the closest point (C{meter}, conventionally)
|
|
663
|
+
or C{None} or C{False} for the interpolated height. If C{False},
|
|
664
|
+
the closest takes the heights of the points into account.
|
|
665
|
+
@kwarg wrap: If C{True}, wrap or I{normalize} and unroll both B{C{point1}} and
|
|
666
|
+
B{C{point2}} (C{bool}).
|
|
667
|
+
@kwarg equidistant: An azimuthal equidistant projection (I{class} or function
|
|
668
|
+
L{pygeodesy.equidistant}) or C{None} for this point's preferred
|
|
669
|
+
C{Equidistant}, like L{Equidistant<LatLonEllipsoidalBase.Equidistant>}.
|
|
674
670
|
@kwarg tol: Convergence tolerance (C{meter}, conventionally).
|
|
675
671
|
|
|
676
672
|
@return: Closest point (C{LatLon}).
|
|
@@ -680,11 +676,10 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
680
676
|
not installed or not found, but only if
|
|
681
677
|
C{B{equidistant}=}L{EquidistantKarney}.
|
|
682
678
|
|
|
683
|
-
@raise TypeError: Invalid B{C{point1}}, B{C{point2}} or
|
|
684
|
-
B{C{equidistant}}.
|
|
679
|
+
@raise TypeError: Invalid B{C{point1}}, B{C{point2}} or B{C{equidistant}}.
|
|
685
680
|
|
|
686
|
-
@raise ValueError: Datum or ellipsoid of B{C{point1}} or B{C{point2}} is
|
|
687
|
-
|
|
681
|
+
@raise ValueError: Datum or ellipsoid of B{C{point1}} or B{C{point2}} is incompatible
|
|
682
|
+
or no convergence for the given B{C{tol}}.
|
|
688
683
|
|
|
689
684
|
@see: I{Karney}'s U{intercept.cpp<https://SourceForge.net/p/geographiclib/
|
|
690
685
|
discussion/1026621/thread/21aaff9f/>}, U{The B{ellipsoidal} case<https://
|
|
@@ -726,15 +721,9 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
726
721
|
@raise ParseError: Invalid B{C{strllh}}.
|
|
727
722
|
'''
|
|
728
723
|
a, b, h = _MODS.dms.parse3llh(strllh, height=height, sep=sep, wrap=wrap)
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
r.datum = datum
|
|
733
|
-
if epoch not in (None, self.epoch):
|
|
734
|
-
r.epoch = epoch
|
|
735
|
-
if reframe not in (None, self.reframe):
|
|
736
|
-
r.reframe = reframe
|
|
737
|
-
return self._xnamed(r, force=True, **name) if name else r
|
|
724
|
+
return self.classof(a, b, height=h, datum=datum or self.datum,
|
|
725
|
+
epoch=epoch or self.epoch,
|
|
726
|
+
reframe=reframe or self.reframe, **name)
|
|
738
727
|
|
|
739
728
|
def _Radjust2(self, adjust, datum, meter_text2):
|
|
740
729
|
'''(INTERNAL) Adjust an C{elevation} or C{geoidHeight} with
|
|
@@ -745,7 +734,7 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
745
734
|
'''
|
|
746
735
|
if adjust: # Elevation2Tuple or GeoidHeight2Tuple
|
|
747
736
|
m, t = meter_text2
|
|
748
|
-
if isinstance(m, float) and fabs(m) > EPS:
|
|
737
|
+
if isinstance(m, float) and fabs(m) > EPS: # PYCHOK no cover
|
|
749
738
|
n = Datums.NAD83.ellipsoid.rocGauss(self.lat)
|
|
750
739
|
if n > EPS0:
|
|
751
740
|
# use ratio, datum and NAD83 units may differ
|
|
@@ -809,9 +798,9 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
809
798
|
converted height (C{meter}).
|
|
810
799
|
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
811
800
|
|
|
812
|
-
@return: The converted point (
|
|
813
|
-
|
|
814
|
-
|
|
801
|
+
@return: The converted point (this C{LatLon}) or a copy
|
|
802
|
+
of this point if B{C{datum2}} matches this
|
|
803
|
+
point's C{datum}.
|
|
815
804
|
|
|
816
805
|
@raise TypeError: Invalid B{C{datum2}}.
|
|
817
806
|
'''
|
|
@@ -934,9 +923,9 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
934
923
|
@kwarg pole: Optional top/center of (stereographic)
|
|
935
924
|
projection (C{str}, 'N[orth]' or 'S[outh]').
|
|
936
925
|
@kwarg falsed: False easting and northing (C{bool}).
|
|
937
|
-
@kwarg center: If C{True}, I{un}-center the UPS
|
|
938
|
-
|
|
939
|
-
|
|
926
|
+
@kwarg center: If C{True}, I{un}-center the UPS to its
|
|
927
|
+
C{lowerleft} (C{bool}) or by C{B{center}
|
|
928
|
+
meter} (C{scalar}).
|
|
940
929
|
|
|
941
930
|
@return: The UPS coordinate (L{Ups}).
|
|
942
931
|
|
|
@@ -953,9 +942,9 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
953
942
|
def toUtm(self, center=False):
|
|
954
943
|
'''Convert this C{LatLon} point to a UTM coordinate.
|
|
955
944
|
|
|
956
|
-
@kwarg center: If C{True}, I{un}-center the UTM
|
|
957
|
-
|
|
958
|
-
|
|
945
|
+
@kwarg center: If C{True}, I{un}-center the UTM to its
|
|
946
|
+
C{lowerleft} (C{bool}) or by C{B{center}
|
|
947
|
+
meter} (C{scalar}).
|
|
959
948
|
|
|
960
949
|
@return: The UTM coordinate (L{Utm}).
|
|
961
950
|
|
|
@@ -1004,11 +993,11 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
1004
993
|
return _MODS.namedTuples.Vector3Tuple(r.x, r.y, r.z, name=self.name)
|
|
1005
994
|
|
|
1006
995
|
def triangulate(self, bearing1, other, bearing2, **height_wrap_tol):
|
|
1007
|
-
'''I{Iteratively} locate a point given this, an other point and
|
|
1008
|
-
|
|
996
|
+
'''I{Iteratively} locate a point given this, an other point and a bearing
|
|
997
|
+
from North at each point.
|
|
1009
998
|
|
|
1010
999
|
@arg bearing1: Bearing at this point (compass C{degrees360}).
|
|
1011
|
-
@arg other:
|
|
1000
|
+
@arg other: The other point (C{LatLon}).
|
|
1012
1001
|
@arg bearing2: Bearing at the B{C{other}} point (compass C{degrees360}).
|
|
1013
1002
|
@kwarg height_wrap_tol: Optional keyword arguments C{B{height}=None},
|
|
1014
1003
|
C{B{wrap}=False} and C{B{tol}}, see method L{intersection3
|
|
@@ -1026,44 +1015,40 @@ class LatLonEllipsoidalBase(LatLonBase):
|
|
|
1026
1015
|
|
|
1027
1016
|
def trilaterate5(self, distance1, point2, distance2, point3, distance3,
|
|
1028
1017
|
area=True, eps=EPS1, wrap=False):
|
|
1029
|
-
'''Trilaterate three points by I{area overlap} or I{perimeter
|
|
1030
|
-
|
|
1018
|
+
'''Trilaterate three points by I{area overlap} or I{perimeter intersection}
|
|
1019
|
+
of three intersecting circles.
|
|
1031
1020
|
|
|
1032
|
-
@arg distance1: Distance to this point (C{meter}), same units
|
|
1033
|
-
as B{C{eps}}).
|
|
1021
|
+
@arg distance1: Distance to this point (C{meter}), same units as B{C{eps}}).
|
|
1034
1022
|
@arg point2: Second center point (C{LatLon}).
|
|
1035
|
-
@arg distance2: Distance to point2 (C{meter}, same units as
|
|
1036
|
-
B{C{eps}}).
|
|
1023
|
+
@arg distance2: Distance to point2 (C{meter}, same units as B{C{eps}}).
|
|
1037
1024
|
@arg point3: Third center point (C{LatLon}).
|
|
1038
|
-
@arg distance3: Distance to point3 (C{meter}, same units as
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
(C{meter}, conventionally).
|
|
1025
|
+
@arg distance3: Distance to point3 (C{meter}, same units as B{C{eps}}).
|
|
1026
|
+
@kwarg area: If C{True}, compute the area overlap, otherwise the perimeter
|
|
1027
|
+
intersection of the circles (C{bool}).
|
|
1028
|
+
@kwarg eps: The required I{minimal overlap} for C{B{area}=True} or the
|
|
1029
|
+
I{intersection margin} for C{B{area}=False} (C{meter},
|
|
1030
|
+
conventionally).
|
|
1045
1031
|
@kwarg wrap: If C{True}, wrap or I{normalize} and unroll B{C{point2}}
|
|
1046
1032
|
and B{C{point3}} (C{bool}).
|
|
1047
1033
|
|
|
1048
|
-
@return: A L{Trilaterate5Tuple}C{(min, minPoint, max, maxPoint, n)}
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1034
|
+
@return: A L{Trilaterate5Tuple}C{(min, minPoint, max, maxPoint, n)} with
|
|
1035
|
+
C{min} and C{max} in C{meter}, same units as B{C{eps}}, the
|
|
1036
|
+
corresponding trilaterated points C{minPoint} and C{maxPoint}
|
|
1037
|
+
as I{ellipsoidal} C{LatLon} and C{n}, the number of trilatered
|
|
1038
|
+
points found for the given B{C{eps}}.
|
|
1053
1039
|
|
|
1054
|
-
If only a single trilaterated point is found, C{min I{is}
|
|
1055
|
-
|
|
1040
|
+
If only a single trilaterated point is found, C{min I{is} max},
|
|
1041
|
+
C{minPoint I{is} maxPoint} and C{n=1}.
|
|
1056
1042
|
|
|
1057
|
-
|
|
1058
|
-
respectively
|
|
1043
|
+
If C{B{area}=False}, C{min} and C{max} represent the nearest
|
|
1044
|
+
respectively farthest intersection margin.
|
|
1059
1045
|
|
|
1060
|
-
|
|
1061
|
-
|
|
1046
|
+
If C{B{area}=True}, C{min} and C{max} are the smallest respectively
|
|
1047
|
+
largest I{radial} overlap found.
|
|
1062
1048
|
|
|
1063
|
-
If C{B{area}=True} and all 3 circles are concentric, C{n=0}
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
largest B{C{distance#}}.
|
|
1049
|
+
If C{B{area}=True} and all 3 circles are concentric, C{n=0} and
|
|
1050
|
+
C{minPoint} and C{maxPoint} are the B{C{point#}} with the smallest
|
|
1051
|
+
B{C{distance#}} C{min} respectively largest B{C{distance#}} C{max}.
|
|
1067
1052
|
|
|
1068
1053
|
@raise IntersectionError: Trilateration failed for the given B{C{eps}},
|
|
1069
1054
|
insufficient overlap for C{B{area}=True}, no
|
|
@@ -1163,7 +1148,7 @@ __all__ += _ALL_DOCS(CartesianEllipsoidalBase, LatLonEllipsoidalBase)
|
|
|
1163
1148
|
|
|
1164
1149
|
# **) MIT License
|
|
1165
1150
|
#
|
|
1166
|
-
# Copyright (C) 2016-
|
|
1151
|
+
# Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
|
|
1167
1152
|
#
|
|
1168
1153
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
1169
1154
|
# copy of this software and associated documentation files (the "Software"),
|