Figure 8 shows an example of how to instantiate the SAREF4CITY extension of SAREF. This example shows the use of different patterns included in the SAREF4CITY ontology. First of all, a camera (ex:Camera1) measures the speed of a car (ex:Car35) in the information attached to the individual ex:Camera1Measurement200, which provides a value of 35 Km/hour. The position of the car at that moment is captured by the instance ex:CarLocation2018-11-20T13-30-00 with points to the geographical coordinates in which the car is located and also to the road segment in which it is included. It can be observed that such road segment might contain (see property geo:sf:Contains) other city objects such as a lamppost or a building.
The KPI pattern is also instantiated in the example. The instance ex:RoadSegment50Congestion2018-11-20T13-30-00 refer to the value (70 %) of the road congestion on the 2018-11-20 at 13:20. Such value is assessed by the public administration ex:City4. In the calculation of such value the speed of the cars (ex:CarsSpeed2018-11-20), the pollution (ex:Polution2018-11-20) and the GMaps API (ex:GMapsAPI2018-11-20) values have been taken into account as it can be observed from the s4city:isDerivedFrom property between the KPI value and the different saref:Observation instances.
In the example the event ex:BasketMatch23, as sub event of the ex:BasketWeek2018, is described. It can be seen that the match is accessible by metro, is organized by ex:City4 and takes place at the facility ex:BasketArena7. Finally, some examples of public services are shown. One service example is the ex:HealthService123 that involves the facility ex:BasketArena7 and is available in Spanish. Such service is available in area ex:Neighbourhood34 that is contained in ex:City4, which is the service provider organization. In addition, another service, ex:BusService33, is provided by another organization, in this case ex:TransportCo.