v.lrs.where(1)

πŸ’– v.lrs.where β€” the GRASS GIS bestie who tells you exactly where you are πŸ’–

okay so like. imagine you're standing somewhere on a route and you're like "bestie... where even am I??" and this little icon answers you with a line id and a real km+offset. that's the whole gig. she finds the line id and real km+offset for given points in a vector map, using a linear reference system. no cap.

keywords: vector, linear reference system, network πŸ¦‹


✨ SYNOPSIS ✨

v.lrs.where
v.lrs.where --help
v.lrs.where lines=name points=name  [llayer=string]   [player=string]
[rsdriver=string]   [rsdatabase=string]  rstable=string
[threshold=float]   [--help]  [--verbose]  [--quiet]  [--ui]

πŸŽ€ FLAGS πŸŽ€

  • --help β€” prints the usage summary, aka the little "here's how you use me" moment πŸ’…
  • --verbose β€” verbose module output. she's talking more now, and honestly? we love that for her.
  • --quiet β€” quiet module output. shhh. main character silence. 🀫
  • --ui β€” force launching GUI dialog. clicky clicky instead of typey typey ✨

🌸 PARAMETERS 🌸

  • lines=name [required] β€” name of the input vector map. this is the vector map containing lines, i.e. the actual route we're referencing. πŸ›£οΈ
  • points=name [required] β€” name of the input vector map. this one holds the points, aka the mystery locations you want identified. πŸ“
  • llayer=string β€” layer number or name. this is the line layer. default: 1
  • player=string β€” layer number or name. this is the point layer. default: 1
  • rsdriver=string β€” driver name for the reference system table. options: dbf, mesql, mysql, odbc, ogr, pg, sqlite. default: sqlite
  • rsdatabase=string β€” database name for the reference system table. default: $GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
  • rstable=string [required] β€” name of the reference system table. no table, no answers, bestie. πŸ’€
  • threshold=float β€” maximum distance to nearest line. default: 1000

πŸ’œ DESCRIPTION πŸ’œ

so like, v.lrs.where identifies the line id and the real milepost+offset for points in a vector map, using a linear reference system. that's it, that's the service. she matches your random points up against the LRS and hands you the receipts. 🧚


🌈 EXAMPLE 🌈

this example is written for the Spearfish dataset (it continues the example from v.lrs.create). yes, it's a sequel. she's a franchise now. πŸ‘‘

in this example, the 'route_lrs' shall be queried for unknown positions (points, stored in the map newpoints) along the LRS:

# generate query points
echo "590866.15|4926737.0
590933|4927133" | v.in.ascii out=newpoints
v.lrs.where lines=route_lrs points=newpoints rstable=route_lrs
pcat|lid|mpost|offset
pcat|lid|mpost|offset
1|22|4.000000+212.091461
2|22|6.000000+188.112093
# verification
g.region vector=route_lrs n=n+100 s=s-100 -p
d.erase
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
d.vect newpoints col=red
# measure distance to previous bus stop:
# use measuring tool in graphical user interface

look at that output. pcat|lid|mpost|offset and then the actual rows. she ATE. πŸ”₯


πŸ‘€ SEE ALSO πŸ‘€

  • v.lrs.where, v.lrs.segment, v.lrs.label
  • LRS tutorial
  • Introducing the Linear Reference System in GRASS

🫢 AUTHORS 🫢

  • Radim Blazek, ITC-irst/MPA Solutions
  • Documentation update (based on above journal article and available fragments): Markus Neteler

πŸ’… SOURCE CODE πŸ’…

Available at: v.lrs.where source code (history)

Accessed: Saturday Jan 17 05:41:25 2026

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


and that's the whole page, bestie!! this was v.lrs.where(1) from GRASS GIS 8.4.2, brought to you by the GRASS Development Team β€” Β© 2003-2025, GRASS GIS 8.4.2 Reference Manual, and the manual page was accessed Saturday Jan 17 05:41:25 2026. periodt. πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from