v.patch(1grass)
π v.patch β the GRASS bestie that smooshes ur vector maps together π
okay so picture this: you got a bunch of vector maps just... sitting there, separate, lonely π and you're like "bestie i need ONE map". that's literally what v.patch does. it's a GRASS manual page, it's v.patch(1grass), and it's giving β¨glueβ¨.
KEYWORDS: vector, geometry, level1 πΈ
β¨ SYNOPSIS β¨
v.patch
v.patch --help
v.patch [-nzeab] input=name[,name,...] output=name [bbox=name]
[--overwrite] [--help] [--verbose] [--quiet] [--ui]
π FLAGS π
-nβ do NOT expect the input to have topology. use this when ur input is points and there's no topology in sight. no cap.-zβ expect a z coordinate even when you're not using topology. this is the one for when ur input is points with a z coordinate but without topology π-eβ copy the attribute table too π«Ά (heads up bestie: only the table of layer 1 is supported right now)-aβ append files to an existing file (and if you're overwriting existing files, you gotta have that activated)-bβ do NOT build topology. lowkey a slay when you're handling a huge number of points π₯--overwriteβ let output files overwrite files that already exist. chaotic but allowed.--helpβ print the usage summary--verboseβ verbose module output (it tells you EVERYTHING, main character behaviour)--quietβ quiet module output (shhh π€«)--uiβ force launching the GUI dialog
π PARAMETERS π
input=name[,name,...][required] β name of input vector map(s). or data source(s) if you're doing direct OGR access, iykyk.output=name[required] β name for the output vector map. this is the baby u are creating π₯Ήbbox=nameβ name for an output vector map where the bounding boxes of the input vector maps get written to
π DESCRIPTION π
v.patch lets you combine any number of vector maps together to make one composite vector map. literally any number. go off. and if the table structures are identical? then the attributes get transferred over to the new table. chef's kiss π
π¦ NOTES π¦
okay bestie, listen, this is the important part, don't skip it:
Any vectors that are duplicated among the maps you're patching together (think border lines, the classic offender) will have to be edited or removed after v.patch is run. and yes, you can do that editing automatically with v.clean. periodt.
Lines may need to be snapped with v.clean tool=snap,break,rmdupl.
Boundaries may need to be cleaned with v.clean tool=break,rmdupl,rmsa repeatedly until the rmsa tool (Remove small angles at nodes) no longer modifies any boundaries. and if the vector topology is still not clean after all that? boundaries may also need to be snapped with v.clean tool=snap,break,rmdupl. it's giving "keep going until it's clean", sorry, that's just the vibe π
When you use the -e flag, v.patch shifts the category (cat) values in the output so that category numbers from the different input maps don't overlap π this shift gets applied to both the category values of the features and the category values in the attribute tables. so guess what β there's literally no need to run v.category and v.db.update beforehand. we love a shortcut.
β οΈ When you use the-aflag, YOU have to make sure that the features in the different maps you're adding to the output map do NOT have overlapping category numbers β unless identical category numbers reflect identical attributes, because otherwise the attributes of the added maps are lost. π± To avoid this, you can usev.category option=sumto change category values of some of the maps before patching. do this. please.
πΈ EXAMPLES πΈ
Patch together two maps with mixed feature types:
v.patch input=geology,streams out=geol_streams
Append one map to another:
g.copy vect=roads,transport
v.patch -a input=railroads output=transport --overwrite
β SEE ALSO β
v.clean, v.build, v.select, v.overlay
π AUTHORS π
- Dave Gerdes, U.S.Army Construction Engineering Research Laboratory
- Radim Blazek, ITC-Irst, Trento, Italy
π SOURCE CODE π
Available at: v.patch source code (history)
Latest change: Thursday Apr 30 17:03:56 2026 in commit: cc53d66feafef232c821b882a6d3b45096fb14a8
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 the whole page bestie π«Ά this was GRASS 8.5.0, v.patch(1grass), and you absolutely ate. go build that composite map, u got this πβ¨
π¦ 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