public ResultDataWithGPS gps() {
        //Consulta gps
        ArrayList paths = new ArrayList<>();
        ArrayList names = new ArrayList<>();
        ArrayList latitudes = new ArrayList<>();
        ArrayList longitudes = new ArrayList<>();
        ArrayList latref = new ArrayList<>();
        ArrayList lonref = new ArrayList<>();
        MongoHandler dbmon = new MongoHandler();
        DB dbmongo = dbmon.connect();
        DBCursor cursorDoc;
        Integer cont = 0;
        Integer pos = 0;
        ResultDataWithGPS res = null;

        DBCollection collection = dbmongo.getCollection("GPSFotos");
        // BasicDBObject query = new BasicDBObject("GPS_VALUE",true);
        cursorDoc = collection.find();

        try {
            while (cursorDoc.hasNext()) {

                pos = cont % 4;

                switch (pos) {
                    case 0:
                        //GPS_VALUE                           
                        latitudes.add((cursorDoc.next().get("GPS_VALUE")));
                        
                        break;

                    case 1:
                        latref.add((cursorDoc.next().get("GPS_VALUE")));
                        
                        break;

                    case 2:
                        longitudes.add((cursorDoc.next().get("GPS_VALUE")));
                        
                        break;

                    case 3:
                        lonref.add((cursorDoc.next().get("GPS_VALUE")));
                        
                        break;
                }

                if ((cont != 0) && (pos == 0)) {
                    paths.add((cursorDoc.curr().get("IMG_PATH")));
                    names.add((cursorDoc.curr().get("IMG_NAME")) + "." + (cursorDoc.curr().get("EXTENSION")));
                }
                cont++;
            }
            res = new ResultDataWithGPS(paths, names, latitudes, longitudes, latref, lonref);             

        } finally {
            cursorDoc.close();
        }
        return res;
    }