In my dataset of points, I need first to group points by ID, sort them by time and for each group to draw a line by time order. And for that processing algorithm points to path
works perfectly. But my problem is that I lose all the attributes of points after running the algorithm. It would mean to me that at least ID of each group of points became ID for the corresponding line. I have some attributes that are for each group the same and it is really important not to lose them after running the algorithm.
In order to better understand my problem, my dataset looks like as:
ID TIME kv X Y
1 00:00 a2 x coord y coord
1 00:05 a2 x coord y coord
1 01:00 a2 x coord y coord
1 03:00 a2 x coord y coord
2 00:00 a6 x coord y coord
2 17:00 a6 x coord y coord
3 05:00 ab x coord y coord
And my output should be the set of lines with the kv column, so for each user, I should have a line between points by time order:
ID kv GEOMETRY
1 a2 geom
2 a6 geom
3 ab geom
And the real output in after finishing algortithm looks as this:
ID GEOMeTRY
new-random-id1 line-geom
new-random-id2 line-geom
new-random-id3 line-geom
Are there any alternative approaches?