v.to.3d(1grass)
β¨ v.to.3d β¨
okay bestie, gather round, because this is the v.to.3d manual page from the GRASS User's Manual and it is literally the glow-up module π
KEYWORDS: vector, geometry, 3D π¦
πΈ SYNOPSIS πΈ
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]
π Flags π
-rβ reverse transformation, no cap: it takes 3D vector features and makes them 2D again π-tβ do NOT copy the attribute table, like at all, periodt π--overwriteβ let your output files just steamroll over existing files, main character energy π--helpβ prints the usage summary so you're not lost, we love that for you π--verboseβ verbose module output, she's chatty and we respect it π£οΈ--quietβ quiet module output, the introvert setting π€«--uiβ force launching the GUI dialog, for the visual girlies πͺβ¨
π Parameters π
input=name[required] β name of the input vector map. or, plot twist, a data source for direct OGR access πlayer=stringβ layer number or name ('-1'for all layers). a single vector map can be connected to multiple database tables, and this number is the one that picks which table to use. when you're doing direct OGR access, this is the layer name instead. default:1type=string[,string,...]β input feature type. options are:point,line,boundary,centroid. default:point,line,boundary,centroid(all of them, she's generous π )output=name[required] β name for output vector map, you gotta name your baby πΌcolumn=nameβ name of the attribute column used for height. can also be used for reverse transformation, to store the height of points πheight=floatβ fixed height for 3D vector features, one number to rule them all ποΈ
π DESCRIPTION π
so the v.to.3d module is the one you call when you need to transform 2D vector features into 3D. the height (that's the z-coordinate, bestie) of the 3D vector features can be specified either by the height parameter as a fixed value, or by the column parameter. pick your fighter β¨
the flag -r enables performing the reverse transformation, i.e., transforming 3D into 2D by omitting the z-coordinate. and the height of the input 3D features can optionally be stored in column. cute, right? π
π₯ NOTES π₯
when transforming 2D vector features to 3D based on an attribute, all NULL values are silently converted to height 0.0. silently!! no warning, no text, she just does it π
also, the reverse transformation (2D to 3D) is possible for points and lines. but for lines, the reverse transformation should only be used when all vertices of a line have the same z-coordinate (think contours, for example). don't be out here doing it otherwise, fr fr π
π 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
π SEE ALSO π
v.transform, v.extrude, v.drape
go read those next, bestie, they're the friend group π«Ά
π AUTHOR π
Martin Landa, Czech Technical University in Prague, Czech Republic π¨πΏ
π§ SOURCE CODE π§
available at: v.to.3d source code (history)
latest change: Friday May 09 14:33:40 2025 in commit: b356c7e108fcbeca77474c8e83ebec8f1e7b3e4a
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
and that's a wrap, my love πΈ this whole thing came straight out of the manual for GRASS 8.5.0, and the last change to this page landed on Friday May 09 14:33:40 2025. stay 3D, stay iconic, mwah πβ¨
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· 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