Áú¹® :
GRASS¿¡¼ CELL driver ÀÇ ±â´É°ú Àǹ̴ ¹«¾ùÀΰ¡ ?
´äº¯ :
CELL driver´Â ¸ð´ÏÅÍ Ãâ·Â ´ë½Å¿¡ ÆÄÀÏ Ãâ·ÂÀ» Áö¿øÇÏ´Â
µå¶óÀ̺êÀÌ´Ù.
´ÙÀ½°ú °°Àº ¿ëµµ·Î »ç¿ëµÈ´Ù :
- ¸ð´ÏÅÍ ÇØ»óµµº¸´Ù ³ôÀº À̹ÌÁö¸¦ ÆÄÀÏ·Î ÀúÀåÇÏ´Â ¿ëµµ.
- d.3d ¸í·ÉÀ» ÅëÇØ »ý¼ºµÈ 3Â÷¿ø ¿µ»óÀ» ÆÄÀÏ·Î ÀúÀåÇÏ´Â ¿ëµµ.
- raster/raster/vector/...µîÀÌ ÁßøµÇ¾î ÀÖ´Â µµ¸éÀ» Çϳª·Î
ÇÕÃļ r.out.tiffµîÀÇ ¸í·É¿¡ »ç¿ëµÉ ÆÄÀÏÀ» ¸¸µå´Â ¿ëµµ.
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 projecting that 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
ATTENTION: You have to add 1 to xxx to get your resolution
(strange thing..)
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 640x480:
export GRASS_WIDTH=641
export GRASS_HEIGHT=481
If "export" is not accepted in your shell, try "setenv" instead:
setenv GRASS_WIDTH 641
setenv GRASS_HEIGHT 481
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
neteler@geog.uni-hannover.de
20. Jan. 1999
Go back to GRASS GIS FAQ...