id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 3052,"poBand->SetMetadataItem( ""source_0"", szFilterSourceXML, ""vrt_sources"" ) not supported as expected",Even Rouault,Even Rouault,"The VRT tutorial says that poBand->SetMetadataItem( ""source_0"", szFilterSourceXML, ""vrt_sources"" ) in the following snippet should be supported, but the code has never been implemented for SetMetadataItem() (although it has been for SetMetadata.) {{{ int nBand; GDALDriver *poDriver = (GDALDriver *) GDALGetDriverByName( ""VRT"" ); GDALDataset *poSrcDS, *poVRTDS; poSrcDS = (GDALDataset *) GDALOpenShared( pszSourceFilename, GA_ReadOnly ); poVRTDS = poDriver->CreateCopy( """", poSrcDS, FALSE, NULL, NULL, NULL ); for( nBand = 1; nBand <= poVRTDS->GetRasterCount(); nBand++ ) { char szFilterSourceXML[10000]; GDALRasterBand *poBand = poVRTDS->GetRasterBand( nBand ); sprintf( szFilterSourceXML, """" "" %s1%d"" "" "" "" 3"" "" 0.111 0.111 0.111 0.111 0.111 0.111 0.111 0.111 0.111"" "" "" """", pszSourceFilename, nBand ); poBand->SetMetadataItem( ""source_0"", szFilterSourceXML, ""vrt_sources"" ); } }}} ",defect,closed,normal,1.6.2,GDAL_Raster,unspecified,normal,fixed,,belaid_moa@…