pygeodesy 24.11.11__py2.py3-none-any.whl → 25.1.5__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.11.11.dist-info → PyGeodesy-25.1.5.dist-info}/METADATA +34 -35
  2. PyGeodesy-25.1.5.dist-info/RECORD +118 -0
  3. {PyGeodesy-24.11.11.dist-info → PyGeodesy-25.1.5.dist-info}/WHEEL +1 -1
  4. pygeodesy/__init__.py +19 -19
  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 +5 -5
  19. pygeodesy/basics.py +60 -8
  20. pygeodesy/booleans.py +1 -1
  21. pygeodesy/cartesianBase.py +22 -61
  22. pygeodesy/clipy.py +1 -1
  23. pygeodesy/constants.py +5 -5
  24. pygeodesy/css.py +1 -1
  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 +86 -2
  29. pygeodesy/deprecated/consterns.py +1 -1
  30. pygeodesy/deprecated/datum.py +5 -5
  31. pygeodesy/deprecated/functions.py +42 -8
  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 +53 -56
  39. pygeodesy/elevations.py +1 -1
  40. pygeodesy/ellipsoidalBase.py +3 -3
  41. pygeodesy/ellipsoidalBaseDI.py +1 -1
  42. pygeodesy/ellipsoidalExact.py +1 -1
  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 +4 -5
  48. pygeodesy/elliptic.py +6 -6
  49. pygeodesy/epsg.py +1 -1
  50. pygeodesy/errors.py +1 -1
  51. pygeodesy/etm.py +5 -5
  52. pygeodesy/fmath.py +18 -17
  53. pygeodesy/formy.py +409 -555
  54. pygeodesy/frechet.py +29 -86
  55. pygeodesy/fstats.py +1 -1
  56. pygeodesy/fsums.py +32 -33
  57. pygeodesy/gars.py +1 -1
  58. pygeodesy/geodesici.py +7 -7
  59. pygeodesy/geodesicw.py +1 -1
  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 +2 -2
  64. pygeodesy/geodesicx/__main__.py +4 -5
  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 +1 -1
  70. pygeodesy/geohash.py +1 -1
  71. pygeodesy/geoids.py +277 -203
  72. pygeodesy/hausdorff.py +23 -81
  73. pygeodesy/heights.py +115 -150
  74. pygeodesy/internals.py +1 -1
  75. pygeodesy/interns.py +2 -3
  76. pygeodesy/iters.py +1 -1
  77. pygeodesy/karney.py +3 -3
  78. pygeodesy/ktm.py +16 -15
  79. pygeodesy/latlonBase.py +323 -409
  80. pygeodesy/lazily.py +53 -44
  81. pygeodesy/lcc.py +1 -1
  82. pygeodesy/ltp.py +46 -50
  83. pygeodesy/ltpTuples.py +147 -130
  84. pygeodesy/mgrs.py +1 -1
  85. pygeodesy/named.py +149 -3
  86. pygeodesy/namedTuples.py +58 -7
  87. pygeodesy/nvectorBase.py +122 -105
  88. pygeodesy/osgr.py +1 -1
  89. pygeodesy/points.py +1 -1
  90. pygeodesy/props.py +1 -1
  91. pygeodesy/resections.py +18 -17
  92. pygeodesy/rhumb/__init__.py +1 -1
  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 +1 -1
  97. pygeodesy/simplify.py +289 -401
  98. pygeodesy/solveBase.py +1 -1
  99. pygeodesy/sphericalBase.py +1 -1
  100. pygeodesy/sphericalNvector.py +5 -5
  101. pygeodesy/sphericalTrigonometry.py +7 -6
  102. pygeodesy/streprs.py +10 -5
  103. pygeodesy/trf.py +1 -1
  104. pygeodesy/triaxials.py +23 -16
  105. pygeodesy/units.py +16 -16
  106. pygeodesy/unitsBase.py +1 -1
  107. pygeodesy/ups.py +4 -4
  108. pygeodesy/utily.py +341 -211
  109. pygeodesy/utm.py +5 -5
  110. pygeodesy/utmups.py +1 -1
  111. pygeodesy/utmupsBase.py +1 -1
  112. pygeodesy/vector2d.py +5 -5
  113. pygeodesy/vector3d.py +14 -3
  114. pygeodesy/vector3dBase.py +5 -5
  115. pygeodesy/webmercator.py +1 -1
  116. pygeodesy/wgrs.py +1 -1
  117. PyGeodesy-24.11.11.dist-info/RECORD +0 -118
  118. {PyGeodesy-24.11.11.dist-info → PyGeodesy-25.1.5.dist-info}/top_level.txt +0 -0
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-
@@ -45,7 +45,7 @@ except ImportError as x: # Python 2.6-
45
45
 
