[gdal-dev] ERROR 4: `test.asc' not recognised as a supported file
format.
Hermann Peifer
peifer at gmx.eu
Fri Aug 26 09:38:19 EDT 2011
Hi,
Occasionally I use a small .asc file, which I then gdal_translate into a
bigger blank GeoTIFF. I tried to make the smallest possible test.asc
file with 1 col x 1 row and 1 cell value only, but I ended up with ERROR
4: file not recognised as a supported file format.
The error message seems to go away after adding (useless) values to the
file, see below.
I am wondering if this is a feature or rather a bug?
Thanks for your time, Hermann
----------
$ gdalinfo --debug on test.asc
ERROR 4: `test.asc' not recognised as a supported file format.
gdalinfo failed - unable to open 'test.asc'.
$ gdalinfo --debug on test2.asc
GDAL: GDALOpen(test2.asc, this=0xab0610) succeeds as AAIGrid.
Driver: AAIGrid/Arc/Info ASCII Grid
Files: test2.asc
Size is 1, 1
Coordinate System is `'
Origin = (0.000000000000000,1.000000000000000)
Pixel Size = (1.000000000000000,-1.000000000000000)
Corner Coordinates:
Upper Left ( 0.0000000, 1.0000000)
Lower Left ( 0.0000000, 0.0000000)
Upper Right ( 1.0000000, 1.0000000)
Lower Right ( 1.0000000, 0.0000000)
Center ( 0.5000000, 0.5000000)
Band 1 Block=1x1 Type=Int32, ColorInterp=Undefined
GDAL: GDALClose(test2.asc, this=0xab0610)
$ gdalinfo --debug on test3.asc
GDAL: GDALOpen(test3.asc, this=0x16c5610) succeeds as AAIGrid.
Driver: AAIGrid/Arc/Info ASCII Grid
Files: test3.asc
Size is 1, 1
Coordinate System is `'
Origin = (0.000000000000000,1.000000000000000)
Pixel Size = (1.000000000000000,-1.000000000000000)
Corner Coordinates:
Upper Left ( 0.0000000, 1.0000000)
Lower Left ( 0.0000000, 0.0000000)
Upper Right ( 1.0000000, 1.0000000)
Lower Right ( 1.0000000, 0.0000000)
Center ( 0.5000000, 0.5000000)
Band 1 Block=1x1 Type=Int32, ColorInterp=Undefined
GDAL: GDALClose(test3.asc, this=0x16c5610)
$ cat test.asc
ncols 1
nrows 1
xllcorner 0
yllcorner 0
cellsize 1
0
$ cat test2.asc
ncols 1
nrows 1
xllcorner 0
yllcorner 0
cellsize 1
0 0 0 0 0 0 0 0 0 0
$ cat test3.asc
ncols 1
nrows 1
xllcorner 0
yllcorner 0
cellsize 1
123456789 987654321
$
More information about the gdal-dev
mailing list