Skip to content

Commit

Permalink
fix query syntax that API now enforces
Browse files Browse the repository at this point in the history
  • Loading branch information
gboeing committed May 4, 2018
1 parent fa43fe5 commit 1413217
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osmnx/pois.py
Expand Up @@ -35,7 +35,7 @@ def parse_poi_query(north, south, east, west, amenities=None, timeout=180, maxsi
query_template = ('[out:json][timeout:{timeout}]{maxsize};((node["amenity"~"{amenities}"]({south:.6f},'
'{west:.6f},{north:.6f},{east:.6f});(._;>;););(way["amenity"~"{amenities}"]({south:.6f},'
'{west:.6f},{north:.6f},{east:.6f});(._;>;););(relation["amenity"~"{amenities}"]'
'({south:.6f},{west:.6f},{north:.6f},{east:.6f});(._;>;);));out;')
'({south:.6f},{west:.6f},{north:.6f},{east:.6f});(._;>;);););out;')

# Parse amenties
query_str = query_template.format(amenities="|".join(amenities), north=north, south=south, east=east, west=west,
Expand All @@ -45,7 +45,7 @@ def parse_poi_query(north, south, east, west, amenities=None, timeout=180, maxsi
query_template = ('[out:json][timeout:{timeout}]{maxsize};((node["amenity"]({south:.6f},'
'{west:.6f},{north:.6f},{east:.6f});(._;>;););(way["amenity"]({south:.6f},'
'{west:.6f},{north:.6f},{east:.6f});(._;>;););(relation["amenity"]'
'({south:.6f},{west:.6f},{north:.6f},{east:.6f});(._;>;);));out;')
'({south:.6f},{west:.6f},{north:.6f},{east:.6f});(._;>;);););out;')

# Parse amenties
query_str = query_template.format(north=north, south=south, east=east, west=west,
Expand Down

0 comments on commit 1413217

Please sign in to comment.