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

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

node
  ["amenity"="bank"]
  (4.6304414673187,-74.075607061386,4.6332058140013,-74.072549343109);
out;

Open street map - Bancolombia (392010374)

Etiquetas 
_____________________________________
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...
36112
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:

nwr["amenity"="bank"](4.6304414673187,-74.075607061386,4.6332058140013,-74.072549343109);
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

jmapb
3.4k73361
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á

http://overpass-turbo.eu/s/XIq

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á

http://overpass-turbo.eu/s/XIs

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

AlaskaDave
5.4k76107164
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:

{{geocodeArea:Bogotá}};
nwr[amenity=bank](area);
out count;
out meta center;

https://overpass-turbo.eu/s/XJT

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:

{{geocodeArea:Bogotá}};
rel(pivot)->.District;
nwr[amenity=bank](area);
out count;
out meta center;
way(r.District);
out geom;

https://overpass-turbo.eu/s/XJU

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

{{geocodeArea:Bogotá}};
nwr[amenity=bank][name~Bancolombia](area);
out count;
out meta center;
permanent link

answered 06 Sep '20, 00:49

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%

edited 06 Sep '20, 00:54

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:

×483
×228
×85

question asked: 05 Sep '20, 00:33

question was seen: 3,477 times

last updated: 06 Sep '20, 00:54

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