Skip to content

Commit

Permalink
mGTFS update direction data model
Browse files Browse the repository at this point in the history
  • Loading branch information
mmathieum committed Jan 14, 2025
1 parent 38e5544 commit 203ce02
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
22 changes: 21 additions & 1 deletion src/main/java/org/mtransit/commons/gtfs/data/Direction.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
package org.mtransit.commons.gtfs.data

// https://github.com/mbta/gtfs-documentation/blob/master/reference/gtfs.md#directionstxt
data class Direction(
val routeId: RouteId,
val directionId: DirectionId,
val directionName: Text,
val direction: Directions,
val destination: Text?
)

enum class Directions {
NORTH,
SOUTH,
EAST,
WEST,
NORTH_EAST,
NORTH_WEST,
SOUTH_EAST,
SOUTH_WEST,
CLOCKWISE,
COUNTER_CLOCKWISE,
INBOUND,
OUTBOUND,
LOOP,
A_LOOP,
B_LOOP,
}
2 changes: 1 addition & 1 deletion src/main/java/org/mtransit/commons/gtfs/sql/AllSQL.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ val ALL_SQL_TABLES: List<TableSQL> = listOf(
StopTimeSQL,
FrequencySQL,

// TODO directions (route_id, direction_id, direction_name)
// TODO directions (route_id, direction_id, direction, direction_destination)
// - ca_levis: directions.txt
// (agency_id,) route_id, direction_id, direction_name (,route_short_name,route_long_name,route_desc,route_type,route_url,route_color,route_text_color,)
// - ca_banff: directions.txt
Expand Down

0 comments on commit 203ce02

Please sign in to comment.