XRIT2PIC translates LRIT/HRIT files originating from Meteosat Second Generation (MSG) weathersatellites into picture files.
A short feature overview:
Reads content of directory containing MSG received files and
generates a clickable tree structure
Preview of single and composed pictures; includes zooming/panning
Generation picture files in some standard format:
PGM (both 1 byte and 2 bytes per pixel)
PPM
JPEG
AVI movie
Overlay of coast/country boundaries
Combining 2 or more channels into composite (colour) pictures
2 ways to generate movies:
Built-in AVI generator
Interfaces with external movie generator, e.g. 'mencoder'
All dataprocessing done using the original received data
Non-gui mode for background translations
OS: Linux and Windows; on request also Sun/Solaris
Full source code available to compile for e.g. Mac
Supported picture formats.
XRIT format
embedded format
translated to
Second format
Comment
LRIT
JPEG 8 bits
JPEG 8 bits
PGM 8 bits
LRIT
Wavelet 8/10 bits
PGM 8/16 bits
Foreign sats, like GOES
HRIT
Wavelet 10 bits
PGM 16 bits
All
Any
AVI
each frame is JPEG
NOTE: PGM 16 bits is in big endian format! Some viewers (e.g. xv of Unix/Linux) assume little endian on little endian machines; probably a bug in these programs.
xrit2pic runs fine on a very simple PC; it doesn't need much memory (32M should be fine).
However, especially for the wavelet decompression a fast PC is needed to translate this format in an acceptable time (2GHz: a few seconds).
Note: You may try to convince me to add certain options! Also, bug reporting is very welcome.
Some technical information.
Each picture is represented into several (e.g. 8, or 58) small files.
JPEG files will be concatenated without decompressing them first, so no informnation is lost. The Independent Jpeg Group (IJG) routines are used for this.
Both 8 and 12 bits JPEG are supported.
If PGM generation is choosen a 8 bits JPEG (LRIT) will be translated into single-byte PGM; a 12 bits JPEG (HRIT HRV channel) will be translated into double-byte PGM (Big Endian).
Wavelet Transform (10 or 8 bits) formats will be concatenated and translated into 16 or 8 bits PGM. Code of this part of the program originates from Eumetsat, and may only be used for the purpose of MSG XRIT translations.
PGM notes
Note that 2 types of 16-bits PGM exist: Big Endian (MSByte first) and Little Endian (LSByte first). I think it is not well defined how PGM should be saved. Windows programs seem to use Big Endian, Linux (xv, IJG routines) Little Endian.
For the moment xrit2pic only generates Big Endian, but it is easy to also generate Little Endian PGM. If you need the latter one let me know!
JPEG notes
The used IJG code needed to be changed:
'Bogus Huffman table definition' error: In jdhuff.c one check has to be removed: (near line 208)
if (((INT32) code) >= (((INT32) 1) << si))
ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
Code is changed to work with both 8 and 12 bits JPEG