|Reported by:||vincentschut||Owned by:||warmerdam|
Attached is a slightly improved version of the gdal_vrtmerge.py that is currently in pymod/samples.
Changes: o uses ngpython bindings ('from osgeo import gdal') o fixed colortable bug o added customizable precision for coordinates and pixel sizes, by
default set to 10 digits. Can be adjusted by changing the variable 'precision' at the beginning of the python script. This is used 1) to round the calculation result of corner coordinates and pixel size, and 2) in the comparison between pixel size/scale of multiple datasets (including a conversion to string before comparison) to prevent bailing out on nanometer/degree scale differences due to rounding/floating point issues.
Any of you who speaks python, feel free to double check my changes and eventually propose/implement better ones :-) I hereby donate this version to the gdal community.