Skip to content

Commit 5cd686e

Browse files
authored
Merge pull request opentripplanner#6680 from HSLdevcom/dictionary
Add a dictionary document for OTP's terminology
2 parents 83255ea + 97b40be commit 5cd686e

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

doc/dev/Dictionary.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Dictionary - OTP Internal Domain Language
2+
3+
The target audience for this document are developers and product owners working with OTP. API and data-feed specific terminology is excluded, unless it is relevant for understanding the internal model.
4+
5+
Usually, we use transit terms from
6+
the [GTFS specification](https://gtfs.org/documentation/schedule/reference/#) when possible. Terms
7+
from [https://transmodel-cen.eu/](Transmodel specification) are used for NETEX/Transmodel specific
8+
concepts, or when we do not feel like the GTFS terms are the most optimal. For rental, we use terms
9+
from the [GBFS specification](https://gbfs.org/documentation/). For algorithms, we use terminology
10+
from scientific literature.
11+
12+
This document includes terms we use for concepts that are not fully covered by the aforementioned
13+
specifications or when we find it important to clarify what the terms mean in OTP's context. Note,
14+
this document will be updated over time, and it does not yet cover everything it should cover.
15+
16+
## Dates
17+
18+
| Term | Description |
19+
|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
20+
| Running date | The actual calendar date. One departure can start and end on a different running date. A trip or trip-pattern may have more than one running date. If the first departure is 2025-01-31 and the last arrival is on 2025-02-02, then 2025-01-31, 2025-02-01 and 2025-02-02 are all running dates for the given trip. |
21+
| Service date | Service dates are used in transit data and they are partly based on how the transit authorities operate. They typically in practice start and end later than a running date, but the starting point for the time of the service date is noon - 12 hours. For example, a trip starting at 1am is often still considered to be part of the previous "calendar date's" service date and in service date terminology, the starting time would be 25:00. There can be trips that last for 24+ hours, but each departure only has one service date and its chosen based on when the trip starts. |
22+
23+
## Stop references
24+
25+
| Term | Description |
26+
|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
27+
| Stop id | A global unique id, frequently used by the APIs and data feeds to reference a stop |
28+
| Stop position | Zero-based index, incremented by 1 for each stop in the stop pattern. |
29+
| GTFS stop sequence | Comes from the GTFS data. Can be used for real-time data matching but also be fetched from the APIs. |
30+
| Stop index | The global integer index of stops used internally in OTP and in Raptor to reference stops by a single integer. There is a 1-to-1 mapping between stop index and Stop:id. |

doc/dev/decisionrecords/NamingConventions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Naming Conventions
22

33
In general, we use American English. We use the GTFS terminology inside OTP as the transit
4-
domain-specific language. In cases where GTFS does not provide an alternative, we use NeTEx.
4+
domain-specific language. In cases where GTFS does not provide an alternative, we use NeTEx. More
5+
information about the used terminology is in [the Dictionary](/doc/dev/Dictionary.md).
56
We follow the [Google Java Style Guide - Naming](https://google.github.io/styleguide/javaguide.html#s5-naming) conventions.
67
The code formatting part of that style guide is not relevant, as OTP code is auto-formatted using Prettier.
78
If in doubt, check the Oxford Dictionary (American).

0 commit comments

Comments
 (0)