pygeodesy 24.12.12__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.
- {PyGeodesy-24.12.12.dist-info → PyGeodesy-25.1.5.dist-info}/METADATA +32 -33
- {PyGeodesy-24.12.12.dist-info → PyGeodesy-25.1.5.dist-info}/RECORD +26 -26
- pygeodesy/__init__.py +16 -16
- pygeodesy/basics.py +59 -7
- pygeodesy/constants.py +2 -2
- pygeodesy/deprecated/__init__.py +1 -1
- pygeodesy/deprecated/classes.py +85 -1
- pygeodesy/deprecated/datum.py +4 -4
- pygeodesy/deprecated/functions.py +25 -1
- pygeodesy/ecef.py +4 -4
- pygeodesy/fmath.py +2 -2
- pygeodesy/formy.py +350 -463
- pygeodesy/frechet.py +28 -85
- pygeodesy/geodesici.py +4 -4
- pygeodesy/geodesicx/__init__.py +1 -1
- pygeodesy/geodesicx/__main__.py +3 -4
- pygeodesy/geoids.py +276 -202
- pygeodesy/hausdorff.py +22 -80
- pygeodesy/heights.py +114 -149
- pygeodesy/latlonBase.py +51 -87
- pygeodesy/lazily.py +44 -35
- pygeodesy/ltpTuples.py +2 -2
- pygeodesy/named.py +11 -11
- pygeodesy/utily.py +188 -115
- {PyGeodesy-24.12.12.dist-info → PyGeodesy-25.1.5.dist-info}/WHEEL +0 -0
- {PyGeodesy-24.12.12.dist-info → PyGeodesy-25.1.5.dist-info}/top_level.txt +0 -0
pygeodesy/heights.py
CHANGED
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
u'''Height interpolations at C{LatLon} points from known C{knots}.
|
|
5
5
|
|
|
6
|
-
Classes L{HeightCubic}, L{
|
|
7
|
-
L{
|
|
8
|
-
L{
|
|
9
|
-
L{
|
|
10
|
-
L{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
lat-/longitudes from a set of C{LatLon} points with I{known heights}.
|
|
6
|
+
Classes L{HeightCubic}, L{HeightIDWcosineLaw}, L{HeightIDWdistanceTo},
|
|
7
|
+
L{HeightIDWequirectangular}, L{HeightIDWeuclidean}, L{HeightIDWflatLocal},
|
|
8
|
+
L{HeightIDWflatPolar}, L{HeightIDWhaversine}, L{HeightIDWhubeny},
|
|
9
|
+
L{HeightIDWkarney}, L{HeightIDWthomas}, L{HeightIDWvincentys}, L{HeightLinear},
|
|
10
|
+
L{HeightLSQBiSpline} and L{HeightSmoothBiSpline} to interpolate the height of
|
|
11
|
+
C{LatLon} locations or separate lat-/longitudes from a set of C{LatLon} points
|
|
12
|
+
with I{known heights}.
|
|
14
13
|
|
|
15
14
|
Typical usage
|
|
16
15
|
=============
|
|
@@ -29,7 +28,7 @@ arguments to select different interpolation options
|
|
|
29
28
|
|
|
30
29
|
C{>>> hinterpolator = HeightXyz(knots, **options)}
|
|
31
30
|
|
|
32
|
-
4. Get the interpolated height of
|
|
31
|
+
4. Get the interpolated height of C{LatLon} location(s) with
|
|
33
32
|
|
|
34
33
|
C{>>> ll = LatLon(1, 2, ...)}
|
|
35
34
|
|
|
@@ -43,7 +42,7 @@ or a list, tuple, generator, etc. of C{LatLon}s
|
|
|
43
42
|
|
|
44
43
|
C{>>> hs = hinterpolator(lls)}
|
|
45
44
|
|
|
46
|
-
5. For separate lat- and longitudes invoke the C{
|
|
45
|
+
5. For separate lat- and longitudes invoke the C{height} method as
|
|
47
46
|
|
|
48
47
|
C{>>> h = hinterpolator.height(lat, lon)}
|
|
49
48
|
|
|
@@ -51,6 +50,10 @@ or as 2 lists, 2 tuples, etc.
|
|
|
51
50
|
|
|
52
51
|
C{>>> hs = hinterpolator.height(lats, lons)}
|
|
53
52
|
|
|
53
|
+
or for several positionals use the C{height_} method
|
|
54
|
+
|
|
55
|
+
C{>>> h1, h2, ... = hinterpolator.height_(lat1, lon1, lat2, lon2, ...)}
|
|
56
|
+
|
|
54
57
|
@note: Classes L{HeightCubic} and L{HeightLinear} require package U{numpy
|
|
55
58
|
<https://PyPI.org/project/numpy>}, classes L{HeightLSQBiSpline} and
|
|
56
59
|
L{HeightSmoothBiSpline} require package U{scipy<https://SciPy.org>}.
|
|
@@ -68,15 +71,15 @@ C{>>> hs = hinterpolator.height(lats, lons)}
|
|
|
68
71
|
# make sure int/int division yields float quotient, see .basics
|
|
69
72
|
from __future__ import division as _; del _ # PYCHOK semicolon
|
|
70
73
|
|
|
71
|
-
from pygeodesy.basics import isscalar, len2, map1,
|
|
74
|
+
from pygeodesy.basics import isscalar, len2, map1, min2, _xnumpy, _xscipy
|
|
72
75
|
from pygeodesy.constants import EPS, PI, PI_2, PI2, _0_0, _90_0, _180_0
|
|
73
76
|
from pygeodesy.datums import _ellipsoidal_datum, _WGS84
|
|
74
77
|
from pygeodesy.errors import _AssertionError, LenError, PointsError, \
|
|
75
78
|
_SciPyIssue, _xattr, _xkwds, _xkwds_get, _xkwds_item2
|
|
76
79
|
# from pygeodesy.fmath import fidw # _MODS
|
|
77
|
-
# from pygeodesy.formy import
|
|
78
|
-
#
|
|
79
|
-
#
|
|
80
|
+
# from pygeodesy.formy import cosineLaw, cosineLawAL, cosineLawFAL, equirectangular4, \
|
|
81
|
+
# euclidean, flatLocal, flatPolar, haversine, thomas, \
|
|
82
|
+
# vincentys # _MODS.into
|
|
80
83
|
# from pygeodesy.internals import _version2 # _MODS
|
|
81
84
|
from pygeodesy.interns import NN, _COMMASPACE_, _insufficient_, _NOTEQUAL_, \
|
|
82
85
|
_PLUS_, _scipy_, _SPACE_, _STAR_
|
|
@@ -91,7 +94,7 @@ from pygeodesy.units import _isDegrees, Float_, Int_
|
|
|
91
94
|
# from math import radians # from .points
|
|
92
95
|
|
|
93
96
|
__all__ = _ALL_LAZY.heights
|
|
94
|
-
__version__ = '24.
|
|
97
|
+
__version__ = '24.12.31'
|
|
95
98
|
|
|
96
99
|
_error_ = 'error'
|
|
97
100
|
_formy = _MODS.into(formy=__name__)
|
|
@@ -163,15 +166,15 @@ def _xyhs(wrap=False, _lat=_90_0, _lon=_180_0, **name_lls):
|
|
|
163
166
|
# map (lat, lon, h) to (x, y, h) in radians, offset
|
|
164
167
|
# x as 0 <= lon <= PI2 and y as 0 <= lat <= PI
|
|
165
168
|
name, lls = _xkwds_item2(name_lls)
|
|
166
|
-
|
|
169
|
+
_w, _r = _Wrap._latlonop(wrap), radians
|
|
167
170
|
try:
|
|
168
171
|
for i, ll in enumerate(lls):
|
|
169
172
|
y, x = _w(ll.lat, ll.lon)
|
|
170
173
|
yield max(_0_0, _r(x + _lon)), \
|
|
171
174
|
max(_0_0, _r(y + _lat)), ll.height
|
|
172
|
-
except Exception as
|
|
175
|
+
except Exception as x:
|
|
173
176
|
i = Fmt.INDEX(name, i)
|
|
174
|
-
raise HeightError(i, ll, cause=
|
|
177
|
+
raise HeightError(i, ll, cause=x)
|
|
175
178
|
|
|
176
179
|
|
|
177
180
|
class _HeightNamed(_Named): # in .geoids
|
|
@@ -181,21 +184,39 @@ class _HeightNamed(_Named): # in .geoids
|
|
|
181
184
|
_Error = HeightError
|
|
182
185
|
_kmin = 2 # min number of knots
|
|
183
186
|
|
|
184
|
-
|
|
187
|
+
_LLiC = LatLon_ # ._height class
|
|
185
188
|
_np_sp = None # (numpy, scipy)
|
|
186
189
|
_wrap = None # wrap knots and llis
|
|
187
190
|
|
|
191
|
+
def __call__(self, *llis, **wrap): # PYCHOK no cover
|
|
192
|
+
'''Interpolate the height for one or several locations. I{Must be overloaded}.
|
|
193
|
+
|
|
194
|
+
@arg llis: One or more locations (each C{LatLon}), all positional.
|
|
195
|
+
@kwarg wrap: If C{B{wrap}=True} to wrap or I{normalize} all B{C{llis}}
|
|
196
|
+
locations (C{bool}), overriding the B{C{knots}}' setting.
|
|
197
|
+
|
|
198
|
+
@return: A single interpolated height (C{float}) or a list or tuple of
|
|
199
|
+
interpolated heights (each C{float}).
|
|
200
|
+
|
|
201
|
+
@raise HeightError: Insufficient number of B{C{llis}} or an invalid B{C{lli}}.
|
|
202
|
+
|
|
203
|
+
@raise SciPyError: A C{scipy} issue.
|
|
204
|
+
|
|
205
|
+
@raise SciPyWarning: A C{scipy} warning as exception.
|
|
206
|
+
'''
|
|
207
|
+
self._notOverloaded(callername='__call__', *llis, **wrap)
|
|
208
|
+
|
|
188
209
|
def _as_lls(self, lats, lons): # in .geoids
|
|
189
|
-
|
|
210
|
+
LLiC, d = self._LLiC, self.datum
|
|
190
211
|
if _isDegrees(lats) and _isDegrees(lons):
|
|
191
|
-
llis =
|
|
212
|
+
llis = LLiC(lats, lons, datum=d)
|
|
192
213
|
else:
|
|
193
214
|
n, lats = len2(lats)
|
|
194
215
|
m, lons = len2(lons)
|
|
195
216
|
if n != m: # format a LenError, but raise self._Error
|
|
196
217
|
e = LenError(self.__class__, lats=n, lons=m, txt=None)
|
|
197
218
|
raise self._Error(str(e))
|
|
198
|
-
llis = [
|
|
219
|
+
llis = [LLiC(*t, datum=d) for t in zip(lats, lons)]
|
|
199
220
|
return llis
|
|
200
221
|
|
|
201
222
|
@property_RO
|
|
@@ -204,6 +225,24 @@ class _HeightNamed(_Named): # in .geoids
|
|
|
204
225
|
'''
|
|
205
226
|
return self._datum
|
|
206
227
|
|
|
228
|
+
def height(self, lats, lons, **wrap): # PYCHOK no cover
|
|
229
|
+
'''I{Must be overloaded}.'''
|
|
230
|
+
self._notOverloaded(lats, lons, **wrap)
|
|
231
|
+
|
|
232
|
+
def height_(self, *latlons, **wrap):
|
|
233
|
+
'''Interpolate the height for each M{(latlons[i], latlons[i+1]) pair
|
|
234
|
+
for i in range(0, len(latlons), B{2})}.
|
|
235
|
+
|
|
236
|
+
@arg latlons: Alternating lat-/longitude pairs (each C{degrees}),
|
|
237
|
+
all positional.
|
|
238
|
+
|
|
239
|
+
@see: Method C{height} for further details.
|
|
240
|
+
|
|
241
|
+
@return: A tuple of interpolated heights (each C{float}).
|
|
242
|
+
'''
|
|
243
|
+
lls = self._as_lls(latlons[0::2], latlons[1::2])
|
|
244
|
+
return tuple(self(lls, **wrap))
|
|
245
|
+
|
|
207
246
|
@property_RO
|
|
208
247
|
def kmin(self):
|
|
209
248
|
'''Get the minimum number of knots (C{int}).
|
|
@@ -225,26 +264,6 @@ class _HeightBase(_HeightNamed): # in .geoids
|
|
|
225
264
|
-3: 'cubic',
|
|
226
265
|
-5: 'quintic'}
|
|
227
266
|
|
|
228
|
-
def __call__(self, *llis, **wrap): # PYCHOK no cover
|
|
229
|
-
'''Interpolate the height for one or several locations. I{Must be overloaded}.
|
|
230
|
-
|
|
231
|
-
@arg llis: One or more locations (C{LatLon}s), all positional.
|
|
232
|
-
@kwarg wrap: If C{True}, wrap or I{normalize} all B{C{llis}}
|
|
233
|
-
locations (C{bool}), overriding the B{C{knots}}
|
|
234
|
-
setting.
|
|
235
|
-
|
|
236
|
-
@return: A single interpolated height (C{float}) or a list
|
|
237
|
-
or tuple of interpolated heights (C{float}s).
|
|
238
|
-
|
|
239
|
-
@raise HeightError: Insufficient number of B{C{llis}} or
|
|
240
|
-
an invalid B{C{lli}}.
|
|
241
|
-
|
|
242
|
-
@raise SciPyError: A C{scipy} issue.
|
|
243
|
-
|
|
244
|
-
@raise SciPyWarning: A C{scipy} warning as exception.
|
|
245
|
-
'''
|
|
246
|
-
self._notOverloaded(callername='__call__', *llis, **wrap)
|
|
247
|
-
|
|
248
267
|
def _as_xyllis4(self, llis, **wrap):
|
|
249
268
|
# convert lli C{LatLon}s to tuples or C{NumPy} arrays of
|
|
250
269
|
# C{SciPy} sphericals and determine the return type
|
|
@@ -282,26 +301,25 @@ class _HeightBase(_HeightNamed): # in .geoids
|
|
|
282
301
|
_ev = _ev[1:].split(None, 4)
|
|
283
302
|
return Fmt.PAREN(_ev['sfb'.index(_ev[0][0])])
|
|
284
303
|
|
|
285
|
-
def height(self, lats, lons, **wrap):
|
|
286
|
-
'''Interpolate the height for one or several lat-/longitudes.
|
|
304
|
+
def height(self, lats, lons, **wrap):
|
|
305
|
+
'''Interpolate the height for one or several lat-/longitudes.
|
|
287
306
|
|
|
288
|
-
@arg lats: Latitude or latitudes (
|
|
289
|
-
@arg lons: Longitude or longitudes (
|
|
290
|
-
@kwarg wrap:
|
|
291
|
-
|
|
292
|
-
the B{C{knots}}
|
|
307
|
+
@arg lats: Latitude or latitudes (each C{degrees}).
|
|
308
|
+
@arg lons: Longitude or longitudes (each C{degrees}).
|
|
309
|
+
@kwarg wrap: Kewyord argument C{B{wrap}=False} (C{bool}). Use C{True} to
|
|
310
|
+
wrap or I{normalize} all B{C{lats}} and B{C{lons}} locationts,
|
|
311
|
+
overriding the B{C{knots}}' setting.
|
|
293
312
|
|
|
294
|
-
@return: A single interpolated height (C{float}) or a list of
|
|
295
|
-
|
|
313
|
+
@return: A single interpolated height (C{float}) or a list of interpolated
|
|
314
|
+
heights (each C{float}).
|
|
296
315
|
|
|
297
|
-
@raise HeightError: Insufficient or
|
|
298
|
-
B{C{lats}} and B{C{lons}}.
|
|
316
|
+
@raise HeightError: Insufficient or unequal number of B{C{lats}} and B{C{lons}}.
|
|
299
317
|
|
|
300
318
|
@raise SciPyError: A C{scipy} issue.
|
|
301
319
|
|
|
302
320
|
@raise SciPyWarning: A C{scipy} warning as exception.
|
|
303
321
|
'''
|
|
304
|
-
lls = self._as_lls(lats, lons)
|
|
322
|
+
lls = self._as_lls(lats, lons) # dup of _HeightIDW.height
|
|
305
323
|
return self(lls, **wrap) # __call__(ll) or __call__(lls)
|
|
306
324
|
|
|
307
325
|
def _interp2d(self, xs, ys, hs, kind=-3):
|
|
@@ -488,11 +506,9 @@ class HeightLSQBiSpline(_HeightBase):
|
|
|
488
506
|
m, w = len2(w)
|
|
489
507
|
if m != n:
|
|
490
508
|
raise LenError(HeightLSQBiSpline, weight=m, knots=n)
|
|
491
|
-
|
|
492
|
-
m = min(w)
|
|
509
|
+
m, i = min2(*map(float, w))
|
|
493
510
|
if m <= 0: # PYCHOK no cover
|
|
494
|
-
|
|
495
|
-
raise HeightError(w, m)
|
|
511
|
+
raise HeightError(Fmt.INDEX(weight=i), m)
|
|
496
512
|
try:
|
|
497
513
|
if not EPS < low < (PI_2 - EPS): # 1e-4 like SciPy example
|
|
498
514
|
raise HeightError(low=low)
|
|
@@ -663,9 +679,9 @@ class _HeightIDW(_HeightNamed):
|
|
|
663
679
|
try:
|
|
664
680
|
for i, k in enumerate(self._knots):
|
|
665
681
|
yield _f(y, x, k.lat, k.lon, **kwds)
|
|
666
|
-
except Exception as
|
|
682
|
+
except Exception as x:
|
|
667
683
|
i = Fmt.INDEX(knots=i)
|
|
668
|
-
raise HeightError(i, k, cause=
|
|
684
|
+
raise HeightError(i, k, cause=x)
|
|
669
685
|
|
|
670
686
|
def _distancesTo(self, _To):
|
|
671
687
|
'''(INTERNAL) Yield distances C{_To}.
|
|
@@ -673,25 +689,26 @@ class _HeightIDW(_HeightNamed):
|
|
|
673
689
|
try:
|
|
674
690
|
for i, k in enumerate(self._knots):
|
|
675
691
|
yield _To(k)
|
|
676
|
-
except Exception as
|
|
692
|
+
except Exception as x:
|
|
677
693
|
i = Fmt.INDEX(knots=i)
|
|
678
|
-
raise HeightError(i, k, cause=
|
|
694
|
+
raise HeightError(i, k, cause=x)
|
|
679
695
|
|
|
680
696
|
def height(self, lats, lons, **wrap):
|
|
681
697
|
'''Interpolate the height for one or several lat-/longitudes.
|
|
682
698
|
|
|
683
|
-
@arg lats: Latitude or latitudes (
|
|
684
|
-
@arg lons: Longitude or longitudes (
|
|
685
|
-
@kwarg wrap:
|
|
686
|
-
|
|
699
|
+
@arg lats: Latitude or latitudes (each C{degrees}).
|
|
700
|
+
@arg lons: Longitude or longitudes (each C{degrees}).
|
|
701
|
+
@kwarg wrap: Keyword argument C{B{wrap}=False} (C{bool}). Use
|
|
702
|
+
C{B{wrap}=True} to wrap or I{normalize} all B{C{lats}}
|
|
703
|
+
and B{C{lons}}.
|
|
687
704
|
|
|
688
705
|
@return: A single interpolated height (C{float}) or a list of
|
|
689
|
-
interpolated heights (C{float}
|
|
706
|
+
interpolated heights (each C{float}).
|
|
690
707
|
|
|
691
|
-
@raise HeightError: Insufficient or
|
|
708
|
+
@raise HeightError: Insufficient or unequal number of B{C{lats}}
|
|
692
709
|
and B{C{lons}} or a L{pygeodesy.fidw} issue.
|
|
693
710
|
'''
|
|
694
|
-
lls = self._as_lls(lats, lons)
|
|
711
|
+
lls = self._as_lls(lats, lons) # dup of _HeightBase.height
|
|
695
712
|
return self(lls, **wrap) # __call__(ll) or __call__(lls)
|
|
696
713
|
|
|
697
714
|
@Property_RO
|
|
@@ -753,69 +770,23 @@ class _HeightIDW(_HeightNamed):
|
|
|
753
770
|
return _xkwds_get(self._kwds, wrap=self._wrap)
|
|
754
771
|
|
|
755
772
|
|
|
756
|
-
class HeightIDWcosineAndoyerLambert(_HeightIDW):
|
|
757
|
-
'''Height interpolator using U{Inverse Distance Weighting
|
|
758
|
-
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW)
|
|
759
|
-
and the I{angular} distance in C{radians} from function
|
|
760
|
-
L{pygeodesy.cosineAndoyerLambert_}.
|
|
761
|
-
'''
|
|
762
|
-
def __init__(self, knots, beta=2, **name__datum_wrap):
|
|
763
|
-
'''New L{HeightIDWcosineAndoyerLambert} interpolator.
|
|
764
|
-
|
|
765
|
-
@kwarg name__datum_wrap: Optional C{B{name}=NN} for this height
|
|
766
|
-
interpolator (C{str}) and any keyword arguments for
|
|
767
|
-
function L{pygeodesy.cosineAndoyerLambert}.
|
|
768
|
-
|
|
769
|
-
@see: L{Here<_HeightIDW.__init__>} for further details.
|
|
770
|
-
'''
|
|
771
|
-
_HeightIDW.__init__(self, knots, beta=beta, **name__datum_wrap)
|
|
772
|
-
self._func = _formy.cosineAndoyerLambert
|
|
773
|
-
|
|
774
|
-
if _FOR_DOCS:
|
|
775
|
-
__call__ = _HeightIDW.__call__
|
|
776
|
-
height = _HeightIDW.height
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
class HeightIDWcosineForsytheAndoyerLambert(_HeightIDW):
|
|
780
|
-
'''Height interpolator using U{Inverse Distance Weighting
|
|
781
|
-
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW)
|
|
782
|
-
and the I{angular} distance in C{radians} from function
|
|
783
|
-
L{pygeodesy.cosineForsytheAndoyerLambert_}.
|
|
784
|
-
'''
|
|
785
|
-
def __init__(self, knots, beta=2, **name__datum_wrap):
|
|
786
|
-
'''New L{HeightIDWcosineForsytheAndoyerLambert} interpolator.
|
|
787
|
-
|
|
788
|
-
@kwarg name__datum_wrap: Optional C{B{name}=NN} for this height
|
|
789
|
-
interpolator (C{str}) and any keyword arguments for
|
|
790
|
-
function L{pygeodesy.cosineForsytheAndoyerLambert}.
|
|
791
|
-
|
|
792
|
-
@see: L{Here<_HeightIDW.__init__>} for further details.
|
|
793
|
-
'''
|
|
794
|
-
_HeightIDW.__init__(self, knots, beta=beta, **name__datum_wrap)
|
|
795
|
-
self._func = _formy.cosineForsytheAndoyerLambert
|
|
796
|
-
|
|
797
|
-
if _FOR_DOCS:
|
|
798
|
-
__call__ = _HeightIDW.__call__
|
|
799
|
-
height = _HeightIDW.height
|
|
800
|
-
|
|
801
|
-
|
|
802
773
|
class HeightIDWcosineLaw(_HeightIDW):
|
|
803
774
|
'''Height interpolator using U{Inverse Distance Weighting
|
|
804
|
-
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW)
|
|
805
|
-
|
|
775
|
+
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW)
|
|
776
|
+
and function L{pygeodesy.cosineLaw}.
|
|
806
777
|
|
|
807
778
|
@note: See note at function L{pygeodesy.vincentys_}.
|
|
808
779
|
'''
|
|
809
|
-
def __init__(self, knots, beta=2, **
|
|
780
|
+
def __init__(self, knots, beta=2, **name__corr_earth_datum_radius_wrap):
|
|
810
781
|
'''New L{HeightIDWcosineLaw} interpolator.
|
|
811
782
|
|
|
812
|
-
@kwarg
|
|
813
|
-
interpolator (C{str}) and any keyword
|
|
814
|
-
function L{pygeodesy.cosineLaw}.
|
|
783
|
+
@kwarg name__corr_earth_datum_radius_wrap: Optional C{B{name}=NN}
|
|
784
|
+
for this height interpolator (C{str}) and any keyword
|
|
785
|
+
arguments for function L{pygeodesy.cosineLaw}.
|
|
815
786
|
|
|
816
787
|
@see: L{Here<_HeightIDW.__init__>} for further details.
|
|
817
788
|
'''
|
|
818
|
-
_HeightIDW.__init__(self, knots, beta=beta, **
|
|
789
|
+
_HeightIDW.__init__(self, knots, beta=beta, **name__corr_earth_datum_radius_wrap)
|
|
819
790
|
self._func = _formy.cosineLaw
|
|
820
791
|
|
|
821
792
|
if _FOR_DOCS:
|
|
@@ -826,8 +797,7 @@ class HeightIDWcosineLaw(_HeightIDW):
|
|
|
826
797
|
class HeightIDWdistanceTo(_HeightIDW):
|
|
827
798
|
'''Height interpolator using U{Inverse Distance Weighting
|
|
828
799
|
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW)
|
|
829
|
-
and the
|
|
830
|
-
conventionally in C{meter}.
|
|
800
|
+
and the points' C{LatLon.distanceTo} method.
|
|
831
801
|
'''
|
|
832
802
|
def __init__(self, knots, beta=2, **name__distanceTo_kwds):
|
|
833
803
|
'''New L{HeightIDWdistanceTo} interpolator.
|
|
@@ -847,12 +817,12 @@ class HeightIDWdistanceTo(_HeightIDW):
|
|
|
847
817
|
# use knots[0] class and datum to create compatible points
|
|
848
818
|
# in ._as_lls instead of class LatLon_ and datum None
|
|
849
819
|
self._datum = ks0.datum
|
|
850
|
-
self.
|
|
820
|
+
self._LLiC = ks0.classof # type(ks0)
|
|
851
821
|
|
|
852
822
|
def _distances(self, x, y):
|
|
853
823
|
'''(INTERNAL) Yield distances to C{(x, y)}.
|
|
854
824
|
'''
|
|
855
|
-
kwds, ll = self._kwds, self.
|
|
825
|
+
kwds, ll = self._kwds, self._LLiC(y, x)
|
|
856
826
|
|
|
857
827
|
def _To(k):
|
|
858
828
|
return k.distanceTo(ll, **kwds)
|
|
@@ -866,9 +836,8 @@ class HeightIDWdistanceTo(_HeightIDW):
|
|
|
866
836
|
|
|
867
837
|
class HeightIDWequirectangular(_HeightIDW):
|
|
868
838
|
'''Height interpolator using U{Inverse Distance Weighting
|
|
869
|
-
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW)
|
|
870
|
-
|
|
871
|
-
L{pygeodesy.equirectangular4}.
|
|
839
|
+
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW)
|
|
840
|
+
and function L{pygeodesy.equirectangular4}.
|
|
872
841
|
'''
|
|
873
842
|
def __init__(self, knots, beta=2, **name__adjust_limit_wrap): # XXX beta=1
|
|
874
843
|
'''New L{HeightIDWequirectangular} interpolator.
|
|
@@ -898,8 +867,8 @@ class HeightIDWequirectangular(_HeightIDW):
|
|
|
898
867
|
|
|
899
868
|
class HeightIDWeuclidean(_HeightIDW):
|
|
900
869
|
'''Height interpolator using U{Inverse Distance Weighting
|
|
901
|
-
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW)
|
|
902
|
-
|
|
870
|
+
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW)
|
|
871
|
+
and function L{pygeodesy.euclidean_}.
|
|
903
872
|
'''
|
|
904
873
|
def __init__(self, knots, beta=2, **name__adjust_radius_wrap):
|
|
905
874
|
'''New L{HeightIDWeuclidean} interpolator.
|
|
@@ -921,8 +890,7 @@ class HeightIDWeuclidean(_HeightIDW):
|
|
|
921
890
|
class HeightIDWexact(_HeightIDW):
|
|
922
891
|
'''Height interpolator using U{Inverse Distance Weighting
|
|
923
892
|
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW)
|
|
924
|
-
and
|
|
925
|
-
L{GeodesicExact.Inverse}.
|
|
893
|
+
and method L{GeodesicExact.Inverse}.
|
|
926
894
|
'''
|
|
927
895
|
def __init__(self, knots, beta=2, datum=None, **name__wrap):
|
|
928
896
|
'''New L{HeightIDWexact} interpolator.
|
|
@@ -949,9 +917,8 @@ class HeightIDWexact(_HeightIDW):
|
|
|
949
917
|
|
|
950
918
|
class HeightIDWflatLocal(_HeightIDW):
|
|
951
919
|
'''Height interpolator using U{Inverse Distance Weighting
|
|
952
|
-
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW)
|
|
953
|
-
|
|
954
|
-
L{pygeodesy.flatLocal_}/L{pygeodesy.hubeny_}.
|
|
920
|
+
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW) and
|
|
921
|
+
the function L{pygeodesy.flatLocal_}/L{pygeodesy.hubeny_}.
|
|
955
922
|
'''
|
|
956
923
|
def __init__(self, knots, beta=2, **name__datum_hypot_scaled_wrap):
|
|
957
924
|
'''New L{HeightIDWflatLocal}/L{HeightIDWhubeny} interpolator.
|
|
@@ -974,8 +941,7 @@ class HeightIDWflatLocal(_HeightIDW):
|
|
|
974
941
|
class HeightIDWflatPolar(_HeightIDW):
|
|
975
942
|
'''Height interpolator using U{Inverse Distance Weighting
|
|
976
943
|
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW)
|
|
977
|
-
and
|
|
978
|
-
L{pygeodesy.flatPolar_}.
|
|
944
|
+
and function L{pygeodesy.flatPolar_}.
|
|
979
945
|
'''
|
|
980
946
|
def __init__(self, knots, beta=2, **name__radius_wrap):
|
|
981
947
|
'''New L{HeightIDWflatPolar} interpolator.
|
|
@@ -996,8 +962,8 @@ class HeightIDWflatPolar(_HeightIDW):
|
|
|
996
962
|
|
|
997
963
|
class HeightIDWhaversine(_HeightIDW):
|
|
998
964
|
'''Height interpolator using U{Inverse Distance Weighting
|
|
999
|
-
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW)
|
|
1000
|
-
|
|
965
|
+
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW)
|
|
966
|
+
and function L{pygeodesy.haversine_}.
|
|
1001
967
|
|
|
1002
968
|
@note: See note at function L{pygeodesy.vincentys_}.
|
|
1003
969
|
'''
|
|
@@ -1028,11 +994,10 @@ class HeightIDWhubeny(HeightIDWflatLocal): # for Karl Hubeny
|
|
|
1028
994
|
|
|
1029
995
|
class HeightIDWkarney(_HeightIDW):
|
|
1030
996
|
'''Height interpolator using U{Inverse Distance Weighting
|
|
1031
|
-
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW) and
|
|
1032
|
-
I{
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
geographiclib.geodesic.Geodesic.Inverse>}.
|
|
997
|
+
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW) and
|
|
998
|
+
I{Karney}'s U{geographiclib<https://PyPI.org/project/geographiclib>}
|
|
999
|
+
method U{geodesic.Geodesic.Inverse<https://GeographicLib.SourceForge.io/
|
|
1000
|
+
Python/doc/code.html#geographiclib.geodesic.Geodesic.Inverse>}.
|
|
1036
1001
|
'''
|
|
1037
1002
|
def __init__(self, knots, beta=2, datum=None, **name__wrap):
|
|
1038
1003
|
'''New L{HeightIDWkarney} interpolator.
|
|
@@ -1062,8 +1027,8 @@ class HeightIDWkarney(_HeightIDW):
|
|
|
1062
1027
|
|
|
1063
1028
|
class HeightIDWthomas(_HeightIDW):
|
|
1064
1029
|
'''Height interpolator using U{Inverse Distance Weighting
|
|
1065
|
-
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW)
|
|
1066
|
-
|
|
1030
|
+
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW)
|
|
1031
|
+
and function L{pygeodesy.thomas_}.
|
|
1067
1032
|
'''
|
|
1068
1033
|
def __init__(self, knots, beta=2, **name__datum_wrap):
|
|
1069
1034
|
'''New L{HeightIDWthomas} interpolator.
|
|
@@ -1084,8 +1049,8 @@ class HeightIDWthomas(_HeightIDW):
|
|
|
1084
1049
|
|
|
1085
1050
|
class HeightIDWvincentys(_HeightIDW):
|
|
1086
1051
|
'''Height interpolator using U{Inverse Distance Weighting
|
|
1087
|
-
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW)
|
|
1088
|
-
|
|
1052
|
+
<https://WikiPedia.org/wiki/Inverse_distance_weighting>} (IDW)
|
|
1053
|
+
and function L{pygeodesy.vincentys_}.
|
|
1089
1054
|
|
|
1090
1055
|
@note: See note at function L{pygeodesy.vincentys_}.
|
|
1091
1056
|
'''
|