This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Looking for complete list of worldwide pubs

2
1

Hi all.

It used to be possible to download a complete list of amenity (or other locations) by not specifying a border. It doesn't seem to be possible now. How/where can I get a list of all the pubs or [amenity=pub] please?

Thanks.

asked 25 Feb '13, 21:49

twistedfirestarter's gravatar image

twistedfires...
31112
accept rate: 0%


One Answer:

5

It is possible by using the Overpass API. An example query is:

http://overpass.osm.rambler.ru/cgi/interpreter?data=[timeout:900];(node["amenity"="pub"];way["amenity"="pub"];rel["amenity"="pub"];);(._;>;);out;

(copy the link by hand, the parser broke it). But I couldn't test it successfully because I always get a 504 Gateway Time-Out. This is also a really heavy query.

An alternative is to get the planet or an extract and use osmfilter / osmconvert to generate this list.

Also keep in mind that the result will never be a complete list because OSM's data (and any other data available) will never be complete and changes continuously.

answered 26 Feb '13, 08:23

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

edited 26 Feb '13, 09:14

3

Thank you for the URL, but it needs an "out" in the end:

http://overpass.osm.rambler.ru/cgi/interpreter?data=[timeout:3600];(node["amenity"="pub"];way["amenity"="pub"];rel["amenity"="pub"];);(._;>;);out;

I've also increased the timeout.

The 504 happens if too much other queries run on the server. You can then try overpass-api.de instead of the rambler instance:

http://overpass-api.de/api/interpreter?data=[timeout:3600];(node["amenity"="pub"];way["amenity"="pub"];rel["amenity"="pub"];);(._;>;);out;
(26 Feb '13, 08:31) Roland Olbricht

Thanks for the information, I updated the query in my answer.

(26 Feb '13, 09:15) scai ♦
2

Hi guys..thanks a lot. That seems to have worked!

(27 Feb '13, 13:47) twistedfires...
1

It would be nice if you accepted the answer then

(27 Feb '13, 21:34) gormo

Source code available on GitHub .