Release Planning

Chouette SaaS

Shapes

Following the Feature Proposal - Shapes, the Shape management will be integrated in Chouette SaaS with the following preliminary features:

Base Shape Management

The user can list Shapes that are present into the Shape Referential, by default, only Shapes associated to its Workbench.

Each Shape contains:

Associate shapes with data set resources

Each Shape can be associated to one or more data set resources like Journey Patterns.

The user can associate a given Journey Pattern to one of the Shapes :

The user can create a sticky association. In this case, the Shape will keep a reference (by checksum or by identifier) to provide an automatic association with the “same” resource later.

When any Data Set resource associated to a Shape is used in merged or aggregated data sets, the Shape is no longer editable. The user can duplicate this Shape (and editable associations) to make a new version.

The user can start an automatic shape association operation in a data set:

According to the chosen options, Chouette SaaS will perform an automatic search of the best shape for each data set resource (like Journey Patterns).

GTFS support

The GTFS import creates or updates Shapes.

Chouette SaaS associates the GTFS Shape with the Chouette Shape via the GTFS shape_id and the Chouette “gtfs” code (in the scope of the Workbench owner).

If a such Shape is found, the Shape will be updated. Otherwise, the Shape is created.

When GTFS Trips are imported, they are associated to a Shape according to their shape_id (by looking for a Shape with the same “gtfs” code and the the same Workbench owner).

The GTFS export will use shapes associated to a resource included in the export scope.

If the “gtfs” code is unique in the GTFS export scope, it uses as value for the GTFS Shape shape_id. Otherwise, the GTFS export uses the the Scope ID.

The Shape associated to a Journey Pattern is used for each associated GTFS trip (exported for Vehicle Journeys).

Reference: GTFS shapes.txt specifications

Shape support

The user can import shapes by using a Shape file (a ZIP file containing shp, dbf, … files).

Each Feature present into the file is used to create/update a Shape.

The user selects the Chouette Code Space and the Shape Feature attribute to be used to identify Shape Features and Chouette Shapes (in the scope of the Workbench owner).

Update Ara SaaS referential with Chouette SaaS data set

The user can use:

Service statistics in GraphQL API

Data sets managed by Chouette SaaS include daily statistics for each Line / Route and Journey Pattern. These statistics will be available via the GraphQL API.

The user can retrieve:

Example 1: Retrieve daily statistics

{
  lines {
    nodes {
      objectid
      serviceCounts(from: "2021-01-01", to: "2021-01-31") {
        date
        count
      }
    }
}  
{
  "data": {
    "lines": {
      "nodes": [
        {
          "objectid": "chouette:Line:d1b1f581-8b68-456c-8de8-714c142a8ec9:LOC",
          "serviceCounts": {
            "nodes": [
              {
                date: "2021-01-01",
                count: 17,
              },
              {
                date: "2021-01-02",
                count: 33,
              },
              ...
              {
                date: "2021-01-31",
                count: 35,
              },
            ]
        }
        {
          "objectid": "chouette:Line:d1b1f581-8b68-456c-8de8-714c142a8ec9:LOC",
           "serviceCounts": {
              "nodes": [
                {
                  date: "2021-01-01",
                  count: 67,
                },
                ...
              ]
           }
        }
      ]
    }
  }
}

Example 2: Retrieve total count

{
  lines {
    nodes {
      objectid
      serviceCount(from: "2021-01-01", to: "2021-01-31")
    }
}
{
  "data": {
    "lines": {
      "nodes": [
        {
          "objectid": "chouette:Line:d1b1f581-8b68-456c-8de8-714c142a8ec9:LOC",
          "serviceCount": 456
        },
        {
          "objectid": "chouette:Line:d1b1f581-8b68-456c-8de8-714c142a8ec9:LOC",
          "serviceCount": 983
        },
        ...
      ]
    }
  }
}  

Objective: Sprint 46

Complete Line and Stop models in GraphQL API

The Chouette GraphQL API provides access to lines and stop areas. The GraphQL schema will be improved to provide all attributes and features supported by these models:

Line

Stop Area

Code Space Management

The (authorized) user can create and manage code spaces supported into a Workgroup.

Each Code Space defines the properties of associated codes which can be used on Stop, Line, Vehicle Journey, etc.

Chouette SaaS imports can be configured to use a specific Code Space to store the associated identifiers (like GTFS or KML identifiers).

Chouette SaaS exports can be configured to use a specified Code Space (or none) to identify Stop, Line, Vehicle Journeys into the created file.

Lines status in Publication API

The Chouette Publication API will provide a new endpoint providing metadatas about lines that belong to the published data set.

The users of the Chouette Publication API can know when the data set has been updated for each Line.

A request to this endpoint https://chouette.enroute.mobi/api/v1/datas/<api name>/lines.json will receive this kind of JSON response:

[
  {
    objectid: "chouette:Line:d1b1f581-8b68-456c-8de8-714c142a8ec9:LOC",
    name: "Nye County Airport",
    updated_at: "2021-06-22 14:45:58 +0200"
  },
  {
    objectid: "chouette:Line:d1b1f581-8b68-456c-8de8-714c142a8ec9:LOC",
    name: "Airport - Amargosa Valley",
    updated_at: "2021-06-22 14:45:58 +0200"
  },
  ...
]

Objective: Sprint 46

Ara SaaS

Import API

Each Ara SaaS referential can store all static information useful to improve the real-time information managed by Ara SaaS like:

Ara SaaS will then provide a new endpoint to import this static information by API :

POST https://ara-api.enroute.mobi/referential_slug/import
{
    "Import": {
        "Total": 489201,
        "StopAreas": 2838,
        "Lines": 87,
        "VehicleJourneys": 23019,
        "StopVisits": 438019
    },
    "Errors": [
        "Error on line 18: ..............",
        "Error on line 137: .............",
    ]
}

The request must be authorized using one of the referential tokens.

Multiple local credentials for the same Partner

The definition of Ara SaaS Partners will support several local credentials:

{
    "Slug": "opendata",
    "ConnectorTypes": [
        "gtfs-rt-trip-updates-broadcaster",
        "gtfs-rt-vehicle-positions-broadcaster",
        "siri-estimated-timetable-request-broadcaster",
        "siri-lite-vehicle-monitoring-request-broadcaster",
        ...
    ],
    "Settings": {
        "ignore_stop_without_line": "false",
        "local_credentials": ["<secret1>","<secret2>","<secret3>"],
        "remote_objectid_kind": "external"
    }
}

Chouette Convert

Conversion Neptune to GTFS

The Chouette Convert API will support the conversion of Neptune files to GTFS files.