[gdal-dev] gdalbuildvrt issues

Joaquim Manuel Freire Luís jluis at ualg.pt
Mon Nov 11 08:14:34 PST 2019


Hi,

I'm facing strange things when using gdalbuildvrt. First, with my own build (GDAL master) I can't use wild cards (Windows here)

$ gdalbuildvrt --version
GDAL 3.1.0dev, released 2019/99/99

j at MARILU C:\SIG_AnaliseDadosSatelite\SIG_ADS\DadosEx2\LC82040332015145LGN00
$ gdalbuildvrt lixo.vrt *.TIF
0...10...20...30...40...50...60...70...80...90...100 - done.
ERROR 4: `*.TIF' does not exist in the file system, and is not recognized as a supported dataset name.
Warning 1: Can't open *.TIF. Skipping it

But with an OSGeo4W build the command works fine

C:\SIG_AnaliseDadosSatelite\SIG_ADS\DadosEx2\LC82040332015145LGN00>gdalbuildvrt --version
GDAL 2.4.1, released 2019/03/15

C:\SIG_AnaliseDadosSatelite\SIG_ADS\DadosEx2\LC82040332015145LGN00>gdalbuildvrt lixo.vrt *.TIF
0...10...20...30...40...50...60...70...80...90...100 - done.

But is not the worst. The worst is that when I look into the VRT file I see this. Notice how the SrcRect and DstRect differ. Why is that?

    <SimpleSource>
      <SourceFilename relativeToVRT="1">LC82040332015145LGN00_B1.TIF</SourceFilename>
      <SourceBand>1</SourceBand>
      <SourceProperties RasterXSize="7731" RasterYSize="7871" DataType="UInt16" BlockXSize="7731" BlockYSize="1" />
      <SrcRect xOff="0" yOff="0" xSize="7731" ySize="7871" />
      <DstRect xOff="0" yOff="0" xSize="8067.13043478261" ySize="8213.21739130435" />
    </SimpleSource>

However, if I build the vrt by explicitly listing the files, then all seems fine. Also with the master branch build

$ gdalbuildvrt lixo.vrt LC82040332015145LGN00_B1.TIF LC82040332015145LGN00_B2.TIF
0...10...20...30...40...50...60...70...80...90...100 - done.

    <SimpleSource>
      <SourceFilename relativeToVRT="1">LC82040332015145LGN00_B1.TIF</SourceFilename>
      <SourceBand>1</SourceBand>
      <SourceProperties RasterXSize="7731" RasterYSize="7871" DataType="UInt16" BlockXSize="7731" BlockYSize="1" />
      <SrcRect xOff="0" yOff="0" xSize="7731" ySize="7871" />
      <DstRect xOff="0" yOff="0" xSize="7731" ySize="7871" />
    </SimpleSource>


Joaquim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20191111/d42cbb97/attachment.html>


More information about the gdal-dev mailing list