private static Point2D getLastPointOfALane(Lane lane) throws IOException { Path2D shape = lane.queryReadShape().get(); PathIterator it = shape.getPathIterator(null); double[] coords = new double[6]; while (!it.isDone()) { it.currentSegment(coords); it.next(); } Point2D lastPoint = new Point2D.Double(coords[0], coords[1]); return lastPoint; }