Hi,

I'm using Pieter Colpaerts script for transforming GTFS public transport
schedule data to RDF, see

https://github.com/OpenTransport/gtfs-csv2rdf/

According to the GTFS specification arrivalTime and departureTime can
have more than 24 hours to represent connections which are technically
on a new day but before the end of the "daily" public transport
schedule. As an example a bus departing at 01:33 would be listed as
25:33:00.

While this makes sense for what GTFS aims to do it's highly inconvenient
for querying the data with SPARQL. When using SPARQL one wants to be
able to use the FILTER keyword to restrict to time ranges for the
particular query. This is in that form not possible as we cannot assign
standard values like xsd:time to it.

As an example I would like to get all departures after 22:00 on that
particular stop/connection.

I wonder what would be needed to implement a new data type for GTFS
datasets with that particular behaviour. In terms of what would be
needed from a Fuseki/SPARQL point of view and is this a good idea or
not? It clearly will break any other SPARQL endpoint which would not
know how to handle this data type but it would not require hacks on
GTFS2RDF side.

I will collect ideas in this issue:

https://github.com/OpenTransport/gtfs-csv2rdf/issues/13

regards

Adrian

Reply via email to