[GRASS-user] why is landcover class being lost on classification

Can anybody tell me why the classification I so carefully preserve on v.to.rast from my training data does not reflect on my classification?

When I query my vector training data I get:
v.what --v -a map=traintest210912a@3420 east_north=-80606.881455,-3785043.808541 distance=388.789822

East: -80606.881455

North: -3785043.808541

Map: traintest210912a

Mapset: 3420

Type: Area

Sq Meters: 6133078.387

Hectares: 613.308

Acres: 1515.517

Sq Miles: 2.3680

Layer: 1

Category: 1

Driver: dbf

Database: /home/tms/LC_NGIqxx/LO21/3420/dbf/

Table: traintest210912a

Key column: cat

cat : 1

cat_ : 12

label : shrubs and bushes

rgb : 38: 181: 113

Building spatial index...

(Thu Sep 27 14:29:00 2012) Command finished (0 sec)

When I convert this to raster ensuring ‘cat_’ remains the key column and I query the resulting raster I get:

r.what --v -f input=trainteset1_rast@3420 east_north=-80568.002473,-3785121.566505

-80568.002473|-3785121.566505||12|

(Thu Sep 27 14:30:58 2012) Command finished (0 sec)

And when I query the classification after running i.gensig and i.maxlik, I get:

r.what --v -f input=sclasstest1@3420 east_north=-80412.486544,-3783994.076020

-80412.486544|-3783994.076020||1|

(Thu Sep 27 14:31:57 2012) Command finished (0 sec)

Which means I am now forced to repeat myself and run recode or reclass, after going to the hassle of setting the classification codes for a supervised classificaton in the begining.
It would make sense to me if I had run i.class (as per the older documentation I have found that doesn’t include i.gensig), but not with a training map.

Is there maybe a background setting I haven’t found yet that I need to set? Or is this how it is supposed to run? In which case, is there a technical reason for this that I am missing?

Thank you
Sam

On 27/09/12 14:49, Samantha Goodchild-Brown wrote:

  Can anybody tell me why the classification I so carefully preserve on
v.to.rast from my training data does not reflect on my classification?

This is the way i.gensig/i.maxlik works. I agree that it is not ideal. You could file an enhancement wish in the bug tracker.

i.gensigset/i.smap conserves the category values you provide.

Moritz