read_grid#
- mhm_tools.common.esri_grid.read_grid(file, dtype=None)[source]#
Read an ASCII grid from file.
- Parameters:
file (
PathLike) – File containing the ASCII grid.dtype (str/type, optional) – Data type. Needs to be integer or float and compatible with np.dtype (i.e. “i4”, “f4”, “f8”), by default None
- Returns:
header (dict) – Header describing the grid.
data (numpy.ndarray) – Data of the grid.
- Raises:
ValueError – If data shape is not matching the given header.