getCellsAlongLine(header, lineDict, addBuffer=True)[source]

Find all raster cells crossed by the line line has to be entierly contained on the raster extend. If addBuffer is True, add neighbour cells to the result based on

  • header (dict) – raster header

  • lineDict (dict) – line dictionary

  • addBuffer (boolean) – True to add a 1 cell buffer around the line


lineDict – line dictionary updated with the “cellsCrossed” 1D array (boolean array of 0 and 1 if the cell is crossed by the line or in its neigborhood)

Return type