d.path(1)
π d.path π
okay bestie, welcome to d.path(1) from the GRASS GIS User's Manual β yes, the same one that ships with GRASS 8.4.2. this little icon finds the shortest path between a starting node and an ending node you pick. it's giving map-girlie-main-character energy and honestly? obsessed. π¦
β¨ NAME β¨
d.path β finds shortest path for selected starting and ending node. that's it, that's the girl. π
π·οΈ KEYWORDS π·οΈ
display, network, shortest path β the three vibes. slay.
πΈ SYNOPSIS πΈ
d.path
d.path --help
d.path [-gb] map=name [arc_type=string[,string,...]]
coordinates=x1,y1,x2,y2 [arc_layer=string] [node_layer=string]
[arc_column=string] [arc_backward_column=string]
[node_column=string] [highlight_color=string] [--help] [--verbose]
[--quiet] [--ui]
π© Flags π©
-gβ use geodesic calculation for longitude-latitude locations. lat/long girlies, this one's for you. π-bβ render bold lines. thick. bold. iconic. π--helpβ print usage summary. your little cheat sheet bestie. π«Ά--verboseβ verbose module output. she talks a LOT and we love that for her. π--quietβ quiet module output. she's mysterious. she's silent. she ate. π€«--uiβ force launching GUI dialog. no terminal, just vibes. β¨
π Parameters π
map=name[required] β name of vector map. or, plot twist, a data source for direct OGR access. πarc_type=string[,string,...]β arc type.- Options:
line,boundary - Default:
line,boundary - both by default, as she deserves. π
- Options:
coordinates=x1,y1,x2,y2[required] β starting and ending coordinates. this is literally the whole point. πarc_layer=stringβ arc layer. vector features can have category values in different layers, and this number determines which layer to use. when used with direct OGR access, this is the layer name.- Default:
1
- Default:
node_layer=stringβ node layer. same situation: vector features can have category values in different layers, and this number determines which layer to use. with direct OGR access, this is the layer name.- Default:
2
- Default:
arc_column=stringβ arc forward/both direction(s) cost column (number). πΈarc_backward_column=stringβ arc backward direction cost column (number). because sometimes going back costs differently, and honestly? relatable. πnode_column=stringβ node cost column. π°highlight_color=stringβ highlight color.- Default:
red - classic. bold. never misses. π₯
- Default:
π DESCRIPTION π
d.path enables shortest path vector networking. π«
costs may be either line lengths, or attributes saved in a database table. supported are cost assignments for both arcs and nodes, and also different in both directions of a vector line. for areas, cost will be calculated along boundary lines. no cap, she does all of that. π§
π NOTE π
bestie, listen. the user needs to display a vector map before using d.path. if no graphics monitor is open, a file map.png is generated in the current directory. so likeβ¦ it'll still work, but it's doing it quietly in a PNG instead of showing off on screen. π
the 'from' and 'to' points are entered by mouse into the map displayed in the GRASS monitor, or if the coordinates option is used they can be specified non-interactively. the actions bound to the mouse buttons are described in the terminal window when running the command. so read the terminal, she's telling you things. π«Ά
to calculate shortest path non-interactively and save the path to a new vector map, use the v.net.path module. that's the other girl. she files receipts. π
π₯ EXAMPLES π₯
interactive shortest path routing on road network (North Carolina sample dataset):
g.region vector=roadsmajor -p
d.vect roadsmajor
d.path roadsmajor coordinates=668646.15,224447.16,668348.83,235894.02
non-interactive shortest path routing on road network (North Carolina sample dataset):
d.path -b roadsmajor coordinates=668646.15,224447.16,668348.83,235894.02
notice the -b? bold lines. she understood the assignment. π
π SEE ALSO π
v.net.path
go say hi, she's the sibling module. π
π AUTHOR π
Radim Blazek, ITC-Irst, Trento, Italy. thank you king, we stan. π«Ά
π§ SOURCE CODE π§
available at: d.path source code (history)
accessed: Saturday Jan 17 05:40:36 2026
main index | display 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 was d.path(1) from the GRASS GIS User's Manual, running on GRASS 8.4.2 β no cap, go find your shortest path, you're gonna ate. ππ¦ππ
π¦ 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