magowiz82
(Magowiz82)
7
ok thank you very much for your contribute, seeing what you proposed I changed a bit mine final query
this is my python code that generates query:
TOURIST_ATTRACTIONS is a list of possible tourism values I use in or, in the clause, I choose to get with out both meta and geom to be sure I get: latitude and longitude (so I can generate a osm link) and also few information like opening hours when available. But also in this case correct me if I’m wrong.
cl_tags = '|'.join(TOURIST_ATTRACTIONS)
clause = f'nwr["tourism"~"{cl_tags}"](area.searchArea);'
query = f"""
area[name={self.country_name}];
rel[name="{self.city_name}"](area);
map_to_area ->.searchArea;
{clause}
out meta geom;
"""