
NAME
v.drape - Converts vector map to 3D by sampling of elevation raster map.
KEYWORDS
vector, geometry, sampling, 3D
SYNOPSIS
v.drape
v.drape help
v.drape input=name layer=string [type=string[,string,...]] rast=name output=name [method=string] [scale=float] [where=sql_query] [null_value=float] [--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
- Data source for direct OGR access
- layer=string
- Layer number or name ('-1' for all layers)
- A single vector map can be connected to multiple database tables. This number determines which table to use. Layer name for direct OGR access.
- Default: -1
- type=string[,string,...]
- Feature type
- Options: point,line,boundary,centroid,area,face,kernel
- Default: point,line,boundary,centroid,area,face,kernel
- rast=name
- Elevation raster map for height extraction
- output=name
- Name for output vector map
- method=string
- Sampling method
- Options: nearest,bilinear,cubic
- Default: nearest
- nearest: nearest neighbor
- bilinear: bilinear interpolation
- cubic: cubic convolution interpolation
- scale=float
- Scale sampled raster values
- Default: 1.0
- where=sql_query
- WHERE conditions of SQL statement without 'where' keyword
- Example: income < 1000 and inhab >= 10000
- null_value=float
- Vector Z value for unknown height
- Will set Z to this value, if value from raster map can not be read
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.
v.drape will skip vector features outside of current computational region or
where raster map has NULL value. It's possible to include all vector features
by specifying height value that will be assigned to verticles whose values
can not be determined from raster map.
NOTES
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.
EXAMPLES
Spearfish example:
v.drape in=roads rast=elevation.10m method=bilinear out=roads3d
v.info roads3d
Create 3D vector roads map containing only "unimproved" roads.
Set road height to 1000 m for all parts without height information.
v.drape input=roads type=line rast=elevation.dem output=roads_3d \
method=nearest scale=1.0 where='cat=5' layer=1 null_value=1000
POVRAY EXAMPLE
#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
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-11-27 08:39:38 -0800 (Thu, 27 Nov 2008) $
Main index - vector index - Full index
© 2003-2011 GRASS Development Team