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/frechet.py CHANGED
@@ -3,21 +3,19 @@
3
3
 
4
4
  u'''Fréchet distances.
5
5
 
6
- Classes L{Frechet}, L{FrechetDegrees}, L{FrechetRadians},
7
- L{FrechetCosineAndoyerLambert}, L{FrechetCosineForsytheAndoyerLambert},
8
- L{FrechetCosineLaw}, L{FrechetDistanceTo}< L{FrechetEquirectangular},
9
- L{FrechetEuclidean}, L{FrechetExact}, L{FrechetFlatLocal}, L{FrechetFlatPolar},
10
- L{FrechetHaversine}, L{FrechetHubeny}, L{FrechetKarney}, L{FrechetThomas}
11
- and L{FrechetVincentys} to compute I{discrete} U{Fréchet
12
- <https://WikiPedia.org/wiki/Frechet_distance>} distances between two sets
13
- of C{LatLon}, C{NumPy}, C{tuples} or other types of points.
6
+ Classes L{Frechet}, L{FrechetDegrees}, L{FrechetRadians}, L{FrechetCosineLaw},
7
+ L{FrechetDistanceTo}, L{FrechetEquirectangular}, L{FrechetEuclidean},
8
+ L{FrechetExact}, L{FrechetFlatLocal}, L{FrechetFlatPolar}, L{FrechetHaversine},
9
+ L{FrechetHubeny}, L{FrechetKarney}, L{FrechetThomas} and L{FrechetVincentys}
10
+ to compute I{discrete} U{Fréchet<https://WikiPedia.org/wiki/Frechet_distance>}
11
+ distances between two sets of C{LatLon}, C{NumPy}, C{tuples} or other types of points.
14
12
 
15
13
  Only L{FrechetDistanceTo} -iff used with L{ellipsoidalKarney.LatLon}
16
14
  points- and L{FrechetKarney} requires installation of I{Charles Karney}'s
17
15
  U{geographiclib<https://PyPI.org/project/geographiclib>}.
18
16
 
19
- Typical usage is as follows. First, create a C{Frechet} calculator
20
- from one set of C{LatLon} points.
17
+ Typical usage is as follows. First, create a C{Frechet} calculator from one
18
+ set of C{LatLon} points.
21
19
 
22
20
  C{f = FrechetXyz(point1s, ...)}
23
21
 
@@ -101,7 +99,7 @@ from collections import defaultdict as _defaultdict
101
99
  # from math import radians # from .points
102
100
 
103
101
  __all__ = _ALL_LAZY.frechet
104
- __version__ = '24.06.15'
102
+ __version__ = '24.12.31'
105
103
 
106
104
 
107
105
  def _fraction(fraction, n):
@@ -381,7 +379,7 @@ class _FrechetMeterRadians(Frechet):
381
379
  return self._discrete(point2s, fraction, _formy._radistance(self))
382
380
 
383
381
  @Property
384
- def _func_(self):
382
+ def _func_(self): # see _formy._radistance
385
383
  '''(INTERNAL) I{Must be overloaded}.'''
386
384
  self._notOverloaded(**self.kwds)
387
385
 
@@ -390,67 +388,22 @@ class _FrechetMeterRadians(Frechet):
390
388
  return _formy._Propy(func, 3, self.kwds)
391
389
 
392
390
 
393
- class FrechetCosineAndoyerLambert(_FrechetMeterRadians):
394
- '''Compute the C{Frechet} distance based on the I{angular} distance
395
- in C{radians} from function L{pygeodesy.cosineAndoyerLambert}.
396
- '''
397
- def __init__(self, point1s, **fraction_name__datum_wrap):
398
- '''New L{FrechetCosineAndoyerLambert} calculator/interpolator.
399
-
400
- @kwarg fraction_name__datum_wrap: Optional C{B{fraction}=None}
401
- and C{B{name}=NN} and keyword arguments for
402
- function L{pygeodesy.cosineAndoyerLambert}.
403
-
404
- @see: L{Frechet.__init__} for details about B{C{point1s}},
405
- B{C{fraction}}, B{C{name}} and other exceptions.
406
- '''
407
- Frechet.__init__(self, point1s, **fraction_name__datum_wrap)
408
- self._func = _formy.cosineAndoyerLambert
409
- self._func_ = _formy.cosineAndoyerLambert_
410
-
411
- if _FOR_DOCS:
412
- discrete = Frechet.discrete
413
-
414
-
415
- class FrechetCosineForsytheAndoyerLambert(_FrechetMeterRadians):
416
- '''Compute the C{Frechet} distance based on the I{angular} distance
417
- in C{radians} from function L{pygeodesy.cosineForsytheAndoyerLambert}.
418
- '''
419
- def __init__(self, point1s, **fraction_name__datum_wrap):
420
- '''New L{FrechetCosineForsytheAndoyerLambert} calculator/interpolator.
421
-
422
- @kwarg fraction_name__datum_wrap: Optional C{B{fraction}=None} and
423
- C{B{name}=NN} and keyword arguments for function
424
- L{pygeodesy.cosineForsytheAndoyerLambert}.
425
-
426
- @see: L{Frechet.__init__} for details about B{C{point1s}},
427
- B{C{fraction}}, B{C{name}} and other exceptions.
428
- '''
429
- Frechet.__init__(self, point1s, **fraction_name__datum_wrap)
430
- self._func = _formy.cosineForsytheAndoyerLambert
431
- self._func_ = _formy.cosineForsytheAndoyerLambert_
432
-
433
- if _FOR_DOCS:
434
- discrete = Frechet.discrete
435
-
436
-
437
391
  class FrechetCosineLaw(_FrechetMeterRadians):
438
- '''Compute the C{Frechet} distance based on the I{angular} distance
439
- in C{radians} from function L{pygeodesy.cosineLaw}.
392
+ '''Compute the C{Frechet} distance with functionn L{pygeodesy.cosineLaw}.
440
393
 
441
394
  @note: See note at function L{pygeodesy.vincentys_}.
442
395
  '''
