mirror of
https://codeberg.org/matkoniecz/list_how_openstreetmap_can_be_improved_with_alltheplaces_data.git
synced 2025-05-13 05:03:09 +02:00
provide link generator in Match class
This commit is contained in:
parent
20e7401a0b
commit
da11b4b071
1 changed files with 6 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue