in3Utils.geoTrans.remeshRaster

remeshRaster(rasterFile, cfgSim, typeIndicator='DEM', onlySearch=False)[source]

change raster cell size by reprojecting on a new grid - first check if remeshed raster available

the new raster is as big or smaller as the original raster and saved to Inputs/remeshedRasters as remeshedTYPEINDICATORcellSize

Interpolation is based on griddata with a cubic method. Here would be the place to change the order of the interpolation or to switch to another interpolation method.

Parameters
  • rasterFile (str or pathlib path) – file path to DEM in Inputs/

  • cfgSim (configParser) – meshCellSizeThreshold : threshold under which no remeshing is done meshCellSize : desired cell size

  • typeIndicator (str) – type of raster, possible options DEM or RELTH

  • onlySearch (bool) – if True - only searching for remeshed DEM but not remeshing if not found

Returns

pathRaster – path of raster with desired cell size relative to Inputs/

Return type

str