Skip to main content
Solved

Fill gaps in GPS track lines


btl
Contributor
Forum|alt.badge.img+3
  • Contributor

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.

View original
Did this help you find an answer to your question?

2 replies

redgeographics
Celebrity
Forum|alt.badge.img+50
  • Celebrity
  • 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+3
  • Author
  • Contributor
  • August 27, 2019
redgeographics wrote:

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings