public void run() {

		DbConnection dbConn = new DbConnection();
		Connection conn = dbConn.getConnection();
		try {
			while (true) {
				DataQuery sqlQuery = ThreadStorage.pollSqlQueries();
				if (sqlQuery == null && ThreadStorage.isEndQueries()) {
					break;
				} else if (sqlQuery != null) {

					Statement stmt = conn.createStatement();
					ResultSet results = stmt.executeQuery(sqlQuery
							.getStatement());
					processTile(results, sqlQuery.getLat(), sqlQuery.getLon());
					results = null;
					stmt.close();
				}
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} finally {
			try {
				dbConn.closeConnection(conn);
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}