Hi Agus, <br>the Raster/BuildVRT calls the gdalbuildvrt executable [1]. <br><br>The default gdalbuildvrt behavior is to create a VRT which has as many bands <br>as one of the input files.<br>You should use "-separate" option to make sure that each files goes into a <br>

separate <em></em>band. <br>The "-separate" option is available from gdal1.7, but in this moment you cannot <br>tick the option from the Raster/BuildVRT tool.<br><br>Cheers.<br><br>[1] <a href="http://www.gdal.org/gdalbuildvrt.html">http://www.gdal.org/gdalbuildvrt.html</a><br>

<br><br><div class="gmail_quote">On Tue, Nov 2, 2010 at 1:45 PM, Agustin Lobo <span dir="ltr"><<a href="mailto:alobolistas@gmail.com">alobolistas@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">



Just to report that this problem is still present when making a VRT file<br>
using "Raster/Build virtual raster (catalog)": I've made another vrt file<br>
and had to add the 2 lines:<br>
</VRTRasterBand><br>
<VRTRasterBand dataType="UInt16" band="2"><br>
<br>
for each layer as suggested by Benoit in August.<br>
<br>
I've filled a ticket.<br>
<br>
Agus<br>
<br>
2010/8/11 Benoit de Cabissole <<a href="mailto:benoit@exigesa.com">benoit@exigesa.com</a>>:<br>
> Agus,<br>
><br>
> Please try the following:<br>
><br>
> (note the comments in the xml to help you see the changes)<br>
><br>
> <VRTDataset rasterXSize="3001" rasterYSize="2554"><br>
>  <SRS>PROJCS[&quot;WGS 84 / UTM zone 26N&quot;,GEOGCS[&quot;WGS<br>
> 84&quot;,DATUM[&quot;WGS_1984&quot;,SPHEROID[&quot;WGS<br>
> 84&quot;,6378137,298.2572235630016,AUTHORITY[&quot;EPSG&quot;,&quot;7030&quo<br>
> t;]],AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],PRIMEM[&quot;Greenwich&qu<br>
> ot;,0],UNIT[&quot;degree&quot;,0.0174532925199433],AUTHORITY[&quot;EPSG&quot<br>
> ;,&quot;4326&quot;]],PROJECTION[&quot;Transverse_Mercator&quot;],PARAMETER[&<br>
> quot;latitude_of_origin&quot;,0],PARAMETER[&quot;central_meridian&quot;,-27]<br>
> ,PARAMETER[&quot;scale_factor&quot;,0.9996],PARAMETER[&quot;false_easting&qu<br>
> ot;,500000],PARAMETER[&quot;false_northing&quot;,0],UNIT[&quot;metre&quot;,1<br>
> ,AUTHORITY[&quot;EPSG&quot;,&quot;9001&quot;]],AUTHORITY[&quot;EPSG&quot;,&q<br>
> uot;32626&quot;]]</SRS><br>
>  <GeoTransform> 6.5222487132554676e+005, 4.0000000000000000e+000,<br>
> 0.0000000000000000e+000, 4.1899966827195832e+006,<br>
> 0.0000000000000000e+000,-4.0000000000000000e+000</GeoTransform><br>
>  <VRTRasterBand dataType="UInt16" band="1"><br>
>    <ColorInterp>Gray</ColorInterp><br>
>    <SimpleSource><br>
>      <SourceFilename<br>
> relativeToVRT="1">po_172227_blu_0000000.tif</SourceFilename><br>
>      <SourceBand>1</SourceBand><br>
>      <SourceProperties RasterXSize="3001" RasterYSize="2554"<br>
> DataType="UInt16" BlockXSize="3001" BlockYSize="256"/><br>
>      <SrcRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>      <DstRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>    </SimpleSource><br>
> <!-- added following two lines --><br>
>  </VRTRasterBand><br>
>  <VRTRasterBand dataType="UInt16" band="2"><br>
>    <SimpleSource><br>
>      <SourceFilename<br>
> relativeToVRT="1">po_172227_grn_0000000.tif</SourceFilename>     <!--<br>
> changed relativeToVRT to 1 --><br>
>      <SourceBand>1</SourceBand><br>
>      <SourceProperties RasterXSize="3001" RasterYSize="2554"<br>
> DataType="UInt16" BlockXSize="3001" BlockYSize="256"/><br>
>      <SrcRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>      <DstRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>    </SimpleSource><br>
> <!-- added following two lines --><br>
>  </VRTRasterBand><br>
>  <VRTRasterBand dataType="UInt16" band="3"><br>
>    <SimpleSource><br>
>      <SourceFilename<br>
> relativeToVRT="1">po_172227_nir_0000000.tif</SourceFilename>     <!--<br>
> changed relativeToVRT to 1 --><br>
>      <SourceBand>1</SourceBand><br>
>      <SourceProperties RasterXSize="3001" RasterYSize="2554"<br>
> DataType="UInt16" BlockXSize="3001" BlockYSize="256"/><br>
>      <SrcRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>      <DstRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>    </SimpleSource><br>
> <!-- added following two lines --><br>
>  </VRTRasterBand><br>
>  <VRTRasterBand dataType="UInt16" band="4"><br>
>    <SimpleSource><br>
>      <SourceFilename<br>
> relativeToVRT="1">po_172227_red_0000000.tif</SourceFilename>     <!--<br>
> changed relativeToVRT to 1 --><br>
>      <SourceBand>1</SourceBand><br>
>      <SourceProperties RasterXSize="3001" RasterYSize="2554"<br>
> DataType="UInt16" BlockXSize="3001" BlockYSize="256"/><br>
>      <SrcRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>      <DstRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>    </SimpleSource><br>
>  </VRTRasterBand><br>
> </VRTDataset><br>
><br>
><br>
> This should hopefully do it.<br>
> Otherwise, is your data type really UInt16, can it be coerced to bytes?<br>
><br>
> Cheers,<br>
> Benoit<br>
><br>
>> -----Original Message-----<br>
>> From: Agustin Lobo [mailto:<a href="mailto:alobolistas@gmail.com">alobolistas@gmail.com</a>]<br>
>> Sent: Tuesday, 10 August 2010 22:37<br>
>> To: Benoit EXIGE<br>
>> Cc: qgis-user; <a href="mailto:arturgil@gmail.com">arturgil@gmail.com</a>; <a href="mailto:cavallini@faunalia.it">cavallini@faunalia.it</a><br>
>> Subject: Re: [Qgis-user] QGIS1.5 on Win (standalone installation):<br>
>> Problem with VRT<br>
>><br>
>><br>
>> Thanks, I've done as below and the problem remains.<br>
>> Should I fill a ticket?<br>
>><br>
>> <VRTDataset rasterXSize="3001" rasterYSize="2554"><br>
>>   <SRS>PROJCS[&quot;WGS 84 / UTM zone 26N&quot;,GEOGCS[&quot;WGS<br>
>> 84&quot;,DATUM[&quot;WGS_1984&quot;,SPHEROID[&quot;WGS<br>
>> 84&quot;,6378137,298.2572235630016,AUTHORITY[&quot;EPSG&quot;,&quo<br>
>> t;7030&quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],PRIME<br>
>> M[&quot;Greenwich&quot;,0],UNIT[&quot;degree&quot;,0.0174532925199<br>
>> 433],AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]],PROJECTION[&quo<br>
> t;Transverse_Mercator&quot;],PARAMETER><br>
> [&quot;latitude_of_origin&quot;,0],PARAMETER[&quot;central_meridia<br>
>> n&quot;,-27],PARAMETER[&quot;scale_factor&quot;,0.9996],PARAMETER[<br>
> &quot;false_easting&quot;,500000],PARAMETER><br>
> [&quot;false_northing&quot;,0],UNIT[&quot;metre&quot;,1,AUTHORITY[<br>
> &quot;EPSG&quot;,&quot;9001><br>
> &quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;32626&quot;]]</SRS><br>
>>   <GeoTransform> 6.5222487132554676e+005, 4.0000000000000000e+000,<br>
>> 0.0000000000000000e+000, 4.1899966827195832e+006,<br>
>> 0.0000000000000000e+000,-4.0000000000000000e+000</GeoTransform><br>
>>   <VRTRasterBand dataType="UInt16" band="1"><br>
>>     <ColorInterp>Gray</ColorInterp><br>
>>     <SimpleSource><br>
>>       <SourceFilename<br>
>> relativeToVRT="1">po_172227_blu_0000000.tif</SourceFilename><br>
>>       <SourceBand>1</SourceBand><br>
>>       <SourceProperties RasterXSize="3001" RasterYSize="2554"<br>
>> DataType="UInt16" BlockXSize="3001" BlockYSize="256"/><br>
>>       <SrcRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>>       <DstRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>>     </SimpleSource><br>
>>     <SimpleSource><br>
>>       <SourceFilename<br>
>> relativeToVRT="2">po_172227_grn_0000000.tif</SourceFilename><br>
>>       <SourceBand>1</SourceBand><br>
>>       <SourceProperties RasterXSize="3001" RasterYSize="2554"<br>
>> DataType="UInt16" BlockXSize="3001" BlockYSize="256"/><br>
>>       <SrcRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>>       <DstRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>>     </SimpleSource><br>
>>     <SimpleSource><br>
>>       <SourceFilename<br>
>> relativeToVRT="3">po_172227_nir_0000000.tif</SourceFilename><br>
>>       <SourceBand>1</SourceBand><br>
>>       <SourceProperties RasterXSize="3001" RasterYSize="2554"<br>
>> DataType="UInt16" BlockXSize="3001" BlockYSize="256"/><br>
>>       <SrcRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>>       <DstRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>>     </SimpleSource><br>
>>     <SimpleSource><br>
>>       <SourceFilename<br>
>> relativeToVRT="4">po_172227_red_0000000.tif</SourceFilename><br>
>>       <SourceBand>1</SourceBand><br>
>>       <SourceProperties RasterXSize="3001" RasterYSize="2554"<br>
>> DataType="UInt16" BlockXSize="3001" BlockYSize="256"/><br>
>>       <SrcRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>>       <DstRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>>     </SimpleSource><br>
>>   </VRTRasterBand><br>
>> </VRTDataset><br>
>><br>
>><br>
>> 2010/8/10 Benoit EXIGE <<a href="mailto:benoit@exigesa.com">benoit@exigesa.com</a>>:<br>
>> > Hi Agus,<br>
>> ><br>
>> > Looks to me that the <sourceband> should be incremented from 1<br>
>> to 4 for your<br>
>> > four rasters.<br>
>> ><br>
>> > Hope this helps.<br>
>> > Benoit<br>
>> ><br>
>> ><br>
>> > Sent from my iPod<br>
>> ><br>
>> > On 10 Aug 2010, at 21:01, Agustin Lobo <<a href="mailto:alobolistas@gmail.com">alobolistas@gmail.com</a>> wrote:<br>
>> ><br>
>> >> Hi!<br>
>> >><br>
>> >> I use the gdal utilities (raster/Build Virtual Raster) with 4 files but<br>
>> >> then QGIS sees one band only (only one band listed in the Properties<br>
>> >> dialog).<br>
>> >> This is the VRT file, could anyone tell me if this is correct?<br>
>> >><br>
>> >> <VRTDataset rasterXSize="3001" rasterYSize="2554"><br>
>> >>  <SRS>PROJCS[&quot;WGS 84 / UTM zone 26N&quot;,GEOGCS[&quot;WGS<br>
>> >> 84&quot;,DATUM[&quot;WGS_1984&quot;,SPHEROID[&quot;WGS<br>
>> >><br>
>> >><br>
>> 84&quot;,6378137,298.2572235630016,AUTHORITY[&quot;EPSG&quot;,&quo<br>
>> t;7030&quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],PRIME<br>
>> M[&quot;Greenwich&quot;,0],UNIT[&quot;degree&quot;,0.0174532925199<br>
>> 433],AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]],PROJECTION[&quo<br>
> t;Transverse_Mercator&quot;],PARAMETER><br>
> [&quot;latitude_of_origin&quot;,0],PARAMETER[&quot;central_meridia<br>
>> n&quot;,-27],PARAMETER[&quot;scale_factor&quot;,0.9996],PARAMETER[<br>
> &quot;false_easting&quot;,500000],PARAMETER><br>
> [&quot;false_northing&quot;,0],UNIT[&quot;metre&quot;,1,AUTHORITY[<br>
> &quot;EPSG&quot;,&quot;9001><br>
> &quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;32626&quot;]]</SRS><br>
>> >>  <GeoTransform> 6.5222487132554676e+005, 4.0000000000000000e+000,<br>
>> >> 0.0000000000000000e+000, 4.1899966827195832e+006,<br>
>> >> 0.0000000000000000e+000,-4.0000000000000000e+000</GeoTransform><br>
>> >>  <VRTRasterBand dataType="UInt16" band="1"><br>
>> >>   <ColorInterp>Gray</ColorInterp><br>
>> >>   <SimpleSource><br>
>> >>     <SourceFilename<br>
>> >> relativeToVRT="1">po_172227_blu_0000000.tif</SourceFilename><br>
>> >>     <SourceBand>1</SourceBand><br>
>> >>     <SourceProperties RasterXSize="3001" RasterYSize="2554"<br>
>> >> DataType="UInt16" BlockXSize="3001" BlockYSize="256"/><br>
>> >>     <SrcRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>> >>     <DstRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>> >>   </SimpleSource><br>
>> >>   <SimpleSource><br>
>> >>     <SourceFilename<br>
>> >> relativeToVRT="1">po_172227_grn_0000000.tif</SourceFilename><br>
>> >>     <SourceBand>1</SourceBand><br>
>> >>     <SourceProperties RasterXSize="3001" RasterYSize="2554"<br>
>> >> DataType="UInt16" BlockXSize="3001" BlockYSize="256"/><br>
>> >>     <SrcRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>> >>     <DstRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>> >>   </SimpleSource><br>
>> >>   <SimpleSource><br>
>> >>     <SourceFilename<br>
>> >> relativeToVRT="1">po_172227_nir_0000000.tif</SourceFilename><br>
>> >>     <SourceBand>1</SourceBand><br>
>> >>     <SourceProperties RasterXSize="3001" RasterYSize="2554"<br>
>> >> DataType="UInt16" BlockXSize="3001" BlockYSize="256"/><br>
>> >>     <SrcRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>> >>     <DstRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>> >>   </SimpleSource><br>
>> >>   <SimpleSource><br>
>> >>     <SourceFilename<br>
>> >> relativeToVRT="1">po_172227_red_0000000.tif</SourceFilename><br>
>> >>     <SourceBand>1</SourceBand><br>
>> >>     <SourceProperties RasterXSize="3001" RasterYSize="2554"<br>
>> >> DataType="UInt16" BlockXSize="3001" BlockYSize="256"/><br>
>> >>     <SrcRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>> >>     <DstRect xOff="0" yOff="0" xSize="3001" ySize="2554"/><br>
>> >>   </SimpleSource><br>
>> >>  </VRTRasterBand><br>
>> >> </VRTDataset><br>
>> >><br>
>> >> Thanks<br>
>> >> Agus<br>
>> >> _______________________________________________<br>
>> >> Qgis-user mailing list<br>
>> >> <a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
>> >> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
>> ><br>
>> > _______________________________________________<br>
>> > Qgis-user mailing list<br>
>> > <a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
>> > <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
>> ><br>
><br>
> _______________________________________________<br>
> Qgis-user mailing list<br>
> <a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
><br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Giuseppe Sucameli<br><br>