A distance and direction tutorial provided as an Answer at How to add Direction and Distance to attribute table? uses:
- xat (0 ), xat (-1 ) and yat (0 ), yat (-1) for start and end points of lines; in addition to
- (*atan((xat(-1)-xat(0))/(yat(-1)-yat(0)))) * 180/3.14159 + (180 *(((yat(-1)-yat(0)) < 0) + (((xat(-1)-xat(0)) < 0 AND (yat(-1) - yat(0)) >0)2))) to calculate direction
I would like to know any difference in application if lines with more than 1 part and/or nodes are used.
Would there be any difference between using lines with 2 nodes vs lines with more than 2 nodes and segments?
Which assumptions would QGIS automatically use/make in the following scenarios below:
a - regarding direction: the overall direction is derived from the difference in start and end node OR would it be the average of each individual computed segment.
b - regarding distance: is it the distance between start node and end node OR is it the sum total of each segment that is represented in the distance