Why do we need to write 'band1 [band1==ndv] = newndv' When we can just use 'ds.GetRasterBand(1).SetNoDataValue(newndv)' and it changes the no data value as well?
@geospatialschool3 жыл бұрын
There are multiple ways to do things. Give it a try and see what happens
@lisalootte5 жыл бұрын
Is there a way to set a keyboard shortcut for running the script? Less clicking
@markbrown66235 жыл бұрын
Not sure if it helps you now but I've been running through these tutorials using Jupyter Notebooks. You can simply run the code using ctrl and enter. The iface.addRasterLayer(fn) won't work though unless you're in the QGIS console.