XAPI: Unterschied zwischen den Versionen

Aus Geoinformation HSR
Wechseln zu: Navigation, Suche
(Technisches)
Zeile 11: Zeile 11:
 
* The original: Mumps und GT.M
 
* The original: Mumps und GT.M
 
* Projekt [https://github.com/slomo/osm-spline-xapi osm-spline-xapi] - Reimplementation in serverside JavaScript mit PostGIS.
 
* Projekt [https://github.com/slomo/osm-spline-xapi osm-spline-xapi] - Reimplementation in serverside JavaScript mit PostGIS.
* Projekt [http://wiki.openstreetmap.org/wiki/Xapi#Java JXAPI] - Reimplementation als Java Servlet mit PostgreSQL by Ian Dees  
+
* Projekt [http://wiki.openstreetmap.org/wiki/Xapi#Java JXAPI] - Reimplementation als Java Servlet mit PostgreSQL by Ian Dees => [https://github.com/iandees/xapi-servlet XAPI-Servlet]
** [https://github.com/iandees/xapi-servlet XAPI-Servlet]
 
  
 
Services (''NOTE: the service and the software and hardware behind most OSM XAPI servers are instable and often offline''):
 
Services (''NOTE: the service and the software and hardware behind most OSM XAPI servers are instable and often offline''):

Version vom 9. Juni 2011, 11:21 Uhr

Siehe auch OSM-Technisches.

Service, der original OSM XML liefert mit einfachen Query-Möglichkeiten.

Dokumentation:

  • OSM XAPI
  • Examples:
    • ... /api/0.6/node%5Bnatural=peak%5D%5Bbbox=5.94360,45.93587,10.61279,47.73193%5D natural=peak within Switzerland]).

Implementationen:

  • The original: Mumps und GT.M
  • Projekt osm-spline-xapi - Reimplementation in serverside JavaScript mit PostGIS.
  • Projekt JXAPI - Reimplementation als Java Servlet mit PostgreSQL by Ian Dees => XAPI-Servlet

Services (NOTE: the service and the software and hardware behind most OSM XAPI servers are instable and often offline):

Technisches

Siehe http://www.gis.hsr.ch/wiki/XAPI

Das Ziel ist nicht die vollständige "Syntax", sondern nur spezifische und häufige Requests, bestehend aus Key/Value Pairs (0, 1 ode mehrere) sowie einer Bounding Box-Angabe. Wegen '[' muss die URL kanonisiert werden. Achtung auch wegen ":".

Hier einige Tests: * .../api/0.6/node[amenity=*] * .../api/0.6/node[highway=busstop] * .../api/0.6/node[bbox=-6,50,2,61] * .../api/0.6/node[amenity=hospital][bbox=-6,50,2,61] * .../api/0.6/*[seamark:type=signal_station_warning]

Hier konkrete, laufende Beispiele:

Logs:

XAPI => SQL:

Beispiel:

 .../api/0.6/node[tourism=zoo][bbox=6.2,46.1,10.0,47.6]
 => 
 SELECT ST_AsText(way) geom, name label
 FROM osm_point
 WHERE hstore(tags)->'tourism'='zoo'
 AND ST_Contains(ST_Transform(ST_SetSRID('BOX(6.2 46.1, 10.0 47.6)'::box2d, 4326),900913),way)