use of uk.me.parabola.imgfmt.app.Area in project mkgmap by openstreetmap.
the class RestrictionRelationTest method ignoreMotorcycleTest2.
@Test
public void ignoreMotorcycleTest2() {
GeneralRelation gr = createRelation();
gr.addTag("restriction", "no_u_turn");
gr.addTag("except", "motorcycle");
RestrictionRelation rr = new RestrictionRelation(gr);
rr.eval(new Area(-100, -100, 1000, 1000));
assertTrue(rr.isValid());
assertEquals(DEFAULT_EXCEPTION, rr.getExceptMask());
}
use of uk.me.parabola.imgfmt.app.Area in project mkgmap by openstreetmap.
the class RestrictionRelationTest method multipleExeptTestWithUnknown.
@Test
public void multipleExeptTestWithUnknown() {
GeneralRelation gr = createRelation();
gr.addTag("restriction", "no_left_turn");
gr.addTag("except", "psv;xyz;bicycle");
RestrictionRelation rr = new RestrictionRelation(gr);
rr.eval(new Area(-100, -100, 1000, 1000));
assertTrue(rr.isValid());
assertEquals(AccessTagsAndBits.BUS | AccessTagsAndBits.TAXI | AccessTagsAndBits.BIKE | DEFAULT_EXCEPTION, rr.getExceptMask());
}
use of uk.me.parabola.imgfmt.app.Area in project mkgmap by openstreetmap.
the class RestrictionRelationTest method motor_vehicleExceptCarTest.
@Test
public void motor_vehicleExceptCarTest() {
GeneralRelation gr = createRelation();
gr.addTag("except", "motorcar");
gr.addTag("restriction:motor_vehicle", "no_left_turn");
RestrictionRelation rr = new RestrictionRelation(gr);
rr.eval(new Area(-100, -100, 1000, 1000));
assertTrue(rr.isValid());
assertEquals(AccessTagsAndBits.BIKE | AccessTagsAndBits.CAR | DEFAULT_EXCEPTION, rr.getExceptMask());
}
use of uk.me.parabola.imgfmt.app.Area in project mkgmap by openstreetmap.
the class RestrictionRelationTest method mixedDirectionsTest.
@Test
public void mixedDirectionsTest() {
GeneralRelation gr = createRelation();
gr.addTag("restriction:car", "no_left_turn");
gr.addTag("restriction:truck", "no_u_turn");
RestrictionRelation rr = new RestrictionRelation(gr);
rr.eval(new Area(-100, -100, 1000, 1000));
assertFalse(rr.isValid());
}
Aggregations