def __init__(self, points, seed=None, name=NN, units=NN, **wrap_adjust): '''New C{Hausdorff...} calculator. @arg points: Initial set of points, aka the C{model} or C{template} (C{LatLon}[], C{Numpy2LatLon}[], C{Tuple2LatLon}[] or C{other}[]). @kwarg seed: Random sampling seed (C{any}) or C{None}, C{0} or C{False} for no U{random sampling<https:// Publik.TUWien.ac.AT/files/PubDat_247739.pdf>}. @kwarg name: Optional name for this interpolator (C{str}). @kwarg units: Optional, distance units (C{str}). @kwarg wrap_adjust: Optionally, C{wrap} and unroll longitudes, iff applicable (C{bool}) and C{adjust} wrapped, unrolled longitudinal delta by the cosine of the mean latitude, iff applicable. @raise HausdorffError: Insufficient number of B{C{points}} or an invalid B{C{point}}, B{C{seed}} or B{{wrap}} or B{C{ajust}} not applicable. ''' _, self._model = self._points2(points) if seed: self.seed = seed if name: self.name = name if units and not self.units: self.units = units if wrap_adjust: _bkwds(self, Error=HausdorffError, **wrap_adjust)
def __init__(self, points, fraction=None, name=NN, units=NN, **wrap_adjust): '''New C{Frechet...} calculator/interpolator. @arg points: First set of points (C{LatLon}[], L{Numpy2LatLon}[], L{Tuple2LatLon}[] or C{other}[]). @kwarg fraction: Index fraction (C{float} in L{EPS}..L{EPS1}) to interpolate intermediate B{C{points}} or use C{None}, C{0} or C{1} for no intermediate B{C{points}} and no I{fractional} indices. @kwarg name: Optional calculator/interpolator name (C{str}). @kwarg units: Optional distance units (C{str}). @kwarg wrap_adjust: Optionally, C{wrap} and unroll longitudes, iff applicable (C{bool}) and C{adjust} wrapped, unrolled longitudinal delta by the cosine of the mean latitude, iff applicable. @raise FrechetError: Insufficient number of B{C{points}} or invalid B{C{fraction}} or B{{wrap}} or B{C{ajust}} not applicable. ''' self._n1, self._ps1 = self._points2(points) if fraction: self.fraction = fraction if name: self.name = name if units and not self.units: self.units = units if wrap_adjust: _bkwds(self, Error=FrechetError, **wrap_adjust)
def __init__(self, knots, beta=2, name=NN, **wrap_adjust): '''New L{_HeightIDW} interpolator. ''' self._xs, self._ys, self._hs = _xyhs3(tuple, self._kmin, knots, off=False) self.beta = beta if name: self.name = name if wrap_adjust: _bkwds(self, Error=HeightError, **wrap_adjust)