in3Utils.geoTrans.remeshData

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’ or ‘RectBivariateSpline’ Only the ‘griddata’ works properly if the input data contains noData points, ‘RectBivariateSpline’ is faster but fails 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

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

  • cellSizeNew (float) – mesh size of new mesh

  • remeshOption (str) – method used to remesh (‘griddata’ 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

Returns

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

Return type

dict