smash.tools.raster_handler.gdal_read_windowed_raster#
- smash.tools.raster_handler.gdal_read_windowed_raster(filename, smash_mesh, band=None, lacuna=None)[source]#
Reading a raster file with gdal and return a np.ndarray storing the different data bands according the SMASH model boundingbox.
- Parameters:
- filenamestring, path to a file
- smash_meshsmash.mesh object representing the mesh
- band: band to be read
- lacuna: float64 replacing the Nodata value
- Returns:
- arraynp.array or np.ndarray storing one or all different data, stored in filename, sliced compare to the mesh boundingbox
Examples
array=gdal_read_windowed_raster(“filename”, model.mesh)