[OSM-dev] Query-Formats
Peter Körner
osm-lists at mazdermind.de
Tue Mar 23 12:30:04 GMT 2010
Hi
On the osm dev-server we're playing around with the postgres-hstore
extension which allows us to repond to xapi-like queries, but with
already assembled LIESTRINGs and such neat things.
I'm currently thinking about the interface on how to query this resource
and i'd like to be able to ask queries like "all highway=trunk and
highway=primary with a name" what is not possible with the current
XAPI-Interface.
So I was thinking about an XML-Based interface:
<query>
<and>
<type>line</type>
<or>
<bbox>x1,y1,x2,y2</bbox>
<bbox>xx,yy1,xx2,yy2</bbox>
</or>
<or>
<tag k="highway" v="primary" />
<tag k="highway" v="secondary" />
</or>
</and>
</query>
What do you think about it? I'd also implement a json-based interface in
the same way. Do you agree with this kind of query or do you like the
possibility to query via url? how would you like to supply ANDs and ORs
then?
what do you think about supplying a raw SQL-Where via URL?
query.php?(tags ? 'name') AND (tags ? 'highway') AND ((tags->'highway' =
'primary') OR (tags->'highway' = secondary'))
Peter
More information about the dev
mailing list