<div dir="ltr"><div class="post-text" itemprop="text">

        <p>Hi,<br></p><p>I have millions of points in a PostGIS database containing 
taxi gps tracks.
Now I want to create lines from these points by vehicleid and ordered by
 timestamp.
But, and that's my problem right now, at first I want to include every 
column of my point table into the "line table" and I also need to 
intersect those lines at specific points.</p>

<p>I have one column representing the "taxi_is_occupied" status with 0 or 1. </p>

<p>What I want now is to create lines which are divided every time this 
status changes. 
In the end I need lines which show the path of every taxi over time, 
divided every time the status of the car changes so that I can query all
 lines where the taxi is occupied, for example.</p>

<p>What do I have to use therefore? I know that there is the 
ST_MakeLines tool existing in PostGIS, but as I am a new PostGIS user...
 I do not know exactly how to use it to get the results I need. <br></p><p><br></p><p>Thanks a lot<br></p>

    </div></div>