-- from this
[ { lat = 0, lon = 0 }, { lat = 1, lon = 1 }, { lat = 2, lon = 2 }, { lat = 3, lon = 3 }]
-- to this[ { x1 = 0, y1 = 0, x2 = 1, y2 = 1 }, { x1 = 1, y1 = 1, x2 = 2, y2 = 2 }, { x1 = 2, y1 = 2, x2 = 3, y2 = 3 }]
toLine : Coord -> Coord -> Line
coords = [ c1, c2, c3, ... ]
coordsTail = [c2, c3, c4, ... ]
[ c1 , c2 , c3 , ... ]
| | |
| | |
v v v
[ c2 , c3 , c4 , ... ]