etalab / transport-validator

GTFS validator
https://transport.data.gouv.fr/validation/
MIT License
38 stars 10 forks source link

Add lines_with_custom_color_count information in metadatas #126

Closed fchabouis closed 2 years ago

fchabouis commented 2 years ago

A route is considered to have a custom color if the route color is not white or the route text color is not black.

Tristramg commented 2 years ago

This is going to be a bit tricky :grimacing:

The GTFS specification says that if no color is provided, the color is white.

Route color designation that matches public facing material. Defaults to white (FFFFFF) when omitted or left empty

So it was an actual bug in the GTFS library to have it as an option and it was fixed https://github.com/rust-transit/gtfs-structure/commit/2b342876bd82f04b407ad1f6d71516566e4995cb

Maybe a check would be that if all lines are white, there should be an information level saying that’s not nice (while thinking about networks with only 1 or 2 lines to avoid too much noise)

fchabouis commented 2 years ago

Thanks @Tristramg . I propose to output the number of lines having custom colors in the metadata then. And by comparing to the total number of lines, users can deduce how complete the color information is.