[Qgis-developer] iteration over raster

Andruit at gmx.de Andruit at gmx.de
Thu Feb 24 10:36:01 EST 2011


Hello,
I would like to write a qgis python plugin, which modifies cell values based on the values of their surrounding neighbors.

But how can I iterate over a raster layer in order to read the value of each raster cell (and its surrounding neighbors)?
Is there any method querying raster cell values

for i in range (1, numberofrows)
  for j in range (1, numberofcolumns)
     
       value=???  #read cell value of cell[i j]


Thank you very much in advance. 
-- 
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl


More information about the Qgis-developer mailing list