--- Start of Idrisi List message
Hi Everyone,
Sorry for taking so long to SUM these responses, but
I've just finally got around to working everything
out. Thanks to Chunling Liu, Jaime Garatuza and
especially Bhat for their information. Everyone gave
my the same solution so I'm only including Bhat's
because it is most detailed.
A summary of my original post is:
"Does anyone know how to separate a .bsq file into 7
bands? I'm very new to working with raster images and
finally just figured out how to open the image in
Idrisi using the PARE module. The .bsq also has a
header file that gives the following info:"
ByteOrder: M
Rows: 4407
Columns: 3080
NBands: 7
NBits: 8
Solution:
"It is possible to convert the BSQ format files. Your
file has a header and the data. You have 4407 rows and
1080 columns and 7 band data. So the file sze without
header should be 95014920 bytes size.
1. Keep a copy of your data, if it is in CD ROM no
problem at all.
Use Pare function of Idrisi(Filemenu>import>genral
conversion tools>pare) and remove the header Header
size = file size-95014920bytes. Here you have to fill
in the number of rows and columns( in output reference
information submenu) as any two numbers that will
multiply to form 95014920 (your data is in 8 bit
unsigned integer)
name the output file as bandall.tmp
Next go to one of the following options- option2 is
easy --> (I used option 2)
Option 1
Use any DOS binary editing programme to cut the file
in to 7 equal pieces. Each file should have a size of
bytes. There were programmes by Norton which does this
job easily. Cut off each piece with the size mentioned
above and save it as images.namely band1. img
band2.img etc.
Option2
Use Pare again on *.tmp you have got by now as output
from the first paring,
give header size as 0
give the row 4407 and column 3080 give output file
name as band1
Idrisi will give a saying the file size greater than
required etc etc
ask to continue
Now you have band1 separated as band1.rdt and
band1.rst files
Next repeat the same procedure but give the header
size as 13573560 bytes. You get band2. Repeat the
procedures but use the header sizes as multiples of
13573560 until you get all 7 bands. If you have not
understood please feel free to get back to me
You are basically doing following things:
First step - cutting out the header and saving the
rest of the file as bandall.tmp. Bandall tmp will have
95014920 bytes only. Which is equal to 4047*3080* 7
bands of data
Second and subsequent steps you are cutting off 7
equal pieces of data as band1...7. First cut has the
first of 13573560 bytes and second file has from
13573561 to 27147120 bytes ( of the bandall.tmp file)
and so on. Each of the files will have same size
Regards
Bhat
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
--- 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/.