started to implement overpass queries
This commit is contained in:
0
backend/src/structs/__init__.py
Normal file
0
backend/src/structs/__init__.py
Normal 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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user