Re: ENVI File Question [message #55788 is a reply to message #55787] |
Wed, 12 September 2007 15:40   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jean H. writes:
> You can write the image AND the header at the same time, using
> ENVI_WRITE_ENVI_FILE
>
> here is an example... please note that some info has been read when
> opening another file (the headerInfo structure)... I am not sure how to
> build the map info on its own!
>
> ENVI_WRITE_ENVI_FILE, data, data_type=1, nb = nbBands, nl=data_sizeY, $
> ns=data_sizeX,OUT_NAME = workingDirectory + "fileName.dat", $
> BNAMES = "band Name", class_names = headerInfo.class_names, $
> lookup=headerInfo.lookup, map_info=headerInfo.map_info,num_classes =
> headerInfo.num_classes
Good suggestion, Jean. And I notice that this also automatically
adds the new image to the Available Bands list, which is great.
BUT, even though I get a map info structure from the GeoTiff
files when I open them,(I open with ENVI_OPEN_DATA_FILE and
I get the map structure with ENVI_GET_MAP_INFO, and check to
be sure it is valid), the map information is not there in the
Available Bands list as it is for the GeoTiff files. (I pass
the map info information along with the MAPINFO keyword
in ENVI_WRITE_ENVI_FILE.) Any idea why this wouldn't be
shown in the Available Bands list, too?
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|