[OSM-dev] Syntax of XAPI queries with OR and NOT?

Stefan Keller sfkeller at gmail.com
Sun Apr 15 18:16:11 BST 2012


Hi,

With a XAPI API I'd like to make following query types (operators/predicates):
1) OR query: Example "[amenity=restaurant] OR [tourism=office]"
2. NOT query: Example "NOT [cuisine=pizza]"

What could be a suitable syntax for doing this?
My suggestions:
1a) ?xapi=node[amenity=restaurant]|[tourism=office]
or 1b) ?xapi=node[amenity=restaurant]|node[tourism=office]
2) ?xapi=-node[cuisine=pizza]

Or did I miss something in
http://wiki.openstreetmap.org/wiki/XAPI#Tag_Predicates ?

Yours, Stefan



More information about the dev mailing list