pygeodesy 24.5.15__py2.py3-none-any.whl → 24.6.1__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.5.15.dist-info → PyGeodesy-24.6.1.dist-info}/METADATA +6 -5
- PyGeodesy-24.6.1.dist-info/RECORD +116 -0
- pygeodesy/__init__.py +4 -4
- pygeodesy/albers.py +41 -41
- pygeodesy/auxilats/__init__.py +1 -1
- pygeodesy/auxilats/__main__.py +2 -2
- pygeodesy/auxilats/auxAngle.py +32 -31
- pygeodesy/auxilats/auxLat.py +80 -51
- pygeodesy/azimuthal.py +123 -124
- pygeodesy/basics.py +46 -10
- pygeodesy/booleans.py +13 -14
- pygeodesy/cartesianBase.py +25 -23
- pygeodesy/clipy.py +3 -3
- pygeodesy/constants.py +3 -3
- pygeodesy/css.py +50 -42
- pygeodesy/datums.py +42 -41
- pygeodesy/deprecated/functions.py +9 -3
- pygeodesy/dms.py +6 -6
- pygeodesy/ecef.py +41 -41
- pygeodesy/ellipsoidalBase.py +41 -41
- pygeodesy/ellipsoidalBaseDI.py +3 -4
- pygeodesy/ellipsoidalGeodSolve.py +2 -2
- pygeodesy/ellipsoidalKarney.py +3 -3
- pygeodesy/ellipsoidalNvector.py +11 -12
- pygeodesy/ellipsoids.py +45 -38
- pygeodesy/elliptic.py +3 -4
- pygeodesy/epsg.py +4 -3
- pygeodesy/errors.py +52 -20
- pygeodesy/etm.py +68 -65
- pygeodesy/fmath.py +44 -49
- pygeodesy/formy.py +129 -115
- pygeodesy/frechet.py +118 -103
- pygeodesy/fstats.py +21 -14
- pygeodesy/fsums.py +124 -80
- pygeodesy/gars.py +10 -9
- pygeodesy/geodesicw.py +19 -17
- pygeodesy/geodesicx/__init__.py +1 -1
- pygeodesy/geodesicx/__main__.py +2 -2
- pygeodesy/geodesicx/gx.py +39 -33
- pygeodesy/geodesicx/gxarea.py +12 -9
- pygeodesy/geodesicx/gxbases.py +3 -4
- pygeodesy/geodesicx/gxline.py +6 -8
- pygeodesy/geodsolve.py +29 -28
- pygeodesy/geohash.py +60 -57
- pygeodesy/geoids.py +34 -32
- pygeodesy/hausdorff.py +114 -101
- pygeodesy/heights.py +137 -130
- pygeodesy/internals.py +16 -11
- pygeodesy/interns.py +3 -6
- pygeodesy/iters.py +19 -17
- pygeodesy/karney.py +21 -17
- pygeodesy/ktm.py +25 -18
- pygeodesy/latlonBase.py +12 -11
- pygeodesy/lazily.py +6 -6
- pygeodesy/lcc.py +24 -25
- pygeodesy/ltp.py +143 -113
- pygeodesy/ltpTuples.py +207 -150
- pygeodesy/mgrs.py +26 -26
- pygeodesy/named.py +172 -90
- pygeodesy/namedTuples.py +33 -25
- pygeodesy/nvectorBase.py +8 -8
- pygeodesy/osgr.py +40 -48
- pygeodesy/points.py +18 -18
- pygeodesy/props.py +29 -16
- pygeodesy/rhumb/__init__.py +1 -1
- pygeodesy/rhumb/aux_.py +13 -15
- pygeodesy/rhumb/bases.py +12 -5
- pygeodesy/rhumb/ekx.py +24 -18
- pygeodesy/rhumb/solve.py +13 -10
- pygeodesy/simplify.py +16 -16
- pygeodesy/solveBase.py +18 -18
- pygeodesy/sphericalBase.py +17 -21
- pygeodesy/sphericalTrigonometry.py +21 -21
- pygeodesy/streprs.py +5 -5
- pygeodesy/trf.py +13 -11
- pygeodesy/triaxials.py +68 -64
- pygeodesy/units.py +35 -35
- pygeodesy/unitsBase.py +24 -11
- pygeodesy/ups.py +66 -70
- pygeodesy/utily.py +3 -3
- pygeodesy/utm.py +183 -187
- pygeodesy/utmups.py +38 -38
- pygeodesy/utmupsBase.py +104 -106
- pygeodesy/vector2d.py +6 -7
- pygeodesy/vector3d.py +16 -17
- pygeodesy/vector3dBase.py +4 -5
- pygeodesy/webmercator.py +43 -51
- PyGeodesy-24.5.15.dist-info/RECORD +0 -116
- {PyGeodesy-24.5.15.dist-info → PyGeodesy-24.6.1.dist-info}/WHEEL +0 -0
- {PyGeodesy-24.5.15.dist-info → PyGeodesy-24.6.1.dist-info}/top_level.txt +0 -0
pygeodesy/heights.py
CHANGED
|
@@ -72,16 +72,16 @@ from pygeodesy.basics import isscalar, len2, map1, map2, _xnumpy, _xscipy
|
|
|
72
72
|
from pygeodesy.constants import EPS, PI, PI2, _0_0, _90_0, _180_0
|
|
73
73
|
from pygeodesy.datums import _ellipsoidal_datum, _WGS84
|
|
74
74
|
from pygeodesy.errors import _AssertionError, LenError, PointsError, \
|
|
75
|
-
_SciPyIssue, _xattr, _xkwds, _xkwds_get
|
|
75
|
+
_SciPyIssue, _xattr, _xkwds, _xkwds_get, _xkwds_item2
|
|
76
76
|
# from pygeodesy.fmath import fidw # _MODS
|
|
77
77
|
# from pygeodesy.formy import cosineAndoyerLambert, cosineForsytheAndoyerLambert, \
|
|
78
|
-
# cosineLaw,
|
|
78
|
+
# cosineLaw, equirectangular4, euclidean, flatLocal, \
|
|
79
79
|
# flatPolar, haversine, thomas, vincentys # _MODS
|
|
80
80
|
# from pygeodesy.internals import _version2 # _MODS
|
|
81
|
-
from pygeodesy.interns import NN, _COMMASPACE_, _cubic_, _insufficient_,
|
|
82
|
-
|
|
81
|
+
from pygeodesy.interns import NN, _COMMASPACE_, _cubic_, _insufficient_, _linear_, \
|
|
82
|
+
_NOTEQUAL_, _PLUS_, _scipy_, _SPACE_, _STAR_
|
|
83
83
|
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS, _FOR_DOCS
|
|
84
|
-
from pygeodesy.named import _Named
|
|
84
|
+
from pygeodesy.named import _name2__, _Named
|
|
85
85
|
from pygeodesy.points import _distanceTo, LatLon_, Fmt, radians, _Wrap
|
|
86
86
|
from pygeodesy.props import Property_RO, property_RO
|
|
87
87
|
# from pygeodesy.streprs import Fmt # from .points
|
|
@@ -91,7 +91,7 @@ from pygeodesy.units import _isDegrees, Float_, Int_
|
|
|
91
91
|
# from math import radians # from .points
|
|
92
92
|
|
|
93
93
|
__all__ = _ALL_LAZY.heights
|
|
94
|
-
__version__ = '24.05.
|
|
94
|
+
__version__ = '24.05.25'
|
|
95
95
|
|
|
96
96
|
_error_ = 'error'
|
|
97
97
|
_llis_ = 'llis'
|
|
@@ -179,9 +179,10 @@ def _ordedup(ts, lo=EPS, hi=PI2-EPS):
|
|
|
179
179
|
return sorted(set(max(lo, min(hi, t)) for t in ts)) # list
|
|
180
180
|
|
|
181
181
|
|
|
182
|
-
def _xyhs(
|
|
182
|
+
def _xyhs(wrap=False, **name_lls):
|
|
183
183
|
# map (lat, lon, h) to (x, y, h) in radians, offset
|
|
184
184
|
# x as 0 <= lon <= PI2 and y as 0 <= lat <= PI
|
|
185
|
+
name, lls = _xkwds_item2(name_lls)
|
|
185
186
|
_0, _90, _180 = _0_0, _90_0, _180_0
|
|
186
187
|
_m, _r, _w = max, radians, _Wrap._latlonop(wrap)
|
|
187
188
|
try:
|
|
@@ -253,7 +254,7 @@ class _HeightsBase(_HeightBase): # in .geoids
|
|
|
253
254
|
atype = self.numpy.array
|
|
254
255
|
wrap = _xkwds(wrap, wrap=self._wrap)
|
|
255
256
|
_as, llis = _as_llis2(llis)
|
|
256
|
-
xis, yis, _ = zip(*_xyhs(llis, **wrap)) # PYCHOK yield
|
|
257
|
+
xis, yis, _ = zip(*_xyhs(llis=llis, **wrap)) # PYCHOK yield
|
|
257
258
|
return _as, atype(xis), atype(yis), llis
|
|
258
259
|
|
|
259
260
|
def _ev(self, *args): # PYCHOK no cover
|
|
@@ -334,12 +335,14 @@ class _HeightsBase(_HeightBase): # in .geoids
|
|
|
334
335
|
'''
|
|
335
336
|
return _MODS.internals._version2(self.scipy.version.version, **n)
|
|
336
337
|
|
|
337
|
-
def _xyhs3(self, knots, **
|
|
338
|
+
def _xyhs3(self, knots, wrap=False, **name):
|
|
338
339
|
# convert knot C{LatLon}s to tuples or C{NumPy} arrays and C{SciPy} sphericals
|
|
339
|
-
xs, ys, hs = zip(*_xyhs(knots
|
|
340
|
+
xs, ys, hs = zip(*_xyhs(knots=knots, wrap=wrap)) # PYCHOK yield
|
|
340
341
|
n = len(hs)
|
|
341
342
|
if n < self.kmin:
|
|
342
343
|
raise _insufficientError(self.kmin, knots=n)
|
|
344
|
+
if name:
|
|
345
|
+
self.name = name
|
|
343
346
|
return map1(self.numpy.array, xs, ys, hs)
|
|
344
347
|
|
|
345
348
|
|
|
@@ -352,13 +355,14 @@ class HeightCubic(_HeightsBase):
|
|
|
352
355
|
_kind = _cubic_
|
|
353
356
|
_kmin = 16
|
|
354
357
|
|
|
355
|
-
def __init__(self, knots,
|
|
358
|
+
def __init__(self, knots, **name_wrap):
|
|
356
359
|
'''New L{HeightCubic} interpolator.
|
|
357
360
|
|
|
358
361
|
@arg knots: The points with known height (C{LatLon}s).
|
|
359
|
-
@kwarg
|
|
360
|
-
|
|
361
|
-
|
|
362
|
+
@kwarg name_wrap: Optional C{B{name}=NN} for this height interpolator
|
|
363
|
+
(C{str}) and keyword argument C{b{wrap}=False} to wrap or
|
|
364
|
+
I{normalize} all B{C{knots}} and B{C{llis}} locations iff
|
|
365
|
+
C{True} (C{bool}).
|
|
362
366
|
|
|
363
367
|
@raise HeightError: Insufficient number of B{C{knots}} or
|
|
364
368
|
invalid B{C{knot}}.
|
|
@@ -373,15 +377,12 @@ class HeightCubic(_HeightsBase):
|
|
|
373
377
|
'''
|
|
374
378
|
spi = self.scipy_interpolate
|
|
375
379
|
|
|
376
|
-
xs, ys, hs = self._xyhs3(knots, **
|
|
380
|
+
xs, ys, hs = self._xyhs3(knots, **name_wrap)
|
|
377
381
|
try: # SciPy.interpolate.interp2d kind 'linear' or 'cubic'
|
|
378
382
|
self._interp2d = spi.interp2d(xs, ys, hs, kind=self._kind)
|
|
379
383
|
except Exception as x:
|
|
380
384
|
raise _SciPyIssue(x)
|
|
381
385
|
|
|
382
|
-
if name:
|
|
383
|
-
self.name = name
|
|
384
|
-
|
|
385
386
|
def __call__(self, *llis, **wrap):
|
|
386
387
|
'''Interpolate the height for one or several locations.
|
|
387
388
|
|
|
@@ -390,7 +391,7 @@ class HeightCubic(_HeightsBase):
|
|
|
390
391
|
@raise SciPyWarning: A C{scipy.interpolate.interp2d} warning
|
|
391
392
|
as exception.
|
|
392
393
|
|
|
393
|
-
@see: L{Here<_HeightsBase.__call__>} for
|
|
394
|
+
@see: L{Here<_HeightsBase.__call__>} for further details.
|
|
394
395
|
'''
|
|
395
396
|
return _HeightsBase._eval(self, llis, **wrap)
|
|
396
397
|
|
|
@@ -407,7 +408,7 @@ class HeightCubic(_HeightsBase):
|
|
|
407
408
|
@raise SciPyWarning: A C{scipy.interpolate.interp2d} warning
|
|
408
409
|
as exception.
|
|
409
410
|
|
|
410
|
-
@see: L{Here<_HeightsBase.height>} for
|
|
411
|
+
@see: L{Here<_HeightsBase.height>} for further details.
|
|
411
412
|
'''
|
|
412
413
|
return _height_called(self, lats, lons, **wrap)
|
|
413
414
|
|
|
@@ -420,12 +421,12 @@ class HeightLinear(HeightCubic):
|
|
|
420
421
|
_kind = _linear_
|
|
421
422
|
_kmin = 2
|
|
422
423
|
|
|
423
|
-
def __init__(self, knots,
|
|
424
|
+
def __init__(self, knots, **name_wrap):
|
|
424
425
|
'''New L{HeightLinear} interpolator.
|
|
425
426
|
|
|
426
|
-
@see: L{Here<HeightCubic.__init__>} for details.
|
|
427
|
+
@see: L{Here<HeightCubic.__init__>} for all details.
|
|
427
428
|
'''
|
|
428
|
-
HeightCubic.__init__(self, knots,
|
|
429
|
+
HeightCubic.__init__(self, knots, **name_wrap)
|
|
429
430
|
|
|
430
431
|
if _FOR_DOCS:
|
|
431
432
|
__call__ = HeightCubic.__call__
|
|
@@ -439,23 +440,24 @@ class HeightLSQBiSpline(_HeightsBase):
|
|
|
439
440
|
'''
|
|
440
441
|
_kmin = 16 # k = 3, always
|
|
441
442
|
|
|
442
|
-
def __init__(self, knots, weight=None,
|
|
443
|
+
def __init__(self, knots, weight=None, **name_wrap):
|
|
443
444
|
'''New L{HeightLSQBiSpline} interpolator.
|
|
444
445
|
|
|
445
446
|
@arg knots: The points with known height (C{LatLon}s).
|
|
446
447
|
@kwarg weight: Optional weight or weights for each B{C{knot}}
|
|
447
448
|
(C{scalar} or C{scalar}s).
|
|
448
|
-
@kwarg
|
|
449
|
-
|
|
450
|
-
|
|
449
|
+
@kwarg name_wrap: Optional C{B{name}=NN} for this height interpolator
|
|
450
|
+
(C{str}) and keyword argument C{b{wrap}=False} to wrap or
|
|
451
|
+
I{normalize} all B{C{knots}} and B{C{llis}} locations iff
|
|
452
|
+
C{True} (C{bool}).
|
|
451
453
|
|
|
452
454
|
@raise HeightError: Insufficient number of B{C{knots}} or
|
|
453
455
|
an invalid B{C{knot}} or B{C{weight}}.
|
|
454
456
|
|
|
455
457
|
@raise LenError: Unequal number of B{C{knots}} and B{C{weight}}s.
|
|
456
458
|
|
|
457
|
-
@raise ImportError: Package C{numpy} or C{scipy} not found
|
|
458
|
-
|
|
459
|
+
@raise ImportError: Package C{numpy} or C{scipy} not found or
|
|
460
|
+
not installed.
|
|
459
461
|
|
|
460
462
|
@raise SciPyError: A C{scipy} C{LSQSphereBivariateSpline} issue.
|
|
461
463
|
|
|
@@ -465,7 +467,7 @@ class HeightLSQBiSpline(_HeightsBase):
|
|
|
465
467
|
np = self.numpy
|
|
466
468
|
spi = self.scipy_interpolate
|
|
467
469
|
|
|
468
|
-
xs, ys, hs = self._xyhs3(knots, **
|
|
470
|
+
xs, ys, hs = self._xyhs3(knots, **name_wrap)
|
|
469
471
|
n = len(hs)
|
|
470
472
|
|
|
471
473
|
w = weight
|
|
@@ -492,9 +494,6 @@ class HeightLSQBiSpline(_HeightsBase):
|
|
|
492
494
|
except Exception as x:
|
|
493
495
|
raise _SciPyIssue(x)
|
|
494
496
|
|
|
495
|
-
if name:
|
|
496
|
-
self.name = name
|
|
497
|
-
|
|
498
497
|
def __call__(self, *llis, **wrap):
|
|
499
498
|
'''Interpolate the height for one or several locations.
|
|
500
499
|
|
|
@@ -503,7 +502,7 @@ class HeightLSQBiSpline(_HeightsBase):
|
|
|
503
502
|
@raise SciPyWarning: A C{scipy} C{LSQSphereBivariateSpline}
|
|
504
503
|
warning as exception.
|
|
505
504
|
|
|
506
|
-
@see: L{Here<_HeightsBase.__call__>} for
|
|
505
|
+
@see: L{Here<_HeightsBase.__call__>} for further details.
|
|
507
506
|
'''
|
|
508
507
|
return _HeightsBase._eval(self, llis, **wrap)
|
|
509
508
|
|
|
@@ -515,7 +514,7 @@ class HeightLSQBiSpline(_HeightsBase):
|
|
|
515
514
|
@raise SciPyWarning: A C{scipy} C{LSQSphereBivariateSpline}
|
|
516
515
|
warning as exception.
|
|
517
516
|
|
|
518
|
-
@see: L{Here<_HeightsBase.height>} for
|
|
517
|
+
@see: L{Here<_HeightsBase.height>} for further details.
|
|
519
518
|
'''
|
|
520
519
|
return _height_called(self, lats, lons, **wrap)
|
|
521
520
|
|
|
@@ -527,21 +526,21 @@ class HeightSmoothBiSpline(_HeightsBase):
|
|
|
527
526
|
'''
|
|
528
527
|
_kmin = 16 # k = 3, always
|
|
529
528
|
|
|
530
|
-
def __init__(self, knots, s=4,
|
|
529
|
+
def __init__(self, knots, s=4, **name_wrap):
|
|
531
530
|
'''New L{HeightSmoothBiSpline} interpolator.
|
|
532
531
|
|
|
533
532
|
@arg knots: The points with known height (C{LatLon}s).
|
|
534
533
|
@kwarg s: The spline smoothing factor (C{scalar}), default C{4}.
|
|
535
|
-
@kwarg
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
534
|
+
@kwarg name_wrap: Optional C{B{name}=NN} for this height interpolator
|
|
535
|
+
(C{str}) and keyword argument C{b{wrap}=False} to wrap or
|
|
536
|
+
I{normalize} all B{C{knots}} and B{C{llis}} locations iff
|
|
537
|
+
C{True} (C{bool}).
|
|
539
538
|
|
|
540
539
|
@raise HeightError: Insufficient number of B{C{knots}} or
|
|
541
540
|
an invalid B{C{knot}} or B{C{s}}.
|
|
542
541
|
|
|
543
|
-
@raise ImportError: Package C{numpy} or C{scipy} not found
|
|
544
|
-
|
|
542
|
+
@raise ImportError: Package C{numpy} or C{scipy} not found or not
|
|
543
|
+
installed.
|
|
545
544
|
|
|
546
545
|
@raise SciPyError: A C{scipy} C{SmoothSphereBivariateSpline} issue.
|
|
547
546
|
|
|
@@ -552,16 +551,13 @@ class HeightSmoothBiSpline(_HeightsBase):
|
|
|
552
551
|
|
|
553
552
|
s = Float_(s, name=_smoothing_, Error=HeightError, low=4)
|
|
554
553
|
|
|
555
|
-
xs, ys, hs = self._xyhs3(knots, **
|
|
554
|
+
xs, ys, hs = self._xyhs3(knots, **name_wrap)
|
|
556
555
|
try:
|
|
557
556
|
self._ev = spi.SmoothSphereBivariateSpline(ys, xs, hs,
|
|
558
557
|
eps=EPS, s=s).ev
|
|
559
558
|
except Exception as x:
|
|
560
559
|
raise _SciPyIssue(x)
|
|
561
560
|
|
|
562
|
-
if name:
|
|
563
|
-
self.name = name
|
|
564
|
-
|
|
565
561
|
def __call__(self, *llis, **wrap):
|
|
566
562
|
'''Interpolate the height for one or several locations.
|
|
567
563
|
|
|
@@ -570,7 +566,7 @@ class HeightSmoothBiSpline(_HeightsBase):
|
|
|
570
566
|
@raise SciPyWarning: A C{scipy} C{SmoothSphereBivariateSpline}
|
|
571
567
|
warning as exception.
|
|
572
568
|
|
|
573
|
-
@see: L{Here<_HeightsBase.__call__>} for
|
|
569
|
+
@see: L{Here<_HeightsBase.__call__>} for further details.
|
|
574
570
|
'''
|
|
575
571
|
return _HeightsBase._eval(self, llis, **wrap)
|
|
576
572
|
|
|
@@ -582,7 +578,7 @@ class HeightSmoothBiSpline(_HeightsBase):
|
|
|
582
578
|
@raise SciPyWarning: A C{scipy} C{SmoothSphereBivariateSpline}
|
|
583
579
|
warning as exception.
|
|
584
580
|
|
|
585
|
-
@see: L{Here<_HeightsBase.height>} for
|
|
581
|
+
@see: L{Here<_HeightsBase.height>} for further details.
|
|
586
582
|
'''
|
|
587
583
|
return _height_called(self, lats, lons, **wrap)
|
|
588
584
|
|
|
@@ -603,20 +599,22 @@ class _HeightIDW(_HeightBase):
|
|
|
603
599
|
_knots = () # knots list or tuple
|
|
604
600
|
_kwds = {} # func_ options
|
|
605
601
|
|
|
606
|
-
def __init__(self, knots, beta=2,
|
|
602
|
+
def __init__(self, knots, beta=2, **name__kwds):
|
|
607
603
|
'''New C{_HeightIDW*} interpolator.
|
|
608
604
|
|
|
609
605
|
@arg knots: The points with known height (C{LatLon}s).
|
|
610
606
|
@kwarg beta: Inverse distance power (C{int} 1, 2, or 3).
|
|
611
|
-
@kwarg
|
|
612
|
-
|
|
607
|
+
@kwarg name__kwds: Optional C{B{name}=NN} for this height interpolator
|
|
608
|
+
(C{str}) and any keyword arguments for the distance function,
|
|
613
609
|
retrievable with property C{kwds}.
|
|
614
610
|
|
|
615
|
-
@raise HeightError: Insufficient number of B{C{knots}} or
|
|
616
|
-
|
|
611
|
+
@raise HeightError: Insufficient number of B{C{knots}} or an invalid
|
|
612
|
+
B{C{knot}} or B{C{beta}}.
|
|
617
613
|
'''
|
|
614
|
+
name, kwds = _name2__(**name__kwds)
|
|
618
615
|
if name:
|
|
619
616
|
self.name = name
|
|
617
|
+
|
|
620
618
|
n, self._knots = len2(knots)
|
|
621
619
|
if n < self.kmin:
|
|
622
620
|
raise _insufficientError(self.kmin, knots=n)
|
|
@@ -637,17 +635,17 @@ class _HeightIDW(_HeightBase):
|
|
|
637
635
|
invalid B{C{lli}} or L{pygeodesy.fidw}
|
|
638
636
|
issue.
|
|
639
637
|
'''
|
|
640
|
-
def _xy2(
|
|
638
|
+
def _xy2(wrap=False):
|
|
641
639
|
_w = _Wrap._latlonop(wrap)
|
|
642
640
|
try: # like _xyhs above, but degrees
|
|
643
|
-
for i, ll in enumerate(
|
|
641
|
+
for i, ll in enumerate(llis):
|
|
644
642
|
yield _w(ll.lon, ll.lat)
|
|
645
|
-
except Exception as
|
|
643
|
+
except Exception as x:
|
|
646
644
|
i = Fmt.INDEX(llis=i)
|
|
647
|
-
raise HeightError(i, ll, cause=
|
|
645
|
+
raise HeightError(i, ll, cause=x)
|
|
648
646
|
|
|
649
647
|
_as, llis = _as_llis2(llis)
|
|
650
|
-
return _as(map(self._hIDW, *zip(*_xy2(
|
|
648
|
+
return _as(map(self._hIDW, *zip(*_xy2(**wrap))))
|
|
651
649
|
|
|
652
650
|
@property_RO
|
|
653
651
|
def adjust(self):
|
|
@@ -790,15 +788,16 @@ class HeightIDWcosineAndoyerLambert(_HeightIDW):
|
|
|
790
788
|
and the I{angular} distance in C{radians} from function
|
|
791
789
|
L{pygeodesy.cosineAndoyerLambert_}.
|
|
792
790
|
'''
|
|
793
|
-
def __init__(self, knots, beta=2,
|
|
791
|
+
def __init__(self, knots, beta=2, **name__datum_wrap):
|
|
794
792
|
'''New L{HeightIDWcosineAndoyerLambert} interpolator.
|
|
795
793
|
|
|
796
|
-
@kwarg
|
|
797
|
-
|
|
794
|
+
@kwarg name__datum_wrap: Optional C{B{name}=NN} for this height
|
|
795
|
+
interpolator (C{str}) and any keyword arguments for
|
|
796
|
+
function L{pygeodesy.cosineAndoyerLambert}.
|
|
798
797
|
|
|
799
|
-
@see: L{Here<_HeightIDW.__init__>} for
|
|
798
|
+
@see: L{Here<_HeightIDW.__init__>} for further details.
|
|
800
799
|
'''
|
|
801
|
-
_HeightIDW.__init__(self, knots, beta=beta,
|
|
800
|
+
_HeightIDW.__init__(self, knots, beta=beta, **name__datum_wrap)
|
|
802
801
|
self._func = self._formy.cosineAndoyerLambert
|
|
803
802
|
|
|
804
803
|
if _FOR_DOCS:
|
|
@@ -812,15 +811,16 @@ class HeightIDWcosineForsytheAndoyerLambert(_HeightIDW):
|
|
|
812
811
|
and the I{angular} distance in C{radians} from function
|
|
813
812
|
L{pygeodesy.cosineForsytheAndoyerLambert_}.
|
|
814
813
|
'''
|
|
815
|
-
def __init__(self, knots, beta=2,
|
|
814
|
+
def __init__(self, knots, beta=2, **name__datum_wrap):
|
|
816
815
|
'''New L{HeightIDWcosineForsytheAndoyerLambert} interpolator.
|
|
817
816
|
|
|
818
|
-
@kwarg
|
|
819
|
-
|
|
817
|
+
@kwarg name__datum_wrap: Optional C{B{name}=NN} for this height
|
|
818
|
+
interpolator (C{str}) and any keyword arguments for
|
|
819
|
+
function L{pygeodesy.cosineForsytheAndoyerLambert}.
|
|
820
820
|
|
|
821
|
-
@see: L{Here<_HeightIDW.__init__>} for
|
|
821
|
+
@see: L{Here<_HeightIDW.__init__>} for further details.
|
|
822
822
|
'''
|
|
823
|
-
_HeightIDW.__init__(self, knots, beta=beta,
|
|
823
|
+
_HeightIDW.__init__(self, knots, beta=beta, **name__datum_wrap)
|
|
824
824
|
self._func = self._formy.cosineForsytheAndoyerLambert
|
|
825
825
|
|
|
826
826
|
if _FOR_DOCS:
|
|
@@ -835,15 +835,16 @@ class HeightIDWcosineLaw(_HeightIDW):
|
|
|
835
835
|
|
|
836
836
|
@note: See note at function L{pygeodesy.vincentys_}.
|
|
837
837
|
'''
|
|
838
|
-
def __init__(self, knots, beta=2,
|
|
838
|
+
def __init__(self, knots, beta=2, **name__radius_wrap):
|
|
839
839
|
'''New L{HeightIDWcosineLaw} interpolator.
|
|
840
840
|
|
|
841
|
-
@kwarg
|
|
842
|
-
|
|
841
|
+
@kwarg name__radius_wrap: Optional C{B{name}=NN} for this height
|
|
842
|
+
interpolator (C{str}) and any keyword arguments for
|
|
843
|
+
function L{pygeodesy.cosineLaw}.
|
|
843
844
|
|
|
844
|
-
@see: L{Here<_HeightIDW.__init__>} for
|
|
845
|
+
@see: L{Here<_HeightIDW.__init__>} for further details.
|
|
845
846
|
'''
|
|
846
|
-
_HeightIDW.__init__(self, knots, beta=beta,
|
|
847
|
+
_HeightIDW.__init__(self, knots, beta=beta, **name__radius_wrap)
|
|
847
848
|
self._func = self._formy.cosineLaw
|
|
848
849
|
|
|
849
850
|
if _FOR_DOCS:
|
|
@@ -857,21 +858,20 @@ class HeightIDWdistanceTo(_HeightIDW):
|
|
|
857
858
|
and the distance from the points' C{LatLon.distanceTo} method,
|
|
858
859
|
conventionally in C{meter}.
|
|
859
860
|
'''
|
|
860
|
-
def __init__(self, knots, beta=2,
|
|
861
|
+
def __init__(self, knots, beta=2, **name__distanceTo_kwds):
|
|
861
862
|
'''New L{HeightIDWdistanceTo} interpolator.
|
|
862
863
|
|
|
863
|
-
@kwarg
|
|
864
|
-
|
|
865
|
-
|
|
864
|
+
@kwarg name__distanceTo_kwds: Optional C{B{name}=NN} for this
|
|
865
|
+
height interpolator (C{str}) and keyword arguments
|
|
866
|
+
for B{C{knots}}' method C{LatLon.distanceTo}.
|
|
866
867
|
|
|
867
|
-
@see: L{Here<_HeightIDW.__init__>} for
|
|
868
|
+
@see: L{Here<_HeightIDW.__init__>} for further details.
|
|
868
869
|
|
|
869
870
|
@note: All B{C{points}} I{must} be instances of the same
|
|
870
871
|
ellipsoidal or spherical C{LatLon} class, I{not
|
|
871
872
|
checked}.
|
|
872
873
|
'''
|
|
873
|
-
_HeightIDW.__init__(self, knots, beta=beta,
|
|
874
|
-
**distanceTo_kwds)
|
|
874
|
+
_HeightIDW.__init__(self, knots, beta=beta, **name__distanceTo_kwds)
|
|
875
875
|
ks0 = _distanceTo(HeightError, knots=self._knots)[0]
|
|
876
876
|
# use knots[0] class and datum to create compatible points
|
|
877
877
|
# in _height_called instead of class LatLon_ and datum None
|
|
@@ -898,23 +898,23 @@ class HeightIDWequirectangular(_HeightIDW):
|
|
|
898
898
|
'''Height interpolator using U{Inverse Distance Weighting
|
|
899
899
|
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW) and
|
|
900
900
|
the I{angular} distance in C{radians squared} like function
|
|
901
|
-
L{pygeodesy.
|
|
901
|
+
L{pygeodesy.equirectangular4}.
|
|
902
902
|
'''
|
|
903
|
-
def __init__(self, knots, beta=2,
|
|
903
|
+
def __init__(self, knots, beta=2, **name__adjust_limit_wrap): # XXX beta=1
|
|
904
904
|
'''New L{HeightIDWequirectangular} interpolator.
|
|
905
905
|
|
|
906
|
-
@kwarg
|
|
907
|
-
|
|
906
|
+
@kwarg name__adjust_limit_wrap: Optional C{B{name}=NN} for this
|
|
907
|
+
height interpolator (C{str}) and keyword arguments
|
|
908
|
+
for function L{pygeodesy.equirectangular4}.
|
|
908
909
|
|
|
909
|
-
@see: L{Here<_HeightIDW.__init__>} for
|
|
910
|
+
@see: L{Here<_HeightIDW.__init__>} for further details.
|
|
910
911
|
'''
|
|
911
|
-
_HeightIDW.__init__(self, knots, beta=beta,
|
|
912
|
-
**adjust_limit_wrap)
|
|
912
|
+
_HeightIDW.__init__(self, knots, beta=beta, **name__adjust_limit_wrap)
|
|
913
913
|
|
|
914
914
|
def _distances(self, x, y):
|
|
915
915
|
'''(INTERNAL) Yield distances to C{(x, y)}.
|
|
916
916
|
'''
|
|
917
|
-
_f, kwds = self._formy.
|
|
917
|
+
_f, kwds = self._formy.equirectangular4, self._kwds
|
|
918
918
|
try:
|
|
919
919
|
for i, k in enumerate(self._knots):
|
|
920
920
|
yield _f(y, x, k.lat, k.lon, **kwds).distance2
|
|
@@ -932,16 +932,16 @@ class HeightIDWeuclidean(_HeightIDW):
|
|
|
932
932
|
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW) and the
|
|
933
933
|
I{angular} distance in C{radians} from function L{pygeodesy.euclidean_}.
|
|
934
934
|
'''
|
|
935
|
-
def __init__(self, knots, beta=2,
|
|
935
|
+
def __init__(self, knots, beta=2, **name__adjust_radius_wrap):
|
|
936
936
|
'''New L{HeightIDWeuclidean} interpolator.
|
|
937
937
|
|
|
938
|
-
@kwarg
|
|
939
|
-
|
|
938
|
+
@kwarg name__adjust_radius_wrap: Optional C{B{name}=NN} for this
|
|
939
|
+
height interpolator (C{str}) and keyword arguments
|
|
940
|
+
for function function L{pygeodesy.euclidean}.
|
|
940
941
|
|
|
941
|
-
@see: L{Here<_HeightIDW.__init__>} for
|
|
942
|
+
@see: L{Here<_HeightIDW.__init__>} for further details.
|
|
942
943
|
'''
|
|
943
|
-
_HeightIDW.__init__(self, knots, beta=beta,
|
|
944
|
-
**adjust_radius_wrap)
|
|
944
|
+
_HeightIDW.__init__(self, knots, beta=beta, **name__adjust_radius_wrap)
|
|
945
945
|
self._func = self._formy.euclidean
|
|
946
946
|
|
|
947
947
|
if _FOR_DOCS:
|
|
@@ -955,20 +955,21 @@ class HeightIDWexact(_HeightIDW):
|
|
|
955
955
|
and the I{angular} distance in C{degrees} from method
|
|
956
956
|
L{GeodesicExact.Inverse}.
|
|
957
957
|
'''
|
|
958
|
-
def __init__(self, knots, beta=2,
|
|
958
|
+
def __init__(self, knots, beta=2, datum=None, **name__wrap):
|
|
959
959
|
'''New L{HeightIDWexact} interpolator.
|
|
960
960
|
|
|
961
961
|
@kwarg datum: Datum to override the default C{Datums.WGS84} and
|
|
962
962
|
first B{C{knots}}' datum (L{Datum}, L{Ellipsoid},
|
|
963
963
|
L{Ellipsoid2} or L{a_f2Tuple}).
|
|
964
|
-
@kwarg
|
|
965
|
-
|
|
964
|
+
@kwarg name__wrap: Optional C{B{name}=NN} for this height interpolator
|
|
965
|
+
(C{str}) and a keyword argument for method C{Inverse1} of
|
|
966
|
+
class L{geodesicx.GeodesicExact}.
|
|
966
967
|
|
|
967
968
|
@raise TypeError: Invalid B{C{datum}}.
|
|
968
969
|
|
|
969
|
-
@see: L{Here<_HeightIDW.__init__>} for
|
|
970
|
+
@see: L{Here<_HeightIDW.__init__>} for further details.
|
|
970
971
|
'''
|
|
971
|
-
_HeightIDW.__init__(self, knots, beta=beta,
|
|
972
|
+
_HeightIDW.__init__(self, knots, beta=beta, **name__wrap)
|
|
972
973
|
self._datum_setter(datum)
|
|
973
974
|
self._func = self.datum.ellipsoid.geodesicx.Inverse1
|
|
974
975
|
|
|
@@ -983,16 +984,17 @@ class HeightIDWflatLocal(_HeightIDW):
|
|
|
983
984
|
and the I{angular} distance in C{radians squared} like function
|
|
984
985
|
L{pygeodesy.flatLocal_}/L{pygeodesy.hubeny_}.
|
|
985
986
|
'''
|
|
986
|
-
def __init__(self, knots, beta=2,
|
|
987
|
+
def __init__(self, knots, beta=2, **name__datum_hypot_scaled_wrap):
|
|
987
988
|
'''New L{HeightIDWflatLocal}/L{HeightIDWhubeny} interpolator.
|
|
988
989
|
|
|
989
|
-
@kwarg
|
|
990
|
-
|
|
990
|
+
@kwarg name__datum_hypot_scaled_wrap: Optional C{B{name}=NN}
|
|
991
|
+
for this height interpolator (C{str}) and any
|
|
992
|
+
keyword arguments for L{pygeodesy.flatLocal}.
|
|
991
993
|
|
|
992
|
-
@see: L{HeightIDW<_HeightIDW.__init__>} for
|
|
994
|
+
@see: L{HeightIDW<_HeightIDW.__init__>} for further details.
|
|
993
995
|
'''
|
|
994
|
-
_HeightIDW.__init__(self, knots, beta=beta,
|
|
995
|
-
**
|
|
996
|
+
_HeightIDW.__init__(self, knots, beta=beta,
|
|
997
|
+
**name__datum_hypot_scaled_wrap)
|
|
996
998
|
self._func = self._formy.flatLocal
|
|
997
999
|
|
|
998
1000
|
if _FOR_DOCS:
|
|
@@ -1006,15 +1008,16 @@ class HeightIDWflatPolar(_HeightIDW):
|
|
|
1006
1008
|
and the I{angular} distance in C{radians} from function
|
|
1007
1009
|
L{pygeodesy.flatPolar_}.
|
|
1008
1010
|
'''
|
|
1009
|
-
def __init__(self, knots, beta=2,
|
|
1011
|
+
def __init__(self, knots, beta=2, **name__radius_wrap):
|
|
1010
1012
|
'''New L{HeightIDWflatPolar} interpolator.
|
|
1011
1013
|
|
|
1012
|
-
@kwarg
|
|
1013
|
-
|
|
1014
|
+
@kwarg name__radius_wrap: Optional C{B{name}=NN} for this
|
|
1015
|
+
height interpolator (C{str}) and any keyword
|
|
1016
|
+
arguments for function L{pygeodesy.flatPolar}.
|
|
1014
1017
|
|
|
1015
|
-
@see: L{Here<_HeightIDW.__init__>} for
|
|
1018
|
+
@see: L{Here<_HeightIDW.__init__>} for further details.
|
|
1016
1019
|
'''
|
|
1017
|
-
_HeightIDW.__init__(self, knots, beta=beta,
|
|
1020
|
+
_HeightIDW.__init__(self, knots, beta=beta, **name__radius_wrap)
|
|
1018
1021
|
self._func = self._formy.flatPolar
|
|
1019
1022
|
|
|
1020
1023
|
if _FOR_DOCS:
|
|
@@ -1029,15 +1032,16 @@ class HeightIDWhaversine(_HeightIDW):
|
|
|
1029
1032
|
|
|
1030
1033
|
@note: See note at function L{pygeodesy.vincentys_}.
|
|
1031
1034
|
'''
|
|
1032
|
-
def __init__(self, knots, beta=2,
|
|
1035
|
+
def __init__(self, knots, beta=2, **name__radius_wrap):
|
|
1033
1036
|
'''New L{HeightIDWhaversine} interpolator.
|
|
1034
1037
|
|
|
1035
|
-
@kwarg
|
|
1036
|
-
|
|
1038
|
+
@kwarg name__radius_wrap: Optional C{B{name}=NN} for this
|
|
1039
|
+
height interpolator (C{str}) and any keyword
|
|
1040
|
+
arguments for function L{pygeodesy.haversine}.
|
|
1037
1041
|
|
|
1038
|
-
@see: L{Here<_HeightIDW.__init__>} for
|
|
1042
|
+
@see: L{Here<_HeightIDW.__init__>} for further details.
|
|
1039
1043
|
'''
|
|
1040
|
-
_HeightIDW.__init__(self, knots, beta=beta,
|
|
1044
|
+
_HeightIDW.__init__(self, knots, beta=beta, **name__radius_wrap)
|
|
1041
1045
|
self._func = self._formy.haversine
|
|
1042
1046
|
|
|
1043
1047
|
if _FOR_DOCS:
|
|
@@ -1061,23 +1065,24 @@ class HeightIDWkarney(_HeightIDW):
|
|
|
1061
1065
|
<https://geographiclib.sourceforge.io/Python/doc/code.html#
|
|
1062
1066
|
geographiclib.geodesic.Geodesic.Inverse>}.
|
|
1063
1067
|
'''
|
|
1064
|
-
def __init__(self, knots, beta=2,
|
|
1068
|
+
def __init__(self, knots, beta=2, datum=None, **name__wrap):
|
|
1065
1069
|
'''New L{HeightIDWkarney} interpolator.
|
|
1066
1070
|
|
|
1067
1071
|
@kwarg datum: Datum to override the default C{Datums.WGS84} and
|
|
1068
1072
|
first B{C{knots}}' datum (L{Datum}, L{Ellipsoid},
|
|
1069
1073
|
L{Ellipsoid2} or L{a_f2Tuple}).
|
|
1070
|
-
@kwarg
|
|
1071
|
-
|
|
1074
|
+
@kwarg name__wrap: Optional C{B{name}=NN} for this height interpolator
|
|
1075
|
+
(C{str}) and a keyword argument for method C{Inverse1} of
|
|
1076
|
+
class L{geodesicw.Geodesic}.
|
|
1072
1077
|
|
|
1073
1078
|
@raise ImportError: Package U{geographiclib
|
|
1074
1079
|
<https://PyPI.org/project/geographiclib>} missing.
|
|
1075
1080
|
|
|
1076
1081
|
@raise TypeError: Invalid B{C{datum}}.
|
|
1077
1082
|
|
|
1078
|
-
@see: L{Here<_HeightIDW.__init__>} for
|
|
1083
|
+
@see: L{Here<_HeightIDW.__init__>} for further details.
|
|
1079
1084
|
'''
|
|
1080
|
-
_HeightIDW.__init__(self, knots, beta=beta,
|
|
1085
|
+
_HeightIDW.__init__(self, knots, beta=beta, **name__wrap)
|
|
1081
1086
|
self._datum_setter(datum)
|
|
1082
1087
|
self._func = self.datum.ellipsoid.geodesic.Inverse1
|
|
1083
1088
|
|
|
@@ -1091,15 +1096,16 @@ class HeightIDWthomas(_HeightIDW):
|
|
|
1091
1096
|
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW) and the
|
|
1092
1097
|
I{angular} distance in C{radians} from function L{pygeodesy.thomas_}.
|
|
1093
1098
|
'''
|
|
1094
|
-
def __init__(self, knots, beta=2,
|
|
1099
|
+
def __init__(self, knots, beta=2, **name__datum_wrap):
|
|
1095
1100
|
'''New L{HeightIDWthomas} interpolator.
|
|
1096
1101
|
|
|
1097
|
-
@kwarg
|
|
1098
|
-
|
|
1102
|
+
@kwarg name__datum_wrap: Optional C{B{name}=NN} for this
|
|
1103
|
+
height interpolator (C{str}) and any keyword
|
|
1104
|
+
arguments for function L{pygeodesy.thomas}.
|
|
1099
1105
|
|
|
1100
|
-
@see: L{Here<_HeightIDW.__init__>} for
|
|
1106
|
+
@see: L{Here<_HeightIDW.__init__>} for further details.
|
|
1101
1107
|
'''
|
|
1102
|
-
_HeightIDW.__init__(self, knots, beta=beta,
|
|
1108
|
+
_HeightIDW.__init__(self, knots, beta=beta, **name__datum_wrap)
|
|
1103
1109
|
self._func = self._formy.thomas
|
|
1104
1110
|
|
|
1105
1111
|
if _FOR_DOCS:
|
|
@@ -1114,15 +1120,16 @@ class HeightIDWvincentys(_HeightIDW):
|
|
|
1114
1120
|
|
|
1115
1121
|
@note: See note at function L{pygeodesy.vincentys_}.
|
|
1116
1122
|
'''
|
|
1117
|
-
def __init__(self, knots, beta=2,
|
|
1123
|
+
def __init__(self, knots, beta=2, **name__radius_wrap):
|
|
1118
1124
|
'''New L{HeightIDWvincentys} interpolator.
|
|
1119
1125
|
|
|
1120
|
-
@kwarg
|
|
1121
|
-
|
|
1126
|
+
@kwarg name__radius_wrap: Optional C{B{name}=NN} for this
|
|
1127
|
+
height interpolator (C{str}) and any keyword
|
|
1128
|
+
arguments for function L{pygeodesy.vincentys}.
|
|
1122
1129
|
|
|
1123
|
-
@see: L{Here<_HeightIDW.__init__>} for
|
|
1130
|
+
@see: L{Here<_HeightIDW.__init__>} for further details.
|
|
1124
1131
|
'''
|
|
1125
|
-
_HeightIDW.__init__(self, knots, beta=beta,
|
|
1132
|
+
_HeightIDW.__init__(self, knots, beta=beta, **name__radius_wrap)
|
|
1126
1133
|
self._func = self._formy.vincentys
|
|
1127
1134
|
|
|
1128
1135
|
if _FOR_DOCS:
|