NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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%


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.

permanent link

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

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×94

question asked: 25 Feb '13, 21:49

question was seen: 3,457 times

last updated: 27 Feb '13, 21:34

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum