Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I think my problem is quite easy to be solved by the most postgis-users, but i am a bloody beginner: i have a timestamped point-table representing GPS-tracked places of different cars. To distinguish the cars there is a car-id for every point. So, a simplified version is looking like that:

enter image description here

Now, i want to write a query for connecting the places of each car chronologically with lines so that the track of each car can be displayed. The table is sorted chronologically, so it can be worked with the id's instead of the timestamps. How can I solve it? Thank you in advance!

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

You want to use the ST_MakeLine function. There is an example of almost exactly what you are trying to do (if I have understood you correctly) here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.