ibi-group / datatools-ui

Core application for IBI's transit data tools suite.
https://data-tools-docs.ibi-transit.com/en/latest/
MIT License
119 stars 76 forks source link

Distance traveled incorrect when moving stops up/down a loop pattern #973

Closed binh-dam-ibigroup closed 1 year ago

binh-dam-ibigroup commented 1 year ago

Observed behavior (please include a screenshot if possible)

When moving stops up and down a pattern where a previous stop is repeated later, shape_dist_traveled in stop_times.txt are incorrectly updated: the distance traveled when a repeated stop is hit first is higher than subsequent stops, so distances do not appear in increasing order, causing validation errors with the MobilityData validator.

Expected behavior

shape_dist_traveled for repeated stops in stop_times.txt should be updated correctly.

Steps to reproduce the problem

In the GTFS route editor:

  1. Open a route pattern or create one as a big loop (where the trip returns to some of the first stops in the pattern).
  2. Move a not-repeated stop in that pattern up or down the list.
  3. Take a editor snapshot and publish it as a new version
  4. Observe the extra MobilityData validation errors regarding distance traveled not in order.

Any special notes on configuration used

NA

Version of datatools-ui and datatools-server if applicable (exact commit hash or branch name)

Recent datatools-ui dev branch.