[gdal-dev] Does gdal_calc.py not calculate arithmetic with in the same file?

Cleo Drakos cleo21drakos at gmail.com
Mon Jul 28 23:46:00 PDT 2014


Hi GDAL Developers,

I have one GeoTIFF file with 2 bands. The data type is Byte. I want to
calculate (Band2-Band1)/(Band2+Band1).

But the following command provided a dark image:

gdal_calc.py -A infile --A_band 1 -B infile, --B_band 0 --outfile outfile
--calc "(A-B)/(A+B)"

Does gdal_calc.py not calculate arithmetic with in the same file?

Thanks for your time.

cleo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140729/ecbcc602/attachment.html>


More information about the gdal-dev mailing list