I'm looking to apply a mask to a number of rasters in PyQGIS.
import processing rstr = "/Users/rasterfilepath/" shp = "/Users/shapefile.shp" outputDir = "/Users/output/" for lyr in rstr: processing.runandload("gdalogr:cliprasterbymasklayer", rstr, shp, "none", False, False, outputDir + ".tif") lyr +=1 What am I doing wrong?
أكثر...
import processing rstr = "/Users/rasterfilepath/" shp = "/Users/shapefile.shp" outputDir = "/Users/output/" for lyr in rstr: processing.runandload("gdalogr:cliprasterbymasklayer", rstr, shp, "none", False, False, outputDir + ".tif") lyr +=1 What am I doing wrong?
أكثر...