XAPI: Unterschied zwischen den Versionen

Aus Geoinformation HSR
Wechseln zu: Navigation, Suche
K (XAPI Services)
 
(24 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
Siehe auch [[OSM-Technisches]].
+
XAPI ('zappy') X API zur [[OpenStreetMap]]-Datenbank. Ein Webservice mit einfachen Query-Möglichkeiten, der eine OSM XML-Datei zurückgibt. Recht beliebter [[OSM]]-Webservice aber immer wieder überlastet.
  
Service, der original OSM XML liefert mit einfachen Query-Möglichkeiten.
+
Siehe auch:
 +
* [[OSM-Technisches]]
 +
* [[PostGIS-Terminal#XAPI-to-Map]]
  
Dokumentation:
 
* [http://wiki.openstreetmap.org/wiki/Xapi 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:
+
== XAPI Services ==
* The original: Mumps und GT.M
 
* 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
 
** [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''):
+
Laufende XAPI-Beispiele mit Webservices der HSR:
* Aktueller Service: [http://wiki.openstreetmap.org/wiki/Xapi xapi.openstreetmap.org]
+
* "XAPI-to-Map" vom PostGIS-Terminal (Schweizer Daten vom Vorabend): http://labs.geometa.info/postgisterminal/?xapi=node*%5Btourism=zoo%5D
* [http://openstreetmap.us/uixapi/xapi.html XAPI Helper Webtool on openstreetmap.us]
+
* OpenStreetMap-in-a-Box der HSR (Schweiz, veraltete Daten vom 2011): http://geometa.hsr.ch/xapi/api/0.6/*%5Btourism=zoo%5D
* [http://open.mapquestapi.com/xapi/ XAPI Helper Webtool from Mapquest]
 
  
== Technisches ==
+
Laufende XAPI-Beispiele mit Webservices:
 +
* OpenStreetMap CH (Schweizer Daten, im Sommer 2 im Winter 1 hinter GMT auf dem OSM Planet): http://xapi.openstreetmap.ch:8080/xapi/api/0.6/*%5Btourism=zoo%5D, bzw. http://osm.xiala.net:8080/xapi/api/0.6/*%5Btourism=zoo%5D (Dank an Beni mit xiala.net)
 +
* Overpass XAPI (weltweit): http://www.overpass-api.de/api/xapi?node%5Btourism=zoo%5D%5Bbbox=5.943,45.935,10.612,47.731%5D
 +
* OSM2WEB (weltweit): http://www.gis-hosting.lu/osm2web/export/points/tourism/zoo.geojson?bbox=5.943,45.935,10.612,47.731&srid=4326
 +
* Weitere:
 +
** [http://open.mapquestapi.com/xapi/ XAPI Helper Webtool from Mapquest]
 +
** jXAPI (weltweit): http://jxapi.openstreetmap.org/xapi/api/0.6/*%5Btourism=zoo%5D%5Bbbox=5.943,45.935,10.612,47.731%5D
 +
** MapQuest (weltweit): http://open.mapquestapi.com/xapi/api/0.6/*%5Btourism=zoo%5D%5Bbbox=5.943,45.935,10.612,47.731%5D
 +
** (J)XAPI Frontend 0.2 [http://openstreetmap.us/uixapi/xapi.html XAPI Helper Webtool on openstreetmap.us]
  
Siehe http://www.gis.hsr.ch/wiki/XAPI
+
Defunct/unusable:
 +
* 'Offizieller' Service: [http://wiki.openstreetmap.org/wiki/Xapi xapi.openstreetmap.org] (''NOTE: the original service and the software and hardware behind most OSM XAPI servers are instable and often offline''):
 +
* http://xapi.openstreetmap.org/api/0.6/*%tourism=zoo%5D%5Bbbox=5.943,45.935,10.612,47.731%5D
 +
* http://xapi.spline.de/api/0.6/*%5Btourism=zoo%5D%5Bbbox=5.943,45.935,10.612,47.731%5D
  
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 ":".
+
== XAPI Projekte ==
 +
# Projekt 'XAPI - The original': Mumps und GT.M (no comment...!?!)
 +
# Projekt '[http://wiki.openstreetmap.org/wiki/Xapi#Java JXAPI]': [https://github.com/iandees/xapi-servlet Source] - Reimplementation als Java Servlet mit PostgreSQL by Ian Dees => [https://github.com/iandees/xapi-servlet XAPI-Servlet]
 +
# Projekt '[https://github.com/slomo/osm-spline-xapi osm-spline-xapi]' - Reimplementation in serverside JavaScript mit PostGIS.
 +
# Projekt [[PostGIS-Terminal#XAPI-to-Map|XAPI-to-Map]] (HSR)
 +
# Projekt [http://wiki.openstreetmap.org/wiki/Overpass_API Overpass]
  
Hier einige Tests:
+
== Dokumentation ==
<nowiki>
+
* [http://wiki.openstreetmap.org/wiki/Xapi OSM XAPI]  
* .../api/0.6/node[amenity=*]
+
* Query-Syntax: ANTRL-Syntax [https://github.com/iandees/xapi-antlr/blob/master/src/main/antlr3/com/yellowbkpk/geo/xapi/antlr/XAPI.g], Query-Parser in Python [http://gitorious.org/osm-poi-tools/server/blobs/master/list/views.py]
* .../api/0.6/node[highway=busstop]
+
* JXAPI-Logs (live!): http://jxapi.openstreetmap.org/xapi/admin/stats sowie [http://fsi.spline.de/osm/xapi-access-23-01-2011.log.bz2 Log-Backup von XAPI] (unbestätigter Herkunft).
* .../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]
 
</nowiki>
 
 
 
Hier konkrete, laufende Beispiele:
 
* http://xapi.spline.de/api/0.6/node[amenity=*]
 
* http://open.mapquestapi.com/xapi/api/0.6/node[operator=Stadtverkehr Lübeck]
 
* http://open.mapquestapi.com/xapi/api/0.6/node[ref:svhl=*]
 
  
Logs:
+
== Beispiele ==
* http://jxapi.openstreetmap.org/xapi/admin/stats und log http://fsi.spline.de/osm/xapi-access-23-01-2011.log.bz2
 
  
XAPI => SQL:
+
Beliebt:
* gemäss osm2pgsql-Schema
+
* Alle Zoos der Schweiz: http://jxapi.openstreetmap.org/xapi/api/0.6/node[tourism=zoo][bbox=5.9436,45.9358,10.6127,47.7319]
* Original wäre das OSM 'pgsnapshot_schema_0.6'
+
* Knie's Kinderzoo: http://jxapi.openstreetmap.org/xapi/api/0.6/*[name=Knie's Kinderzoo]
** [http://trac.openstreetmap.org/browser/applications/utils/osmosis/trunk/package/script/pgsnapshot_schema_0.6.sql]
 
** Siehe dazu https://github.com/osm-spline/xapi/blob/master/sql/sampleRequests.sql
 
  
Beispiel:
+
Häufige Anfragen gemäss Logs:
  .../api/0.6/node[tourism=zoo][bbox=6.2,46.1,10.0,47.6]
+
* *[amenity=*]
 +
* *[highway=bus_stop]
 +
* *[shop=*]
 +
* *[tourism=*]
 +
* node[railway=station]
 +
* relation[type=restriction]
  
   SELECT ST_AsText(way) geom, name label
+
<tt>
   FROM osm_point
+
  Use e.g. http://osm.xiala.net:8080/xapi/api/0.6 for a <xapi_service_url>:
   WHERE hstore(tags)->'tourism'='zoo'
+
   <xapi_service_url>/node[tourism=zoo]
   AND ST_Contains(ST_Transform(ST_SetSRID('BOX(6.2 46.1, 10.0 47.6)'::box2d, 4326),900913),way)
+
  <xapi_service_url>/*[highway=bus_stop][bbox=5.943,45.935,10.612,47.731]
 +
  <xapi_service_url>/node[amenity=hospital]
 +
   <xapi_service_url>/node[natural=peak]
 +
   <xapi_service_url>/*[power_source=nuclear]
 +
   <xapi_service_url>/node[amenity=*][bbox=5.943,45.935,10.612,47.731]
 +
  <xapi_service_url>/*[seamark:type=signal_station_warning]
 +
  <xapi_service_url>/*[amenity=*][bbox=8.420,47.072,9.088,47.431]
 +
  <xapi_service_url>/*[shop=*][bbox=8.420,47.072,9.088,47.431]
 +
  <xapi_service_url>/*[tourism=*][bbox=8.420,47.072,9.088,47.431]
 +
  <xapi_service_url>/node[railway=station][bbox=8.420,47.072,9.088,47.431]
 +
  <xapi_service_url>/relation[type=restriction][bbox=8.420,47.072,9.088,47.431]
 +
</tt>

Aktuelle Version vom 17. Dezember 2012, 03:34 Uhr

XAPI ('zappy') X API zur OpenStreetMap-Datenbank. Ein Webservice mit einfachen Query-Möglichkeiten, der eine OSM XML-Datei zurückgibt. Recht beliebter OSM-Webservice aber immer wieder überlastet.

Siehe auch:


XAPI Services

Laufende XAPI-Beispiele mit Webservices der HSR:

Laufende XAPI-Beispiele mit Webservices:

Defunct/unusable:

XAPI Projekte

  1. Projekt 'XAPI - The original': Mumps und GT.M (no comment...!?!)
  2. Projekt 'JXAPI': Source - Reimplementation als Java Servlet mit PostgreSQL by Ian Dees => XAPI-Servlet
  3. Projekt 'osm-spline-xapi' - Reimplementation in serverside JavaScript mit PostGIS.
  4. Projekt XAPI-to-Map (HSR)
  5. Projekt Overpass

Dokumentation

Beispiele

Beliebt:

Häufige Anfragen gemäss Logs:

  • *[amenity=*]
  • *[highway=bus_stop]
  • *[shop=*]
  • *[tourism=*]
  • node[railway=station]
  • relation[type=restriction]

 Use e.g. http://osm.xiala.net:8080/xapi/api/0.6 for a <xapi_service_url>:
 <xapi_service_url>/node[tourism=zoo]
 <xapi_service_url>/*[highway=bus_stop][bbox=5.943,45.935,10.612,47.731]
 <xapi_service_url>/node[amenity=hospital]
 <xapi_service_url>/node[natural=peak]
 <xapi_service_url>/*[power_source=nuclear]
 <xapi_service_url>/node[amenity=*][bbox=5.943,45.935,10.612,47.731] 
 <xapi_service_url>/*[seamark:type=signal_station_warning]
 <xapi_service_url>/*[amenity=*][bbox=8.420,47.072,9.088,47.431]
 <xapi_service_url>/*[shop=*][bbox=8.420,47.072,9.088,47.431]
 <xapi_service_url>/*[tourism=*][bbox=8.420,47.072,9.088,47.431]
 <xapi_service_url>/node[railway=station][bbox=8.420,47.072,9.088,47.431]
 <xapi_service_url>/relation[type=restriction][bbox=8.420,47.072,9.088,47.431]