Skip to content

Commit

Permalink
Fix mappy write
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Lucey committed Aug 5, 2023
1 parent bafb527 commit a49a334
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/via/models/journey.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,10 @@ def edge_data(self):

def write_mappy_path(self):
mmap_file = Path(f"/tmp/{self.uuid}_matches_map.html")
trace = [(p.gps.lat, p.gps.lng) for p in self.all_points]
trace = Trace.from_dataframe(pandas.DataFrame(trace), True, 0, 1)
matcher = get_matcher_by_graph(self.bounding_graph)
match_result = matcher.match_trace(trace)
mmap = plot_matches(match_result.matches)
mmap.save(str(mmap_file))

Expand Down

0 comments on commit a49a334

Please sign in to comment.