def _vrtWrapBand(vrtDataset, sourceBand):
    """
	Wraps a GDAL raster band in a VRT band.
	"""
    width = sourceBand.XSize
    height = sourceBand.YSize
    vrtDataset.AddBand(sourceBand.DataType)
    vrtBand = vrtDataset.GetRasterBand(vrtDataset.RasterCount)
    bandSource = (
        """<SimpleSource>
		<SourceFilename relativeToVRT="1">{}</SourceFilename>
		<SourceBand>{}</SourceBand>
		<SrcRect xOff="{}" yOff="{}" xSize="{}" ySize="{}"/>
		<DstRect xOff="{}" yOff="{}" xSize="{}" ySize="{}"/>
	</SimpleSource>"""
        .format(sourceBand.GetDataset().GetFileList()[0], sourceBand.
        GetBand(), 0, 0, width, height, 0, 0, width, height))
    metadata = {}
    metadata['source_0'] = bandSource
    vrtBand.SetMetadata(metadata, 'vrt_sources')
    return vrtBand
