I have a several line features stored as shapefiles, obviously constructed of several connecting segment.
I wish to export the attribute tables of each feature as a CSV to use in a separate spreadsheet. However, this requires the comprising segments being ordered in the order which they comprise the line (i.e. the bottom left segment first and the top right segment last). Is there an algorithm or tool I could use to achieve this? Ideally it would assign each segment an ID based on its location in the line feature, incrementing from the start of the line (0) to the end.
I have calculated the start/end points of each line segment but unfortunately cannot simply sort by these coordinates as the lines do not run in a continuous direction.
Expanded information: My data is a section of a road network stored as a single polyline. This line is comprised contains a number of features, each with information of their length and average travel time (see picture):
I actually have several lines, each one representing a direction of travel across a route in the road network.
I have exported the line features to a CSV so that I can compare the travel times across the routes with those produced with a traffic model. However, in order to compare like-for-like I need each feature to be in order as they form the line. Currently, each feature in the attribute table corresponds to a random section of the route - I wish to sort these features so that they appear in the order which they form the line.
Toid
field on your screenshot be in sequence as per your line?