2

I am trying to reproject and retile BMNG data. So far I have processing my images into geotifs. I can view them together in QGIS and everything looks good:

enter image description here

I then created a vrt file. The vrt file lives in the same folder as the tifs. When I attempt to open the vrt in QGIS or run gdalwarp on it, I get the following error: ERROR 4: \1_3.tif: No such file or directory

The lines in the vrt that reference the offending tif look like this:

<SimpleSource> <SourceFilename relativeToVRT="1">\1_3.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="512" RasterYSize="512" DataType="Byte" BlockXSize="512" BlockYSize="5" /> <SrcRect xOff="0" yOff="0" xSize="512" ySize="512" /> <DstRect xOff="1536" yOff="1536" xSize="512" ySize="512" /> </SimpleSource>

What am I doing wrong?

0

1 Answer 1

1

If your tifs are actually named "1_3.tif", not "\1_3.tif" then you need to remove the backslash.

<SimpleSource>
      <SourceFilename relativeToVRT="1">1_3.tif</SourceFilename>
      <SourceBand>1</SourceBand>
      <SourceProperties RasterXSize="512" RasterYSize="512" DataType="Byte" BlockXSize="512" BlockYSize="5" />
      <SrcRect xOff="0" yOff="0" xSize="512" ySize="512" />
      <DstRect xOff="1536" yOff="1536" xSize="512" ySize="512" />
</SimpleSource>
1
  • Thank you! It turns out I was running gdalbuildvrt with <output_path>*.tif and I had an extra backslash.
    – kcwill2
    Apr 10, 2020 at 6:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.