congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FootFlagEncoder.acceptWay
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: graphhopper/graphhopper

@Test
public void testPier() {
  ReaderWay way = new ReaderWay(1);
  way.setTag("man_made", "pier");
  long flags = footEncoder.handleWayTags(way, footEncoder.acceptWay(way), 0);
  assertNotEquals(0, flags);
}
origin: graphhopper/graphhopper

@Test
public void testMixSpeedAndSafe() {
  ReaderWay way = new ReaderWay(1);
  way.setTag("highway", "motorway");
  long flags = footEncoder.handleWayTags(way, footEncoder.acceptWay(way), 0);
  assertEquals(0, flags);
  way.setTag("sidewalk", "yes");
  flags = footEncoder.handleWayTags(way, footEncoder.acceptWay(way), 0);
  assertEquals(5, footEncoder.getSpeed(flags), 1e-1);
  way.clearTags();
  way.setTag("highway", "track");
  flags = footEncoder.handleWayTags(way, footEncoder.acceptWay(way), 0);
  assertEquals(5, footEncoder.getSpeed(flags), 1e-1);
}
origin: graphhopper/graphhopper

@Test
public void testRailPlatformIssue366() {
  ReaderWay way = new ReaderWay(1);
  way.setTag("railway", "platform");
  long flags = footEncoder.handleWayTags(way, footEncoder.acceptWay(way), 0);
  assertNotEquals(0, flags);
  way.clearTags();
  way.setTag("highway", "track");
  way.setTag("railway", "platform");
  flags = footEncoder.handleWayTags(way, footEncoder.acceptWay(way), 0);
  assertNotEquals(0, flags);
  way.clearTags();
  // only tram, no highway => no access
  way.setTag("railway", "tram");
  flags = footEncoder.handleWayTags(way, footEncoder.acceptWay(way), 0);
  assertEquals(0, flags);
}
origin: graphhopper/graphhopper

@Test
public void testSlowHiking() {
  ReaderWay way = new ReaderWay(1);
  way.setTag("highway", "track");
  way.setTag("sac_scale", "hiking");
  long flags = footEncoder.handleWayTags(way, footEncoder.acceptWay(way), 0);
  assertEquals(FootFlagEncoder.MEAN_SPEED, footEncoder.getSpeed(flags), 1e-1);
  way.setTag("highway", "track");
  way.setTag("sac_scale", "mountain_hiking");
  flags = footEncoder.handleWayTags(way, footEncoder.acceptWay(way), 0);
  assertEquals(FootFlagEncoder.SLOW_SPEED, footEncoder.getSpeed(flags), 1e-1);
}
origin: graphhopper/graphhopper

assertTrue(footEncoder.acceptWay(way) > 0);
way.setTag("sidewalk", "left");
assertTrue(footEncoder.acceptWay(way) > 0);
assertFalse(footEncoder.acceptWay(way) > 0);
way.setTag("sidewalk", "left");
way.setTag("access", "private");
assertFalse(footEncoder.acceptWay(way) > 0);
way.clearTags();
assertTrue(footEncoder.acceptWay(way) > 0);
assertTrue(footEncoder.acceptWay(way) > 0);
assertFalse(footEncoder.acceptWay(way) > 0);
assertTrue(footEncoder.acceptWay(way) > 0);
assertTrue(footEncoder.acceptWay(way) > 0);
way.setTag("foot", "no");
assertFalse(footEncoder.acceptWay(way) > 0);
assertTrue(footEncoder.acceptWay(way) > 0);
assertFalse(footEncoder.acceptWay(way) > 0);
way.setTag("foot", "yes");
assertTrue(footEncoder.acceptWay(way) > 0);
origin: graphhopper/graphhopper

@Test
public void handleWayTagsCircularJunction() {
  ReaderWay way = new ReaderWay(1);
  way.setTag("junction", "circular");
  way.setTag("highway", "tertiary");
  long flags = footEncoder.handleWayTags(way, footEncoder.acceptWay(way), 0);
  assertTrue(footEncoder.isBool(flags, FlagEncoder.K_ROUNDABOUT));
}
origin: graphhopper/graphhopper

@Test
public void handleWayTagsRoundabout() {
  ReaderWay way = new ReaderWay(1);
  way.setTag("junction", "roundabout");
  way.setTag("highway", "tertiary");
  long flags = footEncoder.handleWayTags(way, footEncoder.acceptWay(way), 0);
  assertTrue(footEncoder.isBool(flags, FlagEncoder.K_ROUNDABOUT));
}
origin: graphhopper/graphhopper

@Test
public void testFerrySpeed() {
  ReaderWay way = new ReaderWay(1);
  way.setTag("route", "ferry");
  // a bit longer than an hour
  way.setTag("duration:seconds", "4000");
  long flags = footEncoder.handleWayTags(way, footEncoder.acceptWay(way), 0);
  assertTrue(footEncoder.getSpeed(flags) > footEncoder.getMaxSpeed());
  assertEquals(20, footEncoder.getSpeed(flags), .1);
}
com.graphhopper.routing.utilFootFlagEncoderacceptWay

Javadoc

Some ways are okay but not separate for pedestrians.

Popular methods of FootFlagEncoder

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

Popular in Java

  • Making http post requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • compareTo (BigDecimal)
  • startActivity (Activity)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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