public List<Double> caculeRoute(int start, int end, int route) {

        List<Double> routeCalculete = new ArrayList<Double>();
        List<Double> ruta = rutas.get(route).getPoints();

        int pointStart = 0;
        int pointEnd = 0;

        double latitudeStart = estacionModels.get(start).getLatitude();
        double longitudeStart = estacionModels.get(start).getLongitude();
        double latitudeEnd = estacionModels.get(end).getLatitude();
        double longitudeEnd = estacionModels.get(end).getLongitude();

        double distanceStart = calculeDistance(latitudeStart, longitudeStart, ruta.get(0), ruta.get(1));
        double distanceEnd = calculeDistance(latitudeEnd, longitudeEnd, ruta.get(0), ruta.get(1));

        double distance;

        List<Double> auxList;

        for (int i = 2; i < ruta.size(); i += 2) {

            distance = calculeDistance(latitudeStart, longitudeStart, ruta.get(i), ruta.get(i + 1));

            if (distance < distanceStart) {
                distanceStart = distance;
                pointStart = i;
            }

            distance = calculeDistance(latitudeEnd, longitudeEnd, ruta.get(i), ruta.get(i + 1));

            if (distance < distanceEnd) {
                distanceEnd = distance;
                pointEnd = i;
            }
        }

        System.out.println(pointStart + "," + pointEnd);

        if (pointStart < pointEnd) {

            if (pointEnd - pointStart < ruta.size() - 2 - pointEnd + pointStart) {
                routeCalculete = subList(route, pointStart, pointEnd + 2);


            } else {
                routeCalculete.addAll(reverseList(subList(route, pointEnd, ruta.size())));
                routeCalculete.addAll(reverseList(subList(route, 0, pointStart + 2)));
                int aux = pointStart;
                pointStart = pointEnd;
                pointEnd = aux;
            }
        } else {
            if (pointStart - pointEnd < ruta.size() - 2 - pointStart + pointEnd) {
                routeCalculete = reverseList(subList(route, pointEnd, pointStart + 2));
                int aux = pointStart;
                pointStart = pointEnd;
                pointEnd = aux;
            } else {
                routeCalculete.addAll(subList(route, pointStart, ruta.size()));
                routeCalculete.addAll(subList(route, 0, pointEnd + 2));
            }

        }

//        System.out.println("route 1:" + routeCalculete.toString());


        auxList = nearPoint(latitudeStart, longitudeStart, pointStart, route);
//        System.out.println("Aux 1:" + auxList.toString());

        if (routeCalculete.size() > 2 && calculateAngle(routeCalculete.get(0), routeCalculete.get(1),
                routeCalculete.get(2), routeCalculete.get(3), auxList.get(0), auxList.get(1))) {

            routeCalculete.remove(0);
            routeCalculete.remove(0);
        }

        routeCalculete.addAll(0, auxList);


//        System.out.println("route 2:" + routeCalculete.toString());

        auxList = nearPoint(latitudeEnd, longitudeEnd, pointEnd, route);
//        System.out.println("Aux 2:" + auxList.toString());

        if (calculateAngle(routeCalculete.get(routeCalculete.size() - 2), routeCalculete.get(routeCalculete.size() - 1),
                routeCalculete.get(routeCalculete.size() - 4), routeCalculete.get(routeCalculete.size() - 3), auxList.get(0), auxList.get(1))) {

            routeCalculete.remove(routeCalculete.size() - 1);
            routeCalculete.remove(routeCalculete.size() - 1);
        }

        routeCalculete.addAll(routeCalculete.size(), auxList);


        return routeCalculete;
    }