Skip to main content
Solved

Fill gaps in GPS track lines

  • August 23, 2019
  • 2 replies
  • 104 views

btl
Contributor
Forum|alt.badge.img+7
  • Contributor
  • 21 replies

I have some vehicle GPS tracking lines. The lines have gaps in them. I want to join the lines.

The data is ordered and categorised so I can use a Chopper to chop the lines into vertices and then a LineBuilder with "Group By" set to the vehicle Type and "Group By Mode" set to "Process When Group Changes" to rebuild the lines with gaps joined.

However, in the source, consecutive lines may be a different vehicle of the same Type (I can see they are different vehicles but there is nothing in the data to differentiate individual vehicles), so I get unwanted connections.

There are two methods I could use to prevent most of these unwanted connections:

  • if the distance to the next line is too far do not create a connection
  • the source data contains start and finish times for each track, so if the finish time of the current line is after the start time of the next one, do not create a connection

But I'm not sure how to do either of these - can anyone help?

Best answer by redgeographics

I would look into the 2nd option first. In the AttributeManager, using the Adjacent Features option, you can set up a conditional value to fill a "vehicle id" attribute based upon the difference between the end time of one segment and start time of the next: if the next start is before the current finish or there is a big difference between them you can create a new vehicle id and then use that in the LineBuilder.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3701 replies
  • Best Answer
  • August 23, 2019

I would look into the 2nd option first. In the AttributeManager, using the Adjacent Features option, you can set up a conditional value to fill a "vehicle id" attribute based upon the difference between the end time of one segment and start time of the next: if the next start is before the current finish or there is a big difference between them you can create a new vehicle id and then use that in the LineBuilder.


btl
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 21 replies
  • August 27, 2019

I would look into the 2nd option first. In the AttributeManager, using the Adjacent Features option, you can set up a conditional value to fill a "vehicle id" attribute based upon the difference between the end time of one segment and start time of the next: if the next start is before the current finish or there is a big difference between them you can create a new vehicle id and then use that in the LineBuilder.

That's great, thank you, was not familiar with that functionality - I'm half way there - now to see what I can do about the distance...

...which is actually dead easy using the same method.