2

I have an excel file containing coordinates of taxi positions which I would like to turn into lines in QGIS. The example data are as follows

no   trj_id       lat        lng
1    10162    -6.32044    106.837
2    10162    -6.32043    106.837
3    10162    -6.32048    106.837
4    10162    -6.32054    106.8369
.      .          .           .
.      .          .           .
.      .          .           .
.      .          .           .
438  10165     -6.25062   106.9883
439  10165     -6.25068   106.9881
.      .          .           .
.      .          .           .
.      .          .           .

This goes on for another 377000 points with total of 471 trj_id

I have attached the points represented in QGIS as shown below Points in QGIS

The idea is to create a line based on the same trj_id in QGIS, but I am not sure how to implement it simultaneously. I previously separate the data points based on trj_id but that would take a lot files. Is there anyway to do this?

1 Answer 1

3

Run "points to path" from processing toolbox and set no as Order field and trj_id as Group field:

enter image description here

From your example, two lines were created:

enter image description hereenter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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