started to implement overpass queries

This commit is contained in:
2024-05-30 00:48:38 +02:00
parent 03da8441f2
commit d88f22121e
5 changed files with 87 additions and 51 deletions

View File

View File

@@ -13,12 +13,18 @@ class Landmark(BaseModel) :
type: LandmarkType # De facto mapping depending on how the query was executed with overpass. Should still EXACTLY correspond to the preferences
location : tuple
# loop through the preferences and assign a score to the landmark
def score(self, preferences: Preferences):
def score(preferences: Preferences):
# loop through the preferences and assign a score
return 29
for preference_name, preference in preferences.__dict__.items():
if (preference_name == self.type.landmark_type) :
score = preference.score
if (not score) :
raise Exception(f"Could not determine score for landmark {self.name}")
else :
return score