Interpolation

Functions which can be used to perform interpolation of point data

exception pylidar.toolbox.interpolation.InterpolationError[source]

Interpolation Error

pylidar.toolbox.interpolation.interpGrid(xVals, yVals, zVals, gridCoords, method='pynn')[source]

A function to interpolate values to a regular gridCoords given an irregular set of input data points

  • xVals is an array of X coordinates for known points
  • yVals is an array of Y coordinates for known points
  • zVals is an array of values associated with the X,Y points to be interpolated
  • gridCoords is a 2D array with the X,Y values for each ‘pixel’ in the grid; use data.info.getBlockCoordArrays()
  • method is a string specifying the method of interpolation to use, ‘nearest’, ‘linear’, ‘cubic’, ‘cgalnn’, ‘pynn’, ‘pylinear’

returns grid of float64 values with the same dimensions are the gridCoords with interpolated Z values.

pylidar.toolbox.interpolation.interpPoints(xVals, yVals, zVals, ptCoords, method='pynn')[source]

A function to interpolate values to a set of points given an irregular set of input data points

  • xVals is an array of X coordinates for known points
  • yVals is an array of Y coordinates for known points
  • zVals is an array of values associated with the X,Y points to be interpolated
  • ptCoords is a 2D array with pairs of xy values (shape: N*2)
  • method is a string specifying the method of interpolation to use, ‘pynn’ is the only currently implemented one.

returns 1d array with Z values.