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 nodata_values to nan and set nodata_value to nan
- Returns
data –
- -headerInfo: class
information that is stored in header (ncols, nrows, xllcenter, yllcenter, nodata_value)
- -rasterdata2D numpy array
2D numpy array of ascii matrix
- Return type
dict