Skip to content

Commit 98e731f

Browse files
committed
slight refactor of map query, adding way query
1 parent 8602154 commit 98e731f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,24 @@ In addition to just send you query and parse it, the wrapper provides shortcuts
6161

6262
#### MapQuery
6363

64-
Up to now, only a query for [complete ways and relations](http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#Completed_ways_and_relations) in a bounding box is supported.
64+
This is a shorthand for a [complete ways and relations](http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#Completed_ways_and_relations) query in a bounding box (the 'map call').
6565
You just pass the bounding box to the constructor:
6666

6767
```python
68-
>>> map_query = overpass.MapQuery((50.746,7.154,50.748,7.157))
68+
>>> map_query = overpass.MapQuery(50.746,7.154,50.748,7.157)
6969
>>> response = api.Get(map_query)
7070
```
7171

72+
#### WayQuery
73+
74+
This is shorthand for getting a set of ways and their child nodes that satisfy certain criteria.
75+
Pass the criteria as a Overpass QL stub to the constructor:
76+
77+
```python
78+
>>> way_query = overpass.WayQuery('[name=Highway 51]')
79+
>>> response = api.Get(way_query)
80+
```
81+
7282
## Need help? Want feature?
7383

7484
Create a [new issue](https://github.com/mvexel/overpass-api-python-wrapper/issues).

0 commit comments

Comments
 (0)