Merge two point files

Questions and discussions about operating Tru-Traffic

Moderator: bullock

Merge two point files

Postby Chris » Tue Oct 13, 2009 4:05 pm

Device A has points 5-20 where Device B has points 1-20. Can I get a new file with points B 1-5 and A 6-20? Problems I see are different start times so the time column would be off and then B is every second while B is every 2 seconds. Thanks.
Chris
 
Posts: 59
Joined: Wed Nov 17, 2004 2:25 pm
Location: San Antonio, TX

Re: Merge two point files

Postby bullock » Wed Oct 14, 2009 12:16 am

Hi, Chris.

I assume the points you're referring to are trip logs, not geographic locations of intersections. (Otherwise, the times wouldn't matter).

If the sets of points A 5-20 and B 1-20 overlap (e.g., for points 5 - 20), then I think your best option is, after downloading both trip logs, A & B, to
  1. export them both to text files (either .csv or .tsv),
  2. hand edit the two files so they have a common start time (making a compensating change to the elapsed times in column 1),
  3. further hand edit the points in the two files, merging & deleting as needed (and making sure the points remain in chronological order), and
  4. import the two files back into Tru-Traffic.
The imported trip logs will get marked as imported from an "unverifiable" file, but other than that, this should give what you want. Tru-Traffic doesn't care about the 1 & 2 second mismatch, as long as for each point, the start time + elapsed time gives the actual time the point was recorded. When analyzing trip logs, the software always calculates the time difference between consecutive points, without making too many assumptions about how big the time difference is or whether the time difference is consistent throughout the trip log.

If the sets of points A and B didn't overlap, there'd be an easier route to do all this, provided there isn't too long of a time gap between the two sets. After downloading, you'd just highlight the two trip logs, right click and choose Join Trip Logs from the popup menu.

If this doesn't give you what you need, let me know.

Regards.
Greg
bullock
Site Admin
 
Posts: 218
Joined: Thu May 06, 2004 6:51 pm
Location: Pacific Grove, CA

Re: Merge two point files

Postby Chris » Wed Oct 14, 2009 6:30 pm

When I am adjusting column 1 can I use negative values for time? The stream of points I like starts at time 0 and the points I want to add are before that.
Chris
 
Posts: 59
Joined: Wed Nov 17, 2004 2:25 pm
Location: San Antonio, TX

Re: Merge two point files

Postby bullock » Wed Oct 14, 2009 7:34 pm

Chris wrote:When I am adjusting column 1 can I use negative values for time?


I think it will have trouble with the negative times. You might want to try it just to be sure, but I suspect it will disable the negative-time points and, worse, set their actual times from the absolute value of the elapsed time. I'll look into that and, if necessary, try to correct it for future versions.

For now, you'll probably have to make compensating changes to both, the starting time and the elapsed time column, in both files, to ensure the elapsed times in column 1 are nonnegative and the sum (starting time + elapsed time) is correct for each point.

Regards.
Greg
bullock
Site Admin
 
Posts: 218
Joined: Thu May 06, 2004 6:51 pm
Location: Pacific Grove, CA


Return to Program Operation

Who is online

Users browsing this forum: No registered users and 10 guests

cron