See https://developers.google.com/transit/gtfs/reference/#frequenciestxt
The data model is defined as shown below:
-
id
: Entity ID.- It shall be
urn:ngsi-ld:GtfsFrequency:<frequency_identifier>
.
- It shall be
-
type
: Entity type.- It shall be equal to
GtfsFrequency
.
- It shall be equal to
-
source
: A sequence of characters giving the source of the entity data.- Attribute type: Text or URL
- Optional
-
dataProvider
: Specifies the URL to information about the provider of this information- Attribute type: URL
- Optional
-
dateCreated
: Entity's creation timestamp.- Attribute type: DateTime
- Read-Only. Automatically generated.
-
dateModified
: Last update timestamp of this Entity.- Attribute type: DateTime
- Read-Only. Automatically generated.
-
name
: Name given to this frequency.- Attribute type: Property. Text
- Optional
-
description
: Description given to this frequency.- Attribute type: Property. Text
- Optional
-
hasTrip
: Trip associated to this Entity.- Attribute type: Relationship. It shall point to an Entity of Type GtfsTrip
- Mandatory
-
startTime
: Same as GTFSstart_time
. See format.- Attribute type: Property. Text.
- Mandatory
-
endTime
: Same as GTFSend_time
. See format.- Attribute type: Property. Text.
- Mandatory
-
headwaySeconds
: Same as GTFSheadway_secs
.- Attribute type: Property. Integer.
- Mandatory
-
exactTimes
: Same as GTFSexact_times
but encoded as a Boolean:false
: Frequency-based trips are not exactly scheduled.true
: Frequency-based trips are exactly scheduled.- Attribute type: Property. Boolean.
- Optional
Normalized NGSI response
{
"id": "urn:ngsi-ld:GtfsFrequency:Malaga:Linea1",
"type": "GtfsFrequency",
"description": {
"value": "Cada 10 minutos"
},
"hasTrip": {
"type": "Relationship",
"value": "urn:ngsi-ld:GtfsTrip:Spain:Malaga:1"
},
"headwaySeconds": {
"value": 600
},
"startTime": {
"value": "07:00:00"
},
"endTime": {
"value": "10:25:00"
},
"name": {
"value": "Laborables"
}
}
Sample uses simplified representation for data consumers ?options=keyValues
{
"id": "urn:ngsi-ld:GtfsFrequency:Malaga:Linea1",
"type": "GtfsFrequency",
"name": "Laborables",
"description": "Cada 10 minutos",
"hasTrip": "urn:ngsi-ld:GtfsTrip:Spain:Malaga:1",
"startTime": "07:00",
"endTime": "10:00",
"headwaySeconds": 600
}
GTFS Field | NGSI Attribute | LinkedGTFS | Comment |
---|---|---|---|
start_time |
startTime |
gtfs:startTime |
|
end_time |
endTime |
gtfs:endTime |
|
headway_secs |
headwaySeconds |
gtfs:headwaySeconds |
|
exact_times |
exactTimes |
gtfs:exactTimes |
|
name |
schema:name |
||
description |
schema:description |
GTFS Field | NGSI Attribute | LinkedGTFS | Comment |
---|---|---|---|
trip_id |
hasTrip |
It shall point to an Entity of Type GtfsTrip |