Last spring I tried to use netpbm utilities to convert the DIFAX maps that we
receive via IDD in g3 (FAX) format to postscript, with unsatisfactory results.
Many of the images were chopped off, and most were too small. I experimented
with all of the command-line options described in the netpbm man pages, to
little effect. At that time, Mark Franklin of Alden was also on the trail of a
satisfactory method to do the conversion, but he doesn't seem to have succeeded
either, in spite of his vow to get to the bottom of the problem--I haven't
heard from him since.
There may be a relatively simple technical fix to the netpbm program "g3otpbm"
that would solve the problem, but I don't speak C and I don't know enough about g3 format
to attempt to modify the g3topbm code.
I last looked at the mail archives on this subject at Unidata last spring, but
didn't find anything of help. Has there been additional mail since then on this
issue?
Below I've included a script that contains most of my various attempts to get
the netpbm routines to decode DIFAX products satisfactorily, in case you find
if of any value. I haven't looked at in in a while so I don't know exactly in
what state I left it.
If you find a satisfactory conversion procedure, please share it!
-- Dave
I'll just chime in a little here, also. We've been doing difax over IDD for
about half a year now, and have had few problems, once we worked the kinks out.
As previously stated, size of the images can be a problem. We solved most of
those problems by using the pbmplus utilities to cut four panel images down
into 4 different images (it's much better for viewing online, and quicker to
load when my boss is teaching his forecasting classes). We also do cropping on
some of the regular images, and crop down to the area that we're usually
interested in. We also save the whole image each time, in case we need it for
any reason.
As previously noted, the images often need to be rotated 90 degrees, or have
other things done to them, so I made up a little scheme were we have a
configuration file for each difax product that we want to save. In the conf
file, we are able to define the transformations that we want to do to each
product. So, we can cut the images into panels, crop, rotate, and scale the
images, all of which are easily done through the pnm routines. Whenever a
difax product comes in over the IDD, it gets sent to a perl script I wrote,
which does the stuff. It works well.
Of course, there are occasional problems with getting the products over the
IDD, but we haven't had too many problems. As for the the problem with
g3topbm, does everybody use the -kludge option? When I've left it off in the
past, things just don't work.
Anyway, my scripts are far too messy for anyone else to read (they've sorta
grown organically as our needs have changed here), but I'll attempt to answer
any questions folks have...
Dana
dana@xxxxxxxxxxxxxxx