2

Some units are moving and regularly registering it location. Each of these register events corresponds to row in a csv-file. This row contains fields:

  • id (unit identifier),
  • lat, long (event location),
  • time (event time in yyyy-MM-dd HH:mm:ss format, it can be a number of seconds from 1970 if it really matters)

I need to create a polyline layer in QGIS from this csv-file, that represent routes of the units.

2

QGIS Points to Path tool understands Date/Datetime field as an order field.

So the overall steps are:

(1) From Menu Layer | Add Layer | Add delimited text layer to read csv into QGIS to create a point layer.

(2) From Processing Toolbox | Vector creation (tools) | Points to path to create polylines from this point layer. Your time field would be the order field. It understands Date and Datetime according to Python datetime format. If required, give format option (e.g. %Y-%m-%d %H:%M:%S), too.

  • As an alternative to the step (2) offered by @Kazuhito, there is also a SAGA vector line tool, called Convert Points to Line(s), where the order field requires string values of the time, it could be achieved with a time.ctime([secs]) conversion. – Taras Aug 10 '18 at 12:00
  • @TarasDubrava Looks like your comment is proper answer! – Kazuhito Aug 10 '18 at 21:32
  • @Kazuhito, thanks, but I assume that my comment is it too poor to be a proper answer. However, I will try. – Taras Aug 13 '18 at 4:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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