| 1 |
<h2>DESCRIPTION</h2> |
| 2 |
|
| 3 |
<em>v.out.vtk</em> |
| 4 |
converts a GRASS vector map in binary format to the VTK ASCII |
| 5 |
output. |
| 6 |
<p>If the <b>output</b> parameter is not given, the output will be send to stdout. |
| 7 |
|
| 8 |
<h2>NOTES</h2> |
| 9 |
|
| 10 |
The following vector types can be exported together in one VTK ascii file: |
| 11 |
<ul> |
| 12 |
<li>point</li> |
| 13 |
<li>line</li> |
| 14 |
<li>centroid</li> |
| 15 |
<li>boundary</li> |
| 16 |
<li>area</li> |
| 17 |
<li>face</li> |
| 18 |
</ul> |
| 19 |
|
| 20 |
Category data (cat) for the selected vector type and layer will be written as scalar |
| 21 |
data with name "cat_{vectorname}". If no cat exists, the value will set to -1 as normal cat's are |
| 22 |
always positive. |
| 23 |
If a vector has more categories in one layer, only the first category |
| 24 |
will be exported. |
| 25 |
<br> |
| 26 |
<br> |
| 27 |
3d vectors are supported by default. The created VTK data always includes x, y and z coordinates |
| 28 |
(z = 0 if not a 3d vector map). |
| 29 |
Note that you can easily convert your 2d vectors into 3d vectors with v.drape. |
| 30 |
<br> |
| 31 |
<br> |
| 32 |
Because of the 32bit limits of OpenGL which is used by VTK, visualisation errors may occur if |
| 33 |
the grass region contains coordinates greater than 1.000.000 and vector coordinates |
| 34 |
with 0.01 - 0.001 meters precisison. For this reason, the flag "-c" was added. The coordinates are |
| 35 |
transformed to smaller coordinates (by decreasing the coordinates with the region center). |
| 36 |
<br> |
| 37 |
<br> |
| 38 |
If the "-c" flag is used and the data should be visualised together with other data exported via *.out.vtk |
| 39 |
modules, be sure the "-c" flag was also set in these modules. |
| 40 |
But this will only work with data from the SAME location |
| 41 |
(The reference point for the coordinates transformation is based on the default region). |
| 42 |
<br> |
| 43 |
<br> |
| 44 |
The GRASS vector data is converted into the polydata format of VTK: |
| 45 |
|
| 46 |
<ul> |
| 47 |
<li><i>vtk Vertices</i> -- representing points and centroids </li> |
| 48 |
<li><i>vtk lines</i> -- representing lines and boundaries </li> |
| 49 |
<li><i>vtk polygons</i> -- representing areas and faces </li> |
| 50 |
</ul> |
| 51 |
<p>The VTK file can be visualized with |
| 52 |
<em><a href="https://vtk.org/">VTK Toolkit</a></em>, |
| 53 |
<em><a href="https://www.paraview.org/">Paraview</a></em> and |
| 54 |
<em><a href="https://github.com/enthought/mayavi">MayaVi</a></em>. |
| 55 |
|
| 56 |
<h3>Attention</h3> |
| 57 |
<p>If areas or faces are exported, the data have to be triangulated within Paraview or |
| 58 |
MayaVi. |
| 59 |
|
| 60 |
<h2>EXAMPLE</h2> |
| 61 |
|
| 62 |
Spearfish example: |
| 63 |
<p>Export the soils with cats in layer 1: |
| 64 |
<div class="code"><pre> |
| 65 |
v.out.vtk input=soils type=area layer=1 output=/tmp/soils.vtk |
| 66 |
</pre></div> |
| 67 |
Export the streams with cats in layer 1: |
| 68 |
<div class="code"><pre> |
| 69 |
v.out.vtk input=streams type=line layer=1 output=/tmp/streams.vtk |
| 70 |
</pre></div> |
| 71 |
Write the archsite vtk output to stdout with cats in layer 1: |
| 72 |
<div class="code"><pre> |
| 73 |
v.out.vtk input=archsites type=point layer=1 |
| 74 |
</pre></div> |
| 75 |
|
| 76 |
<h2>SEE ALSO</h2> |
| 77 |
|
| 78 |
<em> |
| 79 |
<a href="v.out.ascii.html">v.out.ascii</a>, |
| 80 |
<a href="r.out.vtk.html">r.out.vtk</a>, |
| 81 |
<a href="r3.out.vtk.html">r3.out.vtk</a> |
| 82 |
</em> |
| 83 |
|
| 84 |
<h2>AUTHOR</h2> |
| 85 |
|
| 86 |
Soeren Gebbert |