Feature Plan - Shapes

Description

The user can manage Shapes in a dedicated referential (like stop areas or lines). Shapes are not included into each data set (with Routes, Journey Patterns, etc) but can exist separately.

Base Shape Management

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

Each Shape contains:

  • an oriented geometry

  • an optional name

  • codes of several kinds (like “gtfs”, “kml”, etc) to identify the Shape in several contexts

  • remaining references (to be associated automatically with data set resources)

Associate shapes with data set resources

Each Shape contains be associated to one or more data set resources like Journey Patterns, and next, Routes, Lines and Vehicle Journeys.

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).

To match shapes with resources, Chouette SaaS provides several algorithms:

  • reference matching (to follow sticky associations)

  • distance with stops

  • difference with a routing engine

If requested, the operation will wait the user validation, especially to resolve associations with multiple solutions.

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

KML support

The user can import one or several shapes by using a KML file, or a zip file containing KML files.

Each PlaceMark with a LineString present into the file is used to create/update a Shape.

Chouette SaaS associates the KML LineString with the Chouette Shape via the LineString XML identifier and the Chouette “kml” code (in the scope of the Workbench owner).

If the KML file doesn’t include any id/targetId attributes, the Shapes will be recreated on each import.

Example

1 2 3 4 5 6 <Placemark id="ORLEANS:JourneyPattern:15_R_167"> <name>1</name> <LineString> <coordinates>6.966138,43.569284 ... 6.967700,43.55603</coordinates> </LineString> </Placemark>

Idea proposal: The user could setup the KML import to generate a Shape reference according to the KML content. For example, the KML import can create a JourneyPattern id reference according to a KML LineString attribute (like id or targetId), directly or via a (simple) value transformation.

Reference: KML specifications

Shapefile support

The user can import shapes by using a Shapefile (a ZIP file containing shp, dbf, … files). Each Record present into the file is used to create/update a Shape.

The user provides an attribute name to be used as code. This attribute must provide an unique value for each record in the file.

Chouette associates the geometry Shapefile with the Chouette Shape via the attribute selected as identifier and the Chouette “external” code (in the scope of the Shape Provider).

The import tries to find a Shape with:

  • the same Shape Provider than the import

  • a “external” code with the attribute value

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

After the import, the Controls / Compliance Check Sets are not executed.

NeTEx support

When the NeTEx profile supports shapes, the NeTEx Chouette import and exports use ServiceLinks to describe the detailed shape of the different links (between ScheduledStopPoints).

Shape editor

Work in progress - We’re working on a publishable proposal which describes our Shape Editor wire frames.

The Shape editor will provide features like

  • split the Shape geometry into independent sections

  • edit manually a section

  • use a routing engine for automatic section

Automatic Shape creation

Chouette SaaS will provide an operation to create shapes required by the Data Set resources (mainly Journey Patterns and Vehicle Journeys in same case).

These Shapes are created by using a routing engine (in fact, several routing engines to support road, rail or tram mode).

By default, the created Shapes will be in a “in creation” status and the user will be able to validate these automatic shapes and their associations.

Shape controls

The controls dedicated to the Shapes will provide a way to ensure that:

  • wanted Data resources have an associated Shape

  • minimum distances between Stop Areas and Shapes are correct

  • selected shapes are close to the returned solution by a routing engine

Milestones (updated)

Essential support (https://enroute.atlassian.net/wiki/spaces/PUBLIC/pages/525205508): Shapes associated to Journey Patterns. With GTFS import & export support.

Roadmap 2020 Q4: Shapefile import

Roadmap 2021 Q1: First automatic shape association operation (without interactive phase), NeTEx support

Roadmap 2021 Q2: Automatic Shape Creation, Shape editor

Roadmap 2021 Q3: Shape Controls, advanced association methods

Jun2020JulAugSepOctNovDecJan2021FebMarAprMayJunJulAugSepEssential support2020 Q42020 Q12020 Q2
Base
Formats
Association

Shape Management

Shape Editor

Shape Controls

Automatic Shape Creation

GTFS

KML

NeTEx

Shapefile

Resource Association

Automatic association

Interactive Automatic association