[gdal-dev] How to-- gdal_calc.py

Travis Kirstine traviskirstine at gmail.com
Tue Dec 20 10:24:34 EST 2011


Stephen,

I haven't used the gdal_calc tool but if you use python you can easily
convert the image bands to a set of numpy arrays and use all the
great numpy functions.

See the val_repl.py  sample to convert a image to a numpy array(s)
http://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples/val_repl.py

Numpy Stuff:
http://www.scipy.org/Numpy_Example_List#head-7eb5ca476fca411db1db64bc024b7c0c94e42143

Regards


On 20 December 2011 10:11, Stephen Mather <mather.stephen at gmail.com> wrote:
> Hi All,
>       Is there any casting (for lack of a better word) needed when using
> gdal_calc to take, e.g. a series of 16-bit images and perform float
> functions against them?
>
> Best,
> Steve
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list