use of uk.me.parabola.imgfmt.app.Area in project mkgmap by openstreetmap.
the class HGTConverterTest method testLat0Bottom.
@Test
public void testLat0Bottom() throws Exception {
Area bbox = new Area(0, -90.9, 0.1, -90.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 footTest.
@Test
public void footTest() {
GeneralRelation gr = createRelation();
gr.addTag("restriction:foot", "no_left_turn");
RestrictionRelation rr = new RestrictionRelation(gr);
rr.eval(new Area(-100, -100, 1000, 1000));
assertTrue(rr.isValid());
assertEquals(~AccessTagsAndBits.FOOT, rr.getExceptMask());
}
use of uk.me.parabola.imgfmt.app.Area in project mkgmap by openstreetmap.
the class RestrictionRelationTest method psvTest.
@Test
public void psvTest() {
GeneralRelation gr = createRelation();
gr.addTag("restriction", "no_left_turn");
gr.addTag("except", "psv");
RestrictionRelation rr = new RestrictionRelation(gr);
rr.eval(new Area(-100, -100, 1000, 1000));
assertTrue(rr.isValid());
assertEquals(AccessTagsAndBits.BUS | AccessTagsAndBits.TAXI | DEFAULT_EXCEPTION, rr.getExceptMask());
}
use of uk.me.parabola.imgfmt.app.Area in project mkgmap by openstreetmap.
the class RestrictionRelationTest method ignoreMotorcycleTest1.
@Test
public void ignoreMotorcycleTest1() {
GeneralRelation gr = createRelation();
gr.addTag("restriction:motorcycle", "no_u_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 basicTest.
@Test
public void basicTest() {
GeneralRelation gr = createRelation();
gr.addTag("restriction", "no_left_turn");
gr.addTag("except", "bicycle");
RestrictionRelation rr = new RestrictionRelation(gr);
rr.eval(new Area(-100, -100, 1000, 1000));
assertTrue(rr.isValid());
assertEquals(AccessTagsAndBits.BIKE | DEFAULT_EXCEPTION, rr.getExceptMask());
}
Aggregations