443
- def __init__(self, point1s, **fraction_name__radius_wrap):
396
+ def __init__(self, point1s, **fraction_name__corr_earth_wrap):
444
397
  '''New L{FrechetCosineLaw} calculator/interpolator.
445
398
 
446
- @kwarg fraction_name__radius_wrap: Optional C{B{fraction}=None}
447
- and C{B{name}=NN} and keyword arguments
448
- for function L{pygeodesy.cosineLaw}.
399
+ @kwarg fraction_name__corr_earth_wrap: Optional
400
+ C{B{fraction}=None} and C{B{name}=NN} and keyword
401
+ arguments for function L{pygeodesy.cosineLaw}.
449
402
 
450
403
  @see: L{Frechet.__init__} for details about B{C{point1s}},
451
404
  B{C{fraction}}, B{C{name}} and other exceptions.
452
405
  '''
453
- Frechet.__init__(self, point1s, **fraction_name__radius_wrap)
406
+ Frechet.__init__(self, point1s, **fraction_name__corr_earth_wrap)
454
407
  self._func = _formy.cosineLaw
455
408
  self._func_ = _formy.cosineLaw_
456
409
 
@@ -459,8 +412,7 @@ class FrechetCosineLaw(_FrechetMeterRadians):
459
412
 
460
413
 
461
414
  class FrechetDistanceTo(Frechet): # FrechetMeter
462
- '''Compute the C{Frechet} distance based on the distance from the
463
- point1s' C{LatLon.distanceTo} method, conventionally in C{meter}.
415
+ '''Compute the C{Frechet} distance with the point1s' C{LatLon.distanceTo} method.
464
416
  '''
465
417
  _units = _unitsBase._Str_meter
466
418
 
@@ -495,8 +447,7 @@ class FrechetDistanceTo(Frechet): # FrechetMeter
495
447
 
496
448
 
497
449
  class FrechetEquirectangular(Frechet):
498
- '''Compute the C{Frechet} distance based on the I{equirectangular}
499
- distance in C{radians squared} like function L{pygeodesy.equirectangular}.
450
+ '''Compute the C{Frechet} distance with function L{pygeodesy.equirectangular}.
500
451
  '''
501
452
  _units = _unitsBase._Str_radians2
502
453
 
