v.lrs.where(1grass)

✨ v.lrs.where ✨

okay so bestie, welcome to the v.lrs.where page from the GRASS User's Manual πŸ’– this one's all about finding where stuff is on a linear reference system, and yes it's as useful as it sounds, no cap.


πŸ’– NAME πŸ’–

v.lrs.where β€” finds line id and real km+offset for given points in vector map using linear reference system. πŸ¦‹


πŸŽ€ 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 "what does this even do" button πŸ’…
  • --verbose β€” verbose module output, she's chatty, she's telling you everything
  • --quiet β€” quiet module output, she's giving minimal, she's giving silence 🀫
  • --ui β€” forces the GUI dialog to launch, for when you want the pretty window instead of the terminal

πŸŽ€ Parameters πŸŽ€

  • lines=name [required] β€” name of input vector map. It's the input vector map containing lines, the main character of the whole operation πŸ‘‘
  • points=name [required] β€” name of input vector map. It's the input vector map containing points, the ones you're tryna locate.
  • llayer=string β€” layer number or name, aka the Line layer. Default: 1
  • player=string β€” layer number or name, aka the Point layer. Default: 1
  • rsdriver=string β€” driver name for reference system table. Options: dbf, mysql, odbc, ogr, pg, sqlite. Default: sqlite
  • rsdatabase=string β€” database name for reference system table. Default: $GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
  • rstable=string [required] β€” name of the reference system table, bestie you gotta name it
  • threshold=float β€” maximum distance to nearest line. Default: 1000

✨ DESCRIPTION ✨

v.lrs.where identifies line id and real milepost+offset for points in vector map using linear reference system. That's the whole vibe. Points go in, line ids and mileposts+offsets come out, slay. πŸ’…


🌈 EXAMPLE 🌈

This example is written for the Spearfish dataset (it continues the example from v.lrs.create). Iconic continuity, we love to see it. 🫢

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 those results β€” pcat|lid|mpost|offset popping out twice and then the actual rows. 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)

Latest change: Friday Feb 07 19:16:09 2025 in commit: a82a39f673b97fafcfce1604dc3e6015cb96487a

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


and that's the whole page, bestie πŸ’– this was v.lrs.where(1grass) from the GRASS User's Manual β€” Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual. footer said GRASS 8.5.0 on the left and v.lrs.where(1grass) on the right, and we are obsessed. periodt. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from