Opened 11 years ago

Closed 11 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


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) (412 bytes ) - added by bishop 11 years ago.
Disable test_gdalbuildvrt_5

Download all attachments as: .zip

Change History (8)

comment:1 by bishop, 11 years ago

Resolution: fixed
Status: newclosed

Implemented in r25650

comment:2 by Even Rouault, 11 years ago

Resolution: fixed
Status: closedreopened

Dmitry, this changeset apparently breaks the expected result of test_gdalbuildvrt_4 of autotest/utilities/ 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
  TEST: test_gdalbuildvrt_5 ... fail
    line 60: Wrong raster dimensions : 460 x 480

comment:3 by bishop, 11 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 Even Rouault, 11 years ago

No problem, I let you fix the expected result of the test, disable it or do whatever appropriate action.

comment:5 by bishop, 11 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.

by bishop, 11 years ago

Attachment: added

Disable test_gdalbuildvrt_5

comment:6 by Even Rouault, 11 years ago

I have very little time to do GDAL work at the moment, so I let you commit it

comment:7 by bishop, 11 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in r25655

Note: See TracTickets for help on using tickets.