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

How can I get all ATMs in a bounding box?

I know how to get "amenity=atm", but there is also "amenity=bank atm=yes". OK, I can request for "amenity=" and filter the result for all ATMs. But perhaps "atm=yes" is also used in "aerialway=station" or "tourism=hotel" or whatever. How can I get all ATMs if I don't know in which tags they are hidden? Of course I don't want to download "" (all available data) to reduce traffic and server load.

This is only an example. Actually I am interested of getting any "...=yes" tag, not only ATM.

asked 14 Apr '12, 13:36

Plenz's gravatar image

Plenz
26225
accept rate: 0%


You seem to be misunderstanding how tagging works.

An object can have any number of tags (key/value combinations). A bank that also has an ATM would have two tags, amenity=bank and atm=yes (leaving aside the fact that some people use amenity=bank;atm for a moment). So if there is a tag atm=yes then it would not "hide in other tags", it would simply be there in addition to other tags.

An XAPI query for atm=yes would bring up all objects that are thus tagged, including those that also have aerialway=station, those that have tourism=hotel and so on.

The only real problem is in fact the combination of values with a semicolon, so there will be some objects tagged amenity=bank;atm or amenity=fuel;parking making some queries more difficult. But those are exceptions really. Check out TagInfo to find out how often certain tags are used, and which combinations are frequent. For example, http://taginfo.openstreetmap.org/search?q=amenity%3Datm tells you that there are about 42k amenity=atm, and http://taginfo.openstreetmap.org/keys/atm#values lists about 53k instances of atm=yes. The "combinations" tab also tells you that the atm tag is most frequently ised in conjunction with amenity.

permanent link

answered 14 Apr '12, 14:41

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Maybe I misunderstood tagging, maybe I misunderstood XAPI calls - anyway, I did not know that ".../xapi?*[atm=yes][bbox=..." works. Thanks for that!

But I am afraid I need two XAPI calls if I want to get all ATMs: one call "?node[amenity=atm]" and a second call "?*[atm=yes]". Or is there a way to put both requests into one XAPI call?

(14 Apr '12, 15:31) Plenz
1

To really catch all ATMs you would need even more - you would have to ask for amenity=bank;atm and all those funny other combinations as well. You might consider trying out the Overpass API for more complex queries. Or, you can of course download the whole planet file, place it in a database, and query it to your heart's content...

(14 Apr '12, 15:34) Frederik Ramm ♦

Indeed, Overpass API/Language Guide seems to be a page to read.

Unfortunately, there are no wildcard mentioned as for example amenity=*;atm. Will this work or not?

(14 Apr '12, 15:54) Plenz

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:

×32

question asked: 14 Apr '12, 13:36

question was seen: 4,670 times

last updated: 14 Apr '12, 16:34

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