2. Make script executable:
chmod a+x create_location.sh
mount /cdrom cd /cdrom ls #check with gdalinfo if the data are detected properly: gdalinfo l71230079_07920030215_hrf.fst # now we use the script, see help text: create_location.sh #launch it: create_location.sh l71230079_07920030215_hrf.fst tuc_lsat #unmount CDROM: cd $HOME umount /cdrom
grass5 /ssi0/ssi/neteler/grassdata/tuc_lsat/PERMANENT #check the coordinates: g.region -p # should display the correct lat/long values: g.region -l g.projinfo #import the missing channels (thermal): r.in.gdal in=l71230079_07920030215_htm.fst out=l71230079_07920030215_htm.fst #you may want to change the CDROM and import the PAN channel: mount /cdrom cd /cdrom ls #import PAN: r.in.gdal in=l71230079_07920030420_hpn.fst out=l71230079_07920030420_hpn.fst cd $HOME umount /cdrom #now we have 6 channels + 2 thermal (low and high gain) + 1 PAN: g.list rast #look and play: d.mon x0 d.rast l71230079_07920030215_hrf.fst.1 # note that r.in.gdal applies d.rgb b=l71230079_07920030215_hrf.fst.1 g=l71230079_07920030215_hrf.fst.2 r=l71230079_07920030215_hrf.fst.3 # to get better RGB colors, we apply a histogram equalized grey color table: r.colors l71230079_07920030215_hrf.fst.1 col=grey.eq r.colors l71230079_07920030215_hrf.fst.2 col=grey.eq r.colors l71230079_07920030215_hrf.fst.3 col=grey.eq d.rgb b=l71230079_07920030215_hrf.fst.1 g=l71230079_07920030215_hrf.fst.2 r=l71230079_07920030215_hrf.fst.3
i.brovey tm2=l71230079_07920030215_hrf.fst.2 tm4=l71230079_07920030215_hrf.fst.4 \ tm5=l71230079_07920030215_hrf.fst.5 etmpan=l71230079_07920030420_hpn.fst out=brov
r.mapcalc "ndvi_20030215=1.0*(l71230079_07920030215_hrf.fst.4 - l71230079_07920030215_hrf.fst.3)/(l71230079_07920030215_hrf.fst.4 \ + l71230079_07920030215_hrf.fst.3)" d.rast.leg ndvi_20030215