diff --git a/gt_matlab_trajs.py b/gt_matlab_trajs.py index ce11b524f8cede814572fa2540ca65e1576f3438..24dbc9718264a654256f3071b874f5374d3fb177 100755 --- a/gt_matlab_trajs.py +++ b/gt_matlab_trajs.py @@ -66,6 +66,9 @@ for node in g.vertices(): else: trajectories[g.vp.traj[node]].append(g.vp.name[node]) +with open("trajectories.json", "w") as outfile: + json.dump(trajectories, outfile, indent = 4) + # Setup a new trajectory that holds the expanded segments: expanded_trajectories = {} @@ -88,7 +91,7 @@ for trajectory in trajectories.values(): else: expanded_trajectories[key].append(s) -with open("trajectories.json", "w") as outfile: +with open("expanded_trajectories.json", "w") as outfile: json.dump(expanded_trajectories, outfile, indent = 4) print(f'Done saving json: {len(trajectories)} trajectories.')