in3Utils.geoTrans.getNeighborCells
- getNeighborCells(indX, indY, ncols, nrows, cellsArray)[source]
Find the neighbour cells to a given cell
- Parameters
indX (int) – x index of the cell for which you want to find the direct neighbors
indY (int) – y index of the cell for which you want to find the direct neighbors
ncols (int) – number of cols in the raster
nrows (int) – number of rows in the raster
cellsArray (1D int array) – boolean array of 0 and 1 if the cell is crossed by the line or in its neigborhood
- Returns
cellsArray – updated boolean array of 0 and 1 if the cell is crossed by the line or in its neigborhood
- Return type
1D int array