d.3d

Malcolm Williamson malcolm at cast.uark.edu
Fri Jan 14 10:46:24 EST 1994


Gail Goulet (goulet at vulcan1.hac.com) writes on 13 Jan 94:
>I've been working with the 4.1 version of d.3d to display dted data.  I am
>interested in plotting vector data (3d) on this display.  Has any work been
>done in this area?

Another possibility is to turn your vector data into a raster layer using the
CELL driver. The CELL driver replaces your normal graphics driver (x0, x1, etc.)
and simply records anything that you display (using the "d." commands) to a
single raster layer, which can then be used with d.3d . Kind of a round-about
way, but it works. Following are detailed instructions:

-------------------- 
 Thanks to a posting from Ronald Wiemer on grassu-list, I have finally figured
 out how to use the CELL driver in GRASS. This enables you to capture anything
 that you would normally display on a GRASS monitor (vectors, sites, labels,
 legends, etc.) in a single GRASS raster layer. Here's how:
 
 1) define the height and width of the CELL driver in pixels:
 	setenv GRASS_WIDTH 1000 (or some other number)
 	setenv GRASS_HEIGHT 1000 (ditto)
 
 2) start the CELL driver:
 	d.mon start=CELL
 
 3) display your desired map layers, etc., just as you would on a monitor (you 
 don't get to see any of this!). All of the "d." commands work as usual. It may
 help to compose the map on a regular GRASS monitor, and then save the commands
 as a script, which can then be run with the CELL driver selected.
 
 4) stop the CELL driver:
 	d.mon stop=CELL
 
 5) reselect your old GRASS monitor:
 	d.mon select=x1 (or whatever you were running)
 
 6) set your region to the new raster file created by the CELL driver; it will
 always be called D_cell:
 	g.region rast=D_cell
 	d.erase
 
 7) You can now display the raster map (d.rast D_cell), or use p.map or
 ps.map to paint it. Be aware of the resolution of the output device, whether
 it be your GRASS monitor, laser printer, or color printer, as compared to the 
 resolution that you chose for your CELL raster map. THIS IS IMPORTANT!!
 
 Good luck! If you are having problems with this, get in touch with me.
 -- 
-- 
Malcolm D. Williamson - Research Assistant       E-mail: malcolm at cast.uark.edu
Center for Advanced Spatial Technologies      Telephone: (501) 575-6159
Ozark Rm. 12                                        Fax: (501) 575-3846 
University of Arkansas              
Fayetteville, AR 72701



More information about the grass-user mailing list