I want to read Arc/Info Binary Grids and convert them to other image formats using the C#-bindings of GDAL. I installed FWTools 2.4.7 and the current binaries (MSVC2010 (Win64) -stable) from here. Then I started testing the example C#-programs that are part of FWTools, especially GDALRead.cs and GDALReadDirect.cs. When I use the demo dataset utm.tif
, this all works fine.
I then converted utm.tif to the Arc/Info Binary Grid format using ArcMap 10 (Conversion Tools - To Raster - Raster to other Format). When I try to use GDALRead.cs
or GDALReadDirect.cs
I get the following error messages:
GDALRead.cs:
Using driver Arc/Info Binary Grid
Band 1 :
DataType: GDT_Int16
Size (512,512)
PaletteInterp: GCI_Undefined
OverView 0 :
DataType: GDT_Int16
Size (256,256)
PaletteInterp: GCI_GrayIndex
OverView 1 :
DataType: GDT_Int16
Size (128,128)
PaletteInterp: GCI_GrayIndex
Non RGB images are not supported by this sample! ColorInterp = GCI_Undefined
GDALReadDirect.cs:
Using driver Arc/Info Binary Grid
Band 1 :
DataType: GDT_Int16
Size (512,512)
PaletteInterp: GCI_Undefined
OverView 0 :
DataType: GDT_Int16
Size (256,256)
PaletteInterp: GCI_GrayIndex
OverView 1 :
DataType: GDT_Int16
Size (128,128)
PaletteInterp: GCI_GrayIndex
The number of the raster bands is not enough to run this sample
This behavior is a bit surprising for me, as I did not change the dataset, I simply converted it into a new format. Any hints about the reasons for this behavior and how I can use GDAL via C# to convert ArcInfo binary grids to other image formats appreciated.