v.build.polylines(1grass)
π v.build.polylines β the GRASS User's Manual glow-up π
okay bestie, sit down, hydrate, because we're about to talk about v.build.polylines(1grass) and honestly? it's giving topology queen. β¨
β¨ NAME β¨
v.build.polylines β builds polylines from lines or boundaries. that's it, that's the whole job, and she does it flawlessly. π
πΈ KEYWORDS πΈ
vector, topology, geometry, line, node, vertex β iykyk π¦
π SYNOPSIS π
v.build.polylines
v.build.polylines --help
v.build.polylines input=name output=name [cats=string]
[type=string[,string,...]] [--overwrite] [--help] [--verbose]
[--quiet] [--ui]
π«Ά Flags π«Ά
--overwriteβ let your output files just bulldoze whatever's already there. rude but iconic.--helpβ prints the usage summary, aka "help me bestie" mode.--verboseβ verbose module output. she will Not stop talking, and we love that for her.--quietβ quiet module output. she goes silent, mysterious, main character energy. π€«--uiβ force launching the GUI dialog. clicky-clicky time. π±οΈ
π Parameters π
input=name[required] β name of the input vector map. or, plot twist, a data source for direct OGR access. β¨output=name[required] β the name for your shiny new output vector map. name her something cute.cats=stringβ category number mode. Options:no,first,multi,sameDefault:nono: do not assign any category number to polylinefirst: assign category number of first line to polylinemulti: assign multiple category numbers to polylinesame: create polyline from lines with same categories
type=string[,string,...]β input feature type. Options:line,boundaryDefault:line,boundary
π DESCRIPTION π
so v.build.polylines builds polylines from the lines or boundaries in a vector map. simple concept, huge impact. π«Ά
A line is defined by one start node, one end node and any number of vertices between the start and end nodes. The shortest possible line consists of only two vertices where the coordinates of the start and end nodes are identical to those of the two vertices. tiny line, big responsibility.
okay so here's the actual vibe of how it works. v.build.polylines picks a line and from its start node, walks back as long as exactly one other line of the same type is connected to this node. Line directions are reversed as required, i.e. it does not matter if the next line is connected to the current node by its start or end node. Once the start line of a polyline is identified, it walks forward and adds all vertices (in reverse order if needed) of connected lines to the start line, i.e. the start line and connecting lines are reversed as needed. That is, if a line is reversed depends on what node is initially picked for building polylines. and here's the important part, bestie: if the direction of lines is important (it's not for boundaries to build areas), you have to manually change line directions with either v.edit or the wxGUI vector digitizer. no shortcuts, no cap. π€
Polylines provide the most appropriate representation of curved lines when it is important that nodes serve to define topology rather than geometry. Curved lines are usually digitized as polylines, but these are sometimes broken into their constituent straight line segments during conversion from one data format to another. v.build.polylines can be used to rebuild such broken polylines. slay, un-break her, put her back together. π¦
π NOTES π
v.build.polylines combines only lines of the same type to a new polyline, i.e. lines and boundaries are kept separate. no mixing, no blurring the lines (literally), KEEP IT CONSISTENT.
Category number(s) are assigned to a polyline based on the cats parameter.
cats=noβ No category number is assigned to a polyline. Also attributes tables linked to the input vector map are not copied to the output vector map.cats=firstβ Assign to a polyline category number of the first line. All linked attributes tables are copied to the output vector map without filtering, but the categories are processed according to thecatsoption.cats=multiβ If the lines that make up a polyline have different category numbers thenv.build.polylineswill set the multiple category numbers to a polyline. Also all linked attributes tables are copied to the output vector map.cats=sameβ Assigned lines to a polyline have same category numbers in all layers. Linked attributes tables are copied to the output vector map.
v.build.polylines correctly handles input vector maps containing lines, boundaries, centroids and points. Lines and boundaries will be converted to polylines. Areas are guaranteed to be preserved. periodt. π
π ACKNOWLEDGEMENTS π
This program was originally written during Mark Lake's tenure of a Leverhulme Special Research Fellowship at University College London. iconic academic era, we love to see it. πβ¨
β SEE ALSO β
v.build, v.in.ascii, v.edit, v.split
π AUTHORS π
- Mark Lake, Institute of Archaeology, University College London.
- Major rewrite by Radim Blazek, October 2002
- Category mode added by Martin Landa, FBK-irst, Trento, Italy, October 2007
- Support for categories, attributes, and different line types by Markus Metz
π₯ SOURCE CODE π₯
Available at: v.build.polylines source code (history)
Latest change: Friday Aug 08 09:39:19 2025 in commit: ed72c71d8580e872cd6fd345c84a15c324764465
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
and that's the whole page, bestie π this was v.build.polylines from the GRASS 8.5.0 Reference Manual, Β© 2003-2026 GRASS Development Team, stamped with that Friday Aug 08 09:39:19 2025 energy (GRASS 8.5.0, obvi β¨). go build you some polylines, you absolute legend. π«ΆπΈ
π¦ 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