conveyal / gtfs-lib

A library for loading and saving GTFS feeds of arbitrary size with disk-backed storage
BSD 2-Clause "Simplified" License
71 stars 38 forks source link

Multiple Location Groups #355

Closed br648 closed 2 years ago

br648 commented 2 years ago

Checklist

Description

This PR covers loading, exporting and validating multiple location groups. Multi location groups are defined as two or more location groups with the same id. These location groups on loading are combined into a single record/row with an array of location id values. On export, the reverse takes place expanding multi location groups in to single rows to conform with the GTFS Flex spec. A special case has been added to validate references where more than one location id has been defined i.e. it loops over all location ids and checks references for each.