Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

FeedValidator should warn about extremely large transfers #234

Closed
bdferris opened this issue Sep 26, 2014 · 2 comments
Closed

FeedValidator should warn about extremely large transfers #234

bdferris opened this issue Sep 26, 2014 · 2 comments

Comments

@bdferris
Copy link
Contributor

From [email protected] on April 23, 2010 05:00:33

When a feed has an extremely large transfer (be it in terms of time or
stop/station distance) it most likely represents a data error.

Even though the spec does not forbid it, in practice it makes little sense
to specify a transfer between stops/stations that many kilometers apart, or
a min_transfer_time of several hours or days.

As such a warning should be added for values that are large but still
somewhat plausible, and an error for even larger values. We should also
check min_transfer_time with relation to the station/stop distance.

Original issue: http://code.google.com/p/googletransitdatafeed/issues/detail?id=234

@bdferris
Copy link
Contributor Author

From [email protected] on April 23, 2010 05:48:07

This validation has to be added to Tranfer.ValidateAfterAdd, since we need the schedule to be able to access the stops.

However, since invalid transfers (no or invalid {to,from}_stop_id and min_transfer_time) are also added to the schedule
we'd have to rerun the very same checks that are in ValidateBeforeAdd to guard against that.

IMHO the cleanest way of doing this would be to not add invalid transfers to the schedule, so ValidateAfterAdd is only
run on Transfers that seem to be correct. Also add a validation to see if {to,from}_stop_id reference valid stop_ids
before cheking if the transfer is too large.

I'm CCing Tom for his input on this - do you think this is a good idea, or is there something I'm missing that prevents
us from doing this? And, of course, if there's anyone using the transitfeed package and relying on the current behavior
please update this bug to let me know.

Cc: tom.brown.code

@bdferris
Copy link
Contributor Author

From [email protected] on May 14, 2010 09:39:36

Fix committed in revision 1307 .

Status: Fixed
Cc: -tom.brown.code

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant