v.in.lines(1grass)

πŸ’– v.in.lines β€” GRASS User's Manual πŸ’–

okay bestie, gather round, because we're about to import some ASCII coordinates and it's gonna be so satisfying πŸ’…


✨ NAME ✨

v.in.lines β€” imports ASCII x,y[,z] coordinates as a series of lines. yes literally just that. no cap. πŸ¦‹


🌸 KEYWORDS 🌸

vector, import, line, point


πŸŽ€ SYNOPSIS πŸŽ€

v.in.lines
v.in.lines --help
v.in.lines [-z] input=name output=name  [separator=character]
[--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]

🌈 Flags 🩷

  • -z β€” makes a 3D line out of 3-column data. three columns? three dimensions. math is mathing ✨
  • --overwrite β€” lets output files just bulldoze whatever's already sitting there. allow output files to overwrite existing files πŸ’€
  • --help β€” prints the usage summary, aka the "wait what does this do again" button
  • --verbose β€” verbose module output, she's chatty, she tells you everything πŸ—£οΈ
  • --quiet β€” quiet module output, she says nothing, she just works 🀫
  • --ui β€” force-launches the GUI dialog. pop-up window main character energy πŸ‘‘

πŸ’œ Parameters 🧚

  • input=name [required] β€” name of input file (or "-" to read from stdin). yes you can pipe it in, we love a flexible icon 🫢
  • output=name [required] β€” name for the output vector map. give her a name, she deserves one 🌸
  • separator=character β€” the field separator πŸ“
    • special characters: pipe, comma, space, tab, newline
    • Default: pipe

🌟 DESCRIPTION 🌟

Imports a stream of ASCII x,y[,z] coordinates as a line or series of lines. that's it, that's the whole vibe β€” coordinates go in, lines come out, everybody's happy πŸ’–


πŸ’… NOTES πŸ’…

okay so the input ASCII coordinates are just a series of "x y" data points. simple. clean. minimal. we love her for that.

Lines get separated by a row that contains "NaN NaN" β€” that's the ✨ divider ✨ between your lines, like a little "and scene!" between takes 🎬

If you wanna import 3D lines, just give it 3 columns of data in the input stream and hit it with the -z flag. lowkey easy, highkey powerful πŸ”₯

real talk: this script is a simple wrapper around the v.in.mapgen module. she's cute but she's not doing all the heavy lifting herself, iykyk 🧚

πŸ‘‘ EXAMPLE πŸ‘‘

here's the whole thing in action, watch and learn bestie:

v.in.lines in=- out=two_lines separator=, <<EOF
167.846717,-46.516653
167.846663,-46.516645
167.846656,-46.516644
167.846649,-46.516644
167.846642,-46.516643
NaN,NaN
167.846520,-46.516457
167.846528,-46.516461
167.846537,-46.516464
167.846535,-46.516486
167.846544,-46.516489
167.846552,-46.516493
EOF

see that NaN,NaN in the middle? that's the line break, the plot twist, the intermission 🎭 two lines, one command, immaculate 🫢


πŸ¦‹ SEE ALSO πŸ¦‹

d.graph, v.centroids, v.in.ascii, v.in.mapgen, v.in.region, v.out.ascii, r.in.poly

(the whole friend group fr fr 🌈)


πŸ’– AUTHOR πŸ’–

Hamish Bowman Dunedin, New Zealand


⭐ SOURCE CODE ⭐

Available at: v.in.lines source code (history)

Latest change: Tuesday Oct 21 09:57:14 2025 in commit: fb0165c2d021b7700528aca09c224847be871729

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 πŸ’… mwah, tysm for reading, this was v.in.lines(1grass) from the GRASS User's Manual β€” GRASS 8.5.0, last touched Tuesday Oct 21 09:57:14 2025, commit fb0165c2d021b7700528aca09c224847be871729, Β© 2003-2026 GRASS Development Team. slay, go import some lines πŸŽ€βœ¨

πŸ“¦ where this page comes from