public Connection[] shortestPath(Point from, Point to) throws RuntimeException{
    //Reset values
    xMin = 70000; xMax = 0; yMin = 70000; yMax = 0;
    //Create Dijkstra
    DijkstraSP dijk = new DijkstraSP(g, from.getID());
    //If there is no path between points
    if(!dijk.hasPathTo(to.getID())) throw new RuntimeException("No path");
    
    //Iterate points on path and get Connection IDs
    DynArray<Integer> cs = new DynArray<Integer>(Integer[].class);
    Iterator<DirectedEdge> it = dijk.pathTo(to.getID()).iterator();
    while(it.hasNext()){
      DirectedEdge edge = it.next();
      cs.add(edge.id());
    }
    
    //Convert IDs to actual connections and return them
    Connection[] path = new Connection[cs.size()];
    int index = 0;
    for(Integer i : cs){
      Connection con = connections[i];
      path[index++] = con;
      
      //Set xMin, xMax, yMin, yMax. These are used for zooming in on route
      double xLow = con.getLeft().getX();
      double xHigh = con.getRight().getX();
      double yLow, yHigh;
      if(con.getY1() < con.getY2()){
        yLow = con.getY1();
        yHigh = con.getY2();
      }else{
        yLow = con.getY2();
        yHigh = con.getY1();
      }
      
      if(xLow  < xMin) xMin = xLow;
      if(yLow  < yMin) yMin = yLow;
      if(xHigh > xMax) xMax = xHigh;
      if(yHigh > yMax) yMax = yHigh;
    }
    return path;
  }