v.lrs.segment(1)

πŸ’– v.lrs.segment πŸ’–

okay bestie, welcome to the GRASS GIS User's Manual page for v.lrs.segment β€” she's a lil vector module and she's about to make ur LRS dreams come true ✨


🌸 NAME 🌸

v.lrs.segment β€” creates points/segments from input lines, linear reference system and positions read from stdin or a file. no cap, that's literally her whole job πŸ’…

πŸŽ€ KEYWORDS πŸŽ€

vector, linear reference system, network β€” the holy trinity 🫢

✨ SYNOPSIS ✨

v.lrs.segment
v.lrs.segment --help
v.lrs.segment input=name output=name  [llayer=string]
[rsdriver=string]   [rsdatabase=string]  rstable=string  [file=name]
[--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]

πŸ¦‹ Flags:

  • --overwrite β€” allow output files to overwrite existing files. yes she will absolutely body ur old file if u let her 😭
  • --help β€” print usage summary. ur bestie explaining herself πŸ“–
  • --verbose β€” verbose module output. she will NOT stop talking and honestly? we love that 🌈
  • --quiet β€” quiet module output. the opposite of the above, main character goes silent πŸ’€
  • --ui β€” force launching GUI dialog. for when u want buttons instead of typing πŸŽ€

🌸 Parameters:

  • input=name [required] β€” name of input vector map. it's the input vector map containing lines, so like, the raw material bestie 🧚
  • output=name [required] β€” output vector map where segments will be written. this is where the magic lands ✨
  • llayer=string β€” layer number or name. this one is the line layer. default is 1 πŸ‘‘
  • rsdriver=string β€” driver name for reference system table. options are: dbf, mesql, mysql, odbc, ogr, pg, sqlite. default is sqlite πŸ’…
  • rsdatabase=string β€” database name for reference system table. default is $GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db β€” yes the whole thing, don't @ me πŸ“
  • rstable=string [required] β€” name of the reference system table. required required, no skips πŸ™ˆ
  • file=name β€” name of file containing segment rules. if u don't give her one, she reads from stdin. she's flexible like that πŸ’œ

πŸ’… DESCRIPTION πŸ’…

v.lrs.segment creates points/segments from input lines, linear reference system and positions read from standard in or a file. same energy as the NAME section, just saying it again louder πŸ“£

the format is as follows, and pls pls pls respect the format bestie:

P <point_id> <line_id> <milepost>+<offset> [<side offset>]
L <segment_id> <line_id> <milepost>+<offset> <milepost>+<offset> [<side offset>]

πŸ”₯ NOTES πŸ”₯

for more info and examples, go look at the help page for v.lrs.segment's sister module, v.segment. sisters supporting sisters fr fr πŸ‘‘

🌈 EXAMPLE 🌈

this example is written for the Spearfish dataset (it continues the example from v.lrs.create). yes it's a whole cinematic universe, we're doing lore now 🎬

in this example, the 'route_lrs' shall be extended for a new position (point) along the LRS after bus stop 4:

# new point on LRS
echo "P 7 22 4+180" | v.lrs.segment route_lrs out=route_lrs_new rstable=route_lrs
g.region vector=route_lrs n=n+100 s=s-100 -p
d.erase
# existing LRS
d.vect route_lrs
d.vect busstops disp=attr attr=cat size=10 bg=white lcol=blue yref=bottom
d.vect busstops icon=basic/circle fcol=blue
db.select table=route_lrs
# show modified map
d.vect route_lrs_new col=red

slay, look at that display 🫢

πŸ™ˆ TODO πŸ™ˆ

figure out how to merge result into existing LRS map and table. it's giving "we'll get to it", iconic honestly 😭

⭐ SEE ALSO ⭐

v.lrs.create, v.lrs.where, v.lrs.label, v.segment

LRS tutorial, Introducing the Linear Reference System in GRASS

go read them, they're the extended universe πŸ¦‹

πŸ‘‘ AUTHOR πŸ‘‘

Radim Blazek

πŸ’– SOURCE CODE πŸ’–

available at: v.lrs.segment source code (history)

accessed: Saturday Jan 17 05:41:24 2026

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

Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual


and that's the whole page bestie!! this is v.lrs.segment from the GRASS 8.4.2 manual, accessed Saturday Jan 17 05:41:24 2026, Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual. mwah, go make some segments πŸ’œβœ¨

πŸ“¦ where this page comes from