GtfsStop
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/#stopstxt
It represents a GTFS stop which location_type shall be equal to 0.
Data Model
The data model is defined as shown below:
-
id: Entity ID- It shall be
urn:ngsi-ld:GtfsStop:<stop_identifier>beingstop_identifiera value that can derived from the GTFSstop_idfield.
- It shall be
-
type: Entity Type- It shall be equal to
GtfsStop
- 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.
-
name: Same as GTFSstop_name. -
code: Same as GTFSstop_code.- Attribute type: Property. Text
- Optional
-
page: Same as GTFSstop_url.- Attribute type: Property. URL
- Optional
-
description: Same as GTFSstop_desc.- Attribute type: Property. Text
- Normative References:
https://uri.etsi.org/ngsi-ld/descriptionequivalent to description - Optional
-
location: Stop's location encoded as GeoJSON Point which coordinates shall be in the form [stop_long,stop_lat].- Attribute type: GeoProperty.
geo:json. - Normative References: rfc7946
- Mandatory
- Attribute type: GeoProperty.
-
wheelChairAccessible: Same as GTFSwheelchair_boarding. -
zoneCode: Transport zone to which this stop belongs to. Same as GTFSzone_id.- Attribute type: Property. Text
- Optional
-
address: Stop's civic address.- Attribute type: Property. PostalAddress
- Optional
-
hasParentStation: Same as GTFSparent_station.- Attribute type: Relationship. It shall point to an Entity of Type GtfsStation
- Optional
-
operatedBy: Agency that operates this stop.- Attribute type: List of Relationships. They shall point to an Entity of Type GtfsAgency
- Optional
Examples
Normalized Example
Normalized NGSI response
{
"id": "urn:ngsi-ld:GtfsStop:Malaga_101",
"type": "GtfsStop",
"code": {
"value": "101"
},
"operatedBy": {
"type": "Relationship",
"value": "urn:ngsi-ld:GtfsAgency:Malaga_EMT"
},
"location": {
"type": "geo:json",
"value": {
"type": "Point",
"coordinates": [-4.424393, 36.716872]
}
},
"name": {
"value": "Alameda Principal Sur"
}
}
key-value pairs Example
Sample uses simplified representation for data consumers ?options=keyValues
{
"id": "urn:ngsi-ld:GtfsStop:Malaga_101",
"type": "GtfsStop",
"code": "101",
"name": "Alameda Principal (Sur)",
"location": {
"type": "Point",
"coordinates": [-4.424393, 36.716872]
},
"operatedBy": "urn:ngsi-ld:GtfsAgency:Malaga_EMT"
}
LD Example
Sample uses the NGSI-LD representation
{
"id": "urn:ngsi-ld:GtfsStop:Malaga_101",
"type": "GtfsStop",
"code": {
"type": "Property",
"value": "101"
},
"operatedBy": {
"type": "Relationship",
"object": "urn:ngsi-ld:GtfsAgency:Malaga_EMT"
},
"location": {
"type": "GeoProperty",
"value": {
"type": "Point",
"coordinates": [-4.424393, 36.716872]
}
},
"name": {
"type": "Property",
"value": "Alameda Principal Sur"
},
"@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 |
|---|---|---|---|
stop_name |
name |
foaf:name |
|
stop_code |
code |
gtfs:code |
|
stop_url |
page |
foaf:page |
|
stop_desc |
description |
dct:description |
|
stop_long,stop_lat |
location |
geo:long,geo:lat |
Encoded as a GeoJSON Point. |
zone_id |
zoneCode |
||
wheelchair_boarding |
wheelChairAccessible |
gtfs:wheelChairAccessible |
0, 1, 2 as per GTFS spec. |
address |
Stop's address. Schema.org |
Relationships
| GTFS Field | NGSI Attribute | LinkedGTFS | Comment |
|---|---|---|---|
parent_station |
hasParentStation |
gtfs:parentStation |
Shall point to another Entity of Type GtfsStation |
operatedBy |
Shall point to another Entity of Type GtfsAgency |