Question

Frank Warmerdam warmerdam at p...
Wed Dec 13 09:07:48 EST 2000


Vasilakos Christos wrote:
> 
> Hello Frank
> 
> I would like to use your utility. Yes, AVHRR raw data is 10 bit. But the BIP
> file i want to translate is the calibrated image which its values are 8bit
> and if not i can strech them to 8 bit. So, I have downloaded the binaries of
> the GDAL for Win 98. Are these the files that i should have? How the format
> of header should be and with what name? An finally provide some more
> information on how to use it. Within my application i will convert the files
> by creating a batch file and running it.

Vasilakos, 

There are a number of possible header formats, but I prefer PCI .aux. The
full description is at:

http://www.pcigeomatics.com/cgi-bin/pcihlp/GDB|Supported+File+Formats|Raw+Binary+Image+Format+(RAW)|Raw+.aux+Format

But in short, to describe a 1000x1000x5 band BIP eight bit file called avhrr.raw 
you would need to write out a file called avhrr.aux looking like this:

AuxilaryTarget: avhrr.raw
RawDefinition: 1000 1000 5
ChanDefinition-1: 8U 0 5 5000
ChanDefinition-2: 8U 1 5 5000
ChanDefinition-3: 8U 2 5 5000
ChanDefinition-4: 8U 3 5 5000
ChanDefinition-5: 8U 4 5 5000

To access the file in GDAL use the name of the raw file, avhrr.raw, and GDAL
will check for a corresponding .aux file. 

Once this is written you should be able to use gdal_translate.exe to
convert the dataset to other formats:

eg.

C:> gdal_translate -of GTiff avhrr.raw avhrr.tif
C:> gdal_translate -of JPEG avhrr.raw avhrr.jpg

Let me know if you need more information. 

Best regards,

---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at p...
light and sound - activate the windows | http://pobox.com/~warmerda
and watch the world go round - Rush | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list