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
|
One ready-to-use raster sampler built from a surface-like object. |