Diese Webseite verwendet Cookies

Wir verwenden Cookies, um das Nutzungserlebnis zu verbessern. Wählen Sie aus, welche Cookies Sie uns erlauben. Weitere Informationen zu unseren Cookie-Richtlinien finden Sie in unseren Datenschutzbestimmungen.
Zurück
» Die Architektur der OSM History Analytics platform ohsome kurz erklärt
24.05.2018 Alexander Zipf

Die Architektur der OSM History Analytics platform ohsome kurz erklärt

Vor kurzem haben wir die ohsome Plattform für OSM History Analytics vorgestellt. Jetzt möchten wir Ihnen einen Überblick über die Plattform und die darin enthaltenen Komponenten geben.

Die ohsome Plattform basiert auf einer dreischichtigen API-Architektur, bei der sowohl die Flexibilität als auch die Anwendungskomplexität von oben nach unten zunimmt.

Die drei Ebenen werden auf Englisch erläutert:

Ohsome API

On top we have a web interface called . This allows users to query the OSM history data through a simple REST interface. In addition to this it it can be used to implement specific client applications on the web, e.g. web dashboards, which let you interactively execute analysis of the ohsome API in a graphical and more user friendly way. A first prototype is a OSM analytics , and also a new version of the osm-analytics site will make some use of the ohsome API.

To demonstrate how you can use the ohsome API, look at this example request:

https://api.ohsome.org/v0.9/elements/count/groupBy/boundary? bboxes=Kathmandu:85.2,27.6,85.45,27.8|Pokhara:83.9142,28.1693,84.0775,28.2687& types=way&time=2015-01-01/2017-01-01/P1M& keys=building&values=residential&showMetadata=true

The result of this request is the length of the selected elements for each month: all primary highways in the bounding box named ‘Kathmandu’ given by the coordinates of its corners. The time parameter chooses a time range (2015-01-01/2017-01-01) and requests to aggregate the result monthly (P1M).

The ohsome API is implemented using the OSHDB API, which is one level below of the ohsome API.

OSHDB API

The OSHDB is a Java application that stores and serves the OSM history data. The  that supports parallelisation of the computation based on the MapReduce programming model and, thus, may be run on a multi-instances cluster environment. The OSHDB API is more flexible but at the same time more complex than the ohsome API.

The following code-snippet shows the same example as above as a query to the OSHDB API.

  oshdb.areaOfInterest(new OSHDBBoundingBox(85.2,27.6,85.45,27.8))
    .timestamps("2015-01-01", "2017-01-01", OSHDBTimestamps.Interval.MONTHLY)
    .osmTypes(OSMType.WAY)
    .where("highway", "primary")
    .aggregateByTimestamp()
    .map((OSMEntitySnapshot t) -> Geo.lengthOf(t.getGeometry());
  SortedMap result = oshdb.sum();

OSHDB data layer
On the very bottom of the ohsome platform components stack is the OSHDB data layer. The OSHDB data layer is a specification of how the OSM data is stored, partitioned and indexed for the usage in our OSHDB. This digs deep into the core of our database and its data structures. It will leave you with a maximum of flexibility but also complexity. This is useful if you want to do crazy stuff or are a core programmer of the project.

Forthcoming posts will describe the OSHDB data layer/store format and usage in more detail. Stay tuned for updates and further examples of usage of the ohsome platform!

Verfasst um 10:13 Uhr

» Permalink   

Keine Einträge vorhanden.
Keine Einträge vorhanden.
» Die Architektur der OSM History Analytics platform ohsome kurz erklärt
 
TOP