1v.out.vtk(1)                GRASS GIS User's Manual               v.out.vtk(1)
2
3
4

NAME

6       v.out.vtk  - Converts a vector map to VTK ASCII output.
7

KEYWORDS

9       vector, export, output, VTK
10

SYNOPSIS

12       v.out.vtk
13       v.out.vtk --help
14       v.out.vtk     [-cn]    input=name     [layer=string]      [output=name]
15       [type=string[,string,...]]      [precision=integer]      [zscale=float]
16       [--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]
17
18   Flags:
19       -c
20           Correct the coordinates to fit the VTK-OpenGL precision
21
22       -n
23           Export numeric attribute table fields as VTK scalar variables
24
25       --overwrite
26           Allow output files to overwrite existing files
27
28       --help
29           Print usage summary
30
31       --verbose
32           Verbose module output
33
34       --quiet
35           Quiet module output
36
37       --ui
38           Force launching GUI dialog
39
40   Parameters:
41       input=name [required]
42           Name of input vector map
43           Or data source for direct OGR access
44
45       layer=string
46           Layer number or name
47           Vector  features can have category values in different layers. This
48           number determines which layer to use. When used with direct OGR ac‐
49           cess this is the layer name.
50           Default: 1
51
52       output=name
53           Name for output VTK file
54
55       type=string[,string,...]
56           Input feature type
57           Options: point, kernel, centroid, line, boundary, area, face
58           Default: point,kernel,centroid,line,boundary,area,face
59
60       precision=integer
61           Number of significant digits (floating point only)
62
63       zscale=float
64           Scale factor for elevation
65           Default: 1.0
66

DESCRIPTION

68       v.out.vtk converts a GRASS vector map in binary format to the VTK ASCII
69       output.
70
71       If the output parameter is not given, the output will be send  to  std‐
72       out.
73

NOTES

75       The  following  vector  types can be exported together in one VTK ascii
76       file:
77
78           •   point
79
80           •   line
81
82           •   centroid
83
84           •   boundary
85
86           •   area
87
88           •   face
89       Category data (cat) for the selected vector  type  and  layer  will  be
90       written  as scalar data with name "cat_{vectorname}". If no cat exists,
91       the value will set to -1 as normal cat’s are  always  positive.   If  a
92       vector  has  more categories in one layer, only the first category will
93       be exported.
94       3d vectors are supported by default. The created VTK  data  always  in‐
95       cludes  x,  y  and  z coordinates (z = 0 if not a 3d vector map).  Note
96       that you can easily convert  your  2d  vectors  into  3d  vectors  with
97       v.drape.
98       Because  of the 32bit limits of OpenGL which is used by VTK, visualisa‐
99       tion errors may occur if the grass region contains coordinates  greater
100       than 1.000.000 and vector coordinates with 0.01 - 0.001 meters precisi‐
101       son. For this reason, the flag "-c"  was  added.  The  coordinates  are
102       transformed  to smaller coordinates (by decreasing the coordinates with
103       the region center).
104       If the "-c" flag is used and the data  should  be  visualised  together
105       with  other  data exported via *.out.vtk modules, be sure the "-c" flag
106       was also set in these modules.  But this will only work with data  from
107       the  SAME location (The reference point for the coordinates transforma‐
108       tion is based on the default region).
109       The GRASS vector data is converted into the polydata format of VTK:
110
111vtk Vertices -- representing points and centroids
112
113vtk lines -- representing lines and boundaries
114
115vtk polygons -- representing areas and faces
116
117       The VTK file can be visualized with VTK Toolkit, Paraview and MayaVi.
118
119   Attention
120       If areas or faces are exported, the data have to be triangulated within
121       Paraview or MayaVi.
122

EXAMPLE

124       Spearfish example:
125
126       Export the soils with cats in layer 1:
127       v.out.vtk input=soils type=area layer=1 output=/tmp/soils.vtk
128       Export the streams with cats in layer 1:
129       v.out.vtk input=streams type=line layer=1 output=/tmp/streams.vtk
130       Write the archsite vtk output to stdout with cats in layer 1:
131       v.out.vtk input=archsites type=point layer=1
132

SEE ALSO

134        v.out.ascii, r.out.vtk, r3.out.vtk
135

AUTHOR

137       Soeren Gebbert
138

SOURCE CODE

140       Available at: v.out.vtk source code (history)
141
142       Accessed: Mon Jun 20 16:47:11 2022
143
144       Main  index  | Vector index | Topics index | Keywords index | Graphical
145       index | Full index
146
147       © 2003-2022 GRASS Development Team, GRASS GIS 8.2.0 Reference Manual
148
149
150
151GRASS 8.2.0                                                       v.out.vtk(1)
Impressum