[OSM-dev] Syntax of XAPI queries with OR and NOT?
Philipp Borgers
borgers at mi.fu-berlin.de
Sun Apr 15 21:06:07 BST 2012
Hi,
issue two queries? One for [amenity=restaurant] and one for
[toursim=office] ?
I think the pipe "|" is intended for keys and values. You can do
something like this [amenity|tourism=restaurant|office]. This returns
entities for amenity=restaurant, amenitry=office, tourism=restaurant and
tourism=office
I think the NOT operator is only supported for "Child Element
Predicates".
On Sun, 2012-04-15 at 19:16 +0200, Stefan Keller wrote:
> 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
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20120415/36919fc3/attachment.pgp>
More information about the dev
mailing list