v.extrude(1grass)

πŸ’– v.extrude β€” the manual, but make it cute πŸ’–

okay so bestie, you know how 2D stuff is just… lying there, flat, no drama, no verticality? πŸ’€ v.extrude is literally the glow-up module. It's part of the GRASS User's Manual (yes, that's the manual name, we're folding it in like a lil name tag πŸŽ€), and it takes your flat vector features and gives them HEIGHT. Iconic behaviour.

KEYWORDS: vector, geometry, sampling, 3D ✨


🌈 SYNOPSIS 🌈

v.extrude
v.extrude --help
v.extrude [-t] input=name  [layer=string]   [cats=range]
[where=sql_query]   [type=string[,string,...]]  output=name
[zshift=float]   [height=float]   [height_column=name]
[elevation=name]   [method=string]   [scale=float]   [null_value=float]
[--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]

✨ Flags ✨

  • -t β€” Trace elevation. it's giving "show me the receipts" for your elevation values πŸ“ˆ
  • --overwrite β€” Allow output files to overwrite existing files (yes, it will absolutely replace what's already there, consent given πŸ’…)
  • --help β€” Print usage summary
  • --verbose β€” Verbose module output (chatty mode, we love a talker πŸ—£οΈ)
  • --quiet β€” Quiet module output (shhh, no thoughts, just vibes 🀫)
  • --ui β€” Force launching GUI dialog

🌸 Parameters 🌸

  • input=name [required] β€” Name of 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 determines which table to use. When used with direct OGR access, this is the layer name. Default: -1
  • cats=range β€” Category values. Example: 1,3,7-9,13
  • where=sql_query β€” WHERE conditions of SQL statement without ’where’ keyword. Example: income < 1000 and population >= 10000
  • type=string[,string,...] β€” Input feature type. Options: point, line, area. Default: point,line,area
  • output=name [required] β€” Name for output vector map πŸ’–
  • zshift=float β€” Shifting value for z coordinates. Default: 0
  • height=float β€” Fixed height for 3D vector features
  • height_column=name β€” Name of attribute column with feature height
  • elevation=name β€” Elevation raster map for height extraction
  • method=string β€” Sampling interpolation method. Options: nearest, bilinear, bicubic. Default: nearest
    • nearest: Nearest-neighbor interpolation
    • bilinear: Bilinear interpolation
    • bicubic: Bicubic interpolation
  • scale=float β€” Scale factor sampled raster values. Default: 1.0
  • null_value=float β€” Height for sampled raster NULL values

πŸ‘‘ DESCRIPTION πŸ‘‘

v.extrude creates faces, kernels or 3D lines based on input 2D vector features, no cap. Points get converted to 3D vertical lines, lines become faces, and areas become volumes (which is a composition of a closed set of faces and a kernel, very ✨structural✨ of them).

If the elevation parameter is used, then the 3D vector features follow the elevation model by using individual elevation values for the vertices. The height for vertices is interpolated from the elevation raster map using the given interpolation method. it's giving bespoke, made-to-measure z-values 🧚


πŸ’… NOTES πŸ’…

So, v.extrude extrudes vector features, which means points are converted to vertical lines. Lines and area boundaries are extruded to a set of faces, and each segment defines one face. Area centroids are written as kernels. An area as a composition of boundaries and centroid is stored as a closed set of faces and kernel which define a volume. main character geometry energy, fr fr πŸ”₯

For conversion of 2D points or lines to 3D you can also use v.to.3d or v.drape. In opposite to v.extrude, these modules do not extrude vector features β€” they define z-coordinate for the features from given parameters or by sampling elevation raster map values. It means that no feature type conversion is applied, and points remain still points in the output vector map. Same applies for the lines. So like, they're not doing the glow-up, they're just assigning a height, iykyk.

v.extrude modifies only features geometry. Feature categories remain untouched and attribute data is copied from input vector map to the output. no notes, we respect the originals 🫢

By default, all features (including features without category) from input vector map are processed (layer=-1). Feature selection can be applied by layer, cats or where parameter.


🌟 EXAMPLES 🌟

🏠 3D houses with fixed height

v.extrude input=houses output=houses3D height=5 type=area

🏘️ 3D houses with individual height

v.extrude input=houses output=houses3D elevation=dem height_column=height type=area

πŸ“ Convert 2D points to 3D vertical lines with fixed height

v.extrude input=geodetic_pts output=points3D height=200 type=point

πŸ¦‹ SEE ALSO πŸ¦‹

  • v.transform, v.drape, v.to.3d
  • wxGUI 3D viewer

πŸŽ€ AUTHORS πŸŽ€

Jachym Cepicky, Updated for GRASS 7 by Martin Landa, FBK-irst, Italy and Czech Technical University in Prague, Czech Republic


πŸ’œ SOURCE CODE πŸ’œ

Available at: v.extrude 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


and that's the whole page bestie, every flag, every default, every path β€” nothing skipped, nothing invented, periodt πŸ’…βœ¨

kisses, this was v.extrude(1grass) from the GRASS User's Manual 🌸 β€” Β© 2003-2026 GRASS Development Team, from the GRASS 8.5.0 Reference Manual. ok bye, go extrude something iconic 🫢🌺

πŸ“¦ where this page comes from