hydromodpy.spatial.surface_sampling#

Prepared samplers for repeated georeferenced surface sampling.

The bundle export and several runtime solvers repeatedly sample the same topography/substratum rasters at many coordinates. Re-extracting the raw array and raster-support metadata on every call is expensive on large domains.

This module centralizes the ā€œprepare once, sample many timesā€ pattern: - normalize one Surface (or surface-like object) to a NumPy array, - replace nodata sentinels with NaN once, - cache the scalar raster-support metadata needed for interpolation, - expose vectorized sampling helpers that operate on whole coordinate arrays.

Classes

PreparedSurfaceSampler(values,Ā support,Ā ...)

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