Landsat Images on CD

Angus Carr apcarr at FLASH.LakeheadU.CA
Wed Mar 19 23:13:51 EST 1997


If the files are simple x,y rasters (no header, just the pixels) and you
know the dimensions, then you can create a dummy header easily enough, and
then replace it's associated cell file. It's cheesy, but it works quickly.

So: assuming 1500x1000 raster file

g.region res=1 north=1500 south=1 west=1 east=1000  ; to set up for it...
r.mapcalc "dummy=1"                                 ; make the dummy file
r.compress dummy                                    ; uncompress it- I
                                                    ; forgot a switch...
cp /cdrom/band1 $location/$mapset/cell/band1        ; copy in the band
cp $location/$mapset/cellhd/dummy $location/$mapset/cellhd/band1
                                                    ; copy over the header
                                                    ; for it.
Et voila!
You may want to recompress the files, of course, and also get rid of
dummy, but this does work...

Good Luck.
Angus Carr
Masters of Forestry student

On Wed, 19 Mar 1997, Shawn Francis wrote:

> GRASSUSERS:
> 
>         I have a complete landsat TM scene on CD-ROM.  The seven individual
> bands are saved as 7 separate files.  What would be the best way to go about
> importing this data into GRASS.  I can open the images in PCI Image Handler
> (unregistered, of course) and look at them but need to do some simple
> vegetation classification.
> 
>         Could I do a screen dump of each individual file and then pull them
> into GRASS in that way (r.in.tiff of such?)
> 
>         The i.tape. suite of import commands all work from /dev/rmt0 (tape
> device).  Can this problem be overcome (ie, can you specify that you want
> the info from /dev/sd0 (cd-rom)).
> 
>         Any advice is appreciated, many thanks in advance.
> 
> Shawn Francis, M.Sc.
> Forest Ecologist
> 
> Applied Ecosystem Management
> 100-114 Galena Road
> Whitehorse, Yukon  Y1A 2W6
> tel/fax (403) 393-3793
> aem at yknet.yk.ca
> 
> 



More information about the grass-user mailing list