[Qgis-user] Raster alpha band

Craig Leat craig.leat at gmail.com
Mon Jun 6 03:09:32 PDT 2011


Hi,

I have a gdal vrt containing an alpha band and I am unable to get qgis
to honour the transparency. In the transparency tab there is a drop
down box labelled "Transparency band". I think I should be selecting
the alpha channel here, but the drop down is not available. I have
tested on 1.6 and master.

gdalinfo reports:
Z:\>gdalinfo test-alpha.vrt
Driver: VRT/Virtual Raster
Files: test-alpha.vrt
       2930ca13c.sid
       2930ca18a.sid
       2930ca13d.sid
Size is 13933, 15900
Coordinate System is:
LOCAL_CS["WGS84 LO31",
    UNIT["meters",1]]
Origin = (-87195.986784944966000,-3278895.266386568500000)
Pixel Size = (0.350000000000001,-0.349999999999977)
Corner Coordinates:
Upper Left  (  -87195.987,-3278895.266)
Lower Left  (  -87195.987,-3284460.266)
Upper Right (  -82319.437,-3278895.266)
Lower Right (  -82319.437,-3284460.266)
Center      (  -84757.712,-3281677.766)
Band 1 Block=128x128 Type=Byte, ColorInterp=Red
  Mask Flags: PER_DATASET ALPHA
Band 2 Block=128x128 Type=Byte, ColorInterp=Green
  Mask Flags: PER_DATASET ALPHA
Band 3 Block=128x128 Type=Byte, ColorInterp=Blue
  Mask Flags: PER_DATASET ALPHA
Band 4 Block=128x128 Type=Byte, ColorInterp=Alpha

And here is an excerpt from the vrt:
<VRTRasterBand dataType="Byte" band="4">
    <ColorInterp>Alpha</ColorInterp>
    <ComplexSource>
      <SourceFilename relativeToVRT="1">2930ca13c.sid</SourceFilename>
      <SourceBand>1</SourceBand>
      <SourceProperties RasterXSize="6986" RasterYSize="7983"
DataType="Byte" BlockXSize="1024" BlockYSize="128" />
      <SrcRect xOff="0" yOff="0" xSize="6986" ySize="7983" />
      <DstRect xOff="0" yOff="26" xSize="6986" ySize="7983" />
      <ScaleOffset>255</ScaleOffset>
      <ScaleRatio>0</ScaleRatio>
    </ComplexSource>

Please will someone give me a hint on how to correct my configuration.

Regards,

Craig



More information about the Qgis-user mailing list