osm2gtfs icon indicating copy to clipboard operation
osm2gtfs copied to clipboard

Generate fare information

Open AltNico opened this issue 8 years ago • 7 comments

GTFS lets agencies specify fare (i.e. price) information. We should think about how we can include this information into the generation of GTFS with osm2gtfs. You can find the reference here.

Note that Transportr does not support this information yet.

AltNico avatar Dec 17 '17 20:12 AltNico

The official GTFS specification only supports one Rider category, thus the regular, adult fare. I've found this GTFS extension used by the SF Bay Area's Metropolitan Transportation Commission which supports additional categories. Could be interesting some time in the future, but as far as I know isn't supported (yet?) by Navitia.

ialokim avatar Jan 04 '18 20:01 ialokim

As for now, how about an option to include a (as by now) not automatically generated txt-file given by the configuration? Could be interesting for:

  • calendar_dates.txt
  • fare_attributes.txt
  • fare_rules.txt
  • frequencies.txt
  • transfers.txt

Personally, I've wanted to include the (very simple) fare information for Estelí, but it would be much nicer not having to add it manually every time we've generated a new GTFS.

ialokim avatar Jan 04 '18 20:01 ialokim

I've created a first draft in the wiki for a possible fare input format. It is another json file, similar to the Schedule and would work well for the case of Nicaragua:

  • In Esteli, the urban buses generally cost 5 Córdobas, for some destinations up to 8 Córdobas.
  • In Managua, all urban buses cost 2.5 Córdobas.
  • Larger distance buses generally have prizes given by the government in the following form (example for a bus from Esteli to Managua):
origin destination prize
Esteli Santa Cruz 12 C$
Esteli Sébaco 30 C$
Sébaco Tipitapa 40 C$
Sébaco Managua 45 C$

The proposed format introduces fare zones as in GTFS and let you define which stops are within which fare zone and the prize of a journey from one fare zone to another. Also, it is possible to override these prizes (e.g. for more expensive express buses).

Estelí urban buses would have like three of these fare zones, Managua only one and the above table could be easily converted and put into this format.

Please note that there would be another file with another start and end date. See #111.

ialokim avatar Jan 05 '18 16:01 ialokim

@prhod and @nlehuby: I was just wondering, whether fare information from GTFS is imported and used by Navitia or not? 🤔

ialokim avatar Feb 02 '18 19:02 ialokim

@ialokim For the moment, fare information are not read directly from gtfs. We plan to do it, but it will take time. I hope we will be able to do it before the end of the year...

prhod avatar Feb 03 '18 08:02 prhod

@prhod Thanks for your answer! Great to hear you are working on it!

ialokim avatar Feb 16 '18 20:02 ialokim

I've now written a first basic implementation for Estelí that only supports a fare per route, see the proposed fares.json here and the working branch here.

Due to the poor fare possibilities in GTFS, it is not possible to model fares on a per weekday basis (which would be necessary for Esteli), so it is using the same fare every day of the week.

The second step would be to implement the possibility of generating fare zones as proposed in the wiki and necessitated by the countrywide GTFS, see here.

ialokim avatar Feb 17 '18 16:02 ialokim