Opened 8 years ago

Closed 8 years ago

Last modified 8 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

Description

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 8 years ago.

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by Kyle Shannon

Attachment: warped_vrt_band_map.diff added

comment:1 Changed 8 years ago by antonio

Cc: antonio added

comment:2 Changed 8 years ago by Kyle Shannon

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

comment:3 Changed 8 years ago by Even Rouault

The patch looks good to me. You can commit it

comment:4 Changed 8 years ago by Kyle Shannon

Resolution: fixed
Status: newclosed

Committed in trunk, r26121.

comment:5 Changed 8 years ago by Kyle Shannon

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.