Search in sources :

Example 1 with DefaultFlagEncoderFactory

use of com.graphhopper.routing.util.DefaultFlagEncoderFactory in project graphhopper by graphhopper.

the class PrepareRoutingSubnetworksTest method createEncodingManager.

private static EncodingManager createEncodingManager(String flagEncodersStr) {
    EncodingManager.Builder builder = new EncodingManager.Builder();
    for (String encoderStr : flagEncodersStr.split(",")) {
        encoderStr = encoderStr.trim();
        FlagEncoder encoder = new DefaultFlagEncoderFactory().createFlagEncoder(encoderStr.split("\\|")[0], new PMap(encoderStr));
        builder.add(encoder);
        builder.add(Subnetwork.create(encoder.toString()));
    }
    return builder.build();
}
Also used : EncodingManager(com.graphhopper.routing.util.EncodingManager) DefaultFlagEncoderFactory(com.graphhopper.routing.util.DefaultFlagEncoderFactory) FlagEncoder(com.graphhopper.routing.util.FlagEncoder) GraphBuilder(com.graphhopper.storage.GraphBuilder) PMap(com.graphhopper.util.PMap)

Aggregations

DefaultFlagEncoderFactory (com.graphhopper.routing.util.DefaultFlagEncoderFactory)1 EncodingManager (com.graphhopper.routing.util.EncodingManager)1 FlagEncoder (com.graphhopper.routing.util.FlagEncoder)1 GraphBuilder (com.graphhopper.storage.GraphBuilder)1 PMap (com.graphhopper.util.PMap)1