use of uk.me.parabola.imgfmt.app.Area in project mkgmap by openstreetmap.
the class RestrictionRelationTest method motor_vehicleExceptCarTest2.
@Test
public void motor_vehicleExceptCarTest2() {
GeneralRelation gr = createRelation();
gr.addTag("except", "motorcar");
gr.addTag("restriction", "no_left_turn");
gr.addTag("type", "restriction:motor_vehicle");
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 excplicitTestWithUnknown.
@Test
public void excplicitTestWithUnknown() {
GeneralRelation gr = createRelation();
gr.addTag("restriction:xyz", "no_left_turn");
RestrictionRelation rr = new RestrictionRelation(gr);
rr.eval(new Area(-100, -100, 1000, 1000));
assertFalse(rr.isValid());
}
use of uk.me.parabola.imgfmt.app.Area in project mkgmap by openstreetmap.
the class RestrictionRelationTest method motor_vehicleTest2.
@Test
public void motor_vehicleTest2() {
GeneralRelation gr = createRelation();
gr.addTag("restriction", "no_left_turn");
gr.addTag("type", "restriction:motor_vehicle");
RestrictionRelation rr = new RestrictionRelation(gr);
rr.eval(new Area(-100, -100, 1000, 1000));
assertTrue(rr.isValid());
assertEquals(AccessTagsAndBits.BIKE | DEFAULT_EXCEPTION, rr.getExceptMask());
}
use of uk.me.parabola.imgfmt.app.Area in project mkgmap by openstreetmap.
the class RestrictionRelationTest method noEmergencyTest2.
@Test
public void noEmergencyTest2() {
GeneralRelation gr = createRelation();
gr.addTag("restriction:motor_vehicle", "no_left_turn");
gr.addTag("restriction:emergency", "no_left_turn");
RestrictionRelation rr = new RestrictionRelation(gr);
rr.eval(new Area(-100, -100, 1000, 1000));
assertTrue(rr.isValid());
assertEquals(AccessTagsAndBits.BIKE | AccessTagsAndBits.FOOT, rr.getExceptMask());
}
use of uk.me.parabola.imgfmt.app.Area in project mkgmap by openstreetmap.
the class RestrictionRelationTest method multipleExcplicitTestWithUnknown.
@Test
public void multipleExcplicitTestWithUnknown() {
GeneralRelation gr = createRelation();
gr.addTag("restriction:motorcar", "no_left_turn");
gr.addTag("restriction:hgv", "no_left_turn");
gr.addTag("restriction:xyz", "no_left_turn");
RestrictionRelation rr = new RestrictionRelation(gr);
rr.eval(new Area(-100, -100, 1000, 1000));
assertTrue(rr.isValid());
assertEquals(~(AccessTagsAndBits.CAR | AccessTagsAndBits.TRUCK), rr.getExceptMask());
}
Aggregations