Indexed Line String
class IndexedLineString
Create a single LineString from our route which is a list of Ways. Two Arrays are created when the line is created:
indices - this allows any point in the line to be referenced back to the route that created it. When a point is found on the line it can be immediately matched to the Way that it belongs to.
direction - the line segments all have to be in the same direction, and this involves reversing the lines from the Way to keep the line contiguous. We store this so that we can adjust the heading for a point on the line to match that of the Way rather than of the line.
We also create a hashCode as the line is created. This is so that RoadFollowers with identical lines can be de-duplicated.