better logs
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 2m20s
Run linting on the backend code / Build (pull_request) Failing after 26s
Run testing on the backend code / Build (pull_request) Failing after 2m40s
Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 17s
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 2m20s
Run linting on the backend code / Build (pull_request) Failing after 26s
Run testing on the backend code / Build (pull_request) Failing after 2m40s
Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 17s
This commit is contained in:
@@ -212,9 +212,6 @@ class LandmarkManager:
|
||||
for sel in dict_to_selector_list(amenity_selector):
|
||||
self.logger.debug(f"Current selector: {sel}")
|
||||
|
||||
# query_conditions = ['count_tags()>5']
|
||||
# if landmarktype == 'shopping' : # use this later for shopping clusters
|
||||
# element_types = ['node']
|
||||
element_types = ['way', 'relation']
|
||||
|
||||
if 'viewpoint' in sel :
|
||||
@@ -269,7 +266,7 @@ class LandmarkManager:
|
||||
tag_values = set(elem.tags().values()) # Store tag values
|
||||
|
||||
|
||||
# Use simple tags :
|
||||
# Retrieve image, name and website :
|
||||
image_url = elem.tag('image')
|
||||
website_url = elem.tag('website')
|
||||
if website_url is None :
|
||||
@@ -278,6 +275,9 @@ class LandmarkManager:
|
||||
|
||||
if elem_type != "nature" and elem.tag('leisure') == "park":
|
||||
elem_type = "nature"
|
||||
|
||||
if elem.tag('wikipedia') is not None :
|
||||
score += self.wikipedia_bonus
|
||||
|
||||
# Skip element if it is an administrative boundary or a disused thing or it is an appartement and useless amenities
|
||||
if elem.tag('boundary') is not None or elem.tag('disused') is not None:
|
||||
@@ -297,20 +297,16 @@ class LandmarkManager:
|
||||
# do not count the building description as being particularly useful
|
||||
n_tags -= 1
|
||||
|
||||
if "wiki" in tag_key:
|
||||
# wikipedia entries count more
|
||||
score += self.wikipedia_bonus
|
||||
|
||||
if landmarktype != "shopping":
|
||||
if "shop" in tag_key:
|
||||
skip = True
|
||||
break
|
||||
# if landmarktype != "shopping":
|
||||
# if "shop" in tag_key:
|
||||
# skip = True
|
||||
# break
|
||||
# if tag_key == "building" and elem.tag('building') in ['retail', 'supermarket', 'parking']:
|
||||
# skip = True
|
||||
# break
|
||||
|
||||
if skip:
|
||||
continue
|
||||
# if skip:
|
||||
# continue
|
||||
|
||||
score = score_function(score)
|
||||
|
||||
|
@@ -8,9 +8,6 @@ from ..structs.landmark import Landmark
|
||||
from .get_time_separation import get_time
|
||||
from ..constants import OPTIMIZER_PARAMETERS_PATH
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class Optimizer:
|
||||
|
||||
|
@@ -333,7 +333,7 @@ class Refiner :
|
||||
|
||||
minor_landmarks = self.get_minor_landmarks(all_landmarks, base_tour, self.detour_corridor_width)
|
||||
|
||||
self.logger.info(f"Using {len(minor_landmarks)} minor landmarks around the predicted path")
|
||||
self.logger.debug(f"Using {len(minor_landmarks)} minor landmarks around the predicted path")
|
||||
|
||||
# Full set of visitable landmarks.
|
||||
full_set = self.integrate_landmarks(minor_landmarks, base_tour) # could probably be optimized with less overhead
|
||||
|
@@ -1,27 +0,0 @@
|
||||
from OSMPythonTools.overpass import Overpass, overpassQueryBuilder
|
||||
|
||||
|
||||
|
||||
overpass = Overpass()
|
||||
query = overpassQueryBuilder(
|
||||
bbox = (45.7300, 4.7900, 45.8000, 4.8600),
|
||||
elementType = ['way'],
|
||||
# selector can in principle be a list already,
|
||||
# but it generates the intersection of the queries
|
||||
# we want the union
|
||||
selector = '"historic"="building"',
|
||||
includeCenter = True,
|
||||
out = 'body'
|
||||
)
|
||||
|
||||
|
||||
res = overpass.query(query)
|
||||
|
||||
|
||||
# for elem in res.elements() :
|
||||
elem = res.elements()[1]
|
||||
|
||||
tags = elem.tags()
|
||||
|
||||
test = elem.tag('sgehs')
|
||||
print(test)
|
Reference in New Issue
Block a user