<div class="gmail_quote">On Sun, Apr 15, 2012 at 3:26 PM, Stefan Keller <span dir="ltr"><<a href="mailto:sfkeller@gmail.com">sfkeller@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
2012/4/15 Philipp Borgers <<a href="mailto:borgers@mi.fu-berlin.de">borgers@mi.fu-berlin.de</a>>:<br>
> Hi,<br>
><br>
> issue two queries? One for [amenity=restaurant] and one for<br>
> [toursim=office] ?<br>
><br>
> I think the pipe "|" is intended for keys and values. You can do<br>
> something like this [amenity|tourism=restaurant|office]. This returns<br>
> entities for amenity=restaurant, amenitry=office, tourism=restaurant and<br>
> tourism=office<br>
><br>
> I think the NOT operator is only supported for "Child Element<br>
> Predicates".<br>
<br>
Right. That's what I understand too.<br>
<br>
Following the ideas from Overpass API I currently would suggest the<br>
following syntax extensions for XAPI:<br>
<br>
1) OR or union operator ("pipe") as it's denoted in XAPI wiki page,<br>
now valid for tags (nothing between tags means implicit AND as up to<br>
now in XAPI).<br>
?xapi=node[amenity=restaurant]|node[tourism=office]<br>
<br>
2) NOT only with values<br>
?xapi=node[cuisine!=pizza]<br>
<br>
The "out" parameter from Overpass seems to indicate the response/output format.<br>
If that is really needed (like for an alternate OSM JSON) I would<br>
propose to introduce the parameter "format"<br>
&format=xml . That's ugly and not RESTful too [1] - but that's XAPI style :-></blockquote><div><br></div><div>jxapi will respond with JSON if you use .json as a file extension for the request. e.g. map.json?bbox=... or *[foo=bar].json</div>
<div><br></div><div>Unfortunately the OSMF jxapi is down at the moment and MapQuest's isn't recent-enough to support this feature. </div></div>