v.buffer(1grass)

πŸ’– NAME πŸ’–

v.buffer β€” she creates a buffer around vector features of given type. it's giving glow-up but for geometry ✨

🏷️ KEYWORDS 🏷️

vector, buffer, area, circle, geometry, line, grow, shrink


πŸ“œ SYNOPSIS πŸ“œ

v.buffer
v.buffer --help
v.buffer [-sct] input=name  [layer=string]   [cats=range]
[where=sql_query]   [type=string[,string,...]]  output=name
[distance=float]   [minordistance=float]   [angle=float]   [column=name]
[scale=float]   [tolerance=float]   [--overwrite]  [--help]  [--verbose]
[--quiet]  [--ui]

🚩 Flags 🚩

  • -s β€” makes the outside corners straight (no more rounded, bestie)
  • -c β€” do NOT make caps at the ends of polylines, the ends just stay open
  • -t β€” transfer categories and attributes
  • --overwrite β€” let output files overwrite existing files, chaos permitted
  • --help β€” prints the usage summary, your lil cheat sheet
  • --verbose β€” verbose module output, she talks a lot
  • --quiet β€” quiet module output, she's on mute
  • --ui β€” force launching the GUI dialog

πŸŽ€ Parameters πŸŽ€

  • input=name [required] β€” name of input vector map. Or a data source for direct OGR access, whichever vibe.
  • layer=string β€” layer number or name (-1 for all layers). A single vector map can be connected to multiple database tables, so 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 the 'where' keyword. Example: income < 1000 and population >= 10000
  • type=string[,string,...] β€” input feature type. Options: point, line, boundary, centroid, area. Default: point,line,area
  • output=name [required] β€” name for output vector map, the new baby
  • distance=float β€” buffer distance along major axis, in map units
  • minordistance=float β€” buffer distance along minor axis, in map units
  • angle=float β€” angle of major axis in degrees. Default: 0
  • column=name β€” name of column to use for buffer distances
  • scale=float β€” scaling factor for attribute column values. Default: 1.0
  • tolerance=float β€” maximum distance between theoretical arc and polygon segments as multiple of buffer (default 0.01)

🌸 DESCRIPTION 🌸

So v.buffer creates a buffer around features of given type, and those features have to have a category in the given layer, okurrr. The tolerance controls the number of vector segments being generated β€” and the way that works is: the smaller the value, the MORE vector segments get generated. tiny number, big segment energy πŸ’…


πŸ¦‹ NOTES πŸ¦‹

Internal buffers for areas can be generated with negative distance values β€” that's your "inward buffer" or "negative buffer" or "shrinking", all the same thing, iykyk.

v.buffer fusions the geometries of buffers by default. Categories and attribute table will not be transferred β€” and honestly bestie it would not make sense anyway, because one buffer geometry can be the result of many different input geometries. To transfer the categories and attributes the user can set the -t flag. This will result in buffers being cut up where buffers of individual input geometries overlap. Each part that is the result of overlapping buffers of multiple geometries will have multiple categories corresponding to those geometries, and multiple buffer areas can have the same category. The buffer for the input feature with category X can thus be retrieved by selecting all buffer areas with category X (see example below, we got you 🫢).

Buffers for lines and areas are generated using the algorithms from the GEOS library. periodt.

For advanced users only πŸ‘‘ the built-in buffer algorithm is no longer used, because we use GEOS instead. BUT if GRASS was not compiled with GEOS support, or the environmental variable GRASS_VECTOR_BUFFER is defined, then GRASS generates buffers using the built-in buffering algorithm β€” which is still buggy for some input data. not to be dramatic but πŸ’€.

The options minordistance, angle, tolerance are kept for backward compatibility and have no effect with GEOS buffering. they're just here for the memories πŸ₯²

✨ Corner settings ✨

The following vector line related corners (also called "cap") exist:

  • no cap:
  • rounded cap:
  • square cap:

By default v.buffer creates rounded buffers (blue color on the figure below): straight corners with caps are created using the -s flag (red color on the figure below), while the -c flag doesn't make caps at the ends of polylines (green color on the figure below): with a point vector map as input data, square buffers are created instead of round buffers by using the -s flag.


🌈 EXAMPLES 🌈

All examples are based on the North Carolina sample dataset. iconic dataset fr fr.

πŸ›£οΈ Buffer around input lines

v.buffer input=roadsmajor output=roadsmajor_buffer type=line distance=100

Buffer of 100m along the "roadsmajor" lines (map subset, original center line shown in black)

πŸ₯ Circles around input points

v.buffer input=hospitals output=hospitals_circled type=point distance=2000

Buffer of 2000m around the "hospitals" points (map subset, original points shown in black, new area centroids in red)

πŸ“ Circles around input points with attribute transfer

v.buffer input=hospitals output=hospitals_circled type=point distance=1000 -t
# display buffer around hospital with category 36,
# this buffer is composed of several areas:
d.vect map=hospitals_circled type=area layer=1 cats=36
# extract this buffer, dissolving boundaries
v.extract in=hospitals_circled output=hospital_36_circled layer=1 cats=36 -d

🌊 Buffer around input areas

v.buffer input=lakes output=lakes_buffer type=area distance=100

Buffer of 100m around the "lakes" polygons (map subset, original areas shown in black)

🫧 Buffer inside input areas

In this example, an internal buffer ("inward buffer" or "negative buffer") is generated using a negative distance value:

v.buffer input=lakes output=lakes_buffer type=area distance=-50

Internal buffer of 50m inside the "lakes" polygons (map subset, original areas shown in black)

Not all features are buffered, only the polygons that allow creation inside a topological cleaned polygon. (yes that's a real constraint bestie, don't come for me 😭)


πŸ“š REFERENCES πŸ“š

  • GEOS Library

πŸ‘€ SEE ALSO πŸ‘€

r.buffer, v.parallel, v.extract, v.type, v.patch, v.db.connect

go check those out, they're all in the family 🧚


πŸ‘‘ AUTHORS πŸ‘‘

Radim Blazek Rewritten by Rosen Matev (with support through the Google Summer of Code program 2008) Rewritten by Markus Metz (2011, 2012)

three legends, no cap πŸ’œ


πŸ’» SOURCE CODE πŸ’»

Available at: v.buffer source code (history)

Latest change: Tuesday Dec 23 23:30:51 2025 in commit: 2550be39b3524cf105ce856cb27ac8efaeef1bfb

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


okay that's the whole manual bestie, slay πŸ’…βœ¨ this was v.buffer from the GRASS User's Manual, GRASS 8.5.0, and the footer deets are GRASS 8.5.0 / v.buffer(1grass) β€” plus the copyright hold on: Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual. go buffer something cute πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from