I have a PostGIS table with position data of numerous vehicles and want to create lines from these points.
Data can be selected by vehicle id and ordered by timestamp but how to create lines from the result?
What I basically need is one line segment from point 1 to point 2, finalize the line and then again from point 2 to point 3. Of course all that under consideration of the vehicle id.
The latter one is needed because I want to calculate the cruise direction and speed of the vehicle from one point to the next.