[GRASS-user] Problem creating signature file with i.gensig in

Hi, this is my first message to the list. I’m using Grass 6.4.3 under Linuxmint 16.

I’m trying to make a supervised classification.

After digitizing the training areas, I transformed them from vector to raster. Then I’ve done the following:

g.region rast=train_area_2013_03_05_raster@PERMANENT,2013_03_05_toar4@PERMANENT

then

i.group group=group subgroup=sub_group input=2013_03_05_toar4@PERMANENT,2013_03_05_toar5@PERMANENT,2013_03_05_toar3@PERMANENT

and

i.gensig trainingmap=train_area_2013_03_05_raster@PERMANENT group=group@PERMANENT subgroup=sub_group signaturefile=superv_class

but the resulting signature file, only contains one character: “#”.

The output of i.gensig in the console is the following:

*Finding training classes... 3 classes found Calculating class means... Calculating class covariance matrices... Signature 1 not invertible Signature 2 not invertible Signature 3 not invertible i.gensig complete.* 

If I try: i.maxlik group=group@PERMANENT subgroup=sub_group sigfile=superv_class class=results_class

I obtain the following error message:

ERROR: Unable to read signature file <superv_class>

I’ve been searching, but I couldn’t find the solution.

I’ve tried this: http://gis.stackexchange.com/questions/11933/problem-running-i-gensigset-in-grass-any-ideas[](http://gis.stackexchange.com/questions/11933/problem-running-i-gensigset-in-grass-any-ideas)

And read this: http://gis.stackexchange.com/questions/41418/i-maxlik-cannot-read-i-class-output-signature-file

But here, there’s no solution suggested. As in this case, I also used i.cluster to generate an unsupervised signature file and i.maxlik reads this perfectly well.

Here: http://lists.osgeo.org/pipermail/grass-user/2010-April/055821.html

there’s another similar question, but the only answer says: “I suspect that either the training areas are suboptimal or are too small.” What does suboptimal means? What is an optimal training area? How big should they be?

I have 30 areas, 10 for each class. They aren’t too big because I have a small site to clasify.

What does "*Signature X not invertible*" means? Is this the real problem?

Any idea? Thanks for your help!

Lucas.

On 02/07/14 16:01, lbianchi wrote:

Hi, this is my first message to the list. I'm using Grass 6.4.3 under
Linuxmint 16.

I'm trying to make a supervised classification.

After digitizing the training areas, I transformed them from vector to
raster. Then I've done the following:

/|g.region
rast=train_area_2013_03_05_raster@PERMANENT,2013_03_05_toar4@PERMANENT|/

I would just use the image as your reference for the region, not the training areas.

Also, what was the region setting when you converted your training areas to raster ?

Try first setting your region to the satellite image, i.e.

g.region rast=2013_03_05_toar4@PERMANENT

Then v.to.rast of the training areas, then i.gensig.

You can also use i.class in 6.4.3 (with x-monitor), or g.gui.iclass in the wxgui in grass7 to check your classes.

Here: http://lists.osgeo.org/pipermail/grass-user/2010-April/055821.html

  there's another similar question, but the only answer says: "I suspect
that either the training areas are suboptimal or are too small." What
does suboptimal means? What is an optimal training area? How big should
they be?

I have 30 areas, 10 for each class. They aren't too big because I have a
small site to clasify.

Maybe they are too small ?

What does |"/Signature X not invertible/"| means? Is this the real problem?

Yes. And it's linked to the notion of "suboptimal" training areas.

Training areas should be big enough to contain a significant number of pixels (i.e. do not use training areas that are only 5 pixels), but small enough to be homogeneous.

Moritz