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

Negative user tag API search/query

0

Is there a way how to query API for a particular tag (example highway=primary) in objects that were NOT last edited by particular user?

asked 18 Aug '12, 11:41

Kozuch's gravatar image

Kozuch
1.7k587285
accept rate: 8%

edited 20 Aug '12, 17:13


2 Answers:

1

If you mean the search in JOSM, yes. It is easy. Just add a '-'sign to do the negative search. So your search query would be

highway=primary -user:userXYZ

This would give you all primary highways not last edited by userXYZ

answered 18 Aug '12, 12:23

Sanderd17's gravatar image

Sanderd17
1.1k51637
accept rate: 31%

edited 18 Aug '12, 20:51

Tordanik's gravatar image

Tordanik
12.0k15106147

Thanks for an answer, but I rather thought an API query... added API keyword to my question.

(20 Aug '12, 17:15) Kozuch

0

Not explicitly tried it for this, but Overpass might be worth a look (apparently it supports negation)

answered 20 Aug '12, 17:57

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

2

It does support negation, but it seems only for key-values. I didn't accomplish negating the user name of the last edit.

(20 Aug '12, 21:06) scai ♦

Source code available on GitHub .