@@ -520,8 +471,7 @@ class FrechetEquirectangular(Frechet):
520
471
 
521
472
 
522
473
  class FrechetEuclidean(_FrechetMeterRadians):
523
- '''Compute the C{Frechet} distance based on the I{Euclidean}
524
- distance in C{radians} from function L{pygeodesy.euclidean}.
474
+ '''Compute the C{Frechet} distance with function L{pygeodesy.euclidean}.
525
475
  '''
526
476
  def __init__(self, point1s, **fraction_name__adjust_radius_wrap): # was=True
527
477
  '''New L{FrechetEuclidean} calculator/interpolator.
@@ -542,8 +492,7 @@ class FrechetEuclidean(_FrechetMeterRadians):
542
492
 
543
493
 
544
494
  class FrechetExact(Frechet):
545
- '''Compute the C{Frechet} distance based on the I{angular} distance
546
- in C{degrees} from method L{GeodesicExact}C{.Inverse}.
495
+ '''Compute the C{Frechet} distance with method L{GeodesicExact}C{.Inverse}.
547
496
  '''
548
497
  _units = _unitsBase._Str_degrees
549
498
 
@@ -571,8 +520,7 @@ class FrechetExact(Frechet):
571
520
 
572
521
 
573
522
  class FrechetFlatLocal(_FrechetMeterRadians):
574
- '''Compute the C{Frechet} distance based on the I{angular} distance in
575
- C{radians squared} like function L{pygeodesy.flatLocal_}/L{pygeodesy.hubeny}.
523
+ '''Compute the C{Frechet} distance with function L{pygeodesy.flatLocal_}/L{pygeodesy.hubeny}.
576
524
  '''
577
525
  _units_ = _unitsBase._Str_radians2 # see L{flatLocal_}
578
526
 
@@ -597,8 +545,7 @@ class FrechetFlatLocal(_FrechetMeterRadians):
597
545
 
598
546
 
599
547
  class FrechetFlatPolar(_FrechetMeterRadians):
600
- '''Compute the C{Frechet} distance based on the I{angular} distance
601
- in C{radians} from function L{flatPolar_}.
548
+ '''Compute the C{Frechet} distance with function L{flatPolar_}.
602
549
  '''
603
550
  def __init__(self, point1s, **fraction_name__radius_wrap):
604
551
  '''New L{FrechetFlatPolar} calculator/interpolator.
@@ -619,8 +566,7 @@ class FrechetFlatPolar(_FrechetMeterRadians):
619
566
 
620
567
 
621
568
  class FrechetHaversine(_FrechetMeterRadians):
622
- '''Compute the C{Frechet} distance based on the I{angular}
623
- distance in C{radians} from function L{pygeodesy.haversine_}.
569
+ '''Compute the C{Frechet} distance with function L{pygeodesy.haversine_}.
624
570
 
625
571
  @note: See note at function L{pygeodesy.vincentys_}.
626
572
  '''
@@ -651,11 +597,10 @@ class FrechetHubeny(FrechetFlatLocal): # for Karl Hubeny
651
597
 
652
598
 
653
599
  class FrechetKarney(Frechet):
654
- '''Compute the C{Frechet} distance based on the I{angular}
655
- distance in C{degrees} from I{Karney}'s U{geographiclib
600
+ '''Compute the C{Frechet} distance with I{Karney}'s U{geographiclib
656
601
  <https://PyPI.org/project/geographiclib>} U{geodesic.Geodesic
657
- <https://GeographicLib.SourceForge.io/Python/doc/code.html>}
658
- C{Inverse} method.
602
+ <https://GeographicLib.SourceForge.io/Python/doc/code.html>}C{.Inverse}
603
+ method.
659
604
  '''
660
605
  _units = _unitsBase._Str_degrees
661
606
 
@@ -686,8 +631,7 @@ class FrechetKarney(Frechet):
686
631
 
687
632
 
688
633
  class FrechetThomas(_FrechetMeterRadians):
689
- '''Compute the C{Frechet} distance based on the I{angular} distance
690
- in C{radians} from function L{pygeodesy.thomas_}.
634
+ '''Compute the C{Frechet} distance with function L{pygeodesy.thomas_}.
691
635
  '''
692
636
  def __init__(self, point1s, **fraction_name__datum_wrap):
693
637
  '''New L{FrechetThomas} calculator/interpolator.
