Closed nialov closed 4 years ago
Thanks for noticing this @nialov . A fix is about to be implemented in the release of the next version. Temporary fix: inlcude a continue statement after the startx,starty = point line and remove the if bearing >= 180: bearing -= 180 statement.
Note as you say this will not account for different lengths of each line segment. This is also added corrected for in the next release
I'm having some trouble understanding the orientation calculation for rose plotting in NetworkGT. As I've understood it calculates every angle between adjacent points in a LineString and uses the average of these angles to determine the final orientation of a single LineString. But if the lengths of each part of a LineString differ this would not result in the right solution.
I've provided a Jupyter notebook with my testing to illustrate the problem:
Notebook
A vectorial approach as I understand it is to simply take the start and end points of a LineString and calculate the orientation of the line between the start and end points.