v.lrs.segment(1grass)
π v.lrs.segment π
okay bestie, say hi to v.lrs.segment from the GRASS User's Manual β it's a lil main-character module that makes points/segments out of your input lines, your linear reference system, and positions it reads from stdin or a file. π
KEYWORDS: vector, linear reference system, network β¨
π 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β lets output files just like, overwrite files that already exist. no cap, it will do it.--helpβ prints the usage summary--verboseβ verbose module output, so it tells you everything--quietβ quiet module output, so it tells you nothing--uiβ forces launching the GUI dialog
π¦ Parameters:
input=name[required] β Name of input vector map. This is the input vector map containing lines.output=name[required] β Output vector map where segments will be writtenllayer=stringβ Layer number or name. It's the line layer. Default:1rsdriver=stringβ Driver name for the reference system table. Options:dbf,mysql,odbc,ogr,pg,sqlite. Default:sqlitersdatabase=stringβ Database name for the reference system table. Default:$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.dbrstable=string[required] β Name of the reference system tablefile=nameβ Name of file containing segment rules. If it's not given, it reads fromstdin. π
β¨ DESCRIPTION β¨
So v.lrs.segment literally creates points/segments from input lines, a linear reference system, and positions read from standard in or a file. it's giving very precise, very demure. π
The format is as follows:
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 see the help page for v.lrs.segment's sister module, v.segment. sibling energy fr fr π
π EXAMPLE π
This example is written for the Spearfish dataset (it continues the example from v.lrs.create). lowkey a sequel, highkey iconic.
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
π TODO π
Figure out how to merge result into existing LRS map and table. not me leaving a lil mystery for future-you π
π SEE ALSO π
v.lrs.create, v.lrs.where, v.lrs.label, v.segment
LRS tutorial, Introducing the Linear Reference System in GRASS
πΈ AUTHOR πΈ
Radim Blazek
π SOURCE CODE π
Available at: v.lrs.segment source code (history)
Latest change: Wednesday Jul 02 11:14:35 2025 in commit: 99682b0ce35a99593a2f048c9200fd21f735b2ff
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
okay that's the whole thing bestie, you ate π
β¨ this was GRASS 8.5.0 β v.lrs.segment(1grass) β and yes the manual page really does tag itself with both the title and the manual name at the top and bottom, we just folded them in near the top and gave them a cute sign-off instead. periodt. ππ¦π
π¦ 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