v.out.vtk(1)
π v.out.vtk β the GRASS GIS bestie that turns your vector map into VTK ASCII π
okay so real talk, this is v.out.vtk(1) from the GRASS GIS User's Manual, and she is that girl. she takes your vector map and serves it up as VTK ASCII output. no cap. π¦
β¨ NAME β¨
v.out.vtk β converts a vector map to VTK ASCII output. periodt. π
π KEYWORDS π
vector, export, output, VTK β yes bestie, all of them. iykyk. β
πΈ SYNOPSIS πΈ
v.out.vtk
v.out.vtk --help
v.out.vtk [-cn] input=name [layer=string] [output=name]
[type=string[,string,...]] [precision=integer] [zscale=float]
[--overwrite] [--help] [--verbose] [--quiet] [--ui]
π«Ά Flags (the little switches that change everything)
-cβ Correct the coordinates to fit the VTK-OpenGL precision. (more on why she's important later, she's lowkey a lifesaver π)-nβ Export numeric attribute table fields as VTK scalar variables. numbers as scalars, slay β¨--overwriteβ Allow output files to overwrite existing files. she will simply replace what's there, no hesitation π--helpβ Print usage summary.--verboseβ Verbose module output. she'll tell you everything. main character energy fr.--quietβ Quiet module output. she says nothing. mysterious. iconic.--uiβ Force launching GUI dialog. pop-up era π
π Parameters (the actual info you gotta hand over)
input=name[required] β Name of input vector map. Or data source for direct OGR access. yes babe it's required, she needs the goods πlayer=stringβ Layer number or name. Vector features can have category values in different layers, and this number determines which layer to use. When used with direct OGR access, this is the layer name. Default:1.output=nameβ Name for output VTK file.type=string[,string,...]β Input feature type. Options:point,kernel,centroid,line,boundary,area,face. Default:point,kernel,centroid,line,boundary,area,face(yes she defaults to everything, she's generous like that π).precision=integerβ Number of significant digits.zscale=floatβ Scale factor for elevation. Default:1.0.
π DESCRIPTION π
v.out.vtk converts a GRASS vector map in binary format to the VTK ASCII output. that's the whole job bestie and she does it flawlessly.
If the output parameter is not given, the output will be send to stdout. so if you don't tell her where to put it, she just yells it into the terminal. valid. π
π NOTES π
The following vector types can be exported together in one VTK ascii file:
pointlinecentroidboundaryareaface
Category data (cat) for the selected vector type and layer will be written as scalar data with name "cat_{vectorname}". If no cat exists, the value will set to -1, as normal cat's are always positive. If a vector has more categories in one layer, only the first category will be exported. one cat only, she's monogamous to the first one π±
3d vectors are supported by default. The created VTK data always includes x, y and z coordinates (z = 0 if not a 3d vector map). Note that you can easily convert your 2d vectors into 3d vectors with v.drape. glow up your flat little vectors, they deserve it β¨
Because of the 32bit limits of OpenGL which is used by VTK, visualisation errors may occur if the grass region contains coordinates greater than 1.000.000 and vector coordinates with 0.01 - 0.001 meters precisison. For this reason, the flag "-c" was added. The coordinates are transformed to smaller coordinates (by decreasing the coordinates with the region center). she's literally just shrinking the numbers so OpenGL doesn't have a meltdown π
If the "-c" flag is used and the data should be visualised together with other data exported via *.out.vtk modules, be sure the "-c" flag was also set in these modules. But this will only work with data from the SAME location (The reference point for the coordinates transformation is based on the default region). consistency is key, bestie, do NOT mix and match here π
The GRASS vector data is converted into the polydata format of VTK:
- vtk Vertices β representing points and centroids
- vtk lines β representing lines and boundaries
- vtk polygons β representing areas and faces
The VTK file can be visualized with VTK Toolkit, Paraview and MayaVi. take your pick, she's compatible with all her girls π
β οΈ Attention β οΈ
If areas or faces are exported, the data have to be triangulated within Paraview or MayaVi. not optional, bestie, do not skip this step or it's giving broken render π
π§ EXAMPLE π§
Spearfish example, aka the classic:
Export the soils with cats in layer 1:
v.out.vtk input=soils type=area layer=1 output=/tmp/soils.vtk
Export the streams with cats in layer 1:
v.out.vtk input=streams type=line layer=1 output=/tmp/streams.vtk
Write the archsite vtk output to stdout with cats in layer 1:
v.out.vtk input=archsites type=point layer=1
π¦ SEE ALSO π¦
v.out.ascii, r.out.vtk, r3.out.vtk
go check them out, they're her siblings and they all ate π
β AUTHOR β
Soeren Gebbert β thank you king, we appreciate you π«Ά
π SOURCE CODE π
Available at: v.out.vtk source code (history)
Accessed: Saturday Jan 17 05:41:28 2026
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual
okay that's the whole page bestie!! this manual is from GRASS 8.4.2 (the footer said so, and honestly she's thriving), the accessed date was Saturday Jan 17 05:41:28 2026, it's all under the Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual umbrella, and the footer on the original literally just read GRASS 8.4.2 next to v.out.vtk(1). so yeah β go export something gorgeous, mwah ππΈ
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms