# Semantic Traffic Sensor Data:
## 4 Data Annotation and Publishing
### Identification of Relevant Concepts and Properties  
As reported in Section 2.2 an extensive research looking for already-existing traffic-related ontologies and vocabularies has been undertaken. At the end of this process, some of these ontologies have been selected to annotate the traffic concepts. Since no single ontology fits our needs perfectly, a combination of concepts defined in different ontologies has been used. Moreover, in some cases, it was necessary to create new classes and properties, since the available definitions were not suitable. For the \"sensor_traffic\" entity type, described in Section 3.2.2 and depicted in Figure 3, some definitions of the Km4 City ontology have been used to annotate the content of this table. In particular, the class _km4c:SensorSite (Traffic Sensor)_ is used to identify the sensor capable of observing the traffic and the speed of the vehicles, the property _km4c:hasGeometry_ to specify the point where the sensor is located, the class _km4c:Road_ with the property _km4c:placedOnRoad_ to refer to the name of the road where the sensor is located, the property _km4c:type_ to identify the type of the traffic sensor, and the property _km4c:direction_ for the direction of the vehicles counted by the sensor. It is important to specify that, to better link our data, all the streets present in our database are transformed into instances of the class _km4c:Road_ giving them a URI that is, simply, the concatenation of the strings _[[https://trafair.eu_](https://trafair.eu_)]([https://trafair.eu_](https://trafair.eu_)) and the street name. In addition, the Basic Geo (WGS84 lat/long) Vocabulary [68] has  
Figure 4: Overview of the mappings and tools used for data annotation and publishing. The credit of some images used has to be accredited to the creators of the software mentioned and used here for illustration purposes, others are freely available images extracted from Pixabay. The logo of Virtuoso has been extracted from [[https://commons.wikimedia.org/wiki/File:Virtuoso-logo-sm.png](https://commons.wikimedia.org/wiki/File:Virtuoso-logo-sm.png)]([https://commons.wikimedia.org/wiki/File:Virtuoso-logo-sm.png](https://commons.wikimedia.org/wiki/File:Virtuoso-logo-sm.png)), contributed by [PERSON]. been used to represent the latitude (_geo:lat_) and the longitude (_geo:long_) of the above mentioned point. The Basic Geo Vocabulary is a basic RDF vocabulary that provides the Semantic Web community with a namespace for representing the latitude, longitude, and other information about spatially-located entities, using WGS84 as the reference datum. Furthermore, the Linked Geo Data ontology has been exploited to transform the \"road_section\" attribute of the \"sensor_traffic\" table into linked data, since this attribute contains the identification number of a way in OSM and the Linked Geo Data ontology makes the information collected by the OSM project available as an RDF knowledge base according to the Linked Data principles [12]. In Linked Geo Data, the ways of OSM are dereferenceable objects at the link [[http://linkedgeodata.org/triplify/wayOSMID](http://linkedgeodata.org/triplify/wayOSMID)]([http://linkedgeodata.org/triplify/wayOSMID](http://linkedgeodata.org/triplify/wayOSMID)), where _OSMID_ is the identifier of the way. The content of the \"road_section\" attribute has been concatenated to the link [[http://linkedgeodata.org/triplify/way](http://linkedgeodata.org/triplify/way)]([http://linkedgeodata.org/triplify/way](http://linkedgeodata.org/triplify/way)); therefore, if the value of the \"road_section\" attribute is \"387989963\", then it becomes [[http://linkedgeodata.org/triplify/way387989963](http://linkedgeodata.org/triplify/way387989963)]([http://linkedgeodata.org/triplify/way387989963](http://linkedgeodata.org/triplify/way387989963)), which is a dereferenceable object in the Linked Geo Data Knowledge Base [64].