Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#5138 closed enhancement (fixed)

[PATCH] GDALAutoCreateWarpedVRT() doesn't respect band counts/mapping

Reported by: Kyle Shannon Owned by: warmerdam
Priority: normal Milestone: 1.10.1
Component: Algorithms Version: svn-trunk
Severity: minor Keywords: gdalwarper
Cc: antonio


This may be just a convenience, as the docs say:

@param psOptionsIn Additional warp options, normally NULL.

but most are preserved and passed through. The exceptions are the resampling algorithm, which is passed as a separate argument as well as the source dataset, which is passed too. The number of bands and band maps are always set to all bands, regardless of the warp options. The patch explicitly initializes nBandCount to 0 (probably not needed, but doesn't hurt and recognizes subsets of bands. If nBandCount is 0, then set all bands. Otherwise respect original values.

Attachments (1)

warped_vrt_band_map.diff (1.8 KB ) - added by Kyle Shannon 9 years ago.

Download all attachments as: .zip

Change History (6)

by Kyle Shannon, 9 years ago

Attachment: warped_vrt_band_map.diff added

comment:1 by antonio, 9 years ago

Cc: antonio added

comment:2 by Kyle Shannon, 9 years ago

Summary: GDALAutoCreateWarpedVRT() doesn't respect band counts/mapping[PATCH] GDALAutoCreateWarpedVRT() doesn't respect band counts/mapping

comment:3 by Even Rouault, 9 years ago

The patch looks good to me. You can commit it

comment:4 by Kyle Shannon, 9 years ago

Resolution: fixed
Status: newclosed

Committed in trunk, r26121.

comment:5 by Kyle Shannon, 9 years ago

Reverted in r26891, see ticket #5363. I think leaving AutoCreateVRT as automatic as possible is probably best.

Note: See TracTickets for help on using tickets.