I'd like to ask overpass turbo how many objects have the same property in a given area. For instance, what is the distribution of the building tag? could return:

// for a total of 3005 buildings for instance yes: 3000 church: 3 school: 2

It would help me find where buildings have not been updated for a while, based on the source tag attribute.

  • This information is already contained in the Overpass API results. You just need to parse the file to obtain it.
    – scai
    Commented Apr 4, 2017 at 9:49

1 Answer 1


As suggested by @scai, I wrote a shell script doing the job:

wget -O "/tmp/file" "http://overpass-api.de/api/interpreter?data=[out:csv('source', 'building';false)][timeout:25];
sort "/tmp/file" | uniq -c | sort -nr
  • 1
    out:csv provides a setting to suppress the header line, i.e. by saying [out:csv('source', 'building';false]. This way you could get rid of the tail -n +1 in your script.
    – mmd
    Commented Apr 5, 2017 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.