Info |
---|
Links:
https://private-api.gipod.vlaanderen.be/api/v1/ldes/mobility-hindrances
https://w3id.org/ldes/specification
https://private-api.gipod.vlaanderen.be/swagger/index.html
https://github.com/TREEcg/event-stream-client/tree/main/packages/actor-init-ldes-client
https://private-api.gipod.vlaanderen.be/api/v1/taxonomies/mobility-hindrance/consequencetypes |
What does a mobility hindrance look like?
The mobility hindrance data model is part of a Flemish data standard, called Inname Openbaar Domein (scroll to Mobiliteitshinder, to discover the properties of a mobility hindrance). GIPOD used this model as their base model, but extended it to their needs (implementation model).
According to the LDES specification, each LDES should link to or include a Shapes Constaint Language (SHACL) shape. A SHACL shape can be defined as a technical contract to describe that shape of data.
The LDES of mobility hindrances
The LDES accepts a query string parameter, called generatedAtTime, allowing users to specify a datetime, a point in time, indicating how far back in time they want to go to synchronize. The query string parameter is also part of the mobility hindrance data model, and indicates the time the event was inserted in the database.
Furthermore, as there are too many mobility hindrance objects to display on 1 page, we applied a time-based fragmentation, that resulted in fragments containing 250 mobility hindrance objects and links to previous and next pages. This time-based fragmentation means that the oldest mobility hindrance objects (the ones with the earliest generatedAtTime values), will be on the first fragment, while the most recent mobility hindrance objects will be on the latest fragment. So, entering the LDES URL without a query string in the browser or the LDES client, you will be redirected to the fragment containing the oldest mobility hindrance objects (objects with the earliest generatedAtTime values). Passing the current time as value of the generatedAtTime query string will redirect you to the latest fragment (containing the most recent mobility hindrace objects, the ones with the latest generatedAtTime values).
How to consume the mobility hindrance LDES?
In order to consume an LDES, there is an LDES client needed. We will explain how the hindrance objects can be consumed as JSON objects with Javascript.
...
Code Block |
---|
Gipod ID: 10031313 Description: my description Time period: 2020-12-05T00:00:00Z - 2020-12-06T00:00:00Z Status: Onbekend WKT geometry: POLYGON ((105277.37359766 191627.39540625, 103741.37359766 197387.39540625, 99901.37359766 193547.39540625, 100797.37359766 189707.39540625, 105277.37359766 191627.39 540625)) Consequence: Geen doorgang voor gemotoriseerd verkeer |
Restarting
In the script test.js, we also pause the stream after 50 minutes. This can be configured with the TIMEOUT property:
...