refactored landmark manager and clean up

This commit is contained in:
2024-07-25 09:37:37 +02:00
parent d23050b811
commit 80b3d5b012
15 changed files with 218 additions and 1732 deletions

View File

@@ -24,9 +24,9 @@ def write_data(L: List[Landmark], file_name: str):
def test(start_coords: tuple[float, float], finish_coords: tuple[float, float] = None) -> List[Landmark]:
manager = LandmarkManager()
preferences = Preferences(
sightseeing=Preference(
name='sightseeing',
@@ -56,10 +56,12 @@ def test(start_coords: tuple[float, float], finish_coords: tuple[float, float] =
#finish = Landmark(name='finish', type=LandmarkType(landmark_type='finish'), location=(48.847132, 2.312359), osm_type='finish', osm_id=0, attractiveness=0, must_do=True, n_tags = 0)
manager = LandmarkManager(preferences=preferences, coordinates=start_coords)
# Generate the landmarks from the start location
landmarks, landmarks_short = manager.generate_landmarks_list()
landmarks, landmarks_short = manager.generate_landmarks_list(
center_coordinates = start_coords,
preferences = preferences
)
# Store data to file for debug purposes
# write_data(landmarks, "landmarks_Strasbourg.txt")