in3Utils.geoTrans.projectOnGrid
- projectOnGrid(x, y, Z, csz=1, xllc=0, yllc=0, interp='bilinear', getXYField=False)[source]
Projects Z onto points (x,y) using a bilinear or nearest interpolation and returns the z coord
- Parameters
x (array) – x coord of the points to project
y (array) – y coord of the points to project
Z (2D numpy array) – raster data
csz (float) – cellsize corresponding to the raster data
xllc (float) – x coord of the lower left center of the raster
yllc (float) – y coord of the lower left center of the raster
interp (str) – interpolation option, between nearest or bilinear
getXYField (bool) – also return raster with dimension of raster data mark all cells that are used for interpolation of x, y coordinates of points to project
- Returns
z (2D numpy array) – projected data on the raster data
ioob (int) – number of out of bounds indexes