Skip to content

Set of transformations for turning an RDF dataset with traffic data into a GeoSPARQL compliant dataset

Notifications You must be signed in to change notification settings

mjovanovik/TrafficData-to-GeoSPARQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TrafficData-to-GeoSPARQL

This project represents a set of SPARQL-based transformation which turn an RDF dataset with traffic data (from the TomTom synthetic traces generator) into a GeoSPARQL compliant dataset.

Data Structure

The original RDF dataset has Trace entities, which consist of Point entities. Each Point has a latitude value, a longitude value, a timestamp and a Speed entity. The Speed entity has a velocity value and a metric.

Trace Transformations

Each Trace is enhanced to represent a geo:Feature entity, which has a geo:hasGeometry relation with a geometry entity specified as a sf:LineString entity. The sf:LineString entity has a geo:asWKT relation to a geo:wktLiteral value, which represents the entire Trace as a GeoSPARQL LINESTRING.

Point Transformations

Each Point is enhanced to represent a geo:Feature entity, which has a geo:hasGeometry relation with a geometry entity specified as a sf:Point entity. The sf:Point entity has a geo:asWKT relation to a geo:wktLiteral value, which represents the Point as a GeoSPARQL POINT.

Additional Transformations

To support specific use-cases as part of our SAGE Project, we add several additional transformations, which do not necessarily relate to GeoSPARQL:

  • Adding a numerical ID to each trace, via a new property: traces:numID;
  • Adding an explicit relation between a Trace and its start and end points, via new properties: traces:hasStartPoint and traces:hasEndPoint, respectively;
  • Adding an explicit relation between a Trace and its calculated duration, in seconds, via a new property: traces:hasDuration;

Variables

The queries denote the named graph as <myGraphIRI>, which should be replaced with the actual graph IRI you want to use the enhancement queries on.

Use-Cases

Example 1: Find all vehicle traces started within a specified time period and select their respective WKT LINESTRING values, to be drawn on the map. Additionally, select the duration of each such trace, and calculate the distance between the starting point and the ending point of the trace.

Example 2: Find all vehicle traces which have a given map region as a destination. The query selects all traces which satisfy the constraints, gets their WKT LINESTRING values, their duration and calculates the distance between the starting point and the ending point of the trace.

About

Set of transformations for turning an RDF dataset with traffic data into a GeoSPARQL compliant dataset

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published