Tabnine Logo
FootFlagEncoder.getFerrySpeed
Code IndexAdd Tabnine to your IDE (free)

How to use
getFerrySpeed
method
in
com.graphhopper.routing.util.FootFlagEncoder

Best Java code snippets using com.graphhopper.routing.util.FootFlagEncoder.getFerrySpeed (Showing top 4 results out of 315)

origin: graphhopper/graphhopper

@Override
public long handleWayTags(ReaderWay way, long allowed, long relationFlags) {
  if (!isAccept(allowed))
    return 0;
  long flags = 0;
  if (!isFerry(allowed)) {
    String sacScale = way.getTag("sac_scale");
    if (sacScale != null) {
      if ("hiking".equals(sacScale))
        flags = speedEncoder.setDoubleValue(flags, MEAN_SPEED);
      else
        flags = speedEncoder.setDoubleValue(flags, SLOW_SPEED);
    } else {
      flags = speedEncoder.setDoubleValue(flags, MEAN_SPEED);
    }
    flags |= directionBitMask;
    boolean isRoundabout = way.hasTag("junction", "roundabout") || way.hasTag("junction", "circular");
    if (isRoundabout)
      flags = setBool(flags, K_ROUNDABOUT, true);
  } else {
    double ferrySpeed = getFerrySpeed(way);
    flags = setSpeed(flags, ferrySpeed);
    flags |= directionBitMask;
  }
  int priorityFromRelation = 0;
  if (relationFlags != 0)
    priorityFromRelation = (int) relationCodeEncoder.getValue(relationFlags);
  flags = priorityWayEncoder.setValue(flags, handlePriority(way, priorityFromRelation));
  return flags;
}
origin: com.rgi-corp/graphhopper

@Override
public long handleWayTags(ReaderWay way, long allowed, long relationFlags) {
  if (!isAccept(allowed))
    return 0;
  long flags = 0;
  if (!isFerry(allowed)) {
    String sacScale = way.getTag("sac_scale");
    if (sacScale != null) {
      if ("hiking".equals(sacScale))
        flags = speedEncoder.setDoubleValue(flags, MEAN_SPEED);
      else
        flags = speedEncoder.setDoubleValue(flags, SLOW_SPEED);
    } else {
      flags = speedEncoder.setDoubleValue(flags, MEAN_SPEED);
    }
    flags |= directionBitMask;
    boolean isRoundabout = way.hasTag("junction", "roundabout");
    if (isRoundabout)
      flags = setBool(flags, K_ROUNDABOUT, true);
  } else {
    double ferrySpeed = getFerrySpeed(way, SLOW_SPEED, MEAN_SPEED, FERRY_SPEED);
    flags = setSpeed(flags, ferrySpeed);
    flags |= directionBitMask;
  }
  int priorityFromRelation = 0;
  if (relationFlags != 0)
    priorityFromRelation = (int) relationCodeEncoder.getValue(relationFlags);
  flags = priorityWayEncoder.setValue(flags, handlePriority(way, priorityFromRelation));
  return flags;
}
origin: com.graphhopper/graphhopper

double ferrySpeed = getFerrySpeed(way, SLOW_SPEED, MEAN_SPEED, FERRY_SPEED);
flags = setSpeed(flags, ferrySpeed);
flags |= directionBitMask;
origin: com.graphhopper/graphhopper-core

@Override
public long handleWayTags(ReaderWay way, long allowed, long relationFlags) {
  if (!isAccept(allowed))
    return 0;
  long flags = 0;
  if (!isFerry(allowed)) {
    String sacScale = way.getTag("sac_scale");
    if (sacScale != null) {
      if ("hiking".equals(sacScale))
        flags = speedEncoder.setDoubleValue(flags, MEAN_SPEED);
      else
        flags = speedEncoder.setDoubleValue(flags, SLOW_SPEED);
    } else {
      flags = speedEncoder.setDoubleValue(flags, MEAN_SPEED);
    }
    flags |= directionBitMask;
    boolean isRoundabout = way.hasTag("junction", "roundabout") || way.hasTag("junction", "circular");
    if (isRoundabout)
      flags = setBool(flags, K_ROUNDABOUT, true);
  } else {
    double ferrySpeed = getFerrySpeed(way);
    flags = setSpeed(flags, ferrySpeed);
    flags |= directionBitMask;
  }
  int priorityFromRelation = 0;
  if (relationFlags != 0)
    priorityFromRelation = (int) relationCodeEncoder.getValue(relationFlags);
  flags = priorityWayEncoder.setValue(flags, handlePriority(way, priorityFromRelation));
  return flags;
}
com.graphhopper.routing.utilFootFlagEncodergetFerrySpeed

Popular methods of FootFlagEncoder

  • <init>
  • getMaxSpeed
  • handlePriority
  • setBlockByDefault
  • setBlockFords
  • collect
  • isAccept
  • isBlockFords
  • isFerry
  • setBool
  • setSpeed
  • supports
  • setSpeed,
  • supports,
  • getConditionalTagInspector,
  • init,
  • acceptWay,
  • flagsDefault,
  • getReverseSpeed,
  • getSpeed,
  • getTurnCost

Popular in Java

  • Running tasks concurrently on multiple threads
  • notifyDataSetChanged (ArrayAdapter)
  • getSystemService (Context)
  • scheduleAtFixedRate (Timer)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • JFrame (javax.swing)
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now