GtfsStopTime
This repository is now archived and subsequent works will be carried out the in Smart data models repositories.
Description
See https://developers.google.com/transit/gtfs/reference/#stop_timestxt
Data Model
The data model is defined as shown below:
-
id: Entity ID.- It shall be
urn:ngsi-ld:GtfsStopTime:<stop_time_identifier>beingstop_time_identifiera value that can be derived from GTFStrip_idandstop_id.
- It shall be
-
type: Entity type.- It shall be equal to
GtfsStopTime.
- It shall be equal to
-
source: A sequence of characters giving the source of the entity data. -
dataProvider: Specifies the URL to information about the provider of this information- Attribute type: Property. URL
- Optional
-
dateCreated: Entity's creation timestamp.- Attribute type: Property. DateTime
- Read-Only. Automatically generated.
-
dateModified: Last update timestamp of this Entity.- Attribute type: Property. DateTime
- Read-Only. Automatically generated.
-
hasTrip: Same as GTFStrip_id.- Attribute type: Relationship. It shall point to an Entity of type GtfsTrip
- Mandatory
-
hasStop: Same as GTFSstop_id- Attribute type: Relationship. It shall point to an Entity of type GtfsStop
- Mandatory
-
arrivalTime: Same as GTFSarrival_time- Attribute type: Property. Text.
- Mandatory
-
departureTime: Same as GTFSdeparture_time- Attribute type: Property. Text.
- Mandatory
-
stopSequence: Same as GTFSstop_sequence- Attribute type: Property. Integer starting
with
1. - Mandatory
- Attribute type: Property. Integer starting
with
-
stopHeadsign: Same as GTFSstop_headsign- Attribute type: Property. Text.
- Optional
-
pickupType: Same as GTFSpickup_type.- Attribute type: Property. Text.
- Optional
-
dropOffType: Same as GTFSdrop_off_type- Attribute type: Property. Text
- Optional
-
distanceTravelled: Same as GTFSshape_dist_traveled.- Attribute type: Property. Number
- Optional
-
timepoint: Same as GTFStimepoint.- Attribute type: Property. Text
- Optional
Examples
Normalized Example
Normalized NGSI response
{
"id": "urn:ngsi-ld:GtfsStopTime:Spain:Madrid:EMT:FE0010011_737",
"type": "GtfsStopTime",
"departureTime": {
"value": "07:04:24"
},
"hasTrip": {
"type": "Relationship",
"value": "urn:ngsi-ld:GtfsTrip:Madrid:EMT:FE0010011"
},
"stopSequence": {
"value": 4
},
"distanceTravelled": {
"value": 759
},
"arrivalTime": {
"value": "07:04:24"
},
"hasStop": {
"type": "Relationship",
"value": "urn:ngsi-ld:GtfsStop:Madrid:EMT:737"
}
}
key-value pairs Example
Sample uses simplified representation for data consumers ?options=keyValues
{
"id": "urn:ngsi-ld:GtfsStopTime:Spain:Madrid:EMT:FE0010011_737",
"type": "GtfsStopTime",
"hasStop": "urn:ngsi-ld:GtfsStop:Madrid:EMT:737",
"hasTrip": "urn:ngsi-ld:GtfsTrip:Madrid:EMT:FE0010011",
"distanceTravelled": 759,
"stopSequence": 4,
"arrivalTime": "07:04:24",
"departureTime": "07:04:24"
}
LD Example
Sample uses the NGSI-LD representation
{
"id": "urn:ngsi-ld:GtfsStopTime:Spain:Madrid:EMT:FE0010011_737",
"type": "GtfsStopTime",
"departureTime": {
"type": "Property",
"value": "07:04:24"
},
"hasTrip": {
"type": "Relationship",
"object": "urn:ngsi-ld:GtfsTrip:Madrid:EMT:FE0010011"
},
"stopSequence": {
"type": "Property",
"value": 4
},
"distanceTravelled": {
"type": "Property",
"value": 759
},
"arrivalTime": {
"type": "Property",
"value": "07:04:24"
},
"hasStop": {
"type": "Relationship",
"object": "urn:ngsi-ld:GtfsStop:Madrid:EMT:737"
},
"@context": [
"https://schema.lab.fiware.org/ld/context",
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld"
]
}
Summary of mappings to GTFS
Properties
| GTFS Field | NGSI Attribute | LinkedGTFS | Comment |
|---|---|---|---|
arrival_time |
arrivalTime |
gtfs:arrivalTime |
|
departure_time |
departureTime |
gtfs:departureTime |
|
stop_sequence |
stopSequence |
gtfs:stopSequence |
|
stop_headsign |
stopHeadsign |
gtfs:headsign |
|
pickup_type |
pickupType |
gtfs:pickupType |
|
drop_off_type |
dropOffType |
gtfs:dropOffType |
|
shape_dist_travelled |
distanceTravelled |
gtfs:distanceTravelled |
Relationships
| GTFS Field | NGSI Attribute | LinkedGTFS | Comment |
|---|---|---|---|
trip_id |
hasTrip |
gtfs:trip |
|
stop_id |
hasStop |
gtfs:stop |