[PATCH] New option for gdal_calc.py
|Reported by:||CYesson||Owned by:||warmerdam|
I have implemented a new option to gdal_calc.py to deal with a specific request about processing layers of different data types.
The old version performs calculations using the native data type of the original input layers, which can be problematic if, say, you are dividing two integers and expect a float output.
The new feature --CalcAsDT will convert the input data to the output data type prior to calculation and thus bypass the above problem. I have not implemented this as the default option because of the potential hit to performance for larger files.
I have attached the new version of gdal_calc.py and a diff from the previous version
- Chris Yesson