Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GDAL - gdalbuildvrt "tif file not recognized as a supported file format"


I am trying to create a virtual raster (VRT file), that joins a large amount of GeoTIFF rasters.

I am using gdalbuildvrt command in a Windows 7 environment. Below is the syntax used.

gdalbuildvrt -input_file_list C:\listing.txt -srcnodata 0 -resolution average O:\mosaicB.vrt

The file listing.txt holds the full path names of the TIF files I want to process. mosaicB.vrt is the output file.

The first few lines of listing.txt is:

C:\TileCam_GeoTIFF_mosaicb\tf_1422848977_0000069632FN.tif
C:\TileCam_GeoTIFF_mosaicb\tf_1422848977_0000069633FN.tif
C:\TileCam_GeoTIFF_mosaicb\tf_1422848977_0000069634FN.tif
C:\TileCam_GeoTIFF_mosaicb\tf_1422848977_0000069635FN.tif
C:\TileCam_GeoTIFF_mosaicb\tf_1422848977_0000069636FN.tif
C:\TileCam_GeoTIFF_mosaicb\tf_1422848977_0000069638FN.tif

The command runs for quite a while, eventually though, I get warnings, and finally, an empty output file. I do get the following errors, which repeat indefinitely

ERROR 4: 'C:\TileCam_GeoTIFF_mosaicb\tf_1422848977_0000087496FN.tif' not recognised as a supported file format.   
Warning 1: Can't open C:\TileCam_GeoTIFF_mosaicb\tf_1422848977_0000087496FN.tif. Skipping it 
ERROR 4: 'C:\TileCam_GeoTIFF_mosaicb\tf_1422848977_0000087497FN.tif' not recognised as a supported file format. 
Warning 1: Can't open C:\TileCam_GeoTIFF_mosaicb\tf_1422848977_0000087497FN.tif. Skipping it 
ERROR 4: 'C:\TileCam_GeoTIFF_mosaicb\tf_1422848977_0000087498FN.tif' not recognised as a supported file format.

Not sure where to go from here. I have admin rights, so it's not a permission problem. These are 16 bit GeoTIFF files, readable in all GIS programs. I would appreciate any help here.

like image 434
jhc Avatar asked Feb 04 '15 01:02

jhc


1 Answers

Hi I was having the same problem using the C# bindings the solution for me was to call the given GdalConfiguration.ConfigureGdal(); which sets environment paths to drivers. I believe your problem is due to gdal not registering the GeoTiff driver. I would download gdal from OSGeo4W and run it from their supplied shell as it will configure the drivers for you.

like image 153
ZackOfAllTrades Avatar answered Oct 26 '22 00:10

ZackOfAllTrades