v.buffer(1)
π v.buffer(1) β the GRASS GIS manual, but make it cute π
okay bestie, sit down, hydrate, because we're about to talk about the one and only v.buffer from the GRASS GIS User's Manual. yes that GRASS. the GIS one. iconic behavior.
β¨ NAME β¨
v.buffer β Creates a buffer around vector features of given type.
π·οΈ 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β Make outside corners straight-cβ Do not make caps at the ends of polylines-tβ Transfer categories and attributes--overwriteβ Allow output files to overwrite existing files--helpβ Print usage summary--verboseβ Verbose module output--quietβ Quiet module output--uiβ Force launching GUI dialog
π§Έ Parameters π§Έ
input=name[required] β Name of input vector map. Or 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. This number determines which table to use. When used with direct OGR access this is the layer name. Default:-1cats=rangeβ Category values. Example:1,3,7-9,13where=sql_queryβ WHERE conditions of SQL statement without 'where' keyword. Example:income < 1000 and population >= 10000type=string[,string,...]β Input feature type. Options:point,line,boundary,centroid,area. Default:point,line,areaoutput=name[required] β Name for output vector mapdistance=floatβ Buffer distance along major axis in map unitsminordistance=floatβ Buffer distance along minor axis in map unitsangle=floatβ Angle of major axis in degrees. Default:0column=nameβ Name of column to use for buffer distancesscale=floatβ Scaling factor for attribute column values. Default:1.0tolerance=floatβ Maximum distance between theoretical arc and polygon segments as multiple of buffer (default0.01)
πΈ DESCRIPTION πΈ
So v.buffer creates a buffer around features of given type, which have a category in the given layer. and the tolerance? it controls the number of vector segments being generated β the smaller the value, the more vector segments get generated. lowkey more segments, more detail. π
π NOTES π
Internal buffers for areas can be generated with negative distance values (that's your "inward buffer" / "negative buffer" / "shrinking" era π«Ά).
v.buffer fusions the geometries of buffers by default. and no, categories and attribute table will not be transferred β because that would not make sense, bestie, since one buffer geometry can be the result of many different input geometries. π
but if you DO want to transfer the categories and attributes, set the -t flag. what happens then? the buffers get 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. so the buffer for the input feature with category X can be retrieved by selecting all buffer areas with category X (there's an example further down, iykyk π).
Buffers for lines and areas are generated using the algorithms from the GEOS library.
okay advanced users, this one's for you: the built-in buffer algorithm is no longer used, as 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 me hyping up the buggy fallback π just telling you the truth.
The options minordistance, angle, tolerance are kept for backward compatibility and have no effect with GEOS buffering. periodt.
π§ 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 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. slay. β¨
π₯ EXAMPLES π₯
All examples are based on the North Carolina sample dataset. (yes, the classic.)
π 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. π
π REFERENCES π
- GEOS Library
π SEE ALSO π
r.buffer, v.parallel, v.extract, v.type, v.patch, v.db.connect
π AUTHORS π
- Radim Blazek
- Rewritten by Rosen Matev (with support through the Google Summer of Code program 2008)
- Rewritten by Markus Metz (2011, 2012)
π» SOURCE CODE π»
Available at: v.buffer source code (history)
Accessed: Saturday Jan 17 05:41:19 2026
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
and that's the whole page, bestie π«Ά this was the GRASS 8.4.2 Reference Manual for v.buffer, Β© 2003-2025 GRASS Development Team, and the footer says GRASS 8.4.2 with the date Saturday Jan 17 05:41:19 2026 β go buffer something gorgeous, you've got this πβ¨ππ¦πΈ
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· 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