ArrivalEstimation
This repository is now archived and subsequent works will be carried out the in Smart data models repositories.
Description
This Entity Type captures the estimated arrival time of a public transport vehicle reaching a particular stop, whilst the vehicle is servicing a particular route.
Data Model
The data model is defined as shown below:
-
id
: Entity ID- It shall be
urn:ngsi-ld:gtfs:ArrivalEstimation:<identifier>
.
- It shall be
-
type
: Entity Type- It shall be equal to
ArrivalEstimation
- 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.
-
hasStop
: Stop to which this estimation applies to.- Attribute type: Relationship. It shall point to an Entity of Type GtfsStop
- Mandatory
-
hasTrip
: The trip to which this estimation applies to.- Attribute type: Relationship. It shall point to an Entity of Type GtfsTrip
- Mandatory
-
remainingTime
: It shall contain the remaining time of arrival for the trip heading to the concerned stop. -
remainingDistance
: It shall contain the remaining distance (in meters) of arrival for the trip heading to the concerned stop.- Attribute type: Property. Positive Number. https://schema.org/Number
- Attribute metadata:
timestamp
(mapped toobservedAt
in NGSI-LD). Timestamp of the last attribute update- Type: DateTime
- Mandatory
- Default Unit: Meters
- Optional
-
headSign
: It shall contain the text that appears on a sign that identifies the trip's destination to passengers.- Attribute type: Property. Text
- Mandatory
Examples
Normalized Example
Normalized NGSI response
{
"id": "urn:ngsi-ld:ArrivalEstimation:L5C1_Stop74_1",
"type": "ArrivalEstimation",
"hasTrip": {
"type": "Relationship",
"value": "urn:ngsi-ld:GtfsTrip:tus:5C1"
},
"headSign": {
"value": "Plaza Italia"
},
"remainingTime": {
"value": "PT8M5S"
},
"hasStop": {
"type": "Relationship",
"value": "urn:ngsi-ld:GtfsStop:tus:74"
},
"remainingDistance": {
"value": 1200
}
}
key-value pairs Example
Sample uses simplified representation for data consumers ?options=keyValues
{
"id": "urn:ngsi-ld:ArrivalEstimation:L5C1_Stop74_1",
"type": "ArrivalEstimation",
"hasStop": "urn:ngsi-ld:GtfsStop:tus:74",
"hasTrip": "urn:ngsi-ld:GtfsTrip:tus:5C1",
"remainingTime": "PT8M5S",
"remainingDistance": 1200,
"headSign": "Plaza Italia"
}
LD Example
Sample uses the NGSI-LD representation
{
"id": "urn:ngsi-ld:ArrivalEstimation:L5C1_Stop74_1",
"type": "ArrivalEstimation",
"hasTrip": {
"type": "Relationship",
"object": "urn:ngsi-ld:GtfsTrip:tus:5C1"
},
"headSign": {
"type": "Property",
"value": "Plaza Italia"
},
"remainingTime": {
"type": "Property",
"value": "PT8M5S"
},
"hasStop": {
"type": "Relationship",
"object": "urn:ngsi-ld:GtfsStop:tus:74"
},
"remainingDistance": {
"type": "Property",
"value": 1200
},
"@context": [
"https://schema.lab.fiware.org/ld/context",
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld"
]
}