Converting GRASS vectors from 2D into 3D: v.drape
Sep 28, 2005 metroadminMore often than not geographic data come in a format that is essentially two-dimensional: i.e. raster grids and vector points, lines, and areas with only (x,y) style coordinates. GRASS provides a convenient 3D data type for vectors, but it is not common to get data that contains a z-coordinate from the start. The command v.drape can be used to convert a 2D vector (line or point) into a 3D vector by sampling a DEM at each vertex. v.drape is included in GRASS 6.3 and newer: link to manual page.
One possible use for this command is exporting GRASS vectors to POVRAY: see figure.
v.drape + v.out.pov