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

Is it possible to build a query that just returns the number of objects of a certain type in a certain area? Possible use case: define some things that require local knowledge, run query, get a toplist of people who have been working on those things. Find local mappers! (you could even query only things that are at version 1 to have higher probability that it's original mapping) I didn't get further than this:

Also: is this much heavier for the servers than running the query and doing the counting client-side?

asked 13 Aug '18, 14:33

joost%20schouppe's gravatar image

joost schouppe
accept rate: 12%


It may be possible with some of the newer features. You can see similar queries (in that they group a result set and do some statistics on it) described at

I'm not certain it is possible to get the new for block to loop over users though.

(14 Aug '18, 11:30) maxerickson

That's going to be at least an interesting read. Thanks! (I'll report back here if I make progress)

(14 Aug '18, 11:37) joost schouppe

So the for loop does work on user:

for (user()){
    make stat 
     total = count(nodes) + count(ways) + count(relations);
permanent link

answered 15 Aug '18, 13:31

maxerickson's gravatar image

accept rate: 32%

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]( "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: 13 Aug '18, 14:33

question was seen: 1,775 times

last updated: 15 Aug '18, 13:31

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