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/latlonBase.py CHANGED
@@ -20,7 +20,7 @@ from pygeodesy.dms import F_D, F_DMS, latDMS, lonDMS, parse3llh
20
20
  from pygeodesy.errors import _AttributeError, IntersectionError, \
21
21
  _incompatible, _IsnotError, _TypeError, \
22
22
  _ValueError, _xattr, _xdatum, _xError, \
23
- _xkwds, _xkwds_item2, _xkwds_not
23
+ _xkwds, _xkwds_get, _xkwds_item2, _xkwds_not
24
24
  # from pygeodesy.fmath import favg # _MODS
25
25
  # from pygeodesy.formy import antipode, compassAngle, cosineAndoyerLambert_, \
26
26
  # cosineForsytheAndoyerLambert_, cosineLaw, \
@@ -53,7 +53,7 @@ from contextlib import contextmanager
53
53
  from math import asin, cos, degrees, fabs, radians
54
54
 
55
55
  __all__ = _ALL_LAZY.latlonBase
56
- __version__ = '24.12.06'
56
+ __version__ = '24.12.31'
57
57
 
58
58
  _formy = _MODS.into(formy=__name__)
59
59
 
@@ -72,8 +72,8 @@ class LatLonBase(_NamedBase, _NamedLocal):
72
72
 
73
73
  @arg lat_llh: Latitude (C{degrees} or DMS C{str} with N or S suffix) or
74
74
  a previous C{LatLon} instance provided C{B{lon}=None}.
75
- @kwarg lon: Longitude (C{degrees} or DMS C{str} with E or W suffix) or
76
- C(None), indicating B{C{lat_llh}} is a C{LatLon}.
75
+ @kwarg lon: Longitude (C{degrees} or DMS C{str} with E or W suffix),
76
+ required if B{C{lat_llh}} is C{degrees} or C{str}.
77
77
  @kwarg height: Optional height above (or below) the earth surface
78
78
  (C{meter}, conventionally).
