[OSM-dev] Query-Formats

Stefan de Konink stefan at konink.de
Tue Mar 23 15:20:41 GMT 2010


Just make a dbslayer interface, presented that last year on sotm.

Stefan

Op 23 mrt 2010 om 13:30 heeft Peter Körner <osm-lists at mazdermind.de>  
het volgende geschreven:\

> 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
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev




More information about the dev mailing list