Question:  
     What is this funny CELL driver in GRASS?

Answer:  
 The CELL driver exists for file output instead of graphical monitor 
 output. Use that for:

     - storing graphical output into a file with better
       resolution than through screen grabbing. 
     - saving 3-dimensional output from d.3d to a file
     - saving overlays (raster/raster/vector/...) to a file
       for export with r.out.tiff or similar 

 You will find a "D_cell" raster file in your GRASS database 
 after starting the driver, using d.rast, d.vect etc.(find some
 hints for d.3d and CELL driver) and
 stopping the driver again.
 Then you can export this file through r.out.tiff etc. into
 your mapping program (xfig or what you like) or may use it 
 with p(s).map.

 Be aware that "D_cell" is in a different projection than the
 usual raster files and can be displayed on a GRASS monitor only
 with a trick.

 Usage in details:

  Set the raster file size for CELL driver

     export GRASS_WIDTH=xxx    #if you want another size than the default 640
     export GRASS_HEIGHT=xxx   #if you want another size than the default 480

         Example: You want 1000x1000 for a nice poster:
                    export GRASS_WIDTH=1000
                    export GRASS_HEIGHT=1000

     If "export" is not accepted in your shell, try "setenv" instead:
                    setenv GRASS_WIDTH 1000
                    setenv GRASS_HEIGHT 1000


     d.mon start=CELL     # Wait for "Ready" message (may take some time due
                                                  to the file size selected)
     d.mon select=CELL

     d.yyyy               # use your display command (you will see nothing
      (d.rast, d.vect,       certainly, because the output is directed into
       d.3d,...)             the file D_cell)
                            -> use -o flag for second, third raster overlay!

     d.mon stop=CELL      # now the D_cell file is written (will also take
                                time, wait for CPU/Harddisk getting ready)

     
 - If you like: Look at the file

           use a trick:
              g.region raster=D_cell # this sets the region to 
                                         CELL projection
              d.mon start=x0         # start after using g.region
              d.rast D_cell          # should work...
              d.mon stop=x0          # stop it (it is in D_cell projection)
              g.region -d            # don't forget to reset the
                                         location afterwards
              d.mon start=x0         # start after using g.region -d
                                              if you want to display usual maps
                   
         (Hint: If you already have started a X-monitor, use d.mon select=x0
            and d.erase after the g.region commands instead of starting and 
            stopping the X-Monitors.)

 - If you like: Export the file
              g.region raster=D_cell  # set the region to CELL
              r.out.tiff [-p] input=D_cell output=D_cell.tiff  
                          # use -p for 8bit instead of 24bit TIFF export
              g.region -d             # reset the region to your coordinates



 Many thanks to Michel Wurtz - LTE  for his hints!

 
Markus Neteler
20. Jan. 1999

Go back to GRASS GIS FAQ...