Search in sources :

Example 1 with FixedFareAttributeLoader

use of com.graphhopper.gtfs.fare.FixedFareAttributeLoader in project graphhopper by graphhopper.

the class GtfsStorage method fixFares.

private void fixFares(GTFSFeed feed, ZipFile zip) {
    feed.fares.clear();
    Map<String, Fare> fares = new HashMap<>();
    try {
        new FixedFareAttributeLoader(feed, fares).loadTable(zip);
        new FareRule.Loader(feed, fares).loadTable(zip);
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
    feed.fares.putAll(fares);
}
Also used : FixedFareAttributeLoader(com.graphhopper.gtfs.fare.FixedFareAttributeLoader) FareRule(com.conveyal.gtfs.model.FareRule) Fare(com.conveyal.gtfs.model.Fare)

Aggregations

Fare (com.conveyal.gtfs.model.Fare)1 FareRule (com.conveyal.gtfs.model.FareRule)1 FixedFareAttributeLoader (com.graphhopper.gtfs.fare.FixedFareAttributeLoader)1