v.out.svg(1grass)

πŸ’– v.out.svg β€” the GRASS manual, but make it cute πŸ’–

okay bestie, listen up: this is v.out.svg from the GRASS User's Manual, and it's literally the glow-up your vector maps have been waiting for. it takes your GRASS vector stuff and turns it into SVG β€” Scalable Vector Graphics β€” so it can live its best life in a browser. no cap. πŸ¦‹


✨ NAME ✨

v.out.svg β€” exports a vector map to an SVG file. that's it, that's the whole job, and it does it gorgeously. πŸ’…


🌸 KEYWORDS 🌸

vector, export, output. the holy trinity, iykyk. ✨


πŸŽ€ SYNOPSIS πŸŽ€

here's the whole vibe, copy-paste-able and everything:

v.out.svg
v.out.svg --help
v.out.svg input=name  [layer=string]  output=name type=string
[precision=integer]   [attribute=name[,name,...]]   [--overwrite]
[--help]  [--verbose]  [--quiet]  [--ui]

🫢 Flags 🫢

these are your little toggle besties, no = needed, they just are:

  • --overwrite β€” lets output files overwrite existing files. yes queen, bulldoze the old ones. 😌
  • --help β€” prints the usage summary. when in doubt, ask. πŸ’–
  • --verbose β€” verbose module output. chatty mode, love that for us.
  • --quiet β€” quiet module output. shh. 🀫
  • --ui β€” forces the GUI dialog to launch. point-and-click main character energy. πŸ‘‘

🌈 Parameters 🌈

these are the actual deets you gotta feed it:

  • input=name [required] β€” name of the input vector map. or, plot twist, the data source for direct OGR access. either way, you gotta give it something. πŸ”₯
  • layer=string β€” layer number or name ('-1' for all layers). a single vector map can be connected to multiple database tables, and this number decides which table gets used. when you're doing direct OGR access instead, this is the layer name. default: -1. bestie note: -1 means all layers, so it's giving "i want everything". πŸ’œ
  • output=name [required] β€” name for the SVG output file. name your baby. πŸŽ€
  • type=string [required] β€” output type. this defines which feature-type gets extracted. options: poly, line, point. default: poly. pick your fighter. ✨
  • precision=integer β€” coordinate precision. default: 6. ✨
  • attribute=name[,name,...] β€” attribute(s) to include in the output SVG. comma-separate them, bring all your faves. πŸ’–

πŸ‘‘ DESCRIPTION πŸ‘‘

v.out.svg converts GRASS vector data to SVG (Scalable Vector Graphics) code notation. and like, in particular, it:

  • converts GRASS line, boundary, area, point, centroid objects to SVG <path />, <circle /> elements. iconic behavior honestly. 🌟
  • reduces coordinate precision in SVG-output to save bandwidth. we love a girl who's efficient. πŸ¦‹
  • extracts GRASS attributes to gg:name="value" attributes. slay.

the precision parameter controls the number of decimals for coordinates output. and real talk: precision=0 corresponds to integer precision in the output SVG file. zero decimals, zero chaos. πŸ’€


πŸ“ EXAMPLE πŸ“

export polygons from the GRASS vector map soils (Spearfish sample data) to SVG format:

v.out.svg input=soils output=/tmp/output.svg type=poly

export lines from the GRASS vector map t_hydro (Spearfish sample data) to SVG format, and set coordinate precision to 0:

v.out.svg input=t_hydro output=/tmp/output.svg type=line precision=0

export points from the GRASS vector map archsites (Spearfish sample data) to SVG format, and include the attribute str1 (name):

v.out.svg input=archsites output=/tmp/output.svg type=point precision=0 attrib=str1

🌟 REFERENCES 🌟

  • Module v.out.svg at svg.cc
  • SVG (Scalable Vector Graphics) at w3c.org

πŸ› SEE ALSO πŸ›

v.out.ogr

(the extended universe. go read it next, bestie. 🫢)


πŸ’œ AUTHOR πŸ’œ

Klaus Foerster (klaus svg.cc), Innsbruck, Austria. we stan. πŸ‘‘


⭐ SOURCE CODE ⭐

available at: v.out.svg source code (history)

latest change: Friday Sep 05 13:39:09 2025 in commit: f2d027ab71b4f30ff9b8f9e997af30f262070a32

Main index | Vector index | Topics index | Keywords index | Graphical index | Full index


so that's the whole page, no skips, no summaries, every flag accounted for. πŸ’―

and for the cute sign-off: this whole thing lives under Β© 2003-2026 GRASS Development Team, from the GRASS 8.5.0 Reference Manual, and you're reading the v.out.svg(1grass) page of GRASS 8.5.0 β€” periodt. πŸ’…βœ¨πŸŒˆ

πŸ“¦ where this page comes from