GRASS logo

NAME

v.drape - Converts vector map to 3D by sampling of elevation raster map.

KEYWORDS

vector, geometry, sampling

SYNOPSIS

v.drape
v.drape help
v.drape input=name [type=string[,string,...]] [rast=name] [scale=float] [method=string] output=name [--overwrite] [--verbose] [--quiet]

Flags:

--overwrite
Allow output files to overwrite existing files
--verbose
Verbose module output
--quiet
Quiet module output

Parameters:

input=name
Name of input vector map
type=string[,string,...]
Type
Feature type(s)
Options: point,centroid,line,boundary,face,kernel
Default: point,centroid,line,boundary,face,kernel
rast=name
Elevation raster map for height extraction
scale=float
Scale sampled raster values
Default: 1.0
method=string
Sampling method
Options: nearest,bilinear,cubic
Default: nearest
nearest: nearest neighbor
bilinear: bilinear interpolation
cubic: cubic convolution interpolation
output=name
Name for output vector map

DESCRIPTION

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

NOTES

Please run beforehand
g.region vect=2D_vector
and make sure that the extent of the elevation raster is at least as big as the vector to convert.

Additional vertices can be added to the input 2D vector map with v.split.

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

EXAMPLE

Spearfish example:
g.region -p vect=roads align=elevation.10m
v.drape in=roads rast=elevation.10m method=bilinear out=roads3d
v.info roads3d

POVRAY EXAMPLE

#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

ERROR MESSAGES

If the following error message appears
WARNING: Current region does not include the entire input vector map
WARNING: Reading raster map request for row 466 is outside region
ERROR: Problem reading raster map
it indicates that the vector map is spatially larger than the current region settings. To avoid this problem, set region from the input vector map and re-run v.drape.
g.region vect=vectmap
If the following error message appears
WARNING: Elevation raster map does not cover the entire area of the input vector map.
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:
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
Then v.drape should perform the draping.

SEE ALSO

r.out.pov, v.in.region, v.out.pov, v.overlay, v.split, v.what.rast, v.extrude

AUTHOR

Dylan Beaudette, University of California at Davis.

Last changed: $Date: 2008-01-20 14:38:27 -0800 (Sun, 20 Jan 2008) $


Main index - vector index - Full index

© 2003-2008 GRASS Development Team