[gdal-dev] gdalbuildvrt -separate from list of files with two bands

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[gdal-dev] gdalbuildvrt -separate from list of files with two bands

Scott Staniewicz
Hi, I'd like to combine a large list of raster files (each of which has two bands) into one .vrt, where each band of the VRT would have the 2nd band from each file. I thought that the "-b 2" option , but doing

gdalbuildvrt   -b  2  -separate  outvrt.vrt  *two2band_inputs.tif

just gives the warning that "... _____ has 2 bands. Only the first one will be taken into account in the -separate case". I see that the code seems to be not using the -b band option here, and just taking band one: https://github.com/OSGeo/gdal/blob/master/gdal/apps/gdalbuildvrt_lib.cpp#L598-L603

Is there any way to do what I'm attempting? Is the -b option used for some other reason in gdalbuildvrt?

gdal-dev mailing list
[hidden email]