1r.out.vtk(1) Grass User's Manual r.out.vtk(1)
2
3
4
6 r.out.vtk - Converts raster maps into the VTK-Ascii format
7
9 raster
10
12 r.out.vtk
13 r.out.vtk help
14 r.out.vtk [-stvopc] [input=string[,string,...]] [elevation=string]
15 [rgbmaps=string[,string,...]] [vectormaps=string[,string,...]]
16 [output=string] [null=float] [elevscale=float] [eleva‐
17 tion2d=float]
18
19 Flags:
20 -s Use structured grid for elevation (not recommended)
21
22 -t Use polydata-trianglestrips for elevation grid creation
23
24 -v Use polydata-vertices for elevation grid creation (to use with
25 vtkDelauny2D)
26
27 -o Scale factor effects the origin (if no elevation map is given)
28
29 -p Create VTK point data instead of VTK cell data (if no elevation map
30 is given)
31
32 -c Correct the coordinates to fit the VTK-OpenGL precision
33
34 Parameters:
35 input=string[,string,...]
36 Raster map(s) to be converted to VTK-ASCII data format
37
38 elevation=string
39 Raster map that represents the elevation, used for the 3D informa‐
40 tion
41
42 rgbmaps=string[,string,...]
43 Three (r,g,b) raster maps which are used to create rgb values
44 [redmap,greenmap,bluemap]
45
46 vectormaps=string[,string,...]
47 Three (x,y,z) raster maps which are used to create vector values
48 [xmap,ymap,zmap]
49
50 output=string
51 Name for VTK-ASCII output file
52
53 null=float
54 Value to represent no data cell Default: -10.0
55
56 elevscale=float
57 Scale factor for elevation Default: 1.0
58
59 elevation2d=float
60 Elevation (if no elevation map is given) Default: 0.0
61
63 Outputs Raster maps in VTK-ASCII format. Map's are valid Raster map's
64 in the current mapset. output is the name of an VTK-ASCII file which
65 will be written in the current working directory. If output is not
66 specified then stdout is used. The module is sensitive to region set‐
67 tings (set with g.region).
68 Elevation, scaling, point/celldata, vector and RGB Data are supported.
69 If no elevation map is given, the user can set the hight of the map by
70 one value. Point or cell data are available. Also scaling is supported
71 for this elevation value.
72 The RGB input requires three raster maps: red, green, blue - in this
73 order. The maps must have values between 0 and 255, otherwise you will
74 get lots of warnings and the values are set to 0. More than one RGB
75 dataset (3 maps) is not supported.
76 The vector input requires three raster maps: x, y, z -- defining the
77 vector coordinates - in this order. More than one vector dataset (3
78 maps) is not supported.
79
81 This filter generates:
82
83 structured points with celldata or pointdata if no eleva‐
84 tionfile is given
85
86 structured grid (not recommendet) with pointdata if an
87 elevationfile is given
88
89 polydataset with pointdata if an elevationfile is given
90 (default)
91 and puts this in a simple VTK-ASCII file. Nor XML or binary output are
92 supported. It is possible to choose more then one raster map to be
93 written to the VTK-ASCII file. Each cell-/pointdata is named like the
94 raster map it represents. You can visualize this file with the VTK
95 Toolkit, Paraview and MayaVi which are based on VTK. If you have a
96 raster map with partly no data, use the threshold filter in paraview to
97 visualize the valid data. Just filter all data which is greater/lesser
98 than the choosen null value in the VTK-ASCII file.
99 If elevation map is choosen, a polygonal grid is created with quads,
100 but the user can choose also triangle strips or vertices. These
101 dataformats a documented at VTK Toolkit.
102 If the "-c" flag is used and the data should be visualised together
103 with other data exported via *.out.vtk modules, be sure the "-c" flag
104 was also set in these modules. But this will only work with data from
105 the SAME location (The reference point for the coordinates transforma‐
106 tion is based on the default region).
107
108 Difference between point- and celldata
109 r.out.vtk can export raster cells with different representations.
110
111 pointdata -- the cells/values are represented by the cen‐
112 ter of the cell. Instead of cells, points are created.
113 Each point can hold different values, but the user can
114 only visualize one value at a time. These points can be
115 connected in different ways.
116
117 celldata -- is only provided if no elevation map is
118 given. The cells are created with the same hight and
119 width as in GRASS. Each cell can hold different values,
120 but the user can only visualize one value at a time.
121
123 Simple Spearfish example
124
125 #set a nice region
126 g.region -d
127 g.region n=4926970 s=4914857 w=591583 e=607793 res=50
128 #export the data
129 r.out.vtk input=elevation.10m,slope,aspect elevation=elevation.10m out‐
130 put=/tmp/out.vtk
131 # visualize in paraview or other VTK viewer:
132 paraview --data=/tmp/out.vtk
133
134
135 Spearfish example with RGB data
136
137 #set the region
138 g.region -d
139 g.region n=4926970 s=4914857 w=591583 e=607793 res=50
140 #we are using r.in.onearth (available from the grass addon wiki) to
141 create rgb data
142 #get some satellite images with r.in.onearth
143 r.in.onearth -l output=Sat tmband=Red
144 r.in.onearth -l output=Sat tmband=IR1
145 r.in.onearth -l output=Sat tmband=IR2
146 #export the data
147 r.out.vtk rgbmaps=SatLandsatTM_IR1,SatLandsatTM_IR2,SatLandsatTM_Red
148 elevation=elevation.10m output=/tmp/out.vtk
149 # visualize in paraview or other VTK viewer:
150 paraview --data=/tmp/out.vtk
151
152
154 r3.out.vtk
155 r.out.ascii
156 g.region
157
159 Soeren Gebbert
160
161 Last changed: $Date: 2006/06/16 19:35:13 $
162
163 Full index
164
165
166
167GRASS 6.2.2 r.out.vtk(1)