1
0
Fork 0

provide link generator in Match class

This commit is contained in:
Mateusz Konieczny 2025-02-07 11:21:23 +01:00
parent 20e7401a0b
commit da11b4b071

View file

@ -1,7 +1,7 @@
import base64
import json
import csv
import shared
class Match:
def __init__(self, atp_center, atp_tags, osm_match_center, osm_match_tags, osm_link, match_distance, all_very_good_matches):
@ -16,6 +16,11 @@ class Match:
def __str__(self):
return "Match(" + str(self.atp_center) + ',' + str(self.atp_tags) + ',' + str(self.osm_match_center) + ',' + str(self.osm_match_tags) + ',' + str(self.osm_link) + ',' + str(self.match_distance) + ',' + str(self.all_very_good_matches) + ")"
def link_to_point_in_atp(self):
return shared.link_to_point_in_atp(self.atp_center['lat'], self.atp_center['lon'])
def link_to_point_in_osm(self):
return shared.link_to_point_in_osm(self.osm_match_center['lat'], self.osm_match_center['lon'])
def save_list_of_matches_to_csv(filepath, data):
with open(filepath, 'w', newline='') as f: