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/formy.py CHANGED
@@ -6,12 +6,12 @@ u'''Formulary of basic geodesy functions and approximations.
6
6
  # make sure int/int division yields float quotient, see .basics
7
7
  from __future__ import division as _; del _ # PYCHOK semicolon
8
8
 
9
- # from pygeodesy.basics import W_args_kwds_count2
9
+ # from pygeodesy.basics import _args_kwds_count2, _copysign # from .constants
10
10
  # from pygeodesy.cartesianBase import CartesianBase # _MODS
11
11
  from pygeodesy.constants import EPS, EPS0, EPS1, PI, PI2, PI3, PI_2, R_M, \
12
12
  _0_0s, float0_, isnon0, remainder, _umod_PI2, \
13
13
  _0_0, _0_125, _0_25, _0_5, _1_0, _2_0, _4_0, \
14
- _32_0, _90_0, _180_0, _360_0
14
+ _32_0, _90_0, _180_0, _360_0, _copysign
15
15
  from pygeodesy.datums import Datum, Ellipsoid, _ellipsoidal_datum, \
16
16
  _mean_radius, _spherical_datum, _WGS84, _EWGS84
17
17
  # from pygeodesy.ellipsoids import Ellipsoid, _EWGS84 # from .datums
@@ -26,30 +26,47 @@ from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS
26
26
  from pygeodesy.named import _name__, _name2__, _NamedTuple, _xnamed, \
27
27
  _DUNDER_nameof
28
28
  from pygeodesy.namedTuples import Bearing2Tuple, Distance4Tuple, LatLon2Tuple, \
29
- Intersection3Tuple, PhiLam2Tuple, Vector3Tuple
29
+ Intersection3Tuple, PhiLam2Tuple
30
30
  # from pygeodesy.streprs import Fmt, unstr # from .fsums
31
31
  # from pygeodesy.triaxials import _hartzell3 # _MODS
32
- from pygeodesy.units import _isHeight, _isRadius, Bearing, Degrees_, Distance, \
33
- Distance_, Height, Lamd, Lat, Lon, Meter_, Phid, \
34
- Radians, Radians_, Radius, Radius_, Scalar, _100km
35
- from pygeodesy.utily import acos1, atan2b, atan2d, degrees2m, _loneg, m2degrees, \
36
- tan_2, sincos2, sincos2_, sincos2d_, _Wrap
32
+ from pygeodesy.units import _isDegrees, _isHeight, _isRadius, Bearing, Degrees_, \
33
+ Distance, Distance_, Height, Lamd, Lat, Lon, Meter_, \
34
+ Phid, Radians, Radians_, Radius, Radius_, Scalar, _100km
35
+ from pygeodesy.utily import acos1, atan2, atan2b, degrees2m, _loneg, m2degrees, \
36
+ tan_2, sincos2, sincos2_, _Wrap
37
37
  # from pygeodesy.vector3d import _otherV3d # _MODS
38
38
  # from pygeodesy.vector3dBase import _xyz_y_z3 # _MODS
39
39
  # from pygeodesy import ellipsoidalExact, ellipsoidalKarney, vector3d, \
40
40
  # sphericalNvector, sphericalTrigonometry # _MODS
41
41
 
42
42
  from contextlib import contextmanager
43
- from math import asin, atan, atan2, cos, degrees, fabs, radians, sin, sqrt # pow
43
+ from math import asin, atan, cos, degrees, fabs, radians, sin, sqrt # pow
44
44
 
45
45
  __all__ = _ALL_LAZY.formy
46
- __version__ = '24.10.14'
46
+ __version__ = '24.12.06'
47
47
 
48
48
  _RADIANS2 = (PI / _180_0)**2 # degrees- to radians-squared
49
49
  _ratio_ = 'ratio'
50
50
  _xline_ = 'xline'
51
51
 
52
52
 
53
+ def angle2chord(rad, radius=R_M):
54
+ '''Get the chord length of a (central) angle or I{angular} distance.
55
+
56
+ @arg rad: Central angle (C{radians}).
57
+ @kwarg radius: Mean earth radius (C{meter}, conventionally), datum (L{Datum}) or ellipsoid
58
+ (L{Ellipsoid}, L{Ellipsoid2} or L{a_f2Tuple}) to use or C{None}.
59
+
60
+ @return: Chord length (C{meter}, same units as B{C{radius}} or if C{B{radius} is None}, C{radians}).
61
+
62
+ @see: Function L{chord2angle}, method L{intermediateChordTo<sphericalNvector.LatLon.intermediateChordTo>} and
63
+ U{great-circle-distance<https://WikiPedia.org/wiki/Great-circle_distance#Relation_between_central_angle_and_chord_length>}.
64
+ '''
65
+ d = _isDegrees(rad, iscalar=False)
66
+ r = sin((radians(rad) if d else rad) / _2_0) * _2_0
67
+ return (degrees(r) if d else r) if radius is None else (_mean_radius(radius) * r)
68
+
69
+
53
70
  def _anti2(a, b, n_2, n, n2):
54
71
  '''(INTERNAL) Helper for C{antipode} and C{antipode_}.
55
72
  '''
@@ -161,6 +178,30 @@ def _bearingTo2(p1, p2, wrap=False): # for points.ispolar, sphericalTrigonometr
161
178
  name__=_bearingTo2)
162
179
 
163
180
 
181
+ def chord2angle(chord, radius=R_M):
182
+ '''Get the (central) angle from a chord length or distance.
183
+
184
+ @arg chord: Length or distance (C{meter}, same units as B{C{radius}}).
185
+ @kwarg radius: Mean earth radius (C{meter}, conventionally), datum (L{Datum}) or
186
+ ellipsoid (L{Ellipsoid}, L{Ellipsoid2} or L{a_f2Tuple}) to use.
187
+
188
+ @return: Angle (C{radians} with sign of B{C{chord}}) or C{0} if C{B{radius}=0}.
189
+
190
+ @note: The angle will exceed C{PI} if C{B{chord} > B{radius} * 2}.
191
+
192
+ @see: Function L{angle2chord}.
193
+ '''
194
+ m = _mean_radius(radius)
195
+ r = fabs(chord / (m * _2_0)) if m > 0 else _0_0
196
+ if r:
197
+ i = int(r)
198
+ if i > 0:
199
+ r -= i
200
+ i *= PI
201
+ r = asin(r) + i
202
+ return _copysign(r * _2_0, chord)
203
+
204
+
164
205
  def compassAngle(lat1, lon1, lat2, lon2, adjust=True, wrap=False):
165
206
  '''Return the angle from North for the direction vector M{(lon2 - lon1,
166
207
  lat2 - lat1)} between two points.
@@ -424,7 +465,7 @@ def _ellipsoidal(earth, where):
424
465
 
425
466
 
426
467
  def equirectangular(lat1, lon1, lat2, lon2, radius=R_M, **adjust_limit_wrap):
427
- '''Compute the distance between two points using the U{Equirectangular Approximation
468
+ '''Approximate the distance between two points using the U{Equirectangular Approximation
428
469
  / Projection<https://www.Movable-Type.co.UK/scripts/latlong.html#equirectangular>}.
429
470
 
430
471
  @arg lat1: Start latitude (C{degrees}).
@@ -449,14 +490,14 @@ def equirectangular(lat1, lon1, lat2, lon2, radius=R_M, **adjust_limit_wrap):
449
490
 
450
491
 
451
492
  def _equirectangular(lat1, lon1, lat2, lon2, **adjust_limit_wrap):
452
- '''(INTERNAL) Helper for the L{frechet._FrechetMeterRadians}
453
- and L{hausdorff._HausdorffMeterRedians} classes.
493
+ '''(INTERNAL) Helper for classes L{frechet._FrechetMeterRadians} and
494
+ L{hausdorff._HausdorffMeterRedians}.
454
495
  '''
455
496
  return equirectangular4(lat1, lon1, lat2, lon2, **adjust_limit_wrap).distance2 * _RADIANS2
456
497
 
457
498
 
458
499
  def equirectangular4(lat1, lon1, lat2, lon2, adjust=True, limit=45, wrap=False):
459
- '''Compute the distance between two points using the U{Equirectangular Approximation
500
+ '''Approximate the distance between two points using the U{Equirectangular Approximation
460
501
  / Projection<https://www.Movable-Type.co.UK/scripts/latlong.html#equirectangular>}.
461
502
 
462
503
  This approximation is valid for short distance of several hundred Km or Miles, see
@@ -473,10 +514,10 @@ def equirectangular4(lat1, lon1, lat2, lon2, adjust=True, limit=45, wrap=False):
473
514
  @kwarg wrap: If C{True}, wrap or I{normalize} and unroll B{C{lat2}} and B{C{lon2}}
474
515
  (C{bool}).
475
516
 
476
- @return: A L{Distance4Tuple}C{(distance2, delta_lat, delta_lon, unroll_lon2)}
477
- in C{degrees squared}.
517
+ @return: A L{Distance4Tuple}C{(distance2, delta_lat, delta_lon, unroll_lon2)} with
518
+ C{distance2} in C{degrees squared}.
478
519
 
479
- @raise LimitError: If the lat- and/or longitudinal delta exceeds the B{C{-limit..limit}}
520
+ @raise LimitError: The lat- or longitudinal delta exceeds the B{C{-limit..limit}}
480
521
  range and L{limiterrors<pygeodesy.limiterrors>} is C{True}.
481
522
 
482
523
  @see: U{Local, flat earth approximation<https://www.EdWilliams.org/avform.htm#flat>},
@@ -485,7 +526,10 @@ def equirectangular4(lat1, lon1, lat2, lon2, adjust=True, limit=45, wrap=False):
485
526
  L{thomas} and L{vincentys} and methods L{Ellipsoid.distance2}, C{LatLon.distanceTo*}
486
527
  and C{LatLon.equirectangularTo}.
487
528
  '''
488
- d_lon, lat2, ulon2 = _Wrap.latlon3(lon1, lat2, lon2, wrap)
529
+ if wrap:
530
+ d_lon, lat2, ulon2 = _Wrap.latlon3(lon1, lat2, lon2, wrap)
531
+ else:
532
+ d_lon, ulon2 = (lon2 - lon1), lon2
489
533
  d_lat = lat2 - lat1
490
534
 
491
535
  if limit and limit > 0 and limiterrors():
@@ -996,18 +1040,16 @@ def hartzell(pov, los=False, earth=_WGS84, **name_LatLon_and_kwds):
996
1040
 
997
1041
  def haversine(lat1, lon1, lat2, lon2, radius=R_M, wrap=False):
998
1042
  '''Compute the distance between two (spherical) points using the
999
- U{Haversine<https://www.Movable-Type.co.UK/scripts/latlong.html>}
1000
- formula.
1043
+ U{Haversine<https://www.Movable-Type.co.UK/scripts/latlong.html>} formula.
1001
1044
 
1002
1045
  @arg lat1: Start latitude (C{degrees}).
1003
1046
  @arg lon1: Start longitude (C{degrees}).
1004
1047
  @arg lat2: End latitude (C{degrees}).
1005
1048
  @arg lon2: End longitude (C{degrees}).
1006
- @kwarg radius: Mean earth radius (C{meter}), datum (L{Datum})
1007
- or ellipsoid (L{Ellipsoid}, L{Ellipsoid2} or
1008
- L{a_f2Tuple}) to use.
1009
- @kwarg wrap: If C{True}, wrap or I{normalize} and unroll
1010
- B{C{lat2}} and B{C{lon2}} (C{bool}).
1049
+ @kwarg radius: Mean earth radius (C{meter}), datum (L{Datum}) or ellipsoid
1050
+ (L{Ellipsoid}, L{Ellipsoid2} or L{a_f2Tuple}) to use.
1051
+ @kwarg wrap: If C{True}, wrap or I{normalize} and unroll B{C{lat2}} and
1052
+ B{C{lon2}} (C{bool}).
1011
1053
 
1012
1054
  @return: Distance (C{meter}, same units as B{C{radius}}).
1013
1055
 
@@ -1026,9 +1068,8 @@ def haversine(lat1, lon1, lat2, lon2, radius=R_M, wrap=False):
1026
1068
 
1027
1069
 
1028
1070
  def haversine_(phi2, phi1, lam21):
1029
- '''Compute the I{angular} distance between two (spherical) points
1030
- using the U{Haversine<https://www.Movable-Type.co.UK/scripts/latlong.html>}
1031
- formula.
1071
+ '''Compute the I{angular} distance between two (spherical) points using the
1072
+ U{Haversine<https://www.Movable-Type.co.UK/scripts/latlong.html>} formula.
1032
1073
 
1033
1074
  @arg phi2: End latitude (C{radians}).
1034
1075
  @arg phi1: Start latitude (C{radians}).
@@ -1156,7 +1197,7 @@ class _idllmn6(object): # see also .geodesicw._wargs, .latlonBase._toCartesian3
1156
1197
  m = _MODS.ellipsoidalKarney
1157
1198
  except ImportError:
1158
1199
  m = _MODS.ellipsoidalExact
1159
- _i = m._intersections2 if s else m._intersection3 # ellispoidalBaseDI
1200
+ _i = m._intersections2 if s else m._intersection3 # ellipsoidalBaseDI
1160
1201
  else:
1161
1202
  raise _TypeError(datum=datum)
1162
1203
  yield _i, d, lat2, lon2, m, n
@@ -1231,7 +1272,8 @@ def intersection2(lat1, lon1, bearing1,
1231
1272
 
1232
1273
  else:
1233
1274
  t = _i(m.LatLon(lat1, lon1, datum=d), b1,
1234
- m.LatLon(lat2, lon2, datum=d), b2, height=0, wrap=False)
1275
+ m.LatLon(lat2, lon2, datum=d), b2,
1276
+ LatLon=None, height=0, wrap=False)
1235
1277
  if isinstance(t, Intersection3Tuple): # ellipsoidal
1236
1278
  t, _, _ = t
1237
1279
  t = LatLon2Tuple(t.lat, t.lon, name=n)
@@ -1394,24 +1436,6 @@ def isnormal_(phi, lam, eps=0):
1394
1436
  return (PI_2 - fabs(phi)) >= eps and (PI - fabs(lam)) >= eps
1395
1437
 
1396
1438
 
1397
- def latlon2n_xyz(lat, lon, **name):
1398
- '''Convert lat-, longitude to C{n-vector} (I{normal} to the
1399
- earth's surface) X, Y and Z components.
1400
-
1401
- @arg lat: Latitude (C{degrees}).
1402
- @arg lon: Longitude (C{degrees}).
1403
- @kwarg name: Optional C{B{name}=NN} (C{str}).
1404
-
1405
- @return: A L{Vector3Tuple}C{(x, y, z)}.
1406
-
1407
- @see: Function L{philam2n_xyz}.
1408
-
1409
- @note: These are C{n-vector} x, y and z components,
1410
- I{NOT} geocentric ECEF x, y and z coordinates!
1411
- '''
1412
- return _2n_xyz(name, *sincos2d_(lat, lon))
1413
-
1414
-
1415
1439
  def _normal2(a, b, n_2, n, n2):
1416
1440
  '''(INTERNAL) Helper for C{normal} and C{normal_}.
1417
1441
  '''
@@ -1457,44 +1481,6 @@ def normal_(phi, lam, **name):
1457
1481
  name=_name__(name, name__=normal_))
1458
1482
 
1459
1483
 
1460
- def _2n_xyz(name, sa, ca, sb, cb): # name always **name
1461
- '''(INTERNAL) Helper for C{latlon2n_xyz} and C{philam2n_xyz}.
1462
- '''
1463
- # Kenneth Gade eqn 3, but using right-handed
1464
- # vector x -> 0°E,0°N, y -> 90°E,0°N, z -> 90°N
1465
- return Vector3Tuple(ca * cb, ca * sb, sa, **name)
1466
-
1467
-
1468
- def n_xyz2latlon(x, y, z, **name):
1469
- '''Convert C{n-vector} components to lat- and longitude in C{degrees}.
1470
-
1471
- @arg x: X component (C{scalar}).
1472
- @arg y: Y component (C{scalar}).
1473
- @arg z: Z component (C{scalar}).
1474
- @kwarg name: Optional C{B{name}=NN} (C{str}).
1475
-
1476
- @return: A L{LatLon2Tuple}C{(lat, lon)}.
1477
-
1478
- @see: Function L{n_xyz2philam}.
1479
- '''
1480
- return LatLon2Tuple(atan2d(z, hypot(x, y)), atan2d(y, x), **name)
1481
-
1482
-
1483
- def n_xyz2philam(x, y, z, **name):
1484
- '''Convert C{n-vector} components to lat- and longitude in C{radians}.
1485
-
1486
- @arg x: X component (C{scalar}).
1487
- @arg y: Y component (C{scalar}).
1488
- @arg z: Z component (C{scalar}).
1489
- @kwarg name: Optional C{B{name}=NN} (C{str}).
1490
-
1491
- @return: A L{PhiLam2Tuple}C{(phi, lam)}.
1492
-
1493
- @see: Function L{n_xyz2latlon}.
1494
- '''
1495
- return PhiLam2Tuple(atan2(z, hypot(x, y)), atan2(y, x), **name)
1496
-
1497
-
1498
1484
  def _opposes(d, m, n, n2):
1499
1485
  '''(INTERNAL) Helper for C{opposing} and C{opposing_}.
1500
1486
  '''
@@ -1535,24 +1521,6 @@ def opposing_(radians1, radians2, margin=PI_2):
1535
1521
  return _opposes(radians2 - radians1, m, PI, PI2)
1536
1522
 
1537
1523
 
1538
- def philam2n_xyz(phi, lam, **name):
1539
- '''Convert lat-, longitude to C{n-vector} (I{normal} to the
1540
- earth's surface) X, Y and Z components.
1541
-
1542
- @arg phi: Latitude (C{radians}).
1543
- @arg lam: Longitude (C{radians}).
1544
- @kwarg name: Optional name (C{str}).
1545
-
1546
- @return: A L{Vector3Tuple}C{(x, y, z)}.
1547
-
1548
- @see: Function L{latlon2n_xyz}.
1549
-
1550
- @note: These are C{n-vector} x, y and z components,
1551
- I{NOT} geocentric ECEF x, y and z coordinates!
1552
- '''
1553
- return _2n_xyz(name, *sincos2_(phi, lam))
1554
-
1555
-
1556
1524
  def _Propy(func, nargs, kwds):
1557
1525
  '''(INTERNAL) Helper for the C{frechet.[-]Frechet**} and
1558
1526
  C{hausdorff.[-]Hausdorff*} classes.
@@ -1648,7 +1616,7 @@ def _radistance(inst):
1648
1616
  def _scale_deg(lat1, lat2): # degrees
1649
1617
  # scale factor cos(mean of lats) for delta lon
1650
1618
  m = fabs(lat1 + lat2) * _0_5
1651
- return cos(radians(m)) if m < 90 else _0_0
1619
+ return cos(radians(m)) if m < _90_0 else _0_0
1652
1620
 
1653
1621
 
1654
1622
  def _scale_rad(phi1, phi2): # radians, by .frechet, .hausdorff, .heights
@@ -1809,7 +1777,7 @@ def vincentys_(phi2, phi1, lam21):
1809
1777
 
1810
1778
  # **) MIT License
1811
1779
  #
1812
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
1780
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
1813
1781
  #
1814
1782
  # Permission is hereby granted, free of charge, to any person obtaining a
1815
1783
  # copy of this software and associated documentation files (the "Software"),
pygeodesy/frechet.py CHANGED
@@ -856,7 +856,7 @@ class Frechet6Tuple(_NamedTuple):
856
856
 
857
857
  # **) MIT License
858
858
  #
859
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
859
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
860
860
  #
861
861
  # Permission is hereby granted, free of charge, to any person obtaining a
862
862
  # copy of this software and associated documentation files (the "Software"),
pygeodesy/fstats.py CHANGED
@@ -803,7 +803,7 @@ __all__ += _ALL_DOCS(_FstatsBase, _FstatsNamed)
803
803
 
804
804
  # **) MIT License
805
805
  #
806
- # Copyright (C) 2021-2024 -- mrJean1 at Gmail -- All Rights Reserved.
806
+ # Copyright (C) 2021-2025 -- mrJean1 at Gmail -- All Rights Reserved.
807
807
  #
808
808
  # Permission is hereby granted, free of charge, to any person obtaining a
809
809
  # copy of this software and associated documentation files (the "Software"),