Hello, I am new to using the overpass page, I am trying to extract the number of banks that are in an area of Bogota, Colombia. The problem is that I cannot find all the banks that are in a box. For example, Bancolombia, although when entering the open street map website, it appears in the category of amaneity bank. Thanks for any suggestions.

Your query in pretty Overpass QL: overpass


Open street map - Bancolombia (392010374)

addr:city         | Bogotá 
addr:country      | CO 
addr:district     | Teusaquillo 
addr:housenumber  | 40-95
addr:state        | Distrito Capital
addr:street       | Carrera 24
addr:suburb       | La Soledad
amenity           | bank
atm               | yes
brand             | Bancolombia

asked 05 Sep '20, 00:33

Rafael%20Eduardo%20Diaz's gravatar image

Rafael Eduar...
accept rate: 0%

Hi Rafael, I think the problem is that your query is only looking for banks mapped as nodes, and some of the banks in your search area are mapped as ways. These are both valid methods of mapping banks, depending on the circumstances, so if you're searching for all banks you'll have to check nodes and ways.

Try this search instead:

out body;
out skel qt;

The "nwr" command will search for both nodes and ways. It will also search for relations, which might be used to represent, for instance, a bank building with a courtyard. (Here's a bank mapped as a relation: https://www.openstreetmap.org/relation/2544819.)

permanent link

answered 05 Sep '20, 03:45

jmapb's gravatar image

accept rate: 22%

I find the straight Qverpass Query code too difficult so I used the Overpass Turbo Wizard to find banks with name=Bancolumbia in Bogota and it produced many nodes and polygons. Try it yourself — the link below will be a starting point. Your example asked only for nodes but some of the banks may be mapped as polygons so I did not restrict the query at all.

amenity=bank and brand=Bancolombia in Bogotá


Note I used name=Bancolombia rather than brand=Bancolumbia. To obtain banks that had the brand tag but not the name tag, or vice-versa, just add the extra condition enclosed in parentheses with an or operation.

amenity=bank and (name=Bancolombia or brand=Bancolumbia) in Bogotá


You could also restrict your query to your area of interest by using the bounding box data or enclosing the area in your view and deleting the "in Bogotá" part of the query.

Hope this helps.

permanent link

answered 05 Sep '20, 01:14

AlaskaDave's gravatar image

accept rate: 16%

edited 05 Sep '20, 01:20

Hello thank you, how could I find all the banks in the polygon, which is what I need.

(05 Sep '20, 01:18) Rafael Eduar...

you could add type:relation connected with an AND to the previous examples:

type:relation and amenity=bank and (name=Bancolombia or brand=Bancolumbia) in Bogotá

(05 Sep '20, 01:22) AlaskaDave

However, the AV Villas bank is yet to be found in this polygon. https://www.openstreetmap.org/way/392010458#map=19/4.63106/-74.07539

(05 Sep '20, 02:13) Rafael Eduar...

"extract the number of banks that are in an area of Bogota"

This is the answer to question as written:

out count;
out meta center;


It searches for an area with the name Bogotá. It then searches for all banks within the boundary of that area. It outputs a visual representation ('map' tab) & a count of all the banks broken down into how they're mapped ('data' tab).

If you wish to show the boundary:

out count;
out meta center;
out geom;


You can filter for specific banks by using the name tag, but use the '~' symbol instead of '=' which searches for all names that includes 'Bancolombia' It returns more items

out count;
out meta center;
permanent link

answered 06 Sep '20, 00:49

DaveF's gravatar image

accept rate: 15%

edited 06 Sep '20, 00:54

Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 05 Sep '20, 00:33

question was seen: 2,663 times

last updated: 06 Sep '20, 00:54

powered by OSQA