[Qgis-developer] raster algebra plugin II - the return!
b.rowlingson at lancaster.ac.uk
Fri Nov 28 19:28:13 EST 2008
2008/11/28 Kolberg Sjur A <Sjur.A.Kolberg at sintef.no>:
> If you're taking votes...
> My suggestion would be a multi-line edit window for the expression, where raster bands could be written as variable names.
r1 = 120 - raster(layer=0,band=1)
r2 = 200 - raster(layer=1,band=1)
r3 = r1 + r2
hang on, that's starting to look familiar...
If it gets this complex, you might just as well use Python from the
console and import your scripts... That's all my plugin will be doing
anyway, loading rasters into python objects via gdal, processing them
with numpy functions, and saving them to new Gtiffs...
Of course there is an advantage to keeping it simple and restricting
the syntax. Plus it makes it easier to write a graphical interface
much like the grass raster algebra tool.
More information about the Qgis-developer