use of com.graphhopper.routing.util.TestAlgoCollector.OneRun in project graphhopper by graphhopper.
the class RoutingAlgorithmWithOSMIT method testSidewalkNo.
@Test
public void testSidewalkNo() {
List<OneRun> list = new ArrayList<OneRun>();
// roundabout contains sidewalk=no which should be avoided
list.add(new OneRun(57.154888, -2.101822, 57.153445, -2.099869, 329, 31));
// longer path should go through tertiary, see discussion in #476
list.add(new OneRun(57.154888, -2.101822, 57.147299, -2.096286, 1118, 68));
boolean testAlsoCH = false, is3D = false;
runAlgo(testCollector, DIR + "/map-sidewalk-no.osm.gz", "target/graph-sidewalkno", list, "hike", testAlsoCH, "hike", "fastest", is3D);
assertEquals(testCollector.toString(), 0, testCollector.errors.size());
}
use of com.graphhopper.routing.util.TestAlgoCollector.OneRun in project graphhopper by graphhopper.
the class RoutingAlgorithmWithOSMIT method testMoscowTurnCosts.
@Test
public void testMoscowTurnCosts() {
List<OneRun> list = new ArrayList<OneRun>();
list.add(new OneRun(55.813357, 37.5958585, 55.811042, 37.594689, 1043.99, 12));
list.add(new OneRun(55.813159, 37.593884, 55.811278, 37.594217, 1048, 13));
// TODO include CH
boolean testAlsoCH = false, is3D = false;
runAlgo(testCollector, DIR + "/moscow.osm.gz", "target/graph-moscow", list, "car|turn_costs=true", testAlsoCH, "car", "fastest", is3D);
assertEquals(testCollector.toString(), 0, testCollector.errors.size());
}
use of com.graphhopper.routing.util.TestAlgoCollector.OneRun in project graphhopper by graphhopper.
the class RoutingAlgorithmWithOSMIT method testHarsdorf.
@Test
public void testHarsdorf() {
List<OneRun> list = new ArrayList<OneRun>();
// TODO somehow the bigger road is take even if we make it less preferred (e.g. introduce AVOID AT ALL costs for lanes=2&&maxspeed>50)
list.add(new OneRun(50.004333, 11.600254, 50.044449, 11.543434, 6952, 190));
// choose Unterloher Weg and the following residential + cycleway
// list.add(new OneRun(50.004333, 11.600254, 50.044449, 11.543434, 6931, 184));
runAlgo(testCollector, DIR + "/north-bayreuth.osm.gz", "target/north-bayreuth-gh", list, "bike", true, "bike", "fastest", false);
assertEquals(testCollector.toString(), 0, testCollector.errors.size());
}
use of com.graphhopper.routing.util.TestAlgoCollector.OneRun in project graphhopper by graphhopper.
the class RoutingAlgorithmWithOSMIT method testMonacoVia.
@Test
public void testMonacoVia() {
OneRun oneRun = new OneRun();
oneRun.add(43.730729, 7.42135, 0, 0);
oneRun.add(43.727697, 7.419199, 2581, 110);
oneRun.add(43.726387, 7.4, 3001, 90);
List<OneRun> list = new ArrayList<OneRun>();
list.add(oneRun);
runAlgo(testCollector, DIR + "/monaco.osm.gz", "target/monaco-gh", list, "car", true, "car", "shortest", false);
assertEquals(testCollector.toString(), 0, testCollector.errors.size());
}
use of com.graphhopper.routing.util.TestAlgoCollector.OneRun in project graphhopper by graphhopper.
the class RoutingAlgorithmWithOSMIT method testMonacoBike.
@Test
public void testMonacoBike() {
List<OneRun> list = new ArrayList<OneRun>();
list.add(new OneRun(43.730864, 7.420771, 43.727687, 7.418737, 1642, 87));
list.add(new OneRun(43.727687, 7.418737, 43.74958, 7.436566, 3580, 168));
list.add(new OneRun(43.728677, 7.41016, 43.739213, 7.427806, 2323, 121));
list.add(new OneRun(43.733802, 7.413433, 43.739662, 7.424355, 1434, 89));
runAlgo(testCollector, DIR + "/monaco.osm.gz", "target/monaco-gh", list, "bike", true, "bike", "shortest", false);
assertEquals(testCollector.toString(), 0, testCollector.errors.size());
}
Aggregations