79
79
  @kwarg datum: Optional datum (L{Datum}, L{Ellipsoid}, L{Ellipsoid2},
@@ -362,67 +362,39 @@ class LatLonBase(_NamedBase, _NamedLocal):
362
362
  p = self.others(other)
363
363
  return _formy.compassAngle(self.lat, self.lon, p.lat, p.lon, **adjust_wrap)
364
364
 
365
+ @deprecated_method
365
366
  def cosineAndoyerLambertTo(self, other, **wrap):
366
- '''Compute the distance between this and an other point using the U{Andoyer-Lambert correction<https://
367
- navlib.net/wp-content/uploads/2013/10/admiralty-manual-of-navigation-vol-1-1964-english501c.pdf>}
368
- of the U{Law of Cosines<https://www.Movable-Type.co.UK/scripts/latlong.html#cosine-law>} formula.
369
-
370
- @arg other: The other point (C{LatLon}).
371
- @kwarg wrap: Optional keyword argument C{B{wrap}=False}, if C{True}, wrap or I{normalize}
372
- and unroll the B{C{other}} point (C{bool}).
373
-
374
- @return: Distance (C{meter}, same units as the axes of this point's datum ellipsoid).
375
-
376
- @raise TypeError: The B{C{other}} point is not C{LatLon}.
377
-
378
- @see: Function L{pygeodesy.cosineAndoyerLambert} and methods
379
- L{cosineForsytheAndoyerLambertTo}, L{cosineLawTo},
380
- C{distanceTo*}, L{equirectangularTo}, L{euclideanTo},
381
- L{flatLocalTo}/L{hubenyTo}, L{flatPolarTo}, L{haversineTo},
382
- L{thomasTo} and L{vincentysTo}.
383
- '''
384
- return self._distanceTo_(_formy.cosineAndoyerLambert_, other, **wrap)
367
+ '''DEPRECATED on 2024.12.31, use method L{cosineLawTo} with C{B{corr}=1}.'''
368
+ return self.cosineLawTo(other, corr=1, **wrap)
385
369
 
370
+ @deprecated_method
386
371
  def cosineForsytheAndoyerLambertTo(self, other, **wrap):
387
- '''Compute the distance between this and an other point using the U{Forsythe-Andoyer-Lambert
388
- correction<https://www2.UNB.Ca/gge/Pubs/TR77.pdf>} of the U{Law of Cosines
389
- <https://www.Movable-Type.co.UK/scripts/latlong.html#cosine-law>} formula.
372
+ '''DEPRECATED on 2024.12.31, use method L{cosineLawTo} with C{B{corr}=2}.'''
373
+ return self.cosineLawTo(other, corr=2, **wrap)
390
374
 
391
- @arg other: The other point (C{LatLon}).
392
- @kwarg wrap: Optional keyword argument C{B{wrap}=False}, if C{True}, wrap or I{normalize}
393
- and unroll the B{C{other}} point (C{bool}).
394
-
395
- @return: Distance (C{meter}, same units as the axes of this point's datum ellipsoid).
396
-
397
- @raise TypeError: The B{C{other}} point is not C{LatLon}.
398
-
399
- @see: Function L{pygeodesy.cosineForsytheAndoyerLambert} and methods
400
- L{cosineAndoyerLambertTo}, L{cosineLawTo}, C{distanceTo*},
401
- L{equirectangularTo}, L{euclideanTo}, L{flatLocalTo}/L{hubenyTo},
402
- L{flatPolarTo}, L{haversineTo}, L{thomasTo} and L{vincentysTo}.
403
- '''
404
- return self._distanceTo_(_formy.cosineForsytheAndoyerLambert_, other, **wrap)
405
-
406
- def cosineLawTo(self, other, radius=None, **wrap):
407
- '''Compute the distance between this and an other point using the U{spherical Law of
408
- Cosines<https://www.Movable-Type.co.UK/scripts/latlong.html#cosine-law>} formula.
375
+ def cosineLawTo(self, other, **radius__corr_wrap):
376
+ '''Compute the distance between this and an other point using the U{Law of
377
+ Cosines<https://www.Movable-Type.co.UK/scripts/latlong.html#cosine-law>}
378
+ formula, optionally corrected.
409
379
 
410
380
  @arg other: The other point (C{LatLon}).
411
- @kwarg radius: Mean earth radius (C{meter}) or C{None} for the mean radius of this
412
- point's datum ellipsoid.
413
- @kwarg wrap: Optional keyword argument C{B{wrap}=False}, if C{True}, wrap or
414
- I{normalize} and unroll the B{C{other}} point (C{bool}).
381
+ @kwarg radius__corr_wrap: Optional earth C{B{radius}=None} (C{meter}),
382
+ overriding the equatorial or mean radius of this point's
383
+ datum's ellipsoid and keyword arguments for function
384
+ L{pygeodesy.cosineLaw}.
415
385
 
416
386
  @return: Distance (C{meter}, same units as B{C{radius}}).
417
387
 
418
388
  @raise TypeError: The B{C{other}} point is not C{LatLon}.
419
389
 
420
- @see: Function L{pygeodesy.cosineLaw} and methods L{cosineAndoyerLambertTo},
421
- L{cosineForsytheAndoyerLambertTo}, C{distanceTo*}, L{equirectangularTo},
422
- L{euclideanTo}, L{flatLocalTo}/L{hubenyTo}, L{flatPolarTo},
423
- L{haversineTo}, L{thomasTo} and L{vincentysTo}.
390
+ @see: Function L{pygeodesy.cosineLaw} and methods C{distanceTo*},
391
+ L{equirectangularTo}, L{euclideanTo}, L{flatLocalTo} /
392
+ L{hubenyTo}, L{flatPolarTo}, L{haversineTo}, L{thomasTo} and
393
+ L{vincentysTo}.
424
394
  '''
425
- return self._distanceTo(_formy.cosineLaw, other, radius, **wrap)
395
+ c = _xkwds_get(radius__corr_wrap, corr=0)
396
+ return self._distanceTo_(_formy.cosineLaw_, other, **radius__corr_wrap) if c else \
397
+ self._distanceTo( _formy.cosineLaw, other, **radius__corr_wrap)
426
398
 
427
399
  @property_RO
428
400
  def datum(self): # PYCHOK no cover
@@ -450,19 +422,18 @@ class LatLonBase(_NamedBase, _NamedLocal):
450
422
  def _distanceTo(self, func, other, radius=None, **kwds):
451
423
  '''(INTERNAL) Helper for distance methods C{<func>To}.
452
424
  '''
453
- p, r = self.others(other, up=2), radius
454
- if r is None:
455
- r = self._datum.ellipsoid.R1 if self._datum else R_M
456
- return func(self.lat, self.lon, p.lat, p.lon, radius=r, **kwds)
425
+ p = self.others(other, up=2)
426
+ R = radius or (self._datum.ellipsoid.R1 if self._datum else R_M)
427
+ return func(self.lat, self.lon, p.lat, p.lon, radius=R, **kwds)
457
428
 
458
- def _distanceTo_(self, func_, other, wrap=False, radius=None):
429
+ def _distanceTo_(self, func_, other, wrap=False, radius=None, **kwds):
459
430
  '''(INTERNAL) Helper for (ellipsoidal) distance methods C{<func>To}.
460
431
  '''
461
432
  p = self.others(other, up=2)
462
- D = self.datum
433
+ D = self.datum or _spherical_datum(radius or R_M, func_)
463
434
  lam21, phi2, _ = _Wrap.philam3(self.lam, p.phi, p.lam, wrap)
464
- r = func_(phi2, self.phi, lam21, datum=D)
465
- return r * (D.ellipsoid.a if radius is None else radius)
435
+ r = func_(phi2, self.phi, lam21, datum=D, **kwds)
436
+ return r * (radius or D.ellipsoid.a)
466
437
 
467
438
  @Property_RO
468
439
  def _Ecef_forward(self):
@@ -511,10 +482,9 @@ class LatLonBase(_NamedBase, _NamedLocal):
511
482
 
512
483
  @raise TypeError: The B{C{other}} point is not C{LatLon}.
513
484
 
514
- @see: Function L{pygeodesy.equirectangular} and methods L{cosineAndoyerLambertTo},
515
- L{cosineForsytheAndoyerLambertTo}, L{cosineLawTo}, C{distanceTo*},
516
- C{euclideanTo}, L{flatLocalTo}/L{hubenyTo}, L{flatPolarTo},
517
- L{haversineTo}, L{thomasTo} and L{vincentysTo}.
485
+ @see: Function L{pygeodesy.equirectangular} and methods L{cosineLawTo},
486
+ C{distanceTo*}, C{euclideanTo}, L{flatLocalTo} / L{hubenyTo},
487
+ L{flatPolarTo}, L{haversineTo}, L{thomasTo} and L{vincentysTo}.
518
488
  '''
519
489
  return self._distanceTo(_formy.equirectangular, other, **radius_adjust_limit_wrap)
520
490
 
@@ -533,9 +503,8 @@ class LatLonBase(_NamedBase, _NamedLocal):
533
503
 
534
504
  @raise TypeError: The B{C{other}} point is not C{LatLon}.
535
505
 
536
- @see: Function L{pygeodesy.euclidean} and methods L{cosineAndoyerLambertTo},
537
- L{cosineForsytheAndoyerLambertTo}, L{cosineLawTo}, C{distanceTo*},
538
- L{equirectangularTo}, L{flatLocalTo}/L{hubenyTo}, L{flatPolarTo},
506
+ @see: Function L{pygeodesy.euclidean} and methods L{cosineLawTo}, C{distanceTo*},
507
+ L{equirectangularTo}, L{flatLocalTo} / L{hubenyTo}, L{flatPolarTo},
539
508
  L{haversineTo}, L{thomasTo} and L{vincentysTo}.
540
509
  '''
541
510
  return self._distanceTo(_formy.euclidean, other, **radius_adjust_wrap)
@@ -558,11 +527,10 @@ class LatLonBase(_NamedBase, _NamedLocal):
558
527
 
559
528
  @raise ValueError: Invalid B{C{radius}}.
560
529
 
561
- @see: Function L{pygeodesy.flatLocal}/L{pygeodesy.hubeny}, methods
562
- L{cosineAndoyerLambertTo}, L{cosineForsytheAndoyerLambertTo},
563
- L{cosineLawTo}, C{distanceTo*}, L{equirectangularTo}, L{euclideanTo},
564
- L{flatPolarTo}, L{haversineTo}, L{thomasTo} and L{vincentysTo} and
565
- U{local, flat Earth approximation<https://www.edwilliams.org/avform.htm#flat>}.
530
+ @see: Function L{pygeodesy.flatLocal}/L{pygeodesy.hubeny}, methods L{cosineLawTo},
531
+ C{distanceTo*}, L{equirectangularTo}, L{euclideanTo}, L{flatPolarTo},
532
+ L{haversineTo}, L{thomasTo} and L{vincentysTo} and U{local, flat Earth
533
+ approximation<https://www.edwilliams.org/avform.htm#flat>}.
566
534
  '''
567
535
  r = radius if radius in (None, R_M, _1_0, 1) else Radius(radius)
568
536
  return self._distanceTo_(_formy.flatLocal_, other, radius=r, **wrap) # PYCHOK kwargs
@@ -583,9 +551,8 @@ class LatLonBase(_NamedBase, _NamedLocal):
583
551
 
584
552
  @raise TypeError: The B{C{other}} point is not C{LatLon}.
585
553
 
586
- @see: Function L{pygeodesy.flatPolar} and methods L{cosineAndoyerLambertTo},
587
- L{cosineForsytheAndoyerLambertTo}, L{cosineLawTo}, C{distanceTo*},
588
- L{equirectangularTo}, L{euclideanTo}, L{flatLocalTo}/L{hubenyTo},
554
+ @see: Function L{pygeodesy.flatPolar} and methods L{cosineLawTo}, C{distanceTo*},
555
+ L{equirectangularTo}, L{euclideanTo}, L{flatLocalTo} / L{hubenyTo},
589
556
  L{haversineTo}, L{thomasTo} and L{vincentysTo}.
590
557
  '''
591
558
  return self._distanceTo(_formy.flatPolar, other, **radius_wrap)
@@ -627,9 +594,8 @@ class LatLonBase(_NamedBase, _NamedLocal):
627
594
 
628
595
  @raise TypeError: The B{C{other}} point is not C{LatLon}.
629
596
 
630
- @see: Function L{pygeodesy.haversine} and methods L{cosineAndoyerLambertTo},
631
- L{cosineForsytheAndoyerLambertTo}, L{cosineLawTo}, C{distanceTo*},
632
- L{equirectangularTo}, L{euclideanTo}, L{flatLocalTo}/L{hubenyTo},
597
+ @see: Function L{pygeodesy.haversine} and methods L{cosineLawTo}, C{distanceTo*},
598
+ L{equirectangularTo}, L{euclideanTo}, L{flatLocalTo} / L{hubenyTo}, \
633
599
  L{flatPolarTo}, L{thomasTo} and L{vincentysTo}.
634
600
  '''
635
601
  return self._distanceTo(_formy.haversine, other, **radius_wrap)
@@ -1310,9 +1276,8 @@ class LatLonBase(_NamedBase, _NamedLocal):
1310
1276
 
1311
1277
  @raise TypeError: The B{C{other}} point is not C{LatLon}.
1312
1278
 
1313
- @see: Function L{pygeodesy.thomas} and methods L{cosineAndoyerLambertTo},
1314
- L{cosineForsytheAndoyerLambertTo}, L{cosineLawTo}, C{distanceTo*},
1315
- L{equirectangularTo}, L{euclideanTo}, L{flatLocalTo}/L{hubenyTo},
1279
+ @see: Function L{pygeodesy.thomas} and methods L{cosineLawTo}, C{distanceTo*},
1280
+ L{equirectangularTo}, L{euclideanTo}, L{flatLocalTo} / L{hubenyTo},
1316
1281
  L{flatPolarTo}, L{haversineTo} and L{vincentysTo}.
1317
1282
  '''
1318
1283
  return self._distanceTo_(_formy.thomas_, other, **wrap)
@@ -1323,8 +1288,8 @@ class LatLonBase(_NamedBase, _NamedLocal):
1323
1288
  return self.philam
1324
1289
 
1325
1290
  def toCartesian(self, height=None, Cartesian=None, **Cartesian_kwds):
1326
- '''Convert this point to cartesian, I{geocentric} coordinates, also known
1327
- as I{Earth-Centered, Earth-Fixed} (ECEF).
1291
+ '''Convert this point to cartesian, I{geocentric} coordinates, also known as
1292
+ I{Earth-Centered, Earth-Fixed} (ECEF).
1328
1293
 
1329
1294
  @kwarg height: Optional height, overriding this point's height (C{meter},
1330
1295
  conventionally).
@@ -1533,9 +1498,8 @@ class LatLonBase(_NamedBase, _NamedLocal):
1533
1498
 
1534
1499
  @raise TypeError: The B{C{other}} point is not C{LatLon}.
1535
1500
 
1536
- @see: Function L{pygeodesy.vincentys} and methods L{cosineAndoyerLambertTo},
1537
- L{cosineForsytheAndoyerLambertTo}, L{cosineLawTo}, C{distanceTo*},
1538
- L{equirectangularTo}, L{euclideanTo}, L{flatLocalTo}/L{hubenyTo},
1501
+ @see: Function L{pygeodesy.vincentys} and methods L{cosineLawTo}, C{distanceTo*},
1502
+ L{equirectangularTo}, L{euclideanTo}, L{flatLocalTo} / L{hubenyTo},
1539
1503
  L{flatPolarTo}, L{haversineTo} and L{thomasTo}.
1540
1504
  '''
1541
1505
  return self._distanceTo(_formy.vincentys, other, **_xkwds(radius_wrap, radius=None))
pygeodesy/lazily.py CHANGED
@@ -36,7 +36,7 @@ from pygeodesy.interns import NN, _attribute_, _by_, _COLONSPACE_, _COMMASPACE_,
36
36
  _doesn_t_exist_, _DOT_, _DUNDER_all_, _EQUALSPACED_, \
37
37
  _from_, _HASH_, _immutable_, _line_, _module_, _no_, \
38
38
  _not_, _or_, _pygeodesy_abspath_, _pygeodesy_, _sys, \
39
- _SUB_PACKAGES, _UNDER_, _version_, _intern # function
39
+ _SUB_PACKAGES, _UNDER_, _version_, _intern # function
40
40
  try:
41
41
  from importlib import import_module
42
42
  except ImportError as x: # Python 2.6-
@@ -184,10 +184,10 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
184
184
  'equidistant', 'gnomonic'),
185
185
  basics=_a('clips', 'copysign0', 'copytype', 'halfs2',
186
186
  'int1s', 'isbool', 'isCartesian', 'isclass', 'iscomplex', 'isDEPRECATED', 'isfloat',
187
- 'isidentifier', 'isinstanceof', 'isint', 'isiterable', 'isiterablen', 'iskeyword',
188
- 'isLatLon', 'islistuple', 'isNvector', 'isodd', 'isscalar', 'issequence', 'isstr',
189
- 'issubclassof', 'itemsorted',
190
- 'len2', 'map1', 'map2', 'neg', 'neg_',
187
+ 'isidentifier', 'isinstanceof', 'isint', 'isiterable', 'isiterablen', 'isiterabletype',
188
+ 'iskeyword', 'isLatLon', 'islistuple', 'isNvector', 'isodd',
189
+ 'isscalar', 'issequence', 'isstr', 'issubclassof', 'itemsorted',
190
+ 'len2', 'map1', 'map2', 'max2', 'min2', 'neg', 'neg_',
191
191
  'signBit', 'signOf', 'splice', 'str2ub', 'ub2str', 'unsigned0'),
192
192
  booleans=_a('BooleanFHP', 'BooleanGH', 'LatLonFHP', 'LatLonGH',
193
193
  'isBoolean'),
@@ -246,9 +246,8 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
246
246
  'hypot', 'hypot_', 'hypot1', 'hypot2', 'hypot2_',
247
247
  'norm2', 'norm_', 'sqrt0', 'sqrt3', 'sqrt_a', 'zcrt', 'zqrt'),
