Opened 10 years ago
Closed 10 years ago
#4992 closed enhancement (fixed)
Add band selection option to gdalbuildvrt
Reported by: | bishop | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | GDAL_Raster | Version: | svn-trunk |
Severity: | normal | Keywords: | gdalbuildvrt bands |
Cc: |
Description
I have tiles with great amount of bands - more than 500. I want to create mosaic vrt for 3-4 bands only.
Need -b ptions to gdalbuildvrt
Example command:
gdalbuildvrt -b 10 -b 100 -b 1000 -input_file_list file.lst bands.vrt
Attachments (1)
Change History (8)
comment:1 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Dmitry, this changeset apparently breaks the expected result of test_gdalbuildvrt_4 of autotest/utilities/test_gdalbuildvrt.py. I let you look if it is just the expected result that must be adapted to the new behaviour.
TEST: test_gdalbuildvrt_4 ... Warning 6: gdalbuildvrt does not support heterogenous projection. Skipping tmp/gdalbuildvrt5.tif success TEST: test_gdalbuildvrt_5 ... fail line 60: Wrong raster dimensions : 460 x 480
comment:3 by , 10 years ago
Even, the problem is with test_gdalbuildvrt_5 not 4. The 5-th tests what all input rasters should have the same band count. My changes to gdalbuildvrt make it posible to mosaic rasters with different band count. If option b is present the max band number set from it, else - max band number set from the first raster band count. If other input rasters have less band count than max band number, they will be skipped.
comment:4 by , 10 years ago
No problem, I let you fix the expected result of the test, disable it or do whatever appropriate action.
comment:5 by , 10 years ago
By now, I think disabling of the test is good idea. I'll provide a patch which doing it. If you agree - please commit it to GDAL autotest and close this ticket.
comment:6 by , 10 years ago
I have very little time to do GDAL work at the moment, so I let you commit it
Implemented in r25650