Skip to content
Snippets Groups Projects
Commit 6aef09ea authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Also output the list of unexpanded segments

parent 9cc717df
No related branches found
No related tags found
No related merge requests found
......@@ -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.')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment