I want to read the every cell value in a raster file. When I run the script, it should give me the cell location and it's value.
I can reach center point of the raster and read it's value with this script:
rasterLyr = QgsRasterLayer("C:\qgis_data\SatImage\SatImage.tif",
"Sat Image")
rasterLyr.isValid()
#extent means QgsRectangle
c = rasterLyr.extent()
qry = rasterLyr.dataProvider().identify(c,QgsRaster.IdentifyFormatValue)
qry.isValid()
qry.results()
If there is a toolbox which solves this problem in QGIS 3.0, it also helps me.
I use QGIS 3.0 as I mentioned and python 3.6