Modify r.ppm to read pgm files

Tim Szeliga tim%rainbow at [192.46.108.18]
Thu Sep 9 11:48:00 EDT 1993


I recently started experimenting with the r.ppm routine in src.contrib .
It is set up for PPM file, that is a three band color image with
magic number 6.  Has anyone modified this to read a straight [0-255]
grayscale raster in PGM format, magic number 5?  We regularly 
produce rasters and can easily transform to PGM.  Otherwise I
have to convert to ASCII and bring it in that way.  (There might be 
an obvious workaround, but I haven't turned it up yet.)

Also, wouldn't it be nice if  there was a way to put the header in 
one file and the raster in another.  I had a LULC file for the entire US
that practically filled my disc and had to try to cat and append this 
dinky 14 line header.  Then when I had to make a change it nearly
killed my editor trying to handle the 17-zillion line file.


Tim Szeliga
tim at snow.nohrsc.nws.gov



More information about the grass-dev mailing list