Thanks much, Frank. I did a little more investigating. It looks like my issue may have been introduced with FWTools 2.1.0. I tried three different combinations:<br>
<br>
1 - myfile, myfile.hdr<br>
2 - myfile.envi.dat, myfile.envi.hdr<br>
3 - myfile.envi, myfile.envi.hdr<br>
<br>gdalinfo and gdal.Open() work fine for all three combinations on my machine (WindowsXP 32-bit) with FWTools 2.0.6.<br><br>With FWTools 2.1.0:<br>- The first two combinations both work with gdalinfo and gdal.Open()<br>
- The third one does not seem to work with gdalinfo or gdal.Open()<br><br>
Regards,<br>-Jeff<br><br><div class="gmail_quote">On Tue, Mar 4, 2008 at 7:09 AM, Frank Warmerdam <<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">Jeff Ruby wrote:<br>
> Hi,<br>
><br>
> I'm using FWTools 2.10 on Windows. I'm trying to access an ENVI file<br>
> through Python. I have two files: my_file.envi and my_file.envi.hdr<br>
><br>
> Here's a code snippet:<br>
><br>
> if __name__ == '__main__':<br>
><br>
> input_file = "my_file.envi"<br>
> gdal.AllRegister()<br>
> argv = gdal.GeneralCmdLineProcessor( sys.argv )<br>
><br>
> dataset = gdal.Open(input_file, GA_ReadOnly)<br>
><br>
><br>
> When I do this I get a message saying "my_file.envi" is not a supported file<br>
> format. If I try to use "my_file.envi.hdr" I get a message telling me to<br>
> use "my_file.envi" If I strip off the .envi everything works fine. Is<br>
> there a way to make gdal.Open() work correctly with the .envi in the<br>
> filenames?<br>
<br>
</div></div>Jeff,<br>
<br>
I tried renaming the .dat file from an envi fileset to .envi and did a gdalinfo<br>
on the .envi file and it worked fine for me. I also tried opening it with a<br>
python script. So, I'm not sure why you are running into problems.<br>
<br>
Best regards,<br>
<font color="#888888">--<br>
---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href="http://pobox.com/%7Ewarmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>
and watch the world go round - Rush | President OSGeo, <a href="http://osgeo.org" target="_blank">http://osgeo.org</a><br>
<br>
</font></blockquote></div><br>