This specification is under heavy development. It is not yet stable.
This is a light-weight Linked Data specification for publishing a tiled road network. It makes use of the general concept of a “Way” that contains “Nodes”. Potential “Relations” indicate whether you are allowed to take a turn or not. It takes the model of OpenStreetMap (OSM). We try stay as close to what's in OSM as possible, we don't validate tags or their values. When a server publishes their road network using this specification, a client can automatically discover this and route over it on the fly.
In order to make it known to a client that these are routable tiles, a client must rely on these hypermedia controls:
{
"@context": {
"tiles": "https://w3id.org/tree/terms#",
"hydra": "http://www.w3.org/ns/hydra/core#",
"osm": "https://w3id.org/openstreetmap/terms#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
"dcterms": "http://purl.org/dc/terms/",
"dcterms:license": {"@type": "@id"},
"hydra:variableRepresentation": {"@type": "@id"},
"hydra:property": {"@type": "@id"},
"osm:nodes": {
"@container": "@list",
"@type": "@id"
},
"osm:members": {
"@container": "@list",
"@type": "@id"
}
},
"@id": "«currentPageURL»",
"tiles:zoom": 14,
"tiles:longitudeTile": 8398,
"tiles:latitudeTile": 5463,
"dcterms:isPartOf": {
"@id": "https://tiles.openplanner.team/planet",
"@type": "hydra:Collection",
"dcterms:license": "http://opendatacommons.org/licenses/odbl/1-0/",
"dcterms:rights": "http://www.openstreetmap.org/copyright",
"hydra:search": {
"@type": "hydra:IriTemplate",
"hydra:template": "https://tiles.openplanner.team/14/{x}/{y}",
"hydra:variableRepresentation": "hydra:BasicRepresentation",
"hydra:mapping": [
{
"@type": "hydra:IriTemplateMapping",
"hydra:variable": "x",
"hydra:property": "tiles:longitudeTile",
"hydra:required": true
},
{
"@type": "hydra:IriTemplateMapping",
"hydra:variable": "y",
"hydra:property": "tiles:latitudeTile",
"hydra:required": true
}
]
}
},
"@graph" : [ ... other data ... ]
}
Each Way, Relation and Node must be identified by an HTTP URI. In each Fragment of data, identified by a URL created with a template as described in Hypermedia Controls, Ways are the first subjects that are taken into account.
Describing a WayA Way must contain the following properties when mentioned in a tile:
Describing Nodes
While Ways are described across tiles, each Node only appears once except nodes that are part of ways crossing tile boundaries. In order to find a full list of Nodes for a Way, a client needs to download more tiles of nodes belonging to a Way.
A Node can also describe restrictions, usually in the form of barriers:
Turn restrictions need to be modeled using a Relation. See the OSM documentation on turn restrictions.
An example
{
"@context" : {
... See top...
}
"@graph": [
{
"@id": "#Way1",
"@type": "osm:Way",
"rdfs:label": "Chaussée de Haecht - Haachtsesteenweg",
"osm:maxspeed": "30",
"osm:highway": "osm:tertiary",
"osm:nodes" : [ "#Node1", "#Node2" ]
},
{
"@id": "#Node1",
"geo:long": 3.14,
"geo:lat": 51.2
},
{
"@id": "#Node2",
"geo:long": 3.12,
"geo:lat": 51.32
"osm:barrier": "osm:bollard"
"osm:foot": "osm:yes"
"osm:bicycle": "osm:yes"
},
{
"@id": "#Node3",
"geo:long": 3.22,
"geo:lat": 51.22
},
{
"@id": "#Way2",
"@type": "osm:Way",
"rdfs:label": "Rue Cornet de Grez - Cornet de Grezstraat",
"osm:highway": "osm:residential",
"osm:oneway": "yes",
"osm:oneway-bicycle": "no",
"osm:highway": "osm:tertiary",
"osm:nodes" : [ "#Node1", "#Node3" ]
},
{
"@id": "#TurnRestriction1",
"@type": "osm:Relation",
"osm:restriction":"osm:no_right_turn",
"osm:members" : [
{
"@id": "#Way1",
"@type": "osm:Way",
"osm:role": "osm:from"
},
{
"@id": "#Way2",
"@type": "osm:Way",
"osm:role": "osm:to"
},
{
"@id": "#Node1",
"@type": "osm:Node",
"osm:role": "osm:via"
}
]
}
]
}
When working on live data, query consistency must be able to be guaranteed by requesting the tiles from a specific moment. In order to access older versions, the Memento protocol must be followed. Older versions can in this way be exposed via the Accept-Datetime header.
The Linked Data from the tiles must be provided in JSON-LD with a content-type application/ld+json.
Other Content-Types may be served using content-negotiation, such as GeoJSON, N-Quads, TriG...
As defined above, we have 3 main classes: osm:Way, osm:Relation and osm:Node.
Propertiesosm:from, osm:to and osm:via are predicates to indicate how a Relation maps Ways and Nodes.
osm:restriction is used to model turn restrictions. There are 9 possibilities as a range:
The property osm:nodes is used to link to an rdf:List of osm:Node items. In one page, multiple lists can be described. If a Way crosses a tile, the other tile also mentioned the border Node in one of its rdf:Lists. The property osm:members is used to link to an rdf:List of osm:Member items.