Skip to content

Commit 4f0b1d3

Browse files
committed
set opt.tripsWithoutShapeId to true if shapes.csv is missing 🐛📝
related: d7ad83d
1 parent 8a53f68 commit 4f0b1d3

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

cli.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ Options:
9494
- tpeg-pti: proposed TPEG-PTI-based route types [2]
9595
Default: google-extended
9696
--trips-without-shape-id Don't require trips.txt items to have a shape_id.
97+
Default if shapes.txt has not been provided.
9798
--routes-without-agency-id Don't require routes.txt items to have an agency_id.
9899
--stops-without-level-id Don't require stops.txt items to have a level_id.
99100
Default if levels.txt has not been provided.

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const convertGtfsToSql = async function* (files, opt = {}) {
1616
requireDependencies: false,
1717
ignoreUnsupportedFiles: false,
1818
routeTypesScheme: 'google-extended',
19-
tripsWithoutShapeId: false,
19+
tripsWithoutShapeId: !files.some(f => f.name === 'shapes'),
2020
routesWithoutAgencyId: false,
2121
stopsWithoutLevelId: !files.some(f => f.name === 'levels'),
2222
stopsLocationIndex: false,

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ Options:
153153
- tpeg-pti: proposed TPEG-PTI-based route types [2]
154154
Default: google-extended
155155
--trips-without-shape-id Don't require trips.txt items to have a shape_id.
156+
Default if shapes.txt has not been provided.
156157
--routes-without-agency-id Don't require routes.txt items to have an agency_id.
157158
--stops-without-level-id Don't require stops.txt items to have a level_id.
158159
Default if levels.txt has not been provided.

0 commit comments

Comments
 (0)