use of com.graphhopper.routing.ev.Toll in project graphhopper by graphhopper.
the class OSMTollParser method handleWayTags.
@Override
public IntsRef handleWayTags(IntsRef edgeFlags, ReaderWay readerWay, IntsRef relationFlags) {
Toll toll;
if (readerWay.hasTag("toll", "yes")) {
toll = Toll.ALL;
} else if (readerWay.hasTag(HGV_TAGS, Collections.singletonList("yes"))) {
toll = Toll.HGV;
} else if (readerWay.hasTag("toll", "no")) {
toll = Toll.NO;
} else {
toll = Toll.MISSING;
}
CountryRule countryRule = readerWay.getTag("country_rule", null);
if (countryRule != null)
toll = countryRule.getToll(readerWay, TransportationMode.CAR, toll);
tollEnc.setEnum(false, edgeFlags, toll);
return edgeFlags;
}
Aggregations