[gdal-dev] Gdaltindex

Even Rouault even.rouault at mines-paris.org
Mon Dec 15 13:06:42 EST 2008


Hi,

the behaviour you describe is a bit weird. When you get the error 
message "Unable to open 'foo', skipping", there's no way in the source code 
of gdaltindex.c that 'foo' is added to the tile index (or I should reopen my 
C books ;-)). Are you sure the file was not already in the tile index before 
running this command ? That's the only explanation I have for such a 
behaviour. But I don't understand though why gdaltindex wouldn't manage to 
open it, but gdalinfo would succeed.

Then, the warnings about .tif.ovr being not recognized can probably explained 
by the fact that when you GDALOpen a .tif file, it will also try to open the 
related overview file. It looks like those overviews are corrupted. 

Best regards,
Even

Le Monday 15 December 2008 14:15:02, vous avez écrit :
> Hi,
>
> I was creating tileindexes with gdaltindex from FWTools 2.2.6 on Windows
> and I received strange looking error messages if I had external overviews
> in directories. So far it looks like the resulting shapefile is OK and it
> has polygons for all image files. However, while it is somehow
> understandable to get error messages about external overviews (named
> .tif.ovr) gdaltindex gives also errors about some .tif files. As I said,
> tileindex shapefiles seem to be OK despite of all the error messages.
>
> My command line was like:
> gdaltindex M105_WMS.shp	G:\Data\Shares\Ilmakuva2\Ilmakuvat\M105_WMS\*.tif
>
> A few examples of the error messages follow with couple of my comments
> marked with ***
>
>   Unable to open
> G:\Data\Shares\Ilmakuva2\Ilmakuvat\
> M105_WMS\FMI_2007_M105_TM35_114107D.tif, skipping.
>
> *** This file exists, it is OK for gdalinfo, and it is included in the
> resulting tileindex so it was not skipped really.
>
>   ERROR 4:
> `G:\Data\Shares\Ilmakuva2\Ilmakuvat\
> M105_WMS\FMI_2007_M105_TM35_114111C.tif.ovr'
> not recognised as a supported
> file format.
>
> *** Perhaps external overview mechanism for tiff files have made it
> necessary to make program to understand that *.tif should not include
> *.tif.ovr files?
>
> ERROR 1:
> TIFFFetchDirectory:G:\Data\Shares\Ilmakuva2\Ilmakuvat\
> 105_WMS\FMI_2007_M105_TM35_114302D.tif.ovr:
> Can not read TIFF directory count
> ERROR 1: TIFFReadDirectory:
> Failed to read directory at offset 123088580
> ERROR 1:
> TIFFFetchDirectory:G:\Data\Shares\Ilmakuva2\Ilmakuvat\
> M105_WMS\FMI_2007_M105_TM35_114303D.tif.ovr:
> Can not read  TIFF directory count
> ERROR 1: TIFFReadDirectory:
> Failed to read directory at offset 123088580
> ERROR 4:
> `G:\Data\Shares\Ilmakuva2\Ilmakuvat\
> M105_WMS\FMI_2007_M105_TM35_114305B.tif'
>  not recognised as a supported file
>  format.
>
> Unable to open
> G:\Data\Shares\Ilmakuva2\Ilmakuvat\
> M105_WMS\FMI_2007_M105_TM35_114305B.tif,
> skipping.
> ERROR 4:
> `G:\Data\Shares\Ilmakuva2\Ilmakuvat\
> M105_WMS\FMI_2007_M105_TM35_114306A.tif'
> not recognised as a supported file
>  format.
>
> -Jukka Rahkonen-
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev




More information about the gdal-dev mailing list