gtfs:Service

Description

It represents a transportation service which is available for one or more routes at certain dates.

Data Model

The data model is defined as shown below:

  • id: Entity ID

    • It shall be urn:ngsi-ld:gtfs:Service:<service_identifier>. It can be derived from the service_id field of trips.txt and/or calendar.txt
  • type: Entity Type

    • It shall be equal to gtfs:Service
  • 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: Service name.

    • Attribute type: Property. Text
    • Mandatory
  • description: Service description.

    • Attribute type: Property. Text
    • Optional
  • operatedBy: Agency that operates this service.

    • Attribute type: Relationship. It shall point to an Entity of Type gtfs:Agency
    • Mandatory

Examples

Normalized Example

Normalized NGSI response

{
    "id": "urn:ngsi-ld:Service:Malaga:LAB",
    "type": "gtfs:Service",
    "operatedBy": {
        "type": "Relationship",
        "value": "urn:ngsi-ld:gtfs:Agency:Malaga_EMT"
    },
    "name": {
        "value": "LAB"
    },
    "description": {
        "value": "Laborables"
    }
}

key-value pairs Example

Sample uses simplified representation for data consumers ?options=keyValues

{
    "id": "urn:ngsi-ld:Service:Malaga:LAB",
    "type": "gtfs:Service",
    "name": "LAB",
    "description": "Laborables",
    "operatedBy": "urn:ngsi-ld:gtfs:Agency:Malaga_EMT"
}

Summary of mappings to GTFS

Properties

GTFS Field NGSI Attribute LinkedGTFS Comment
name schema:name
description schema:description

Relationships

GTFS Field NGSI Attribute LinkedGTFS Comment
operatedBy gtfs:agency Shall point to another Entity of Type gtfs:Agency

Open issues