[gdal-dev] multiple bands in gdal2xyz.py should be comma separated
Tom van Tilburg
tom.van.tilburg at gmail.com
Thu May 31 03:55:21 PDT 2012
Hi,
It seems that gdal2xyz.py currently supports the output of multiple
raster bands using:
gdal2xyz.py -band 1 -band 2 etc....
However, when I use this in combination with the parameter -csv I do not
get the extected comma in between the values of my bands.
Extected: 5.604, 50.765, 3, 2
Received: 5.604, 50.765, 3 2 <== "notice the missing komma"
I briefly checked the python code and it seems to be an addition to
'band_format' is needed.
band_format = ("%g " * len(bands)).rstrip() + '\n'
should become something like
band_format = (("%g " + delim) * len(bands)).rstrip(",") + '\n'
Cheers,
Tom
More information about the gdal-dev
mailing list