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
  • 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 of use 1 (Normalized Format)

{
    "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"
    }
}

Examples of use 2 (?options=keyValues simplified representation for data consumers)

{
    "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