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)
asked 05 Sep '20, 00:33 Rafael Eduar... |
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:
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.) answered 05 Sep '20, 03:45 jmapb |
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. answered 05 Sep '20, 01:14 AlaskaDave 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:
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:
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
answered 06 Sep '20, 00:49 DaveF |