how to input binary image into GRASS

kang at risca.rs.msu.edu kang at risca.rs.msu.edu
Tue May 23 08:00:00 EDT 1995



Dr. Baker,
You can use the UNIX "dd" command to strip off the first few lines of a 8-bit
binary file.  Usually you need to know how may bytes of those lines.  For
example, I had been strip a NOAA 8-bit imagey and make it a GRASS binary file.
The imagery I have is a 512 row by 512 column and each pixel is represented in
8-bit.  There are another 512 byte header information in the file.  So, I use
"dd if=input_file of=output_file skip=1" to strip of the first 512 bytes.  The
skip=1 means skip the first bolck (which is 512 bytes on my SUN SPARC 20).  I
think the dd command also allow you to skip certain number of bytes but you may
need to specify it in the command line.  After that, put the output_file in
the GRASS cell directory and run r.support on the file.  You would have to
enter 512 row, 512 column, and 1 byte on the first r.support screen and build
the cateogry, histogram (and range), color, and history information.  This work
s
pretty good with those NOAA 8-bit imagery.

Yung-Tsung Kang,
Center for Remote Sensing, Michigan State University





More information about the grass-user mailing list