how to input binary image into GRASS

BAKERWL at UWYO.EDU BAKERWL at UWYO.EDU
Mon May 22 16:42:06 EDT 1995


Some time ago Steve Franklin explained on the list that it it possible
to get a binary image file directly into GRASS without using r.in.sunrast
or r.in.tiff.  He suggested that if one could get an image into xv, then
the image could be saved as a "pnm" file in 8-bit format; if one then 
strips off the first few lines, puts the file directly into the cell
subdirectory and creates the appropriate cellhd file and colr file, then
the file can become a GRASS map directly.  The advantage of this approach
is that it is possible to avoid r.in.sunrast or r.in.tiff and it is also
possible to input files at a resolution greater than screen resolution,
since xv allows one to save files at their original resolution.

So far I haven't been able to get this to work:
	1. how does one strip off the first few lines of a binary file?
		vi does not like to edit binary files...
	2. how can the color table used in xv be preserved and converted
		to a GRASS color table?  
	3. xv list pm and pbm output formats, but not pnm; since I haven't
		used the pbm utilities I don't know whether the pnm format
		is equivalent to pbm?

Has anyone else figured out a way to go directly from a binary file into
GRASS, or have ideas about going from xv into GRASS directly?

Bill Baker
bakerwl at uwyo.edu



More information about the grass-user mailing list