v.patch(1)
π¦ v.patch(1) β straight out of the GRASS GIS User's Manual, bestie π¦
okay so picture this: you've got a bunch of vector maps and you want them to be one vector map. that's the whole gig. v.patch is the girl who does that. no cap.
β¨ NAME β¨
v.patch β makes a brand new vector map by squishing other vector maps together into one. it's giving "combine and conquer" π
π·οΈ 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β bestie, don't expect the input to have topology. use this when your input is points without topology π«Ά-zβ expect a z coordinate even when you're not using topology. this one's for when your input is points that do have a z coordinate but don't have topology β¨-eβ copy the attribute table too, slay. heads up tho: only the table of layer 1 is supported rn π-aβ append files to an existing file. ngl you must have overwriting of existing files activated for this one π-bβ do NOT build topology. iconic move when you're handling a huge number of points π₯--overwriteβ let output files overwrite files that already exist--helpβ print the usage summary--verboseβ verbose module output--quietβ quiet module output (shhh π€«)--uiβ force launching the GUI dialog
πΈ Parameters:
input=name[,name,...][required] β name of the input vector map(s). or the data source(s) for direct OGR access πoutput=name[required] β name for the output vector map πbbox=nameβ name for an output vector map where the bounding boxes of the input vector maps get written to π¦
π DESCRIPTION π
so v.patch lets you combine any number of vector maps together and make one composite vector map. periodt. and if the table structures are identical, the attributes get transferred over to the new table too. it's giving merge but make it vector β¨
π NOTES π
any vectors that are duplicated among the maps you're patching together (think border lines, the usual suspects) will have to be edited or removed after v.patch has run. the good news is you can do that editing automatically with v.clean π§
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 β and you gotta run that repeatedly until the rmsa tool (Remove small angles at nodes) stops modifying any boundaries. 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 a whole journey, i know π
when you use the -e flag, v.patch shifts category (cat) values in the output so that the 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 like β you do NOT need to run v.category and v.db.update beforehand. we love an efficient queen π
when you use the -a flag, you have to make sure the features in the different maps being added to the output map don't have overlapping category numbers β unless identical category numbers reflect identical attributes, in which case carry on. otherwise? the attributes of the added maps are just... gone π to avoid that tragedy, you can use v.category option=sum to change the category values of some of the maps before patching. do it. thank me later π«Ά
π 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)
Accessed: Saturday Jan 17 05:41:28 2026
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
okay that's the whole page, bestie, and here's your cute little sign-off π this is the GRASS GIS 8.4.2 Reference Manual, Β© 2003-2025 GRASS Development Team, and you're running GRASS 8.4.2 β so go forth and patch those vectors, you absolute main character ππ¦β¨
π¦ 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