Re: [Qgis-user] PyQGIS code on raster image - What am I doing wrong?

2022-06-23 Thread C Hamilton via Qgis-user
Andrea, Thanks so much. I'm not sure I would have figured that out on my own. I also found that I needed to include the min and max values from the statistics. Here is my final code if anyone else is trying to do this. layer = iface.activeLayer() provider = layer.dataProvider() stats =

Re: [Qgis-user] PyQGIS code on raster image - What am I doing wrong?

2022-06-22 Thread Andrea Giudiceandrea via Qgis-user
*C Hamilton*adenaculture at gmail.com /Wed Jun 22 08:36:45 PDT 2022/

[Qgis-user] PyQGIS code on raster image - What am I doing wrong?

2022-06-22 Thread C Hamilton via Qgis-user
I am trying to automatically style a singlebandgray raster image with one of the singlebandpseudocolor color ramps. When I run this code in the QGIS Python console the raster image disappears. If I look at the image "Properties" everything seems to be set correctly and it does appear when Apply or