[Gdal-dev] Using CreateCopy() with ENVI data
Frank Warmerdam
fwarmerdam at gmail.com
Mon Mar 14 11:19:11 EST 2005
On Mon, 14 Mar 2005 16:54:06 +0100, Wim Koolhoven <koolhoven at itc.nl> wrote:
> > Hi All,
> >
> > In a specific project the client uses ENVI data with a program we
> > wrote based on GDAL.
> >
> > The input is read, processed and written to a new dataset. The new
> > datasat is created with CreateCopy(). Unfortunately class names,
> > colors and coordinate information get lost with CreateCopy().
> >
> > Quick and dirty solution would be to copy the .hdr file our selves,
> > but that makes our program dependent on ENVI. Any other ideas?
Wim,
Is the output also ENVI format? The short answer is that the solution
would be to improve the ENVI driver to support all these objects you
want to preserve. The ENVI driver was just hacked together as a quick
way of getting at imagery with ENVI headers, and is by no means feature
complete.
I would add that a CreateCopy from ENVI to ENVI should preserve
the geotransform based on a very quick skim of the envi code. If that
isn't happening it might be considered a bug. The ENVI code is in
gdal/frmts/raw/envidataset.cpp if you are inclined to try and improve
it.
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 | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list