use of uk.me.parabola.imgfmt.app.Area in project mkgmap by openstreetmap.
the class HGTConverterTest method testLon0Left.
@Test
public void testLon0Left() throws Exception {
Area bbox = new Area(0, 0.1, 0.1, 1.0);
HGTConverter hgtConverter = new HGTConverter(HGT_PATH, bbox, null, DEMFile.EXTRA);
assertEquals(0, hgtConverter.getElevation(bbox.getMaxLat() * 256, bbox.getMinLong() * 256));
assertEquals(0, hgtConverter.getElevation(bbox.getMaxLat() * 256, bbox.getMaxLong() * 256));
assertEquals(0, hgtConverter.getElevation(bbox.getMinLat() * 256, bbox.getMinLong() * 256));
assertEquals(0, hgtConverter.getElevation(bbox.getMinLat() * 256, bbox.getMaxLong() * 256));
}
use of uk.me.parabola.imgfmt.app.Area in project mkgmap by openstreetmap.
the class RestrictionRelationTest method multipleExeptTest.
@Test
public void multipleExeptTest() {
GeneralRelation gr = createRelation();
gr.addTag("restriction", "no_left_turn");
gr.addTag("except", "psv;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 footAndBikeTest.
@Test
public void footAndBikeTest() {
GeneralRelation gr = createRelation();
gr.addTag("restriction:foot", "no_left_turn");
gr.addTag("restriction:bicycle", "no_left_turn");
RestrictionRelation rr = new RestrictionRelation(gr);
rr.eval(new Area(-100, -100, 1000, 1000));
assertTrue(rr.isValid());
assertEquals(~(AccessTagsAndBits.FOOT | AccessTagsAndBits.BIKE), rr.getExceptMask());
}
use of uk.me.parabola.imgfmt.app.Area in project mkgmap by openstreetmap.
the class RestrictionRelationTest method noEmergencyTest1.
@Test
public void noEmergencyTest1() {
GeneralRelation gr = createRelation();
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.EMERGENCY, rr.getExceptMask());
}
use of uk.me.parabola.imgfmt.app.Area in project mkgmap by openstreetmap.
the class RestrictionRelationTest method motor_vehicleTest.
@Test
public void motor_vehicleTest() {
GeneralRelation gr = createRelation();
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 | DEFAULT_EXCEPTION, rr.getExceptMask());
}
Aggregations