It is possible to obtain the non imm retirement visa while you are in Thailand and holding a tourist visa. Please noted that the 30 permit you recieve on arrival at the airport is not tourist visa . To obtain the tourist visa, you need to apply it from Royal Thai Embassy on your home land prior to arrival. So, do not get confused, and setting things right from the start are the key here.
The process can be concluded as the followings;
Tourist Visa --> Non Imm O 3 month period --> Retirement Non Imm O 1 year period
From the process described above, we will assume that you are now holding the valid tourist visa, and wish to convert your visa to the retirement type (of course, you, and , or, your spouse must be 50 or older, and you must have at least 21 days remaining on your tourist visa when applied for the coversion to the Non Imm O.
Now to do the first conversion, you can do this at the Suan Phu immigration bureau, 507 Soi Saun Plu, Sathorn Tai Rd., Bangkok, most taxi will know it, if not call talkinthai to let them translate it to the driver. You can also do it at other immigration office outside Bangkok. The catch is this. Immigration Office is not a bank. You can not wondering around submitting paper at one branch, and tommorrow, go to another immigrattion office, and submmiting another paper. It's just not work that way (Though you wish it should). So, throughout the whole process you will be stuch with one immigration office where you first choose to file the document. So, make sure that you don't piss anybody in the immigration office off the first day you file the paper because you will most certainly go through all sources of trouble while converting your visa to Non Imm O.
Now that we know where to go, Let prep for the conversion application!
First, your passport must have at least 18 months of validity remaining, and must contain TM6 form, the white paper attached to a page of your passport with the staple which you obtain upon your arrival. Submit photocopies of your passport + your tourist visa page + TM6 and sign each copy with blue ink