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

Overpass API / simple logical operators

1

The question https://help.openstreetmap.org/questions/21941/can-not-find-rdby-putgarden-denmark-ferry-route-with-navigator-from-mapfactor gave me the idea to query the DB for all nodes that are tagged barrier=... and do not have an access tag, so I can specifically check those in my area.

(How) can this be done in OverpassQL? Does OverpassQL or some other API have support for "not"-style operators? I couldn't find documentation stating this.

asked 29 Apr '13, 14:43

gormo's gravatar image

gormo
2.9k32660
accept rate: 13%

edited 29 Apr '13, 14:44


One Answer:

4

Looks like there's ["key"!="value"], or ["key"!~"value"] if you want to use regular expressions.

https://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#Negation

answered 29 Apr '13, 15:16

neuhausr's gravatar image

neuhausr
7.5k870121
accept rate: 21%

1

Great, thanks!

Shame on my google fu...

(29 Apr '13, 15:47) gormo

Source code available on GitHub .