com.graphhopper.routing.util.parsers.BikeAccessParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphhopper-core Show documentation
Show all versions of graphhopper-core Show documentation
GraphHopper is a fast and memory efficient Java road routing engine
working seamlessly with OpenStreetMap data.
package com.graphhopper.routing.util.parsers;
import com.graphhopper.routing.ev.BooleanEncodedValue;
import com.graphhopper.routing.ev.EncodedValueLookup;
import com.graphhopper.routing.ev.Roundabout;
import com.graphhopper.routing.ev.VehicleAccess;
import com.graphhopper.util.PMap;
public class BikeAccessParser extends BikeCommonAccessParser {
public BikeAccessParser(EncodedValueLookup lookup, PMap properties) {
this(lookup.getBooleanEncodedValue(VehicleAccess.key("bike")),
lookup.getBooleanEncodedValue(Roundabout.KEY));
blockPrivate(properties.getBool("block_private", true));
blockFords(properties.getBool("block_fords", false));
}
public BikeAccessParser(BooleanEncodedValue accessEnc, BooleanEncodedValue roundaboutEnc) {
super(accessEnc, roundaboutEnc);
barriers.add("kissing_gate");
barriers.add("stile");
barriers.add("turnstile");
}
}