248
248
  formy=_a('Radical2Tuple',
249
- 'angle2chord', 'antipode', 'antipode_', 'bearing', 'bearing_', 'chord2angle',
250
- 'compassAngle', 'cosineForsytheAndoyerLambert', 'cosineForsytheAndoyerLambert_',
251
- 'cosineAndoyerLambert', 'cosineAndoyerLambert_', 'cosineLaw', 'cosineLaw_',
249
+ 'angle2chord', 'antipode', 'antipode_', 'bearing', 'bearing_',
250
+ 'chord2angle', 'compassAngle', 'cosineLaw', 'cosineLaw_',
252
251
  'equirectangular', 'equirectangular4', 'euclidean', 'euclidean_',
253
252
  'excessAbc_', 'excessCagnoli_', 'excessGirard_', 'excessLHuilier_',
254
253
  'excessKarney', 'excessKarney_', 'excessQuad', 'excessQuad_',
@@ -257,12 +256,10 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
257
256
  'intersection2', 'intersections2', 'isantipode', 'isantipode_', 'isnormal', 'isnormal_',
258
257
  'normal', 'normal_', 'opposing', 'opposing_', 'radical2',
259
258
  'thomas', 'thomas_', 'vincentys', 'vincentys_'),
260
- frechet=_a('Frechet', 'FrechetDegrees', 'FrechetError', 'FrechetRadians',
261
- 'FrechetCosineAndoyerLambert', 'FrechetCosineForsytheAndoyerLambert',
262
- 'FrechetCosineLaw', 'FrechetDistanceTo', 'FrechetEquirectangular',
263
- 'FrechetEuclidean', 'FrechetExact', 'FrechetFlatLocal', 'FrechetFlatPolar',
264
- 'FrechetHaversine', 'FrechetHubeny', 'FrechetKarney', 'FrechetThomas',
265
- 'FrechetVincentys', 'Frechet6Tuple',
259
+ frechet=_a('Frechet', 'FrechetDegrees', 'FrechetError', 'FrechetRadians', 'FrechetCosineLaw',
260
+ 'FrechetDistanceTo', 'FrechetEquirectangular', 'FrechetEuclidean', 'FrechetExact',
261
+ 'FrechetFlatLocal', 'FrechetFlatPolar', 'FrechetHaversine', 'FrechetHubeny', 'FrechetKarney',
262
+ 'FrechetThomas', 'FrechetVincentys', 'Frechet6Tuple',
266
263
  'frechet_'),
267
264
  fstats=_a('Fcook', 'Flinear', 'Fwelford'),
268
265
  fsums=_a('Fsum', 'DivMod2Tuple', 'Fsum2Tuple', 'ResidualError',
@@ -275,20 +272,16 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
275
272
  'GeodesicAreaExact', 'GeodesicExact', 'GeodesicLineExact', 'PolygonArea'),
276
273
  geodsolve=_a('GeodesicSolve', 'GeodesicLineSolve', 'GeodSolve12Tuple'),
277
274
  geohash=_a('Geohash', 'Geohashed', 'GeohashError', 'Neighbors8Dict', 'Resolutions2Tuple', 'Sizes3Tuple'),
278
- geoids=_a('GeoidError', 'GeoidG2012B', 'GeoidKarney', 'GeoidPGM', 'egmGeoidHeights',
275
+ geoids=_a('GeoidError', 'GeoidEGM96', 'GeoidG2012B', 'GeoidKarney', 'GeoidPGM', 'egmGeoidHeights',
279
276
  'PGMError', 'GeoidHeight5Tuple'),
280
- hausdorff=_a('Hausdorff', 'HausdorffDegrees', 'HausdorffError', 'HausdorffRadians',
281
- 'HausdorffCosineAndoyerLambert', 'HausdorffCosineForsytheAndoyerLambert',
282
- 'HausdorffCosineLaw', 'HausdorffDistanceTo', 'HausdorffEquirectangular',
283
- 'HausdorffEuclidean', 'HausdorffExact', 'HausdorffFlatLocal', 'HausdorffFlatPolar',
284
- 'HausdorffHaversine', 'HausdorffHubeny', 'HausdorffKarney', 'HausdorffThomas',
285
- 'HausdorffVincentys', 'Hausdorff6Tuple',
277
+ hausdorff=_a('Hausdorff', 'HausdorffDegrees', 'HausdorffError', 'HausdorffRadians', 'HausdorffCosineLaw',
278
+ 'HausdorffDistanceTo', 'HausdorffEquirectangular', 'HausdorffEuclidean', 'HausdorffExact',
279
+ 'HausdorffFlatLocal', 'HausdorffFlatPolar', 'HausdorffHaversine', 'HausdorffHubeny',
280
+ 'HausdorffKarney', 'HausdorffThomas', 'HausdorffVincentys', 'Hausdorff6Tuple',
286
281
  'hausdorff_', 'randomrangenerator'),
287
- heights=_a('HeightCubic', 'HeightError',
288
- 'HeightIDWcosineAndoyerLambert', 'HeightIDWcosineForsytheAndoyerLambert',
289
- 'HeightIDWcosineLaw', 'HeightIDWdistanceTo', 'HeightIDWequirectangular',
290
- 'HeightIDWeuclidean', 'HeightIDWexact', 'HeightIDWflatLocal', 'HeightIDWflatPolar',
291
- 'HeightIDWhaversine', 'HeightIDWhubeny', 'HeightIDWkarney', 'HeightIDWthomas',
282
+ heights=_a('HeightCubic', 'HeightError', 'HeightIDWcosineLaw', 'HeightIDWdistanceTo',
283
+ 'HeightIDWequirectangular', 'HeightIDWeuclidean', 'HeightIDWexact', 'HeightIDWflatLocal',
284
+ 'HeightIDWflatPolar', 'HeightIDWhaversine', 'HeightIDWhubeny', 'HeightIDWkarney', 'HeightIDWthomas',
292
285
  'HeightIDWvincentys', 'HeightLinear', 'HeightLSQBiSpline', 'HeightSmoothBiSpline'),
293
286
  internals=_internals.__all__,
294
287
  interns=_interns.__all__,
@@ -361,17 +354,17 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
361
354
  'Radius_', 'Scalar', 'Scalar_', 'Zone'),
362
355
  unitsBase=_a('Float', 'Int', 'Radius', 'Str'),
363
356
  ups=_a('Ups', 'UPSError', 'parseUPS5', 'toUps8', 'upsZoneBand5'),
364
- utily=_a('acos1', 'acre2ha', 'acre2m2', 'asin1', 'atan1', 'atan1d', 'atan2b', 'atan2d',
357
+ utily=_a('acos1', 'acre2ha', 'acre2m2', 'asin1', 'atan1', 'atan1d', 'atan2', 'atan2b', 'atan2d',
365
358
  'chain2m', 'circle4', 'cot', 'cot_', 'cotd', 'cotd_',
366
359
  'degrees', 'degrees90', 'degrees180', 'degrees360', 'degrees2grades', 'degrees2m',
367
- # 'degrees2grades as degrees2gons',
368
- 'fathom2m', 'ft2m', 'furlong2m',
360
+ 'fathom2m', 'ft2m', 'furlong2m', # 'degrees2grades as degrees2gons',
369
361
  'grades', 'grades400', 'grades2degrees', 'grades2radians',
370
362
  # 'grades as gons', 'grades400 as gons400', 'grades2degrees as gons2degrees', 'grades2radians as gons2radians',
371
- 'km2m', 'm2chain', 'm2degrees', 'm2fathom', 'm2ft', 'm2furlong',
372
- 'm2km', 'm2NM', 'm2radians', 'm2SM', 'm2toise', 'm2yard', 'NM2m',
373
- 'radians', 'radiansPI', 'radiansPI2', 'radiansPI_2', 'radians2m',
374
- 'sincos2', 'SinCos2', 'sincos2_', 'sincos2d', 'sincos2d_', 'sincostan3', 'SM2m',
363
+ 'ha2acre', 'ha2m2', 'hav', 'km2m',
364
+ 'm2acre', 'm2chain', 'm2degrees', 'm2fathom', 'm2ft', 'm2furlong',
365
+ 'm2ha', 'm2km', 'm2NM', 'm2radians', 'm2SM', 'm2toise', 'm2yard',
366
+ 'NM2m', 'radians', 'radiansPI', 'radiansPI2', 'radiansPI_2', 'radians2m',
367
+ 'sincos2', 'SinCos2', 'sincos2_', 'sincos2d', 'sincos2d_', 'sincostan3', 'sincostan3d', 'SM2m',
375
368
  'tan', 'tan_', 'tand', 'tand_', 'tan_2', 'tanPI_2_2', 'toise2m', 'truncate',
376
369
  'unroll180', 'unrollPI',
377
370
  'wrap90', 'wrap180', 'wrap360', 'wrapPI_2', 'wrapPI', 'wrapPI2', 'wrap_normal',
@@ -393,7 +386,10 @@ _ALL_DEPRECATED = _NamedEnum_RO(_name='_ALL_DEPRECATED',
393
386
  'rhumbaux', 'rhumbBase', 'rhumbsolve', 'rhumbx'), # ... names
394
387
  deprecated_bases=_a('LatLonHeightBase', 'points2'),
395
388
  deprecated_classes=_a('ClipCS3Tuple', 'EasNorExact4Tuple', 'EcefCartesian', 'Fn_rt',
396
- 'HeightIDW', 'HeightIDW2', 'HeightIDW3', 'Helmert7Tuple',
389
+ 'FrechetCosineAndoyerLambert', 'FrechetCosineForsytheAndoyerLambert',
390
+ 'HausdorffCosineAndoyerLambert', 'HausdorffCosineForsytheAndoyerLambert',
391
+ 'HeightIDW', 'HeightIDW2', 'HeightIDW3', 'HeightIDWcosineAndoyerLambert',
392
+ 'HeightIDWcosineForsytheAndoyerLambert', 'Helmert7Tuple',
397
393
  'Lam_', 'LatLonExact4Tuple', 'NearestOn4Tuple', 'Ned3Tuple',
398
394
  'Phi_', 'RefFrameError', 'Rhumb7Tuple', 'RhumbOrder2Tuple',
399
395
  'Transform7Tuple', 'TriAngle4Tuple', 'UtmUps4Tuple', 'XDist'),
@@ -403,6 +399,8 @@ _ALL_DEPRECATED = _NamedEnum_RO(_name='_ALL_DEPRECATED',
403
399
  'R_FM', 'R_KM', 'R_M', 'R_MA', 'R_MB', 'R_NM', 'R_SM', 'R_VM'),
404
400
  deprecated_functions=_a('anStr', 'areaof', 'atand', 'bounds', # most of the DEPRECATED functions, except ellipsoidal ...
405
401
  'clipCS3', 'clipDMS', 'clipStr', 'collins', 'copysign', # ... and spherical flavors
402
+ 'cosineAndoyerLambert', 'cosineAndoyerLambert_',
403
+ 'cosineForsytheAndoyerLambert', 'cosineForsytheAndoyerLambert_',
406
404
  'decodeEPSG2', 'encodeEPSG', 'enStr2', 'equirectangular_', 'equirectangular3',
407
405
  'excessAbc', 'excessGirard', 'excessLHuilier',
408
406
  'false2f', 'falsed2f', 'float0', 'fStr', 'fStrzs', 'Fsum2product',
@@ -511,7 +509,7 @@ class _ALL_MODS(_internals._MODS_Base):
511
509
  _internals._MODS = _ALL_MODS = _ALL_MODS() # PYCHOK singleton
512
510
 
513
511
  __all__ = _ALL_LAZY.lazily
514
- __version__ = '24.11.28'
512
+ __version__ = '25.01.05'
515
513
 
516
514
 
517
515
  def _ALL_OTHER(*objs):
@@ -548,6 +546,17 @@ def _all_deprecates():
548
546
  _ALL_DEPRECATES = _Dict() # PYCHOK _ALL_DEPRECATED.imports()
549
547
 
550
548
 
549
+ def _all_enums():
550
+ '''(INTERNAL) Yield all C{(mod_, tuple)} pairs for C{__init__._all}.
551
+ '''
552
+ # assert _init__all__
553
+ for mod_t in _ALL_LAZY.enums():
554
+ yield mod_t
555
+ if _FOR_DOCS:
556
+ for mod_t in _ALL_DEPRECATED.enums():
557
+ yield mod_t
558
+
559
+
551
560
  def _all_imports():
552
561
  '''(INTERNAL) Build C{dict} of all lazy imports.
553
562
  '''
pygeodesy/ltpTuples.py CHANGED
@@ -3,8 +3,8 @@
3
3
 
4
4
  u'''Named, I{Local Tangent Plane} (LTP) tuples.
5
5
 
6
- Local coordinate classes L{XyzLocal}, L{Enu}, L{Ned} and L{Aer}
7
- and local coordinate tuples L{Local9Tuple}, L{Xyz4Tuple}, L{Enu4Tuple},
6
+ Local coordinate classes L{XyzLocal}, L{Enu}, L{Ned} and L{Aer} and
7
+ local coordinate tuples L{Local9Tuple}, L{Xyz4Tuple}, L{Enu4Tuple},
8
8
  L{Ned4Tuple}, L{Aer4Tuple}, L{ChLV9Tuple}, L{ChLVEN2Tuple},
9
9
  L{ChLVYX2Tuple}, L{ChLVyx2Tuple} and L{Footprint5Tuple}.
10
10
 
pygeodesy/named.py CHANGED
@@ -926,21 +926,21 @@ class _NamedLocal(object):
926
926
  '''
927
927
  return _MODS.ltp
928
928
 
929
- def _ltp_toLocal(self, ltp, Cls_and_kwds, **nam_Cls): # overloaded in C{Ecef9Tuple}
929
+ def _ltp_toLocal(self, ltp, Xyz_kwds, **Xyz): # overloaded in C{Ecef9Tuple}
930
930
  '''(INTERNAL) Invoke C{ltp._toLocal}.
931
931
  '''
932
- Cls, kwds = self._ltp_toLocal2(Cls_and_kwds, **nam_Cls)
933
- return self._ltp._toLocal(self, ltp, Cls, kwds) # self._ecef9
932
+ Xyz_ = self._ltp_toLocal2(Xyz_kwds, **Xyz)
933
+ return self._ltp._toLocal(self, ltp, *Xyz_) # self._ecef9
934
934
 
935
- def _ltp_toLocal2(self, Cls_and_kwds, _None=None, **nam_Cls):
936
- '''(INTERNAL) Return 2-tuple C{(Cls, kwds)}.
935
+ def _ltp_toLocal2(self, Xyz_kwds, _None=None, **Xyz):
936
+ '''(INTERNAL) Return 2-tuple C{(Xyz_Class, Xyz_kwds)}.
937
937
  '''
938
- Cls, kwds = _xkwds_pop2(Cls_and_kwds, **nam_Cls)
939
- if Cls is not _None: # validate Cls
940
- n, LoC = _xkwds_item2(nam_Cls)
941
- if LoC is not Cls:
942
- _xsubclassof(LoC, **{n: Cls})
943
- return Cls, kwds
938
+ C, _ = Xyz_ = _xkwds_pop2(Xyz_kwds, **Xyz)
939
+ if C is not _None: # validate C
940
+ n, X = _xkwds_item2(Xyz)
941
+ if X is not C:
942
+ _xsubclassof(X, **{n: C})
943
+ return Xyz_
944
944
 
945
945
  @property_ROver
946
946
  def _ltpTuples(self):