If using import from openev, how does gdal know that a given file
is an envi file? I'm importing an envi
file and think that there is a problem
reading the reference information, but
would like to make sure that the file
is actually beeing read as an envi file.
(before filing a bug report to gdal).
Also, is there any format parameter
that can be used in LoadFile ?
Dr. Agustin Lobo
Instituto de Ciencias de la Tierra (CSIC)
Lluis Sole Sabaris s/n
08028 Barcelona SPAIN
tel 34 93409 5410
fax 34 93411 0012
From: Frank Warmerdam <warmerdam@po...> - 2003-02-18 14:33:12
Agustin Lobo wrote:
> If using import from openev, how does gdal know that a given file
> is an envi file? I'm importing an envi
> file and think that there is a problem
> reading the reference information, but
> would like to make sure that the file
> is actually beeing read as an envi file.
> (before filing a bug report to gdal).
> Also, is there any format parameter
> that can be used in LoadFile ?
There is no convienent way to make OpenEV (or GDALOpen()) open a file as
a specific format. GDAL determines the format of a file by calling the
Open() methods for each format in turn untill one "claims" the file as it's
The format drivers are passed a GDALOpenInfo object which includes a chunk
of header (1000 bytes I think), the filename, whether it is a real file
or directory in the file system, and an open file handle on the file. From
this each driver tries to determine if the file is "for it" or not as cheaply
and safely as possible.
In addition to looking at the header data, some drivers look at the extension,
some probe the file system for files with expected naming conventions and
some look for special prefixes on the filename (like gltp: for the OGDI driver).
A user can use the GDAL_SKIP environment variable to provide a list of
space separate driver names to skip when opening files if you think a specific
one is giving problems. Also, gdalinfo will report the driver used to open
a file. The OpenEV file info tab in the raster layer properties dialog also
reports the format.
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@...
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent