remeshData(rasterDict, cellSizeNew, remeshOption='griddata', interpMethod='cubic', larger=True)[source]

compute raster data on a new mesh with cellSize using the specified remeshOption.

remeshOption are to choose between ‘griddata’, ‘interp2d’ or ‘RectBivariateSpline’ Only the ‘griddata’ works properly if the input data contains noData points, ‘interp2d’ or ‘RectBivariateSpline’ are faster but fail if input data contains noData points. The new mesh is as big or smaller as the original mesh if larger is False and bigger if larger is True

  • rasterDict (dict) – raster dictionary (with header and rasterData)

  • cellSize (float) – mesh size of new mesh

  • remeshOption (str) – method used to remesh (‘griddata’, ‘interp2d’ or ‘RectBivariateSpline’) Check the scipy documentation for more details default is ‘griddata’

  • interpMethod (str) – interpolation order to use for the interpolation (‘linear’, ‘cubic’ or ‘quintic’)

  • larger (Boolean) – if true (default) output grid is at least as big as the input


data – remeshed data dict with data as numpy array and header info

Return type