Starting from the OSM data and the KM4City Ontology (http://www.disit.org/km4city/schema), the Graph is created. In this document some details are described.
A road network is a directed graph composed by arcs that meet at some nodes, corresponding to road junctions. The urban roads’ characteristics are stored in the OpenStreetMap database, for example:
- road type https://wiki.openstreetmap.org/wiki/Key:highway
- road lanes https://wiki.openstreetmap.org/wiki/Key:lanes
- etc.
Each road admits an initial node and an end node in order to determine the corresponding directed arc in the graph. In the following we consider an example.
Road 1 (labelled with OS00030031299SR, in OSM: https://www.openstreetmap.org/way/30031299):
Road 2 (labelled with OS00026943048SR):
Road 3 (labelled with OS00205385722SR):
Road 4 (labelled with OS00509328804SR):
Listing the previous road-segments with their initial (nodeA, see the following table) and end node (nodeB, see the following table), the related road junction J (labelled with OS00330684306NO) is implicitly determined by means of the corresponding incoming and outcoming road-segments. In particular, the incoming road-segments in the road junction J are the road-segments having J as their end node, while the outcoming road-segments in the road junction J are the road-segments having J as their initial node (road details can be found in roadDetails.xlsx file coming from the ingestion process).
nodeA |
segment |
length |
road |
nodeB |
OS01344583128NO |
OS00030031299RE/4 |
4 |
OS00030031299SR |
OS00330684306NO |
OS00295213650NO |
OS00026943048RE/5 |
8 |
OS00026943048SR |
OS00330684306NO |
OS00330684306NO |
OS00205385722RE/0 |
29 |
OS00205385722SR |
OS04985765666NO |
OS00330684306NO |
OS00509328804RE/0 |
3 |
OS00509328804SR |
OS05200009916NO |
Road Junction node (labelled with OS00330684306NO):
Moreover, further relations can be considered at the given junction (for example, representing the related turn restriction https://wiki.openstreetmap.org/wiki/Relation:restriction). In the example, no_right_turn restriction from road-segment labelled with 26943048 to road-segment labelled with 205385772 is considered.
node |
from |
to |
restriction |
OS00330684306NO |
OS00026943048RE/5 |
OS00205385722RE/0 |
no_right_turn |
Mapping KM4city - OSM
The following aspects are at the basis of the street path description:
- roads type (motorway, trunk, primary, secondary, tertiary, unclassified, residential, service),
- number of roads lanes,
- maximum flux permitted in the roads
- turn restrictions
- restricted traffic zone
- speed limit
- roads access restriction
- bidirectional traffic roads
- presence of designated lanes for public transport
In the following table it is possible to find the relation of these aspects with the Open Street Map Model
KM4City - Traffic model |
OSM Model |
Relevance |
road type (motorway, trunk, primary, secondary, tertiary, unclassified, residential, service) |
https://wiki.openstreetmap.org/wiki/Key:highway
|
high |
roads lanes (number) |
high |
|
presence of designated lanes for public transport
|
https://wiki.openstreetmap.org/wiki/Key:lanes public service vehicles (PSV) (eg: Bus lanes, ) |
medium |
maximum flux permitted in the roads
|
|
low (it is deduced by the traffic flow model from the road lanes) |
turn restrictions
|
high |
|
restricted traffic zone
|
Ask to municipality (shape fiel or path) |
high |
speed limit
|
high |
|
roads access restriction
|
High, if the restrictions are present in the roads (only for pedestrian, only for bikes, etc.) |
|
bidirectional traffic roads
|
high (if the street is open in only one direction) |
Crossing Roads in Km4city Knowledge Base
nodeA |
g1 |
segment |
length |
dir |
road |
nodeB |
g2 |
nALat |
nALong |
nBLat |
nBLong |
type |
elemType |
total_lanes |
designated_lanes |
forward_lanes |
designated_forward_lanes |
backward_lanes |
designated_backward_lanes |
OS01344583128NO |
POINT(11.271626472473 43.763538360596) |
OS00030031299RE/4 |
4 |
tratto stradale aperto nella direzione positiva (da giunzione NOD_INI a giunzione NOD_FIN) |
OS00030031299SR |
OS00330684306NO |
POINT(11.271666526794 43.763565063477) |
43,763538 |
11,27162647 |
43,76356506 |
11,27166653 |
primary |
di tronco carreggiata |
2 |
|
|
|
|
|
OS00295213650NO |
POINT(11.271677017212 43.763496398926) |
OS00026943048RE/5 |
8 |
tratto stradale aperto nella direzione positiva (da giunzione NOD_INI a giunzione NOD_FIN) |
OS00026943048SR |
OS00330684306NO |
POINT(11.271666526794 43.763565063477) |
43,763496 |
11,27167702 |
43,76356506 |
11,27166653 |
primary |
di tronco carreggiata |
2 |
|
|
|
|
|
OS00330684306NO |
POINT(11.271666526794 43.763565063477) |
OS00205385722RE/0 |
29 |
tratto stradale aperto nella direzione positiva (da giunzione NOD_INI a giunzione NOD_FIN) |
OS00205385722SR |
OS04985765666NO |
POINT(11.27202129364 43.76354598999) |
43,763565 |
11,27166653 |
43,76354599 |
11,27202129 |
tertiary |
di tronco carreggiata |
1 |
|
|
|
|
|
OS00330684306NO |
POINT(11.271666526794 43.763565063477) |
OS00509328804RE/0 |
3 |
tratto stradale aperto nella direzione positiva (da giunzione NOD_INI a giunzione NOD_FIN) |
OS00509328804SR |
OS05200009916NO |
POINT(11.271676063538 43.763584136963) |
43,763565 |
11,27166653 |
43,76358414 |
11,27167606 |
primary |
di tronco carreggiata |
2 |
|
|
|
|
|
Mapping in KM4City ontology (http://www.disit.org/km4city/schema) |
|
Columns (referred to the previous table ) |
|
nodeA |
dct:identifier of km4c:Node |
g1 |
geo:geometry of km4c:Node |
segment |
dct:identifier of km4c:RoadElement |
length |
km4c:length of km4c:RoadElement |
dir |
km4c:trafficDir of km4c:RoadElement |
road |
dct:identifier of km4c:Road |
nodeB |
dct:identifier of km4c:Node |
g2 |
geo:geometry of km4c:Node |
nALat |
geo:lat of km4c:Node |
nALong |
geo:long of km4c:Node |
nBLat |
geo:lat of km4c:Node |
nBLong |
geo:long of km4c:Node |
type |
km4c:highwayType of km4c:RoadElement |
elemType |
km4c:elementType of km4c:RoadElement |
total_lanes |
km4c:RoadElement -- km4c:lanes --> km4c:Lanes -- km4c:lanesCount --> km4c:LanesCount -- sum values on km4c:* properties, each of which takes its name to a type of vehicle or user category (e.g. km4c:taxy, km4c:emergency, km4c:psv, …, and km4c:undesignated for those lanes that can be traversed by any vehicle/user category) --> total_lanes |
designated_lanes |
See the mapping for total_lanes, but exclude the value of km4c:undesignated from the count |
forward_lanes |
km4c:RoadElement -- km4c:lanes --> km4c:Lanes -- discard km4c:Lane resources that have km4c:direction set to something other than "forward" --> km4c:Lanes of your interest -- km4c:lanesCount --> km4c:LanesCount -- sum values on km4c:* properties, each of which takes its name to a type of vehicle or user category (e.g. km4c:taxy, km4c:emergency, km4c:psv, …, and km4c:undesignated for those lanes that can be traversed by any vehicle/user category) --> total_lanes |
designated_forward_lanes |
See the mapping for forward_lanes, and also exclude the value of km4c:undesignated from the count |
backward_lanes |
km4c:RoadElement -- km4c:lanes --> km4c:Lanes -- discard km4c:Lane resources that have km4c:direction set to something other than "backward" --> km4c:Lanes of your interest -- km4c:lanesCount --> km4c:LanesCount -- sum values on km4c:* properties, each of which takes its name to a type of vehicle or user category (e.g. km4c:taxy, km4c:emergency, km4c:psv, …, and km4c:undesignated for those lanes that can be traversed by any vehicle/user category) --> total_lanes |
designated_backward_lanes |
See the mapping for backward_lanes, and also exclude the value of km4c:undesignated from the count |
Relations of interest |
|
km4c:Road resources are linked to segments of road (each represented through a km4c:RoadElement resource) through the km4c:containsElement property |
|
each km4c:RoadElement resource is linked to the km4c:Node resource that represents the point where the road element starts, through the km4c:startsAtNode property |
|
each km4c:RoadElement resource is linked to the km4c:Node resource that represents the point where the road element ends, through the km4c:endsAtNode property |
|
|
|
Namespaces of interest: |
|
Prefix |
Namespace |
km4c |
|
dct |
|
geo |