mvexel / overpass-api-python-wrapper

Python bindings for the OpenStreetMap Overpass API
Apache License 2.0
367 stars 90 forks source link

query not accepted #43

Closed mvexel closed 8 years ago

mvexel commented 8 years ago
>>> api.Get('{{geocodeArea:Alabama}}->.state;relation[type=restriction](area.state);out body;>;')
[out:json];{{geocodeArea:Alabama}}->.state;relation[type=restriction](area.state);out body;>;out body geom;
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/mvexel/dev/overpass-api-python-wrapper/overpass/api.py", line 45, in Get
    raw_response = self._GetFromOverpass(full_query)
  File "/Users/mvexel/dev/overpass-api-python-wrapper/overpass/api.py", line 108, in _GetFromOverpass
    raise OverpassSyntaxError(query)
overpass.errors.OverpassSyntaxError: [out:json];{{geocodeArea:Alabama}}->.state;relation[type=restriction](area.state);out body;>;out body geom;

Query runs fine when run from Overpass Turbo: http://overpass-turbo.eu/s/diB

mvexel commented 8 years ago

Oh WAIT. {{geocodeArea:}} is an Overpass Turbo specific query!