TM Image Import

Mark Gregory mg at soil.agr.okstate.edu
Thu Jan 19 16:43:03 EST 1995



Prakash wrote: 

> I have TM images (all 7 bands eachone in  a seperate file,  a header and  a tailer file) in a hard disk. My problem is how to bring them in grass ? Is there a any way to read these files to grass format ? Thanks in advance for the help.
> 
> Prakash Basnyat


I imagine that there are other ways to accomplish this task, but basically
we simply move each of the individual files (one for each band) into the cell 
sub-directory.  Then within cellhd sub-directory we create an appropriate 
'header' file (one for each cell file).  The six 'regular' bands should all 
have exactly the same information/values within the cellhd file, just different
file names for each band.  The thermal channel may a different values for row 
and columns.  

Below is a copy of a cellhd file for a raw (uncorrected) TM band; note that 
the compressed value is zero (0) meaning no compress and the proj and zone 
values are also zero (0) which indicates raw or uncorrected imagery.  The 
values for the south and east variables match the number of rows and colums 
in the data set.  The number of rows and columns can be taken from the header 
files you mentioned above that are associated with each TM band or file.  
Finally, we run r.support on each 'new GRASS' file.

proj:       0
zone:       0
north:      -0.5
south:      -5965.5
east:       6967.5
west:       0.5
cols:       6967
rows:       5965
e-w resol:  1
n-s resol:  1
format:     0
compressed: 0


Please note, that the above procedure will only work IF the number of rows
multiplied times the number of columns (mentioned in the header file associated
with each TM file on your disk) equals the number of bytes of the TM file as
it resides on your disk system.  So, the TM file (cell file) associated with 
the above cellhd file would occupy 41558155 bytes of space (6967 * 5965 = 
41558155).

If the TM data has already been geo-referenced, then we follow the same pro-
cedures except we fill in the appropriate proj, zone, and e-w and n-s resolution
values; as follows:

proj:       1
zone:       14
north:      3938190
south:      3729240
east:       822840
west:       590790
cols:       7735
rows:       6965
e-w resol:  30
n-s resol:  30
format:     0
compressed: 0



I hope this helps.  Good Luck!


Mark Gregory                             mg at soil.agr.okstate.edu
Oklahoma State University                (405) 744-6417
Stillwater, OK 74078                     (405) 744-5269 (fax)



More information about the grass-user mailing list