v.to.3d(1grass)

v.to.3d1grass

Performs transformation of 2d vector features to 3d.

Usage

v.to.3d

v.to.3d --help

v.to.3d [-rt] input=name [layer=string] [type=string [,string, ...]] output=name [column=name] [height=float] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Keywords

vector, geometry, 3D

Overview

The v.to.3d module is used to transform 2D vector features to 3D. Height (z-coordinate) of 3D vector features can be specified by height parameter as fixed value or by column parameter.

Flag -r enables to perform reverse transformation, i.e., transform 3D vector to 2D by omitting z-coordinate. Height of input 3D features can be optionally stored in column.

Notes

When transforming 2D vector features to 3D based on attribute, all NULL values are silently converted to height 0.0.

Reverse transformation is possible for points and lines. In case of lines, the reverse transformation should be used only when all vertices of a line have the same z-coordinate (for example contours).

Examples

Transform 2D vector features to 3D

# convert z-values from string to double
v.db.addcolumn map=geodetic_pts columns="Z_VALUE_D double precision"
v.db.update map=geodetic_pts column=Z_VALUE_D qcolumn=Z_VALUE
v.db.select map=geodetic_pts columns=cat,Z_VALUE,Z_VALUE_D
# convert 2D vector point map to 3D based on attribute
v.to.3d input=geodetic_pts out=geodetic_pts_3d column=Z_VALUE_D

Transform 3D vector features to 2D

v.to.3d -rt input=elev_lid792_bepts output=elev_lid_2d

Source code

Available at: v.to.3d source code (history)

Accessed: Monday Feb 24 17:51:25 2025

Main index | Vector index | Topics index | Keywords index | Graphical index | Full index

© 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 7 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13

Author

Martin Landa, Czech Technical University in Prague, Czech Republic

From grass-doc 8.4.1-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.