Codota Logo
FootFlagEncoder.getReverseSpeed
Code IndexAdd Codota to your IDE (free)

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

Best Java code snippets using com.graphhopper.routing.util.FootFlagEncoder.getReverseSpeed (Showing top 1 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

@Test
public void testCompatibilityBug() {
  EncodingManager manager2 = new EncodingManager(FlagEncoderFactory.DEFAULT, "bike2", 8);
  ReaderWay osmWay = new ReaderWay(1);
  osmWay.setTag("highway", "footway");
  osmWay.setTag("name", "test");
  BikeFlagEncoder singleBikeEnc = (BikeFlagEncoder) manager2.getEncoder("bike2");
  long flags = manager2.handleWayTags(osmWay, singleBikeEnc.acceptBit, 0);
  double singleSpeed = singleBikeEnc.getSpeed(flags);
  assertEquals(4, singleSpeed, 1e-3);
  assertEquals(singleSpeed, singleBikeEnc.getReverseSpeed(flags), 1e-3);
  EncodingManager manager = new EncodingManager(FlagEncoderFactory.DEFAULT, "bike2,bike,foot", 8);
  FootFlagEncoder foot = (FootFlagEncoder) manager.getEncoder("foot");
  BikeFlagEncoder bike = (BikeFlagEncoder) manager.getEncoder("bike2");
  long acceptBits = foot.acceptBit | bike.acceptBit;
  flags = manager.handleWayTags(osmWay, acceptBits, 0);
  assertEquals(singleSpeed, bike.getSpeed(flags), 1e-2);
  assertEquals(singleSpeed, bike.getReverseSpeed(flags), 1e-2);
  assertEquals(5, foot.getSpeed(flags), 1e-2);
  assertEquals(5, foot.getReverseSpeed(flags), 1e-2);
}
com.graphhopper.routing.utilFootFlagEncodergetReverseSpeed

Popular methods of FootFlagEncoder

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

Popular in Java

  • Reading from database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • findViewById (Activity)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • JButton (javax.swing)
  • JFrame (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
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