calculator between raster

Christian Gollwitzer auriocus at gmx.de
Sun Oct 9 17:08:48 EDT 2016


Am 09.10.16 um 22:55 schrieb chrischris201444 at gmail.com:
> any idea how to calculator rasters images ?like ((raster1+raster2)*(raster4*9)}
> for example.
> maybe is easy that question but i dont work again with raster and python
> i have gdal,numpy,scipy,pygeoprocesing and more
With PIL you can read an image file into numpy array, do your 
calculations the way you wrote, and transform it back to an image (file, 
or display).

Try:

from PIL import Image
import numpy
arr = numpy.asarray(Image.open('somefile.png'))


	Christian




More information about the Python-list mailing list