/** * This test demonstrates the usage of the {@link Lane} object to get geometric information. * * @throws IOException */ @Test public void testGetShape() throws IOException { Lane lane = conn.getLaneRepository().getByID("beg_0"); PathIterator it = lane.getShape().getPathIterator(null); assertFalse(it.isDone()); double[] coords = new double[2]; assertEquals(PathIterator.SEG_MOVETO, it.currentSegment(coords)); assertEquals(0, coords[0], DELTA); assertEquals(-1.65, coords[1], DELTA); it.next(); assertEquals(PathIterator.SEG_LINETO, it.currentSegment(coords)); assertEquals(498.55, coords[0], DELTA); assertEquals(-1.65, coords[1], DELTA); it.next(); assertTrue(it.isDone()); }