I am making a multiband virtual raster using gdalbuildvrt. Everything works fine, but a little detail remains annoying: I cannot control how the bands are sorted. I specified the input raster using the -input_file_list option, but the order is not kept by gdalbuildvrt. Instead it sort the band with lexicographic sorting, which is not what I want.
For instance, that would be my input file list:
/home/example/rasters/1634.tif /home/example/rasters/5899.tif /home/example/rasters/15680.tif
I'd like to have a vrt corresponding to:
band 1 -> 1634.tif band 2 -> 5899.tif band 3 -> 15680.tif
But instead I get:
band 1 -> 15680.tif band 2 -> 1634.tif band 3 -> 5899.tif
I could manually rearange things, but I'd like to avoid it if there is any cleaner solution...
So my question is: is there a way to control how gdalbuildvrt sort the bands when creating a multiband virtual raster?