This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Retrieve added data by a particular user

3
1

Hi,

I want to get all data added(contributed) by a particular user to OSM. How to do?

https://www.openstreetmap.org/user/Rajavelu_M/history shows data added by me with map. But I want data (without map) in JSON/XML or any other format.

Thanks in advance.

asked 18 Apr '17, 16:41

Rajavelu_M's gravatar image

Rajavelu_M
253454858
accept rate: 33%

edited 19 Apr '17, 08:16

Do you want data you modified as well as data you added?

If data was modified after you added it, do you want the latest version or the version you added?

(18 Apr '17, 16:48) SomeoneElse ♦

Yes. I need data modified as well as added by me(or any particular user).

If data modified, i don't need the latest version. version which was added by me is enough.

(18 Apr '17, 17:35) Rajavelu_M

2 Answers:

3

Overpass can be used to query data that was last touched by a user or a set of users. You can use a query like:

[out:json][timeout:25];
// gather results
(
  // query part for: “user:PlaneMad”
  node(user:"PlaneMad")({{bbox}});
  way(user:"PlaneMad")({{bbox}});
  relation(user:"PlaneMad")({{bbox}});
);
// print results
out body;
>;
out skel qt;

Try it. Move the map and run again for any other area. The object counts are at the bottom. This should be fairly accurate if you run it everyday for edits in a 24 hour time range using a more specific query since it is unlikely for the objects to have been modified by another user so soon.

You can see some more query examples here:

answered 19 Apr '17, 08:44

PlaneMad's gravatar image

PlaneMad
28237
accept rate: 33%

edited 20 Apr '17, 10:53

0

Hey you can try using owesome with the following query.

query ($dateFrom: String, $dateTo: String){ days(dateFrom: $dateFrom, dateTo: $dateTo) { day users(users:["Rajavelu_M"]) { user changeset nodeCount featureCollection { type features { id geometry } } } } }

Please note this project could be rough and only has data for 2017. Else you could simply use overpass

answered 19 Apr '17, 07:50

kepta's gravatar image

kepta
211
accept rate: 0%

edited 19 Apr '17, 07:51

Source code available on GitHub .