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:1player=stringβ layer number or name. this is the point layer. default:1rsdriver=stringβ driver name for the reference system table. options:dbf,mesql,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 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
- fedora 44: grass 8.4.2-4.fc44 Β· 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