[Gdal-dev] MrSID / ENVI conflict

Frank Warmerdam warmerdam at pobox.com
Mon Jun 26 13:58:46 EDT 2006


Collins, Benjamin wrote:
> To all,
> I could not find this addressed elsewhere, so I'm asking the list:
> 
> When running gdalinfo (and other commands!) on a MrSID image that I
> have, I am getting the report that "ENVI / ENVI .hdr Labelled" driver
> is reading the image.  I did build gdal with MrSID support, and am
> seeing the format show up in the '--formats' list.  It is getting the
> image dimensions right, and is reading the projection information
> correctly, but is obviously not the right driver (the block size and
> color interpretation are both wrong).  When I use a modified gdalinfo
> that has the call "GDALAllRegister()" replaced with
> "GDALRegister_MrSID()" the image is correctly read.  Is this a problem
> that others have run into?

Ben,

I haven't run into this specific issue, though periodically I do run
into problems with the wrong driver recognising a dataset and trying
to open it.  In your case, perhaps there is a .hdr file in the same
directory with the same basename?

> If this is indeed not my problem, how should I solve this?  I do not
> really need the ENVI driver, so I guess I could rebuild with this
> support disabled.  But this does not seen so elegant.

There is also a quicky work around to add the driver name to the
GDAL_SKIP environment/configuration variable.

eg.
gdalinfo --config GDAL_SKIP ENVI abc.sid

> It also brought to mind the idea that a user could want to request a
> specific driver be used to load an image.  This does not seen possible
> now.  Could/should the API be extended?

I would agree that there ought to be a mechanism to open a file using
only a specific driver, but I'm not keen on adding yet another GDALOpen()
variation.  The clumsy approach at the API is to unregister all other
drivers at runtime from the GDALDriverManager.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org




More information about the Gdal-dev mailing list