PreparedSurfaceSampler#

class hydromodpy.spatial.PreparedSurfaceSampler(values, support, xmin, xmax, ymin, ymax, dx, dy, nrows, ncols)[source]#

Bases: object

One ready-to-use raster sampler built from a surface-like object.

Parameters:
classmethod from_surface(surface)[source]#

Build one sampler from a HydroModPy Surface-like object.

Parameters:

surface (object)

Return type:

PreparedSurfaceSampler

property has_complete_support: bool#

Return whether bilinear sampling can be evaluated on this sampler.

sample(x_values, y_values)[source]#

Sample the prepared surface at one scalar or array of XY coordinates.

Parameters:
  • x_values (Any)

  • y_values (Any)

Return type:

ndarray

sample_points_xy(points_xy)[source]#

Sample an (n_points, 2) coordinate array.

Parameters:

points_xy (Any)

Return type:

ndarray