46
46
  _a0 = () # PYCHOK empty tuple
47
47
  _asSPACED_ = ' as '
48
- _FOR_DOCS = _getPYGEODESY('_FOR_DOCS') # for epydoc ...
48
+ _FOR_DOCS = _getPYGEODESY('FOR_DOCS') # for epydoc ...
49
49
  _init__all__ = _FOR_DOCS or _getPYGEODESY('_init__all__', _DUNDER_all_) == _DUNDER_all_ # PYCHOK exported
50
50
  _lazily_ = 'lazily'
51
51
  _PYTHON_X_DEV = getattr(_sys.flags, 'dev_mode', False) # PYCHOK Python 3.2+
@@ -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,24 +246,20 @@ _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
- 'antipode', 'antipode_', 'bearing', 'bearing_',
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_',
255
254
  'flatLocal', 'flatLocal_', 'flatPolar', 'flatPolar_',
256
255
  'hartzell', 'haversine', 'haversine_', 'heightOf', 'heightOrthometric', 'horizon', 'hubeny', 'hubeny_',
257
256
  'intersection2', 'intersections2', 'isantipode', 'isantipode_', 'isnormal', 'isnormal_',
258
- 'latlon2n_xyz', 'normal', 'normal_', 'n_xyz2latlon', 'n_xyz2philam',
259
- 'opposing', 'opposing_', 'philam2n_xyz', 'radical2',
257
+ 'normal', 'normal_', 'opposing', 'opposing_', 'radical2',
260
258
  'thomas', 'thomas_', 'vincentys', 'vincentys_'),
261
- frechet=_a('Frechet', 'FrechetDegrees', 'FrechetError', 'FrechetRadians',
262
- 'FrechetCosineAndoyerLambert', 'FrechetCosineForsytheAndoyerLambert',
263
- 'FrechetCosineLaw', 'FrechetDistanceTo', 'FrechetEquirectangular',
264
- 'FrechetEuclidean', 'FrechetExact', 'FrechetFlatLocal', 'FrechetFlatPolar',
265
- 'FrechetHaversine', 'FrechetHubeny', 'FrechetKarney', 'FrechetThomas',
266
- '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',
267
263
  'frechet_'),
268
264
  fstats=_a('Fcook', 'Flinear', 'Fwelford'),
269
265
  fsums=_a('Fsum', 'DivMod2Tuple', 'Fsum2Tuple', 'ResidualError',
@@ -276,20 +272,16 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
276
272
  'GeodesicAreaExact', 'GeodesicExact', 'GeodesicLineExact', 'PolygonArea'),
277
273
  geodsolve=_a('GeodesicSolve', 'GeodesicLineSolve', 'GeodSolve12Tuple'),
278
274
  geohash=_a('Geohash', 'Geohashed', 'GeohashError', 'Neighbors8Dict', 'Resolutions2Tuple', 'Sizes3Tuple'),
