1v.drape(1) Grass User's Manual v.drape(1)
2
3
4
6 v.drape - Converts 2D vector to 3D vector by sampling of elevation
7 raster. Default sampling by nearest neighbor.
8
10 vector
11
13 v.drape
14 v.drape help
15 v.drape input=name [type=string[,string,...]] [rast=string]
16 [method=string] output=name [--overwrite] [--verbose] [--quiet]
17
18 Flags:
19 --overwrite
20 Allow output files to overwrite existing files
21
22 --verbose
23 Verbose module output
24
25 --quiet
26 Quiet module output
27
28 Parameters:
29 input=name
30 Name of input vector map
31
32 type=string[,string,...]
33 Type
34 Feature type(s)
35 Options: point,centroid,line,boundary,face,kernel
36 Default: point,centroid,line,boundary,face,kernel
37
38 rast=string
39 Elevation raster for height extraction
40
41 method=string
42 Sampling method
43 Options: nearest,bilinear,cubic
44 Default: nearest
45 nearest: nearest neighbor
46 bilinear: bilinear interpolation
47 cubic: cubic convolution interpolation
48
49 output=name
50 Name for output vector map
51
53 v.drape converts 2D vector point or line data into 3D vector format via
54 sampling of an elevation surface. Three sampling algorithms adapted
55 fromv v.sample were incorporated into this module: nearest neighbor,
56 bilinear, and cubic convultion.
57
59 Please run beforehand
60 g.region vect=2D_vector
61 and make sure that the extent of the elevation raster is at least as
62 big as the vector to convert.
63
64 Additional vertices can be added to the input 2D vector with v.split.
65
66 The module can be used in conjunction with v.out.pov and r.out.pov to
67 export a complete set of vector and raster data for display in POVRAY.
68
70 Spearfish example:
71
72
73 g.region -p vect=roads align=elevation.10m
74 v.drape in=roads rast=elevation.10m method=bilinear out=roads3d
75 v.info roads3d
76
77
79
80 #setup the region
81 g.region vect=roads align=elevation.10m -p
82 #export the vector data
83 v.drape in=roads out=roads3d rast=elevation.10m
84 v.out.pov roads3d out=roads3d.pov
85 #export the raster data
86 r.out.pov elevation.10m tga=elevation.tga
87 r.out.png landcover.30m out=landcover30m.png
88 # now write a complete povray-script and launch povray
89
90
92 If the following error message appears
93 WARNING: [demname in mapset] - read request for row -1 is outside
94 region
95 ERROR: problem reading raster cell file
96 it indicates that the vector map is spatially larger than the raster
97 map. To avoid this problem, the vector map needs to be clipped to the
98 raster map extent, for example:
99 g.region rast=demname
100 v.in.region clipbox
101 v.overlay ain=clipbox bin=vectmap out=vectmap_clipped op=and
102 v.drape vectmap_clipped out=vectdrape rast=demname
103 Then v.drape should perform the draping.
104
106 r.out.pov, v.in.region, v.out.pov, v.overlay, v.split, v.what.rast
107
109 Dylan Beaudette, University of California at Davis.
110 Raster sampling routines borrowed from v.sample.
111
112 Last changed: $Date: 2007-07-09 17:15:36 +0200 (Mon, 09 Jul 2007) $
113
114 Full index
115
116 © 2003-2008 GRASS Development Team
117
118
119
120GRASS 6.3.0 v.drape(1)