[Gdal-dev] GDAL EHdr (.hdr) driver
Frank Warmerdam
warmerdam at pobox.com
Thu May 11 14:23:03 EDT 2006
heinsm wrote:
> I have not been able to find a way to control the 'byteorder' for a warping
> operation using the raw format EHdr driver. I assumed the input .hdr file
> would automatically setup the output .hdr file (which contains the byteorder
> description), but this does not appear to be the case.
Mike,
Currently the EHdr driver always writes image data little endian (BYTEORDER
I). I gather you have some reason that you want a different order? Why is
that? It should be pretty easy to add a new creation option for setting
the BYTEORDER value if there is a need.
> Does anyone know of a property that gives access to the .hdr settings when
> writing to the EHdr driver? (ESRI BIL and .hdr format)
There is no direct control over the .hdr values.
> Also, I've seen the GDALSwap functions but are unsure how to incorporate
> them...
As long as the Create() method is changed to emit a different BYTEORDER,
the rest of the driver will take care of doing the swapping as needed.
Basically Create() just writes out the header, and then reopens the file
in "update" mode, leaving read/write swapping to the normal read/write code.
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