in2Trans.ascUtils.readRaster¶
- readRaster(fname, noDataToNan=True)[source]¶
Read raster file (.asc)
- Parameters
fname (str or pathlib object) – path to ascii file
noDataToNan (bool) – if True convert noDataValues to nan and set noDataValue to nan
- Returns
data –
- -headerInfo: class
information that is stored in header (ncols, nrows, xllcenter, yllcenter, noDataValue)
- -rasterdata2D numpy array
2D numpy array of ascii matrix
- Return type
dict