--- Start of Idrisi List message Thanks for help from Michael Brower, Larry Lass, Marien de Bakker, Viborg Amt. It's very helpful. And below is my original message and the summary of the responses I got. Original message: > Hi all, > > I have a question regarding reading IDRISI .img files. I want to read .img > files with my own code--I am using Visual Basic. I tried to open my .img > file with Notepad, but it's not illegible at all. How can I convert .img > file into an ASCII format that is easily readible with by own code? For > instance, it shows cell location and/or attribute as a list: 1 2 > 3 4 5 etc. Responses: >From Michael Brower: Use the Idrisi command Reformat - Convert, and select the Ascii format for the output file. Make sure you choose the correct data type -- integer or real. If you are in doubt use real. However it should not be necessary to convert to ascii to read the files in Visual Basic. Open the file in binary mode, but make sure you use the same data type and length (in bytes) for your variable as is stored in the Idrisi file. Michael Brower >From Larry Lass: Use convert command in idrisi and select ASCII and integer. You should also be able to read the file as hex in visual basic. In both cases you will need to treat the data as if it was in an array of rows and columns based on the header file data. >From Marien de Bakker: You can use convert in idrisi and use the ascii option. >From Viborg Amt: try to look at www.inovagis.org using this component is a lot easier than writing the code yourself another way around is the old IDRISI2 ascii format (requires file conversion) and yet another is export to the ascii grid ---wei --- End of Idrisi List message IDRISI-L is an unmoderated list. As a service to list users, please post a summary of useful responses to your questions. To post a message to IDRISI-L, send it to [EMAIL PROTECTED] To subscribe to the list, send an email from the address to be subscribed to [EMAIL PROTECTED] with "subscribe" (without quotes) as the first line of the message body. To unsubscribe, do the same, only with "unsubscribe" as the first line of the message body. The list is archived at http://www.mail-archive.com/idrisi-l%40clarklabs.org/.
