Codota Logo
FootFlagEncoder.getFerrySpeed
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
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

  • Making http requests using okhttp
  • getContentResolver (Context)
  • setScale (BigDecimal)
  • setContentView (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now