2

I'm trying to carry out Tasseled Cap Transformations in GRASS GIS. I have a Landsat 8 image with bands 2-7 that are needed for the calculation. I have imported the bands into GRASS and attempted to carry out the calculation but when I do, it outputs an image size of 1x1. I have checked all of the input bands and they are all 8202 x 8113 (rows x columns).

The screenshot below is the output of r.info on the output file. I think it is doing the calculation on the whole map rather than on a pixel by pixel basis, but I've no idea why. Does anyone know how to fix this?

I'm using Fedora 27 and GRASS GIS 7.2.2. I've checked online but no one else seems to be having the same problem.

r.in.gdal input=LC08_L1TP_208023_20170408_20170414_01_T1_B2_2157.TIF output=B2

r.in.gdal input=LC08_L1TP_208023_20170408_20170414_01_T1_B3_2157.TIF output=B3

r.in.gdal input=LC08_L1TP_208023_20170408_20170414_01_T1_B4_2157.TIF output=B4

r.in.gdal input=LC08_L1TP_208023_20170408_20170414_01_T1_B5_2157.TIF output=B5

r.in.gdal input=LC08_L1TP_208023_20170408_20170414_01_T1_B6_2157.TIF output=B6

r.in.gdal input=LC08_L1TP_208023_20170408_20170414_01_T1_B7_2157.TIF output=B7

i.tasscap sensor=landsat8_oli input=B2,B3,B4,B5,B6,B7 output=tct_test

enter image description here

3

It looks like you have not set the GRASS region correctly. After importing your data, you need to set the region to the extent and resolution of one of your bands, e.g.:

g.region rast=B2

and then try to run the process again.

You can check that the region settings are correct by:

g.region -p 

and you should find that they are consistent with the output of:

gdalinfo LC08_L1TP_208023_20170408_20170414_01_T1_B2_2157.TIF

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.