279
- geoids=_a('GeoidError', 'GeoidG2012B', 'GeoidKarney', 'GeoidPGM', 'egmGeoidHeights',
275
+ geoids=_a('GeoidError', 'GeoidEGM96', 'GeoidG2012B', 'GeoidKarney', 'GeoidPGM', 'egmGeoidHeights',
280
276
  'PGMError', 'GeoidHeight5Tuple'),
281
- hausdorff=_a('Hausdorff', 'HausdorffDegrees', 'HausdorffError', 'HausdorffRadians',
282
- 'HausdorffCosineAndoyerLambert', 'HausdorffCosineForsytheAndoyerLambert',
283
- 'HausdorffCosineLaw', 'HausdorffDistanceTo', 'HausdorffEquirectangular',
284
- 'HausdorffEuclidean', 'HausdorffExact', 'HausdorffFlatLocal', 'HausdorffFlatPolar',
285
- 'HausdorffHaversine', 'HausdorffHubeny', 'HausdorffKarney', 'HausdorffThomas',
286
- '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',
287
281
  'hausdorff_', 'randomrangenerator'),
288
- heights=_a('HeightCubic', 'HeightError',
289
- 'HeightIDWcosineAndoyerLambert', 'HeightIDWcosineForsytheAndoyerLambert',
290
- 'HeightIDWcosineLaw', 'HeightIDWdistanceTo', 'HeightIDWequirectangular',
291
- 'HeightIDWeuclidean', 'HeightIDWexact', 'HeightIDWflatLocal', 'HeightIDWflatPolar',
292
- 'HeightIDWhaversine', 'HeightIDWhubeny', 'HeightIDWkarney', 'HeightIDWthomas',
282
+ heights=_a('HeightCubic', 'HeightError', 'HeightIDWcosineLaw', 'HeightIDWdistanceTo',
283
+ 'HeightIDWequirectangular', 'HeightIDWeuclidean', 'HeightIDWexact', 'HeightIDWflatLocal',
284
+ 'HeightIDWflatPolar', 'HeightIDWhaversine', 'HeightIDWhubeny', 'HeightIDWkarney', 'HeightIDWthomas',
293
285
  'HeightIDWvincentys', 'HeightLinear', 'HeightLSQBiSpline', 'HeightSmoothBiSpline'),
294
286
  internals=_internals.__all__,
295
287
  interns=_interns.__all__,
@@ -297,7 +289,7 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
297
289
  'isNumpy2', 'isPoints2', 'isTuple2', 'iterNumpy2', 'iterNumpy2over'),
298
290
  karney=_a('Area3Tuple', 'Caps', 'Direct9Tuple', 'GDict', 'Inverse10Tuple', 'Rhumb8Tuple'),
299
291
  ktm=_a('KTMError', 'KTransverseMercator'),
300
- latlonBase=_a(), # module only
292
+ latlonBase=_a('latlon2n_xyz', 'philam2n_xyz'),
301
293
  lazily=_a('LazyAttributeError', 'LazyImportError', 'isLazy'),
302
294
  lcc=_a('Conic', 'Conics', 'Lcc', 'LCCError', 'toLcc'),
303
295
  ltp=_a('Attitude', 'AttitudeError', 'ChLV', 'ChLVa', 'ChLVe', 'Frustum',
@@ -322,7 +314,7 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
322
314
  'Reverse4Tuple', 'Triangle7Tuple', 'Triangle8Tuple', 'Trilaterate5Tuple',
323
315
  'UtmUps2Tuple', 'UtmUps5Tuple', 'UtmUps8Tuple', 'UtmUpsLatLon5Tuple',
324
316
  'Vector2Tuple', 'Vector3Tuple', 'Vector4Tuple'),
325
- nvectorBase=_a('NorthPole', 'SouthPole'),
317
+ nvectorBase=_a('NorthPole', 'SouthPole', 'n_xyz2latlon', 'n_xyz2philam'),
326
318
  osgr=_a('Osgr', 'OSGRError', 'parseOSGR', 'toOsgr'),
327
319
  points=_a('LatLon_', 'LatLon2psxy', 'Numpy2LatLon', 'Shape2Tuple', 'Tuple2LatLon',
328
320
  'areaOf', 'boundsOf', 'centroidOf', 'fractional',
@@ -344,7 +336,7 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
344
336
  sphericalBase=_a(), # module only
345
337
  sphericalNvector=_a(), # module only
346
338
  sphericalTrigonometry=_a(), # module only
347
- simplify=_a('simplify1', 'simplifyRDP', 'simplifyRDPm', 'simplifyRW', 'simplifyVW', 'simplifyVWm'),
339
+ simplify=_a('simplify1', 'simplifyRDP', 'simplifyRW', 'simplifyVW'),
348
340
  solveBase=_a(), # module only
349
341
  streprs=_a('anstr', 'attrs', 'enstr2', 'fstr', 'fstrzs', 'hstr', 'instr',
350
342
  'lrstrip', 'pairs', 'reprs', 'strs', 'unstr'),
@@ -362,18 +354,18 @@ _ALL_LAZY = _NamedEnum_RO(_name='_ALL_LAZY',
362
354
  'Radius_', 'Scalar', 'Scalar_', 'Zone'),
363
355
  unitsBase=_a('Float', 'Int', 'Radius', 'Str'),
364
356
  ups=_a('Ups', 'UPSError', 'parseUPS5', 'toUps8', 'upsZoneBand5'),
365
- utily=_a('acos1', 'acre2ha', 'acre2m2', 'asin1', 'atan1', 'atan1d', 'atan2b', 'atan2d',
357
+ utily=_a('acos1', 'acre2ha', 'acre2m2', 'asin1', 'atan1', 'atan1d', 'atan2', 'atan2b', 'atan2d',
366
358
  'chain2m', 'circle4', 'cot', 'cot_', 'cotd', 'cotd_',
367
359
  'degrees', 'degrees90', 'degrees180', 'degrees360', 'degrees2grades', 'degrees2m',
368
- # 'degrees2grades as degrees2gons',
369
- 'fathom2m', 'ft2m', 'furlong2m',
360
+ 'fathom2m', 'ft2m', 'furlong2m', # 'degrees2grades as degrees2gons',
370
361
  'grades', 'grades400', 'grades2degrees', 'grades2radians',
371
362
  # 'grades as gons', 'grades400 as gons400', 'grades2degrees as gons2degrees', 'grades2radians as gons2radians',
372
- 'km2m', 'm2chain', 'm2degrees', 'm2fathom', 'm2ft', 'm2furlong',
373
- 'm2km', 'm2NM', 'm2radians', 'm2SM', 'm2toise', 'm2yard', 'NM2m',
374
- 'radians', 'radiansPI', 'radiansPI2', 'radiansPI_2', 'radians2m',
375
- 'sincos2', 'SinCos2', 'sincos2_', 'sincos2d', 'sincos2d_', 'sincostan3', 'SM2m',
376
- 'tand', 'tand_', 'tan_2', 'tanPI_2_2', 'toise2m', 'truncate',
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',
368
+ 'tan', 'tan_', 'tand', 'tand_', 'tan_2', 'tanPI_2_2', 'toise2m', 'truncate',
377
369
  'unroll180', 'unrollPI',
378
370
  'wrap90', 'wrap180', 'wrap360', 'wrapPI_2', 'wrapPI', 'wrapPI2', 'wrap_normal',
379
371
  'yard2m'),
@@ -394,7 +386,10 @@ _ALL_DEPRECATED = _NamedEnum_RO(_name='_ALL_DEPRECATED',
394
386
  'rhumbaux', 'rhumbBase', 'rhumbsolve', 'rhumbx'), # ... names
395
387
  deprecated_bases=_a('LatLonHeightBase', 'points2'),
396
388
  deprecated_classes=_a('ClipCS3Tuple', 'EasNorExact4Tuple', 'EcefCartesian', 'Fn_rt',
397
- 'HeightIDW', 'HeightIDW2', 'HeightIDW3', 'Helmert7Tuple',
389
+ 'FrechetCosineAndoyerLambert', 'FrechetCosineForsytheAndoyerLambert',
390
+ 'HausdorffCosineAndoyerLambert', 'HausdorffCosineForsytheAndoyerLambert',
391
+ 'HeightIDW', 'HeightIDW2', 'HeightIDW3', 'HeightIDWcosineAndoyerLambert',
392
+ 'HeightIDWcosineForsytheAndoyerLambert', 'Helmert7Tuple',
398
393
  'Lam_', 'LatLonExact4Tuple', 'NearestOn4Tuple', 'Ned3Tuple',
399
394
  'Phi_', 'RefFrameError', 'Rhumb7Tuple', 'RhumbOrder2Tuple',
400
395
  'Transform7Tuple', 'TriAngle4Tuple', 'UtmUps4Tuple', 'XDist'),
@@ -404,12 +399,15 @@ _ALL_DEPRECATED = _NamedEnum_RO(_name='_ALL_DEPRECATED',
404
399
  'R_FM', 'R_KM', 'R_M', 'R_MA', 'R_MB', 'R_NM', 'R_SM', 'R_VM'),
405
400
  deprecated_functions=_a('anStr', 'areaof', 'atand', 'bounds', # most of the DEPRECATED functions, except ellipsoidal ...
406
401
  'clipCS3', 'clipDMS', 'clipStr', 'collins', 'copysign', # ... and spherical flavors
402
+ 'cosineAndoyerLambert', 'cosineAndoyerLambert_',
403
+ 'cosineForsytheAndoyerLambert', 'cosineForsytheAndoyerLambert_',
407
404
  'decodeEPSG2', 'encodeEPSG', 'enStr2', 'equirectangular_', 'equirectangular3',
408
405
  'excessAbc', 'excessGirard', 'excessLHuilier',
409
406
  'false2f', 'falsed2f', 'float0', 'fStr', 'fStrzs', 'Fsum2product',
410
407
  'hypot3', 'inStr', 'isenclosedby', 'istuplist',
411
408
  'joined', 'joined_', 'nearestOn3', 'nearestOn4',
412
- 'parseUTM', 'perimeterof', 'polygon', 'scalar', 'simplify2',
409
+ 'parseUTM', 'perimeterof', 'polygon',
410
+ 'scalar', 'simplify2', 'simplifyRDPm', 'simplifyVWm',
413
411
  'tienstra', 'toUtm', 'triAngle4',
414
412
  'unsign0', 'unStr', 'utmZoneBand2'),
415
413
  deprecated_nvector=_a('LatLonNvectorBase', 'Nvector', 'sumOf', 'NorthPole', 'SouthPole'),)
@@ -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.09'
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
  '''
@@ -899,7 +908,7 @@ if _is_DUNDER_main(__name__): # PYCHOK no cover
899
908
 
900
909
  # **) MIT License
901
910
  #
902
- # Copyright (C) 2018-2024 -- mrJean1 at Gmail -- All Rights Reserved.
911
+ # Copyright (C) 2018-2025 -- mrJean1 at Gmail -- All Rights Reserved.
903
912
  #
904
913
  # Permission is hereby granted, free of charge, to any person obtaining a
905
914
  # copy of this software and associated documentation files (the "Software"),
pygeodesy/lcc.py CHANGED
@@ -659,7 +659,7 @@ if __name__ == '__main__':
659
659
 
660
660
  # **) MIT License
661
661
  #
662
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
662
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
663
663
  #
664
664
  # Permission is hereby granted, free of charge, to any person obtaining a
665
665
  # copy of this software and associated documentation files (the "Software"),
pygeodesy/ltp.py CHANGED
@@ -23,8 +23,8 @@ from pygeodesy.ecef import _EcefBase, EcefKarney, Ecef9Tuple, _llhn4, \
23
23
  _xyzn4, _WGS84
24
24
  from pygeodesy.errors import _NotImplementedError, _ValueError, _xattr, \
25
25
  _xkwds, _xkwds_get, _xkwds_pop2
26
- from pygeodesy.fmath import fabs, fdot, Fhorner
27
- from pygeodesy.fsums import _floor, _Fsumf_, fsumf_, fsum1f_
26
+ from pygeodesy.fmath import fabs, fdot, fdot_, Fhorner
27
+ from pygeodesy.fsums import _floor, fsumf_
28
28
  from pygeodesy.interns import _0_, _COMMASPACE_, _DOT_, _ecef_, _height_, _M_, \
29
29
  _invalid_, _lat0_, _lon0_, _name_, _too_
30
30
  # from pygeodesy.lazily import _ALL_LAZY # from vector3d
@@ -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.11.06'
47
+ __version__ = '24.12.12'
48
48
 
49
49
  _height0_ = _height_ + _0_
50
50
  _narrow_ = 'narrow'
@@ -119,14 +119,13 @@ class Attitude(_NamedBase):
119
119
  @see: Matrix M of case 10 in U{Appendix A
120
120
  <https://ntrs.NASA.gov/api/citations/19770019231/downloads/19770019231.pdf>}.
121
121
  '''
122
- _f = fsum1f_
123
122
  # to follow the definitions of rotation angles alpha, beta and gamma:
124
123
  # negate yaw since yaw is counter-clockwise around the z-axis, swap
125
124
  # tilt and roll since tilt is around the x- and roll around the y-axis
126
125
  sa, ca, sb, cb, sg, cg = sincos2d_(-self.yaw, self.roll, self.tilt)
127
- return ((ca * cb, _f(ca * sb * sg, -sa * cg), _f(ca * sb * cg, sa * sg)),
128
- (sa * cb, _f(sa * sb * sg, ca * cg), _f(sa * sb * cg, -ca * sg)),
129
- ( -sb, cb * sg, cb * cg))
126
+ return ((ca * cb, fdot_(ca, sb * sg, -sa, cg), fdot_(ca, sb * cg, sa, sg)),
127
+ (sa * cb, fdot_(sa, sb * sg, ca, cg), fdot_(sa, sb * cg, -ca, sg)),
128
+ ( -sb, cb * sg, cb * cg))
130
129
 
131
130
  @property_doc_(' roll/bank in C{degrees180}, positive to the right and down.')
132
131
  def roll(self):
@@ -159,7 +158,7 @@ class Attitude(_NamedBase):
159
158
 
160
159
  @raise AttitudeError: Invalid B{C{x_xyz}}, B{C{y}} or B{C{z}}.
161
160
 
162
- @raise TypeError: Invalid B{C{Vector}} or B{C{name_Vector_kwds}}.
161
+ @raise TypeError: Invalid B{C{Vector}} or B{C{name_Vector_kwds}} item.
163
162
 
164
163
  @see: U{Yaw, pitch, and roll rotations<http://MSL.CS.UIUC.edu/planning/node102.html>}.
165
164
  '''
@@ -308,11 +307,10 @@ class Frustum(_NamedBase):
308
307
 
309
308
  def _xyz5(b, xy5, z, ltp):
310
309
  # rotate (x, y)'s by bearing, clockwise
311
- s, c = sincos2d(b)
312
- _f = fsum1f_
310
+ sc = sincos2d(b)
313
311
  for x, y in xy5:
314
- yield Xyz4Tuple(_f(x * c, y * s),
315
- _f(y * c, -x * s), z, ltp)
312
+ yield Xyz4Tuple(fdot(sc, x, y),
313
+ fdot(sc, -x, y), z, ltp)
316
314
 
317
315
  try:
318
316
  a, t, y, r = alt_attitude.atyr
@@ -330,7 +328,7 @@ class Frustum(_NamedBase):
330
328
  else:
331
329
  z = _0_0
332
330
 
333
- b = Degrees(yaw=y, wrap=wrap360) # bearing
331
+ b = Degrees(yaw=y, wrap=wrap360) # bearing
334
332
  e = -Degrees(tilt=t, wrap=wrap180) # elevation, pitch
335
333
  if not EPS < e < _180_0:
336
334
  raise _ValueError(tilt=t)
@@ -468,7 +466,7 @@ class LocalCartesian(_NamedBase):
468
466
  '''(INTERNAL) Convert geocentric/geodetic to local, like I{forward}.
469
467
 
470
468
  @arg ecef: Geocentric (and geodetic) (L{Ecef9Tuple}).
471
- @arg Xyz: An L{XyzLocal}, L{Enu} or L{Ned} I{class} or C{None}.
469
+ @arg Xyz: An L{XyzLocal}, L{Aer}, L{Enu} or L{Ned} I{class} or C{None}.
472
470
  @arg name_Xyz_kwds: Optional C{B{name}=NN} (C{str}) and optionally,
473
471
  additional B{C{Xyz}} keyword arguments, ignored if C{B{Xyz}
474
472
  is None}.
@@ -479,16 +477,15 @@ class LocalCartesian(_NamedBase):
479
477
  (L{Ecef9Tuple}) converted to this C{datum} and C{M=None},
480
478
  always.
481
479
 
482
- @raise TypeError: Invalid B{C{Xyz}} or B{C{name_Xyz_kwds}}.
480
+ @raise TypeError: Invalid B{C{Xyz}} or B{C{name_Xyz_kwds}} item.
483
481
  '''
484
482
  _xinstanceof(Ecef9Tuple, ecef=ecef)
485
- ltp = self
486
- if ecef.datum != ltp.datum:
487
- ecef = ecef.toDatum(ltp.datum)
483
+ if ecef.datum != self.datum:
484
+ ecef = ecef.toDatum(self.datum)
488
485
  n, kwds = _name2__(name_Xyz_kwds, _or_nameof=ecef)
489
- x, y, z = self.M.rotate(ecef.xyz, *ltp._t0_xyz)
486
+ x, y, z = self.M.rotate(ecef.xyz, *self._t0_xyz)
490
487
  r = Local9Tuple(x, y, z, ecef.lat, ecef.lon, ecef.height,
491
- ltp, ecef, None, name=n)
488
+ self, ecef, None, name=n)
492
489
  if Xyz:
493
490
  _xsubclassof(*_XyzLocals4, Xyz=Xyz) # Vector3d
494
491
  r = r.toXyz(Xyz=Xyz, name=n, **kwds)
@@ -557,9 +554,9 @@ class LocalCartesian(_NamedBase):
557
554
  @kwarg nine: If C{True}, return a 9-, otherwise a 3-tuple (C{bool}).
558
555
  @kwarg M: Include the rotation matrix (C{bool}).
559
556
 
560
- @return: A I{geocentric} 3-tuple C{(x, y, z)} or if C{B{nine}=True},
561
- an L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)},
562
- optionally including rotation matrix C{M} otherwise C{None}.
557
+ @return: A I{geocentric} 3-tuple C{(x, y, z)} or if C{B{nine}=True}, an
558
+ L{Ecef9Tuple}C{(x, y, z, lat, lon, height, C, M, datum)} with
559
+ rotation matrix C{M} (L{EcefMatrix}) if requested.
563
560
  '''
564
561
  _xinstanceof(*_XyzLocals5, local=local)
565
562
  t = self.M.unrotate(local.xyz, *self._t0_xyz)
@@ -959,15 +956,15 @@ class ChLVa(_ChLV, LocalCartesian):
959
956
  a, b, h_ = _ChLV._llh2abh_3(lat, lon, h)
960
957
  a2, b2 = a**2, b**2
961
958
 
962
- Y = fsumf_( 72.37, 211455.93 * b,
963
- -10938.51 * b * a,
964
- -0.36 * b * a2,
965
- -44.54 * b * b2) # + 600_000
966
- X = fsumf_(147.07, 308807.95 * a,
967
- 3745.25 * b2,
968
- 76.63 * a2,
969
- -194.56 * b2 * a,
970
- 119.79 * a2 * a) # + 200_000
959
+ Y = fdot_(211455.93, b,
960
+ -10938.51, b * a,
961
+ -0.36, b * a2,
962
+ -44.54, b * b2, start=72.37) # + 600_000
963
+ X = fdot_(308807.95, a,
964
+ 3745.25, b2,
965
+ 76.63, a2,
966
+ -194.56, b2 * a,
967
+ 119.79, a2 * a, start=147.07) # + 200_000
971
968
  return self._ChLV9Tuple(True, M, n, Y, X, h_, lat, lon, h)
972
969
 
973
970
  def reverse(self, enh_, n=None, h_=0, M=None, **name): # PYCHOK signature
@@ -976,15 +973,15 @@ class ChLVa(_ChLV, LocalCartesian):
976
973
  a, b, h = _ChLV._YXh_2abh3(Y, X, h_)
977
974
  ab_d, a2, b2 = ChLV._ab_d, a**2, b**2
978
975
 
979
- lat = _Fsumf_(16.9023892, 3.238272 * b,
980
- -0.270978 * a2,
981
- -0.002528 * b2,
982
- -0.0447 * a2 * b,
983
- -0.014 * b2 * b).fover(ab_d)
984
- lon = _Fsumf_( 2.6779094, 4.728982 * a,
985
- 0.791484 * a * b,
986
- 0.1306 * a * b2,
987
- -0.0436 * a * a2).fover(ab_d)
976
+ lat = fdot_(3.238272, b,
977
+ -0.270978, a2,
978
+ -0.002528, b2,
979
+ -0.0447, a2 * b,
980
+ -0.014, b2 * b, start=16.9023892) / ab_d
981
+ lon = fdot_(4.728982, a,
982
+ 0.791484, a * b,
983
+ 0.1306, a * b2,
984
+ -0.0436, a * a2, start=2.6779094) / ab_d
988
985
  return self._ChLV9Tuple(False, M, n, Y, X, h_, lat, lon, h)
989
986
 
990
987
 
@@ -1025,8 +1022,7 @@ class ChLVe(_ChLV, LocalCartesian):
1025
1022
  B0 = _H(a, z, 308770.746371, 75.028131, 120.435227, 0.009488, 0.070332, -0.00001)
1026
1023
  B2 = _H(a, 3745.408911, -193.792705, 4.340858, -0.376174, 0.004053)
1027
1024
  B4 = _H(a, -0.734684, 0.144466, -0.011842)
1028
- B6 = 0.000488
1029
- X = _H(b, B0, z, B2, z, B4, z, B6).fover(ab_M) # 1,000 Km!
1025
+ X = _H(b, B0, z, B2, z, B4, z, 0.000488).fover(ab_M) # 1,000 Km!
1030
1026
 
1031
1027
  t = self._ChLV9Tuple(True, M, n, Y, X, h_, lat, lon, h)
1032
1028
  if gamma:
@@ -1046,8 +1042,7 @@ class ChLVe(_ChLV, LocalCartesian):
1046
1042
  A0 = _H(b, ChLV._sLat, 32386.4877666, -25.486822, -132.457771, 0.48747, 0.81305, -0.0069)
1047
1043
  A2 = _H(b, -2713.537919, -450.442705, -75.53194, -14.63049, -2.7604)
1048
1044
  A4 = _H(b, 24.42786, 13.20703, 4.7476)
1049
- A6 = -0.4249
1050
- lat = _H(a, A0, z, A2, z, A4, z, A6).fover(s_d)
1045
+ lat = _H(a, A0, z, A2, z, A4, z, -0.4249).fover(s_d)
1051
1046
 
1052
1047
  A1 = _H(b, 47297.3056722, 7925.714783, 1328.129667, 255.02202, 48.17474, 9.0243)
1053
1048
  A3 = _H(b, -442.709889, -255.02202, -96.34947, -30.0808)
@@ -1075,15 +1070,16 @@ def _fov_2(**fov):
1075
1070
 
1076
1071
 
1077
1072
  def _toLocal(inst, ltp, Xyz, Xyz_kwds):
1078
- '''(INTENRAL) Helper for C{CartesianBase.toLocal} and C{latLonBase.toLocal}.
1073
+ '''(INTERNAL) Helper for C{CartesianBase.toAer}, C{CartesianBase.toEnu},
1074
+ C{CartesianBase.toLocal}, C{CartesianBase.toNed} and C{latLonBase.toLocal}.
1079
1075
  '''
1080
1076
  return _xLtp(ltp, inst._Ltp)._ecef2local(inst._ecef9, Xyz, Xyz_kwds)
1081
1077
 
1082
1078
 
1083
1079
  def _toLtp(inst, Ecef, ecef9, name):
1084
- '''(INTENRAL) Helper for C{CartesianBase.toLtp} and C{latLonBase.toLtp}.
1080
+ '''(INTERNAL) Helper for C{CartesianBase.toLtp}, C{ecef.toLtp} and C{latLonBase.toLtp}.
1085
1081
  '''
1086
- return inst._Ltp if Ecef in (None, inst.Ecef) and not name else \
1082
+ return inst._Ltp if (not name) and Ecef in (None, inst.Ecef) else \
1087
1083
  Ltp(ecef9, ecef=Ecef(inst.datum), name=inst._name__(name))
1088
1084
 
1089
1085
 
@@ -1125,7 +1121,7 @@ def tyr3d(tilt=INT0, yaw=INT0, roll=INT0, Vector=Vector3d, **name_Vector_kwds):
1125
1121
 
1126
1122
 
1127
1123
  def _xLtp(ltp, *dflt):
1128
- '''(INTERNAL) Validate B{C{ltp}} or ist B{C{dflt}}.
1124
+ '''(INTERNAL) Validate B{C{ltp}} if not C{None} else B{C{dflt}}.
1129
1125
  '''
1130
1126
  if dflt and ltp is None:
1131
1127
  ltp = dflt[0]
@@ -1134,7 +1130,7 @@ def _xLtp(ltp, *dflt):
1134
1130
 
1135
1131
  # **) MIT License
1136
1132
  #
1137
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
1133
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
1138
1134
  #
1139
1135
  # Permission is hereby granted, free of charge, to any person obtaining a
1140
1136
  # copy of this software and associated documentation files (the "Software"),