I'd like to list the nodes that were created by a specified user with the Overpass API. After stumbling on this wiki section I was able to fetch all nodes "touched" by a user. I tested my own username, and as expected it returns all the nodes I've created and edited. https://www.overpass-api.de/api/interpreter?data=[out:json];node(user:"robinmetral");out; However I'm looking for a way to fetch only the nodes that a specified user has created, i.e. added to OSM for the first time (version 1). Is there a way to do this? By looking at if the user has created the node's version 1 perhaps? Any inputs are welcome :) Thanks for your help! Side question: the wiki says that "the user filter selects all elements that have been last touched by the specified user". Why "last"? Does it select a limited number of elements? asked 11 Oct '18, 03:36 robinmetral |
The question has been closed for the following reason "The question is answered, but I can not accept my own answer" by robinmetral 20 Oct '18, 12:43
So after some research, I solved my own question! I thought I'd post it on here in case someone else is looking for a similar solution. Clarification: though I first asked how to list all nodes created by a specific user (because I thought it would be more straightforward), in my case what I really wanted was to check whether a list of nodes were created by a specified user. I was able to do this through the OpenStreetMap API (not the Overpass API). Basically, I use the following request syntax in a JavaScript
Then I parse the XML response to get the value of the Here are the relevant docs sections about retrieving an element's specific version and about fetching multiple elements at once. answered 12 Oct '18, 08:15 robinmetral |
AFAIK, it is not possible to retrieve only revision 1 nodes via Overpass API.
Hmm. Do you know of other possible solutions? Or would this be the only way?
Oooh I think I might have found a way using the OSM API instead of Overpass.
Looking at the history of a node with several versions (example in XML) I might be able to extract the user of version 1!
I'll look into it, but feel free to give me a hand if you know how to convert this XML to JSON and fetch it! :)