@@ -708,8 +652,7 @@ class FrechetThomas(_FrechetMeterRadians):
708
652
 
709
653
 
710
654
  class FrechetVincentys(_FrechetMeterRadians):
711
- '''Compute the C{Frechet} distance based on the I{angular}
712
- distance in C{radians} from function L{pygeodesy.vincentys_}.
655
+ '''Compute the C{Frechet} distance with function L{pygeodesy.vincentys_}.
713
656
 
714
657
  @note: See note at function L{pygeodesy.vincentys_}.
715
658
  '''
pygeodesy/geodesici.py CHANGED
@@ -28,8 +28,8 @@ from __future__ import division as _; del _ # PYCHOK semicolon
28
28
  from pygeodesy.basics import _copy, _enumereverse, map1, \
29
29
  _xinstanceof, _xor
30
30
  from pygeodesy.constants import EPS, INF, INT0, PI, PI2, PI_4, \
31
- _0_0, _0_5, _1_0, _1_5, _2_0, \
32
- _3_0, _64_0, _90_0, isfinite, \
31
+ _0_0, _0_5, _1_0, _1_5, _2_0, _3_0, \
32
+ _45_0, _64_0, _90_0, isfinite, \
33
33
  _EPSjam # PYCHOK used!
34
34
  from pygeodesy.ellipsoids import _EWGS84, Fmt, unstr
35
35
  from pygeodesy.errors import GeodesicError, IntersectionError, _an, \
@@ -56,7 +56,7 @@ from pygeodesy.utily import atan2, sincos2, fabs, radians
56
56
  # from math import ceil as _ceil, fabs, radians # .fsums, .utily
57
57
 
58
58
  __all__ = _ALL_LAZY.geodesici
59
- __version__ = '24.11.24'
59
+ __version__ = '24.12.22'
60
60
 
61
61
  _0t = 0, # int
62
62
  _1_1t = -1, +1
@@ -1214,7 +1214,7 @@ class Intersector(_IntersectBase):
1214
1214
  return X if X is None else self._In5T(glA, glB, X, X)
1215
1215
 
1216
1216
  def _obliqDist4(self):
1217
- zx = 45.0
1217
+ zx = _45_0
1218
1218
  if self.f:
1219
1219
  _abs, _cjD5 = fabs, self._conjDist5
1220
1220
 
@@ -23,7 +23,7 @@ from pygeodesy.karney import Caps, GeodesicError
23
23
  from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY
24
24
 
25
25
  __all__ = _ALL_LAZY.geodesicx + _ALL_DOCS(Caps, GeodesicError)
26
- __version__ = '24.11.02'
26
+ __version__ = '24.12.31'
27
27
 
28
28
  # **) MIT License
29
29
  #
@@ -5,7 +5,7 @@ u'''Print L{geodesicx} version, etc. using C{python -m pygeodesy.geodesicx}.
5
5
  '''
6
6
 
7
7
  __all__ = ()
8
- __version__ = '24.09.06'
8
+ __version__ = '24.12.31'
9
9
 
10
10
 
11
11
  def _main(**C4order): # PYCHOK no cover
@@ -23,11 +23,10 @@ def _main(**C4order): # PYCHOK no cover
23
23
  gX = GeodesicExact(**C4order)
24
24
  cs = geodesicx.gx._C4coeffs(gX.C4order)
25
25
  n = len(cs)
26
- u = n if numpy else len(set(cs))
27
- z = cs.nbytes if numpy else _sizeof(cs)
26
+ u = n if numpy else len(set(cs))
28
27
  p = dict(C4order=gX.C4order, C4n=n, C4u=u,
29
28
  C4u_n=_fper(u, n), C4x=len(gX._C4x),
30
- C4t=type(cs).__name__, C4z=z)
29
+ C4t=type(cs).__name__, C4z=_sizeof(cs))
31
30
  p = list(_EQUAL_(*t) for t in p.items())
32
31
  if numpy:
33
32
  p.append(_name_version(numpy))