Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 413e0bdb3c48563b2d8d9038d07d5533 > files > 2202

grass-6.3.0-15.fc13.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>GRASS GIS: v.drape</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
</head>
<body bgcolor="white">

<img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>

<h2>NAME</h2>
<em><b>v.drape</b></em>  - Converts 2D vector to 3D vector by sampling of elevation raster. Default sampling by nearest neighbor.
<h2>KEYWORDS</h2>
vector
<h2>SYNOPSIS</h2>
<b>v.drape</b><br>
<b>v.drape help</b><br>
<b>v.drape</b> <b>input</b>=<em>name</em>  [<b>type</b>=<em>string</em>[,<i>string</i>,...]]   [<b>rast</b>=<em>string</em>]   [<b>method</b>=<em>string</em>]  <b>output</b>=<em>name</em>  [--<b>overwrite</b>]  [--<b>verbose</b>]  [--<b>quiet</b>] 

<h3>Flags:</h3>
<DL>
<DT><b>--overwrite</b></DT>
<DD>Allow output files to overwrite existing files</DD>
<DT><b>--verbose</b></DT>
<DD>Verbose module output</DD>
<DT><b>--quiet</b></DT>
<DD>Quiet module output</DD>
</DL>

<h3>Parameters:</h3>
<DL>
<DT><b>input</b>=<em>name</em></DT>
<DD>Name of input vector map</DD>

<DT><b>type</b>=<em>string[,<i>string</i>,...]</em></DT>
<DD>Type</DD>
<DD>Feature type(s)</DD>
<DD>Options: <em>point,centroid,line,boundary,face,kernel</em></DD>
<DD>Default: <em>point,centroid,line,boundary,face,kernel</em></DD>

<DT><b>rast</b>=<em>string</em></DT>
<DD>Elevation raster for height extraction</DD>

<DT><b>method</b>=<em>string</em></DT>
<DD>Sampling method</DD>
<DD>Options: <em>nearest,bilinear,cubic</em></DD>
<DD>Default: <em>nearest</em></DD>
<DD><b>nearest</b>: nearest neighbor</DD>
<DD><b>bilinear</b>: bilinear interpolation</DD>
<DD><b>cubic</b>: cubic convolution interpolation</DD>

<DT><b>output</b>=<em>name</em></DT>
<DD>Name for output vector map</DD>

</DL>
<h2>DESCRIPTION</h2>

<em>v.drape</em> converts 2D vector point or line data into 3D vector
format via sampling of an elevation surface. Three sampling algorithms
adapted from<em>v v.sample</em> were incorporated into this module:
nearest neighbor, bilinear, and cubic convultion.

<h2>NOTES</h2>

Please run beforehand
<div class="code"><pre>
g.region vect=2D_vector
</pre></div>
and make sure that the extent of the elevation raster is at least as
big as the vector to convert.

<P>
Additional vertices can be added to the input 2D vector with <em>v.split</em>.
<P>

The module can be used in conjunction with <em>v.out.pov</em> and
<em>r.out.pov</em> to export a complete set of vector and raster data
for display in POVRAY.

<h2>EXAMPLE</h2>

Spearfish example:
<P>
<div class="code"><pre>
g.region -p vect=roads align=elevation.10m
v.drape in=roads rast=elevation.10m method=bilinear out=roads3d
v.info roads3d
</pre></div>

<h2>POVRAY EXAMPLE</h2>

<div class="code"><pre>
#setup the region
g.region vect=roads align=elevation.10m -p
#export the vector data
v.drape in=roads out=roads3d rast=elevation.10m
v.out.pov roads3d out=roads3d.pov
#export the raster data
r.out.pov elevation.10m tga=elevation.tga
r.out.png landcover.30m out=landcover30m.png

# now write a complete povray-script and launch povray
</pre></div>

<h2>ERROR MESSAGES</h2>

If the following error message appears

<div class="code"><pre>
 WARNING: [demname in mapset] - read request for row -1 is outside region
 ERROR: problem reading raster cell file
</pre></div>

it indicates that the vector map is spatially larger than the raster map.
To avoid this problem, the vector map needs to be clipped to the raster
map extent, for example:

<div class="code"><pre>
g.region rast=demname
v.in.region clipbox
v.overlay ain=clipbox bin=vectmap out=vectmap_clipped op=and
v.drape vectmap_clipped out=vectdrape rast=demname
</pre></div>

Then <em>v.drape</em> should perform the draping.


<h2>SEE ALSO</h2>

<EM>
<A HREF="r.out.pov.html">r.out.pov</A>,
<A HREF="v.in.region.html">v.in.region</A>,
<A HREF="v.out.pov.html">v.out.pov</A>,
<A HREF="v.overlay.html">v.overlay</A>,
<A HREF="v.split.html">v.split</A>,
<A HREF="v.what.rast.html">v.what.rast</A>
</EM>

<h2>AUTHOR</h2>

Dylan Beaudette, University of California at Davis.
<br>
Raster sampling routines borrowed from v.sample.

<p><i>Last changed: $Date: 2007-07-09 17:15:36 +0200 (Mon, 09 Jul 2007) $</i>
<HR>
<P><a href="index.html">Main index</a> - <a href="vector.html">vector index</a> - <a href="full_index.html">Full index</a></P>
<P>&copy; 2003-2008 <a href="http://grass.osgeo.org">GRASS Development Team</a></p>
</body>
</html>